CN112104746A - Session management method, device and storage medium - Google Patents

Session management method, device and storage medium Download PDF

Info

Publication number
CN112104746A
CN112104746A CN202011036410.3A CN202011036410A CN112104746A CN 112104746 A CN112104746 A CN 112104746A CN 202011036410 A CN202011036410 A CN 202011036410A CN 112104746 A CN112104746 A CN 112104746A
Authority
CN
China
Prior art keywords
session
reminder
kth
keeping
level
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.)
Granted
Application number
CN202011036410.3A
Other languages
Chinese (zh)
Other versions
CN112104746B (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.)
Ruishi Suzhou Video Technology Co Ltd
Suzhou Keda Technology Co Ltd
Original Assignee
Ruishi Suzhou Video Technology Co Ltd
Suzhou Keda Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ruishi Suzhou Video Technology Co Ltd, Suzhou Keda Technology Co Ltd filed Critical Ruishi Suzhou Video Technology Co Ltd
Priority to CN202011036410.3A priority Critical patent/CN112104746B/en
Publication of CN112104746A publication Critical patent/CN112104746A/en
Application granted granted Critical
Publication of CN112104746B publication Critical patent/CN112104746B/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/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • 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/142Managing session states for stateless protocols; Signalling session states; State transitions; Keeping-state mechanisms
    • 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)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application relates to a session management method, a session management device and a storage medium, which belong to the technical field of computers, and the method comprises the following steps: after the login of the server is successful, displaying session data through a display page corresponding to the current session; monitoring user operation executed by a user; outputting a session maintenance reminder based on a monitoring result of the user operation; before the time length of user operation is not monitored to reach the effective holding time length, if the session holding operation is monitored, the output of session holding reminding is stopped, and a server is triggered to update the session state of the current session; whether the user browses the displayed page or not can be determined through the session maintenance reminding before the current session is invalid, the session effectiveness is continuously maintained when the user browses the displayed page, the situation that the client logs in the server again is avoided, and the efficiency of the client accessing the server is improved. The client does not need to send a client request to the server at regular time to keep the validity of the current session, and bandwidth resources are saved.

Description

Session management method, device and storage medium
Technical Field
The application relates to a session management method, a session management device and a storage medium, and belongs to the technical field of computers.
Background
Typically, a client supports connection to a server (or web-side) via the HTTP protocol. When the client accesses the server, the server creates a session of the client to store session data generated in the session process, such as: monitoring data, requesting data, etc.
The server side usually needs to manage the created session, and the existing session management mechanisms include: after the client successfully logs in the server, the server creates a session (session) corresponding to the client to store session data, wherein the session has effective holding duration; if the client sends a request within the effective holding duration of the session, the server side continues to hold the session; in the effective keeping duration of the session, if the client does not send a request, the server deletes the session; after the session is deleted, if the client sends a request to the server again, the server returns a login page so that the client logs in the server again.
However, if the user browses a page that does not interact with the server, such as a long article, at this time, the client does not send a request to the server within the valid holding duration, which may cause the session to fail. If the user triggers the client to send a request to the server again, at this time, the server feeds back a user login page so that the client logs in the server again, and the user needs to input login information again, so that the access efficiency of the server is reduced.
Disclosure of Invention
The application provides a session management method, a session management device and a session management storage medium, which can solve the problem that when a server manages a session based on uniform effective holding time, a user actually browses a display page but the current session is invalid because whether the user actually browses the display page by using a client cannot be determined.
The application provides the following technical scheme:
in a first aspect, a session management method is provided, where the method includes:
after the login of the server is successful, displaying session data through a display page corresponding to the current session; the current session is created by the server and has an effective holding time length; the effective holding duration refers to the maximum duration for holding the current session to be effective by the server when the client request is not received continuously;
monitoring user operation;
outputting a session keeping reminder based on the monitoring result of the user operation, wherein the session keeping reminder is used for reminding the user to execute session keeping operation, and the session keeping operation is one of the user operations;
and before the duration of the user operation is not monitored to reach the effective holding duration, if the session holding operation is monitored, stopping outputting the session holding prompt and triggering the server to update the session state of the current session.
Optionally, the outputting a session maintenance reminder based on the monitoring result of the user operation includes:
when the time length of the user operation reaches the reminding time length, outputting the conversation keeping reminding; the reminding duration is less than the effective holding duration;
alternatively, the first and second electrodes may be,
and when the user operation is monitored and indicates to output the conversation keeping reminder, outputting the conversation keeping reminder.
Optionally, the outputting the session keep alert includes:
covering a session protection layer above the display page;
outputting the session hold reminder through the session protection layer.
Optionally, the session maintenance reminder includes n-level session maintenance reminders, the session maintenance operation is a session maintenance operation corresponding to any one of the level session maintenance reminders, and n is a positive integer; the outputting the session keep alert through the session protection layer includes:
outputting a kth-level session keep reminder through the session protection layer, wherein the value of k is initialized to 1;
monitoring the kth level session keeping operation corresponding to the kth level session keeping reminder within the kth level monitoring duration corresponding to the kth level session keeping reminder;
and when the kth-level session holding operation is not monitored in the kth-level monitoring duration, updating the value of k to k +1, and executing the step of outputting the kth-level session holding reminder through the session protection layer again until the value of k is n or stopping outputting the session holding reminder when the kth-level session holding operation is monitored in the kth-level monitoring duration.
Optionally, the outputting, by the session protection layer, the kth level session keep alert includes:
outputting the kth level session hold alert through a color gradient display of the session protection layer.
Optionally, the monitoring a kth session holding operation corresponding to the kth session holding reminder within a kth monitoring duration corresponding to the kth session holding reminder includes:
if the user operation is monitored in a kth monitoring duration corresponding to the kth-level session holding prompt, determining that the kth-level session holding operation is monitored;
and if the user operation is not monitored, determining that the k-th-level session holding operation is not monitored.
Optionally, the outputting, by the session protection layer, the kth level session keep alert includes:
displaying an authentication window on the session protection layer to output the kth level session hold alert.
Optionally, the monitoring a kth session holding operation corresponding to the kth session holding reminder within a kth monitoring duration corresponding to the kth session holding reminder includes:
if the user operation acting on the identity authentication window is monitored within a kth monitoring duration corresponding to the kth-level session holding reminder, determining whether first login information indicated by the user operation is matched with second login information indicated by the kth-level session holding operation;
if the first login information is matched with the second login information, determining to monitor the k-th-level session holding operation;
and if the first login information does not match the second login information, determining that the kth-level session holding operation is not monitored.
Optionally, the number of the display pages corresponding to the current session is multiple;
the covering of the session protection layer above the display page comprises:
covering the session protection layer above each display page in a plurality of display pages respectively;
the stopping of the output of the session hold reminder includes:
stopping outputting the session hold reminder through the session protection layer on the plurality of display pages.
Optionally, the session data is data that changes with time, and the displaying the session data through a display page corresponding to the current session includes:
displaying the conversation data in real time through the display page during the period from the time when the conversation keeping reminder is output to the time when the conversation keeping reminder is stopped being output;
alternatively, the first and second electrodes may be,
when the conversation keeping reminder is output, displaying the conversation data corresponding to the first moment through the display page; displaying the conversation data after the first moment through the display page when the output of the conversation keeping reminder is stopped; the first moment is the moment when the conversation keeping reminding is output;
alternatively, the first and second electrodes may be,
when the conversation keeping reminder is output, displaying the conversation data corresponding to the first moment through the display page; when the conversation keeping reminding is stopped being output, displaying the conversation data after the second moment through the display page; the second moment is the moment when the session keeping reminding is stopped being output.
Optionally, the method further comprises:
when the time length of the user operation is not monitored to reach the effective holding time length, stopping displaying the session data on the display page;
and if the user operation is monitored again, sending an access request to the server and displaying a login page returned by the server so as to log in the server again.
In a second aspect, there is provided a session management apparatus, the apparatus comprising a processor and a memory; the memory stores therein a program that is loaded and executed by the processor to implement the session management method of the first aspect.
In a third aspect, a computer-readable storage medium is provided, in which a program is stored, the program being loaded and executed by the processor to implement the session management method of the first aspect.
The beneficial effect of this application lies in: after the login of the server is successful, displaying session data on a display page corresponding to the current session, and monitoring user operation executed by a user; outputting a conversation keeping reminder based on the monitoring result of the user operation, wherein the conversation keeping reminder is used for reminding the user to execute conversation keeping operation, and the conversation keeping operation is one of the user operations; before the time length of user operation is not monitored to reach the effective holding time length, if the session holding operation is monitored, the output of session holding reminding is stopped, and a server is triggered to update the session state of the current session; the problem that when the server manages the session based on the uniform effective holding time, the user actually browses the displayed page but the current session is invalid because whether the user actually browses the displayed page by using the client cannot be determined; before the current session is invalid, the output session keeping prompt reminds the user to input session keeping operation so as to determine whether the user browses the displayed page, and the validity of the session is continuously kept when the user browses the displayed page is determined, at the moment, the client does not need to log in the server again, and the efficiency of the client accessing the server is improved. Meanwhile, the client does not need to send a client request to the server in a timing manner to keep the validity of the current session, and bandwidth resources are saved.
In addition, the user actively calls the session to keep reminding, so that the user can keep the historical access record in the short leaving process, and simultaneously, the safety of the webpage is ensured without exiting.
In addition, whether the user leaves can be automatically detected by automatically outputting the session keeping reminding, and the safety of the webpage after the user leaves is ensured.
In addition, the conversation keeping reminding is output by covering the conversation protection layer above the display page, so that a user who browses the display page can be ensured to perceive the conversation keeping reminding, and the effectiveness of the conversation keeping reminding is ensured.
In addition, by outputting the multi-level conversation keeping reminding, whether the user browses the display page or not can be determined more accurately, and the accuracy of the determination result is ensured.
In addition, the conversation keeping reminding is output in a color gradient display mode, so that the effect of watching a display page by a user can be influenced, and the effectiveness of the conversation keeping reminding is ensured.
In addition, any user operation performed by the user is determined as the session maintaining operation, so that the difficulty of inputting the session maintaining operation by the user can be reduced, and the input efficiency of the session maintaining operation can be improved.
In addition, the session maintenance reminding is output by displaying the authentication window on the session protection layer, and the first login information of the user operation indication acting on the authentication window is verified, so that whether the user browsing the display page currently is an illegal user can be determined, and the security of the session data displayed on the display page is improved.
In addition, by ensuring that a plurality of display pages corresponding to the same current session update session maintenance reminding synchronously, the user is prevented from executing a plurality of session maintenance operations, and the session maintenance efficiency is improved.
The foregoing description is only an overview of the technical solutions of the present application, and in order to make the technical solutions of the present application more clear and clear, and to implement the technical solutions according to the content of the description, the following detailed description is made with reference to the preferred embodiments of the present application and the accompanying drawings.
Drawings
FIG. 1 is a flow chart of a session management method provided by an embodiment of the present application;
fig. 2 is a flowchart of a session management method according to another embodiment of the present application;
FIG. 3 is a schematic illustration of session management provided by one embodiment of the present application;
fig. 4 is a block diagram of a session management apparatus according to an embodiment of the present application;
fig. 5 is a block diagram of a session management apparatus according to an embodiment of the present application.
Detailed Description
The following detailed description of embodiments of the present application will be described in conjunction with the accompanying drawings and examples. The following examples are intended to illustrate the present application but are not intended to limit the scope of the present application.
Optionally, the implementation subject of each embodiment is taken as an example of an electronic device, where a client runs in the electronic device, the client (e.g., a browser) supports logging in a server (e.g., a website (web) server), and the electronic device may be a computer, a mobile phone, a tablet computer, a wearable device, and the like, and the embodiment does not limit the device type of the electronic device.
Fig. 1 is a flowchart of a session management method according to an embodiment of the present application. The method at least comprises the following steps:
step 101, after logging in the server successfully, displaying the session data through a display page corresponding to the current session.
The current session is created by the server and has effective holding duration; the valid duration refers to the maximum duration for which the server keeps the current session valid when the client request is not received continuously. Optionally, the valid holding duration may be set by the server and sent to the client for storage by the server; or, the user sets the valid holding time length in the client, and the present embodiment does not limit the setting manner of the valid holding time length.
Illustratively, the process of the client logging in the server includes: the client sends an access request to the server; after receiving the access request, the server returns a login page to the client; the client displays a login page; the client receives login information input by a user on a login page and sends the login information to the server; after receiving the login information, the server establishes a current session corresponding to the client if the login information passes the authentication, and sends a session identifier of the current session and request content of the client to the client; the client receives the session identifier and displays session data on a display page, such as: the request content of the client. And then, the client requests sent by the client to the server all carry the session identification of the current session, and the server updates the session state of the current session when receiving the client requests.
Wherein, updating the session state of the current session means: and restarting timing for the time length corresponding to the current session and not receiving the client request, and keeping the validity of the current session.
Optionally, the number of the display pages corresponding to the current session is one or more. When the display pages are multiple, the multiple display pages may be displayed through different tab pages in the same client, or displayed through different clients, and the display manner of the multiple display pages is not limited in this embodiment.
Step 102, monitoring user operations performed by a user.
Alternatively, the user operation may be received based on a touch screen; alternatively, it may be based on an external device, such as: the execution mode of the user operation is not limited in this embodiment, which is received by the mouse, the keyboard, and the like.
And 103, outputting a session maintenance reminder based on the monitoring result of the user operation, wherein the session maintenance reminder is used for reminding the user to execute session maintenance operation, and the session maintenance operation is one of the user operations.
In this embodiment, the output of the session maintenance reminder is intended to confirm whether the user has left or is still browsing the page.
The monitoring result of the user operation comprises the following steps: whether a user operation is monitored, and a type of the user operation when the user operation is monitored.
Optionally, the manner of outputting the session maintenance reminder based on the monitoring result of the user operation includes, but is not limited to, the following:
the first method comprises the following steps: and when the time length of the user operation reaches the reminding time length which is not monitored, outputting a conversation keeping reminding, wherein the reminding time length is less than the effective keeping time length.
The reminding duration is less than the effective holding duration, so that the user can be reminded to execute the session holding operation before the current session is invalid, and the server is triggered to hold the current session. In other words, the current session is active for the duration of the reminder.
And the second method comprises the following steps: and when the user operation is monitored and indicates to output the conversation keeping reminder, outputting the conversation keeping reminder.
Optionally, a reminding output control is arranged on the display page; and when receiving the user operation acting on the reminding output control, determining that the user operation indicates to output the conversation keeping reminding, and at the moment, outputting the conversation keeping reminding based on the user operation.
In other embodiments, the reminder output control may also be an entity button disposed on the electronic device, or the reminder output control may also be a virtual control displayed at another position, and this embodiment does not limit the implementation manner of the reminder output control.
Optionally, outputting the session hold reminder comprises: covering a session protection layer above the display page; outputting the session hold reminder through the session protection layer. In other embodiments, the conversation-on-hold reminder may also be output in an audio form, and this embodiment does not limit the output mode of the conversation-on-hold reminder.
In one example, the session maintenance reminder includes n levels of session maintenance reminders, at this time, the session maintenance operation includes a session maintenance operation corresponding to any one level of session maintenance reminder, and n is a positive integer. Accordingly, outputting the session keep alert through the session protection layer includes: outputting a kth level session keep alert through a session protection layer; monitoring the kth level session holding operation corresponding to the kth level session holding reminder within the kth level monitoring duration corresponding to the kth level session holding reminder; and when the kth-level session maintaining operation is not monitored in the kth-level monitoring duration, updating the value of k to be k +1, and executing the step of outputting the kth-level session maintaining reminding again through the session protection layer until the value of k is n or stopping outputting the session maintaining reminding when the kth-level session maintaining operation is monitored in the kth-level monitoring duration. Where the value of k is initialized to 1.
Optionally, when displaying the (k + 1) th level session keep-alive reminder, the (k + 1) th level session keep-alive reminder stops being displayed. In this embodiment, the manner of stopping displaying the session keeping reminder may be to remove the session protection layer.
Optionally, the monitoring durations of different levels are the same or different, and the sum of the monitoring duration of the n level and the reminding duration is less than or equal to the effective holding duration of the current session. The n-level monitoring time length is set by a user; or the default setting of the client is adopted, and the value and the setting mode of each level of monitoring duration are not limited in the embodiment. Such as: and n is 2, the first-stage monitoring time length is 10s, and the second-stage monitoring time length is 30 s.
Optionally, the implementation manners of the session holding reminder at different levels are the same or different, the following two implementation manners are provided in this embodiment, and in actual implementation, the implementation manner of the session holding reminder may also be other manners, and this embodiment is not listed here one by one:
a first implementation, outputting a kth level session keep alert through a session protection layer, includes: outputting a kth level session hold alert through a color gradient display of the session protection layer.
At this time, monitoring the kth level session holding operation corresponding to the kth level session holding reminder within the kth level monitoring duration corresponding to the kth level session holding reminder includes: if the user operation is monitored in the kth monitoring duration corresponding to the kth session keeping reminder, determining that the kth session keeping operation is monitored; and if the user operation is not monitored, determining that the kth-level session holding operation is not monitored.
The color gradient display may be a display of a certain color from light to dark, or a switching display of different colors, and the present embodiment does not limit the color gradient display manner. In one implementation, the session protection layer is initialized to be semi-transparent, and the transparency of the session protection layer is continuously reduced over time to achieve a light-to-dark color display.
A second implementation manner, outputting a kth level session keep alert through a session protection layer, includes: an authentication window is displayed on the session protection layer to output a level k session hold alert.
At this time, the client stores the correct login information of the user (i.e., the second login information hereinafter). Monitoring a kth level session holding operation corresponding to the kth level session holding reminder within a kth level monitoring duration corresponding to the kth level session holding reminder, comprising: if the user operation acting on the identity authentication window is monitored in the kth monitoring duration corresponding to the kth-level session holding prompt, determining whether first login information indicated by the user operation is matched with second login information indicated by the kth-level session holding operation; if the first login information is matched with the second login information, determining that the kth-level session holding operation is monitored; and if the first login information does not match with the second login information, determining that the k-th-level session holding operation is not monitored.
Optionally, the first login information indicated by the user operation may be character information, voiceprint information, face information, and/or the like, and the implementation manner of the first login information is not limited in this embodiment.
Referring to fig. 2, the following description will take n-2, where the first-level session-hold reminder can be implemented in the first implementation manner, the second-level session-hold reminder can be implemented in the second implementation manner, the first-level monitoring duration is 10s, the second-level monitoring duration is 30s, and the reminder duration is 30 minutes. And if the client does not monitor the user operation within 30 minutes, displaying a conversation protection layer above the display page in a color gradient display mode to output a first-level conversation keeping reminder.
At this time, if the user is browsing videos, the user may perform user operations for a first level monitoring duration (i.e., 10s), such as: and correspondingly, the client takes the user operation as a session keeping operation and eliminates a session protection layer, namely, the output of the session keeping reminder is stopped, the user normally browses the video displayed on the display page, and the session is continuously kept.
And if the client does not monitor the session maintenance operation within the first-level monitoring duration, displaying an authentication window on the session protection layer to output a second-level session maintenance prompt. At this time, the user can continue to browse the display page after needing to confirm the identity login information again.
If the client monitors the user operation within the second monitoring duration (namely 30s) and the first login information indicated by the user operation conforms to the prestored second login information, the session protection layer is eliminated, namely, the second-level session keeping reminding is stopped being output, the user normally browses the video displayed on the display page, and the session is continuously kept.
If the client does not monitor the session maintaining operation (for example, the first login information indicated by the user operation does not match the second login information, or no user operation is received) within the second monitoring duration (i.e., 30s), the client stops displaying the session data on the display page and quits the access to the server.
In the embodiment, other users can be prevented from browsing the display page through the legal verification of the login information, and the security of the session data displayed on the display page is improved.
In other embodiments, n may be 1, the first-level session-keeping reminder is implemented by the second implementation manner, and the embodiments do not list the implementation manners of the session-keeping reminder.
And 104, before the duration of the user operation is not monitored to reach the effective holding duration, if the session holding operation is monitored, stopping outputting the session holding prompt and triggering the server to update the session state of the current session.
The client triggers the server to update the session state of the current session, and the method comprises the following steps: and sending a client request to the server to trigger the server to update the session state of the current session. The server side updates the session state when receiving the client side request, so as to count the time length without receiving the client side request again, compares the timing with the effective holding time length again, and deletes the current session only when the timing is longer than the effective holding time length.
When the session keeping reminder is multi-level, the session operation monitored by the client may be a session keeping operation corresponding to any one-level session keeping reminder.
Optionally, when the time length of the user operation which is not executed reaches the effective holding time length, stopping displaying the session data on the display page, and quitting the login of the server; and if the user operation is monitored again, sending an access request to the server and displaying a login page returned by the server so as to log in the server again.
It should be added that, after the session maintaining operation is monitored, the client receives the user operation, at this time, the time length of the user operation that is not executed is counted again, and step 102 is executed again.
Optionally, the number of the display pages corresponding to the current session is multiple; at this time, a session protection layer is overlaid on the display page, including: and covering a session protection layer above each display page in the plurality of display pages respectively. Accordingly, ceasing to output the session-hold reminder includes: the output of the session keep alert through the session protection layer on the plurality of display pages is stopped.
Referring to fig. 3, it is assumed that a user opens a plurality of display pages through a client, and the plurality of display pages correspond to the same current session. For any one of the plurality of display pages, for example: the display page A monitors the session maintaining operation, at the moment, the display page stops outputting the session maintaining prompt based on the session maintaining operation, and triggers the server to update the session state; other display pages may synchronously stop outputting the session hold wakeup based on the session hold operation.
Optionally, in this application, if the client receives the session holding operation, before the session holding operation is received, the client can always acquire the session data from the server and display the session data on the display page. In other words, the current session for the client is always active. At the moment, the client can display the session data in real time through the display page in the current session effective period according to the user requirements; or, when the conversation keeping reminder is output, the display of the conversation data is suspended, and then when the output of the conversation reminder is stopped, the display of the conversation data is continued through the display page.
In one example, the session data is time-varying data such as: video data, audio data, dynamically updated text data, etc. At this time, the session data is displayed through the display page corresponding to the current session, including but not limited to the following implementation manners:
the first method comprises the following steps: and displaying the conversation data in real time through the display page during the period from the time of outputting the conversation keeping reminder to the time of stopping outputting the conversation keeping reminder. Such as: playing the video in real time through a display page, such as: live video, recorded video, and the like. It should be added that the display page displays the session data in real time before the session keep reminder is output and after the session keep reminder is stopped being output.
And the second method comprises the following steps: when the conversation keeping reminding is output, displaying the conversation data corresponding to the first moment through the display page; displaying the conversation data after the first time through a display page when the output of the conversation keeping reminder is stopped; the first time is the time when the session keep alert is output. In this way, the user can continue browsing web pages without accessing historical data. In other words, after the session hold reminder is output, the session data in the display page is paused to be displayed; after the output of the conversation hold reminder is stopped, the conversation data in the display page continues to be displayed.
Illustratively, the session data is video data. In one scenario, when a video player in a display page supports a video caching function, the video data may be live video data or recorded video data; in another scenario, when the video player in the display page does not support the video caching function, the video data is recorded video data.
And the third is that: when the conversation keeping reminding is output, displaying the conversation data corresponding to the first moment through the display page; when the output of the conversation keeping reminder is stopped, displaying the conversation data after the second moment through the display page; the second moment is the moment when the output of the conversation keeping reminding is stopped.
Such as: the session data is video data, and when the video player in the display page does not support the video caching function, the video data played by the display page cannot be acquired during the pause period after being paused, and at this time, the session data acquired at the second moment and after the second moment can be displayed in real time.
Optionally, whether the display page suspends displaying the session data during outputting the session holding reminder may be set by the user (for example, a configuration control is set in the display page, and the user configures whether to suspend displaying the session data based on the configuration control); or, the client is set by default, and the display mode of the session data and the configuration mode of the display mode are not limited in this embodiment.
In summary, in the session management method provided in this embodiment, after the login of the server is successful, the session data is displayed on the display page corresponding to the current session, and the user operation performed by the user is monitored; outputting a conversation keeping reminder based on the monitoring result of the user operation, wherein the conversation keeping reminder is used for reminding the user to execute conversation keeping operation, and the conversation keeping operation is one of the user operations; (ii) a Before the time length of user operation is not monitored to reach the effective holding time length, if the session holding operation is monitored, the output of session holding reminding is stopped, and a server is triggered to update the session state of the current session; the problem that when the server manages the session based on the uniform effective holding time, the user actually browses the displayed page but the current session is invalid because whether the user actually browses the displayed page by using the client cannot be determined; before the current session is invalid, the output session keeping prompt reminds the user to input session keeping operation so as to determine whether the user browses the displayed page, and the validity of the session is continuously kept when the user browses the displayed page is determined, at the moment, the client does not need to log in the server again, and the efficiency of the client accessing the server is improved. Meanwhile, the client does not need to send a client request to the server in a timing manner to keep the validity of the current session, and bandwidth resources are saved.
In addition, the user actively calls the session to keep reminding, so that the user can keep the historical access record in the short leaving process, and simultaneously, the safety of the webpage is ensured without exiting.
In addition, whether the user leaves can be automatically detected by automatically outputting the session keeping reminding, and the safety of the webpage after the user leaves is ensured.
In addition, the conversation keeping reminder is output by covering the conversation protection layer above the display page, so that the user who is browsing the display page can be ensured to obtain the conversation keeping reminder, and the effectiveness of the conversation keeping reminder is ensured.
In addition, by outputting the multi-level conversation keeping reminding, whether the user browses the display page or not can be determined more accurately, and the accuracy of the determination result is ensured.
In addition, the conversation keeping reminding is output in a color gradient display mode, so that the effect of watching a display page by a user can be influenced, and the effectiveness of the conversation keeping reminding is ensured.
In addition, any user operation performed by the user is determined as the session maintaining operation, so that the difficulty of inputting the session maintaining operation by the user can be reduced, and the input efficiency of the session maintaining operation can be improved.
In addition, the session maintenance reminding is output by displaying the authentication window on the session protection layer, and the first login information of the user operation indication acting on the authentication window is verified, so that whether the user browsing the display page currently is an illegal user can be determined, and the security of the session data displayed on the display page is improved.
In addition, by ensuring that a plurality of display pages corresponding to the same current session update session maintenance reminding synchronously, the user is prevented from executing a plurality of session maintenance operations, and the session maintenance efficiency is improved.
Fig. 4 is a block diagram of a session management apparatus according to an embodiment of the present application. The device at least comprises the following modules: a display module 410, a monitoring module 420, and a reminder module 430.
The display module 410 is configured to display session data through a display page corresponding to a current session after the login of the server is successful; the current session is created by the server and has an effective holding time length; the effective holding duration refers to the maximum duration for holding the current session to be effective by the server when the client request is not received continuously;
a monitoring module 420 for monitoring user operations;
a reminding module 430, configured to output a session maintenance reminder based on a monitoring result of the user operation, where the session maintenance reminder is used to remind the user to perform a session maintenance operation, and the session maintenance operation is one of the user operations;
the monitoring module 420 is further configured to stop outputting the session keeping reminder and trigger the server to update the session state of the current session if the session keeping operation is monitored before the duration of the user operation is not monitored to reach the effective keeping duration.
For relevant details reference is made to the above-described method embodiments.
It should be noted that: in the session management device provided in the above embodiment, when performing session management, only the division of the above functional modules is illustrated, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the session management device is divided into different functional modules to complete all or part of the above described functions. In addition, the session management apparatus and the session management method provided in the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments in detail and are not described herein again.
Fig. 5 is a block diagram of a session management apparatus according to an embodiment of the present application. The apparatus comprises at least a processor 501 and a memory 502.
Processor 501 may include one or more processing cores such as: 4 core processors, 8 core processors, etc. The processor 501 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 501 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 501 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, processor 501 may also include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
Memory 502 may include one or more computer-readable storage media, which may be non-transitory. Memory 502 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 502 is used to store at least one instruction for execution by processor 501 to implement the session management methods provided by method embodiments herein.
In some embodiments, the session management device may further include: a peripheral interface and at least one peripheral. The processor 501, memory 502 and peripheral interfaces may be connected by buses or signal lines. Each peripheral may be connected to the peripheral interface via a bus, signal line, or circuit board. Illustratively, peripheral devices include, but are not limited to: radio frequency circuit, touch display screen, audio circuit, power supply, etc.
Of course, the session management apparatus may also include fewer or more components, which is not limited by the embodiment.
Optionally, the present application further provides a computer-readable storage medium, in which a program is stored, and the program is loaded and executed by a processor to implement the session management method of the above method embodiment.
Optionally, the present application further provides a computer product, which includes a computer-readable storage medium, in which a program is stored, and the program is loaded and executed by a processor to implement the session management method of the above-mentioned method embodiment.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (11)

1. A method for session management, the method comprising:
after the login of the server is successful, displaying session data through a display page corresponding to the current session; the current session is created by the server and has an effective holding time length; the effective holding duration refers to the maximum duration for holding the current session to be effective by the server when the client request is not received continuously;
monitoring user operation;
outputting a session keeping reminder based on the monitoring result of the user operation, wherein the session keeping reminder is used for reminding the user to execute session keeping operation, and the session keeping operation is one of the user operations;
and before the duration of the user operation is not monitored to reach the effective holding duration, if the session holding operation is monitored, stopping outputting the session holding prompt and triggering the server to update the session state of the current session.
2. The method of claim 1, wherein outputting a session hold reminder based on the monitoring result of the user operation comprises:
when the time length of the user operation reaches the reminding time length, outputting the conversation keeping reminding; the reminding duration is less than the effective holding duration;
alternatively, the first and second electrodes may be,
and when the user operation is monitored and indicates to output the conversation keeping reminder, outputting the conversation keeping reminder.
3. The method of claim 1, wherein outputting the session hold reminder comprises:
covering a session protection layer above the display page;
outputting the session hold reminder through the session protection layer.
4. The method according to claim 3, wherein the session hold reminder includes n levels of session hold reminders, the session hold operation is a session hold operation corresponding to any one level of session hold reminder, and n is a positive integer; the outputting the session keep alert through the session protection layer includes:
outputting a kth-level session keep reminder through the session protection layer, wherein the value of k is initialized to 1;
monitoring the kth level session keeping operation corresponding to the kth level session keeping reminder within the kth level monitoring duration corresponding to the kth level session keeping reminder;
and when the kth-level session holding operation is not monitored in the kth-level monitoring duration, updating the value of k to k +1, and executing the step of outputting the kth-level session holding reminder through the session protection layer again until the value of k is n or stopping outputting the session holding reminder when the kth-level session holding operation is monitored in the kth-level monitoring duration.
5. The method of claim 4, wherein outputting the level k session hold alert via the session protection layer comprises:
outputting the kth level session hold alert through a color gradient display of the session protection layer.
6. The method of claim 4, wherein outputting the level k session hold alert via the session protection layer comprises:
displaying an authentication window on the session protection layer to output the kth level session hold alert.
7. The method of claim 6, wherein monitoring a kth session hold operation corresponding to the kth session hold alert for a kth monitoring duration corresponding to the kth session hold alert comprises:
if the user operation acting on the identity authentication window is monitored within a kth monitoring duration corresponding to the kth-level session holding reminder, determining whether first login information indicated by the user operation is matched with second login information indicated by the kth-level session holding operation;
if the first login information is matched with the second login information, determining to monitor the k-th-level session holding operation;
and if the first login information does not match the second login information, determining that the kth-level session holding operation is not monitored.
8. The method according to claim 3, wherein the number of the display pages corresponding to the current session is multiple;
the covering of the session protection layer above the display page comprises:
covering the session protection layer above each display page in a plurality of display pages respectively;
the stopping of the output of the session hold reminder includes:
stopping outputting the session hold reminder through the session protection layer on the plurality of display pages.
9. The method according to any one of claims 1 to 8, wherein the session data is time-varying data, and the displaying the session data through the display page corresponding to the current session includes:
displaying the conversation data in real time through the display page during the period from the time when the conversation keeping reminder is output to the time when the conversation keeping reminder is stopped being output;
alternatively, the first and second electrodes may be,
when the conversation keeping reminder is output, displaying the conversation data corresponding to the first moment through the display page; displaying the conversation data after the first moment through the display page when the output of the conversation keeping reminder is stopped; the first moment is the moment when the conversation keeping reminding is output;
alternatively, the first and second electrodes may be,
when the conversation keeping reminder is output, displaying the conversation data corresponding to the first moment through the display page; when the conversation keeping reminding is stopped being output, displaying the conversation data after the second moment through the display page; the second moment is the moment when the session keeping reminding is stopped being output.
10. A session management apparatus, the apparatus comprising a processor and a memory; the memory has stored therein a program that is loaded and executed by the processor to implement the session management method according to any one of claims 1 to 9.
11. A computer-readable storage medium, characterized in that the storage medium has stored therein a program which, when executed by a processor, is adapted to implement the session management method according to any one of claims 1 to 9.
CN202011036410.3A 2020-09-28 2020-09-28 Session management method, device and storage medium Active CN112104746B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011036410.3A CN112104746B (en) 2020-09-28 2020-09-28 Session management method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011036410.3A CN112104746B (en) 2020-09-28 2020-09-28 Session management method, device and storage medium

Publications (2)

Publication Number Publication Date
CN112104746A true CN112104746A (en) 2020-12-18
CN112104746B CN112104746B (en) 2023-03-28

Family

ID=73782712

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011036410.3A Active CN112104746B (en) 2020-09-28 2020-09-28 Session management method, device and storage medium

Country Status (1)

Country Link
CN (1) CN112104746B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115118762A (en) * 2022-05-19 2022-09-27 北京京东乾石科技有限公司 Session processing method, client and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060080383A1 (en) * 2004-07-19 2006-04-13 International Business Machines Corporation Time-out management for session dependent applications
JP2008140203A (en) * 2006-12-04 2008-06-19 Hitachi Software Eng Co Ltd Session management system
CN101588393A (en) * 2009-07-02 2009-11-25 杭州华三通信技术有限公司 Method of state management based on real-time session
CN110233896A (en) * 2019-06-14 2019-09-13 浙江齐治科技股份有限公司 A kind of notification method and device of message
CN110673971A (en) * 2019-09-30 2020-01-10 北京金山云网络技术有限公司 Processing method and device for expiration of login session and user terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060080383A1 (en) * 2004-07-19 2006-04-13 International Business Machines Corporation Time-out management for session dependent applications
JP2008140203A (en) * 2006-12-04 2008-06-19 Hitachi Software Eng Co Ltd Session management system
CN101588393A (en) * 2009-07-02 2009-11-25 杭州华三通信技术有限公司 Method of state management based on real-time session
CN110233896A (en) * 2019-06-14 2019-09-13 浙江齐治科技股份有限公司 A kind of notification method and device of message
CN110673971A (en) * 2019-09-30 2020-01-10 北京金山云网络技术有限公司 Processing method and device for expiration of login session and user terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115118762A (en) * 2022-05-19 2022-09-27 北京京东乾石科技有限公司 Session processing method, client and system

Also Published As

Publication number Publication date
CN112104746B (en) 2023-03-28

Similar Documents

Publication Publication Date Title
US10871985B2 (en) Displaying media files between changes in states of an application client
CN110213356A (en) A kind of login process method and relevant device based on data processing
CN110324793B (en) Information reminding method and device and electronic terminal
CN110505141B (en) Instant messaging message processing method and device, readable medium and electronic equipment
US9607088B2 (en) Method and apparatus for detecting multimedia content change, and resource propagation system
CN110708588B (en) Barrage display method and device, terminal and storage medium
US20220030002A1 (en) System and method for secure access control
CN109495427B (en) Multimedia data display method and device, storage medium and computer equipment
CA2814963A1 (en) Unified policy over heterogenous device types
Liu et al. Screenpass: Secure password entry on touchscreen devices
CN110096329B (en) Display content control method, electronic device and computer readable storage medium
CN107948672A (en) Preserve the method and system and server, Wearable of video data
CN107273278A (en) Interim card determines method, device and terminal
CN114327803A (en) Method, apparatus, device and medium for accessing machine learning model by block chain
CN112104746B (en) Session management method, device and storage medium
US20240056811A1 (en) Verification methods and apparatuses for electronic device insurance
CN108668241A (en) Information prompting method, device, storage medium and electronic equipment
CN114748873A (en) Interface rendering method, device, equipment and storage medium
CN107391763A (en) Information display method and device
CN111857920B (en) Popup window processing method and device, computer equipment and storage medium
CN104702650B (en) Obtain the method and device of application page
CN112287318A (en) Cross-application program login method, device, equipment and medium
CN113157364A (en) Screen protection display method and device
CN111177770B (en) Sensitive information protection method, mobile equipment and storage device
CN114666140B (en) Method, device, computer equipment and medium for accessing form

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