Method and terminal for automatically renewing login state

A login status and automatic technology, applied in the field of data processing, can solve problems such as token invalidation, increase in the number of network requests, and increased pressure on the server, etc., and achieve the effect of low execution difficulty, high processing efficiency, and simple steps

Active Publication Date: 2019-03-29
FUJIAN TIANQUAN EDUCATION TECH LTD
View PDF9 Cites 9 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The disadvantage of this solution is that it cannot completely solve the problem of token invalidation, and the number of network requests will increase, and the pressure on the server will increase

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and terminal for automatically renewing login state
  • Method and terminal for automatically renewing login state
  • Method and terminal for automatically renewing login state

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0069] Please refer to figure 1 , Embodiment 1 of the present invention is:

[0070] The invention provides a method for automatic renewal of a login status, which includes the following steps:

[0071] S1: When the webpage starts, obtain the token corresponding to the current account of the webpage;

[0072] Wherein, the S1 is specifically:

[0073] When the webpage starts, the token corresponding to the current account of the webpage is obtained from the cache.

[0074] S2: Determine whether the token is valid, if invalid, jump to the login page of the webpage; if valid, obtain the last renewal time of the token, and execute S3;

[0075] Wherein, the S2 is specifically:

[0076] Judging whether the token is valid, if invalid, jump to the login page of the webpage; obtain the input account number and password, and perform a login operation. If the login is successful, cache the token corresponding to the currently logged in account, and cache the current time point as Th...

Embodiment 2

[0089] The difference between the second embodiment of the present invention and the first embodiment is that all webpages in the first embodiment are replaced with apps.

Embodiment 3

[0090] Please refer to figure 2 , Embodiment three of the present invention is:

[0091] The present invention provides a terminal for automatically renewing a login status, including a memory 1, a processor 2, and a computer program stored in the memory 1 and operable on the processor 2, and the computer program is implemented when the processor executes the computer program. The following steps:

[0092] S1: When the webpage starts, obtain the token corresponding to the current account of the webpage;

[0093] Wherein, the S1 is specifically:

[0094] When the webpage starts, the token corresponding to the current account of the webpage is obtained from the cache.

[0095] S2: Determine whether the token is valid, if invalid, jump to the login page of the webpage; if valid, obtain the last renewal time of the token, and execute S3;

[0096] Wherein, the S2 is specifically:

[0097] Judging whether the token is valid, if invalid, jump to the login page of the webpage; o...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a method and a terminal for automatically renewing a login state. The method comprises the following steps: step S1, when a webpage is started, acquiring a token corresponding to a current account of the webpage; step S2, judging whether the token is valid or not, if not, jumping to a login page of the webpage; and if yes, acquiring the last renewal time point of the token,and executing S3; and step S3, according to the last renewal time point and the current time point, acquiring a renewal time period, judging whether the renewal time period exceeds a preset time period threshold, if yes, then renewing the token, so as to realize the automatic renewal of the login state of the current account. The method and the terminal for automatically renewing the login state provided by the invention have an efficient processing performance.

Description

technical field [0001] The invention relates to the technical field of data processing, in particular to a method and a terminal for automatically renewing a login status. Background technique [0002] Since the token corresponding to the webpage login account has an expiration time, in order to maintain the login status for a long time, the common solutions in the industry are: [0003] 1. When the server receives the user's network request, it will automatically extend the token expiration time. The disadvantage of this solution is that it is inflexible, unable to meet the complex business needs of large-scale website applications, and its performance is not high. [0004] 2. The client creates a network request interceptor. After the network initiates the request and before accessing the network, it obtains the expiration time of the token. If it is "about to expire", it initiates a renewal request and notifies the server to extend the token expiration time. The disadva...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): H04L29/06
CPCH04L63/0807H04L63/083
Inventor 刘德建陈铭高举全郭玉湖
Owner FUJIAN TIANQUAN EDUCATION TECH LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products