CN108632301B - Method and terminal for processing duration after login state failure - Google Patents

Method and terminal for processing duration after login state failure Download PDF

Info

Publication number
CN108632301B
CN108632301B CN201710154898.1A CN201710154898A CN108632301B CN 108632301 B CN108632301 B CN 108632301B CN 201710154898 A CN201710154898 A CN 201710154898A CN 108632301 B CN108632301 B CN 108632301B
Authority
CN
China
Prior art keywords
login
request
processing
information
server
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
CN201710154898.1A
Other languages
Chinese (zh)
Other versions
CN108632301A (en
Inventor
黄兴平
王旭
杨宇飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710154898.1A priority Critical patent/CN108632301B/en
Publication of CN108632301A publication Critical patent/CN108632301A/en
Application granted granted Critical
Publication of CN108632301B publication Critical patent/CN108632301B/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/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
    • 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
    • H04L63/0815Network architectures or network communication protocols for network security for authentication of entities providing single-sign-on or federations
    • 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
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • 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/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • 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/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

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)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a method and a terminal for processing a continuous period after a login state fails, wherein the method comprises the following steps: initiating a first request in a login state, and executing operation processing corresponding to the first request, wherein the first request is a service request; caching the operation processing corresponding to the first request; interrupting the first request after the login state is invalid, monitoring that the first request is interrupted, and triggering an input area for login on the current page of the operation processing; acquiring login information in the input area, initiating a second request according to the login information, wherein the second request is a login request, and requesting to verify whether the second request and the login request initiated before triggering the first request are the same login request or not; and when the login requests are the same, extracting the operation processing corresponding to the first request from the cache, interrupting and recovering the operation processing, and continuously executing the operation processing.

Description

Method and terminal for processing duration after login state failure
Technical Field
The invention relates to an information processing technology, in particular to a method and a terminal for processing a continuous period after a login state fails.
Background
In the process of logging in a page through a browser on a computer or a mobile phone terminal, a login operation cannot be continued due to network congestion (network speed is slow) or abnormal network state (such as network disconnection), which may occur in a login state in which a user fills account information in a browser page or in a service operation state in which the user performs a next web page process after the user has successfully logged in.
For the above situation, the existing login state failure duration scheme is adopted, and the page where the user is located before is refreshed or re-skipped. For example, if the user has successfully logged in the mailbox (is in a logged-in state), the operation state of the currently edited email is currently performed, and at this time, the network state sends an exception, such as a network disconnection, the user is prompted to refresh or log in the mailbox again, which both interrupts the current service operation state of the user, and even the user needs to return to the initial mailbox login page from the page of the currently edited email.
The existing login state failure duration scheme is adopted, and the problems are as follows: 1) the page needs to be refreshed and loaded again, and even the page can jump to the initial login page; 2) the current business operation of the user is directly interrupted and can not be reserved; the user needs to manually perform the service operation again interrupted by the login operation. These problems increase time and labor costs and also affect process efficiency.
However, in the related art, there is no effective solution to this problem.
Disclosure of Invention
In view of this, the embodiment of the present invention provides a method and a terminal for processing a renewal period after a login state fails, which at least solve the problems in the prior art.
The embodiment of the invention provides a method for processing the renewal of a login state after failure, which comprises the following steps:
initiating a first request in a login state, and executing operation processing corresponding to the first request, wherein the first request is a service request;
caching the operation processing corresponding to the first request;
interrupting the first request after the login state is invalid, monitoring that the first request is interrupted, and triggering an input area for login on the current page of the operation processing;
acquiring login information in the input area, initiating a second request according to the login information, wherein the second request is a login request, and requesting to verify whether the second request and the login request initiated before triggering the first request are the same login request or not;
and when the login requests are the same, extracting the operation processing corresponding to the first request from the cache, interrupting and recovering the operation processing, and continuously executing the operation processing.
In the foregoing solution, the caching the operation processing corresponding to the first request includes:
and when the first request is at least one, caching at least one operation process corresponding to the first request into a first-in first-out data queue according to a time sequence.
In the above scheme, the method further comprises:
and after monitoring that the first request is interrupted, blocking the service response processing of the first request, and taking over the exception processing of the first request interruption.
In the foregoing solution, the method further includes:
before triggering the first request, packaging first account information and first login password information into the login request, and sending the login request to a server for login verification;
and executing login operation after the server passes the verification, and entering the login state.
In the above scheme, initiating a second request according to the login information, and requesting to verify whether the second request is the same login request as the login request initiated before triggering the first request, includes any one of the following manners:
the first method is as follows:
when the login information is second account information and second login password information, packaging the second account information and the second login password information into the second request, and sending the second request to a server;
after the second account information and the second login password information are compared with the first account information and the first login password information and are verified, response feedback of the same login request for multiple logins is received;
the second method comprises the following steps:
when the login information is second account information and second login password information, packaging the second account information and the second login password information into the second request, and sending the second request to a local login verification component of the terminal;
and after the login verification component compares the second account information and the second login password information with the first account information and the first login password information which are stored before and verifies the second account information and the second login password information, response feedback of the same login request for multiple logins is received.
In the above solution, when the login request is the same, extracting the operation processing corresponding to the first request from the cache and recovering the operation processing by interruption, includes:
and analyzing the response feedback to obtain that the multiple logins are the same login request, and extracting at least one operation process corresponding to the first request from the cached data queue according to a first-in first-out sequence so as to continuously execute the at least one operation process corresponding to the first request according to a time sequence.
A terminal according to an embodiment of the present invention includes:
a first request unit, configured to initiate a first request in a login state, and execute an operation process corresponding to the first request, where the first request is a service request;
a cache processing unit, configured to cache the operation processing corresponding to the first request;
the monitoring unit is used for interrupting the first request after the login state is invalid, monitoring that the first request is interrupted, and triggering an input area for login on the current page of the operation processing;
a second request unit, configured to obtain login information in the input area, initiate a second request according to the login information, where the second request is a login request, and request to verify whether the second request is the same login request as a login request initiated before the first request is triggered;
and the recovery processing unit is used for extracting the operation processing corresponding to the first request from the cache, interrupting and recovering the operation processing and continuously executing the operation processing when the same login request is received.
In the foregoing solution, the cache processing unit is further configured to:
and when the first request is at least one, caching at least one operation process corresponding to the first request into a first-in first-out data queue according to a time sequence.
In the foregoing solution, the terminal further includes: a blocking unit to:
and blocking the service response processing of the first request, and taking over the exception processing of the first request interrupt.
In the above solution, the terminal further includes: a login request unit to:
before triggering the first request, packaging first account information and first login password information into the login request, and sending the login request to a server for login verification;
and executing login operation after the server passes the verification, and entering the login state.
In the foregoing solution, the second request unit is further configured to:
when the login information is second account information and second login password information, packaging the second account information and the second login password information into the second request, and sending the second request to the server;
after the second account information and the second login password information are compared with the first account information and the first login password information and are verified, response feedback of the same login request for multiple logins is received; alternatively, the first and second electrodes may be,
the second request unit is further configured to:
when the login information is second account information and second login password information, packaging the second account information and the second login password information into the second request, and sending the second request to a local login verification component of the terminal;
and after the login verification component compares the second account information and the second login password information with the first account information and the first login password information which are stored before and verifies the second account information and the second login password information, response feedback of the same login request for multiple logins is received.
In the foregoing solution, the recovery processing unit is further configured to:
and analyzing the response feedback to obtain that the multiple logins are the same login request, and extracting at least one operation process corresponding to the first request from the cached data queue according to a first-in first-out sequence so as to continuously execute the at least one operation process corresponding to the first request according to a time sequence.
The embodiment of the invention initiates a first request in a login state, and executes operation processing corresponding to the first request, wherein the first request is a service request; caching the operation processing corresponding to the first request; interrupting the first request after the login state is invalid, monitoring that the first request is interrupted, and triggering an input area for login on the current page of the operation processing; acquiring login information in the input area, initiating a second request according to the login information, wherein the second request is a login request, and requesting to verify whether the second request and the login request initiated before triggering the first request are the same login request or not; and when the login requests are the same, extracting the operation processing corresponding to the first request from the cache, interrupting and recovering the operation processing, and continuously executing the operation processing.
By adopting the embodiment of the invention, the operation processing corresponding to the first request in the login state is cached in advance, after the interruption of the first request caused by the failure of the login state is monitored, the input area for login is triggered on the current page of the operation processing, the login information can be directly acquired on the current page for verification, and the user does not need to manually execute the login operations such as account input before, so that the current page does not need to be refreshed and loaded again and jump to the initial login page. And if the login information initiated in the login state and the login information reinitiated after the login state is invalid are verified to be based on the same login request, extracting the operation processing corresponding to the first request saved in advance from the cache, and resuming the execution of the operation processing interrupted before. That is to say, although the current business operation of the user is interrupted due to the failure of the login state, the current business operation state is cached, so that the recovery request is directly initiated next time, the time cost and the labor cost of the whole operation processing are reduced, and the processing efficiency is improved.
Drawings
Fig. 1 is a schematic diagram of an alternative hardware structure of a mobile terminal implementing various embodiments of the present invention;
FIG. 2 is a schematic diagram of a communication system of the mobile terminal shown in FIG. 1;
FIG. 3 is a diagram illustrating a scenario in which an embodiment of the present invention is applied;
FIG. 4 is a diagram of hardware entities performing information interaction according to an embodiment of the present invention;
FIG. 5 is a schematic flow chart illustrating a method according to an embodiment of the present invention;
FIGS. 6-7 are schematic diagrams of a prior art renewal process;
FIG. 8 is a diagram of a system architecture according to an embodiment of the present invention;
FIG. 9 is a schematic diagram illustrating a renewal process of an application scenario according to an embodiment of the present invention.
Detailed Description
The following describes the implementation of the technical solution in further detail with reference to the accompanying drawings.
A mobile terminal implementing various embodiments of the present invention will now be described with reference to the accompanying drawings. In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the description of the embodiments of the present invention, and have no specific meaning in themselves. Thus, "module" and "component" may be used in a mixture.
In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the invention can be practiced without these specific details. In other instances, well-known methods, procedures, components, circuits, and networks disclosed have not been described in detail as not to unnecessarily obscure aspects of the embodiments.
In addition, although the terms "first", "second", etc. are used herein several times to describe various elements (or various thresholds or various applications or various instructions or various operations), etc., these elements (or thresholds or applications or instructions or operations) should not be limited by these terms. These terms are only used to distinguish one element (or threshold or application or instruction or operation) from another element (or threshold or application or instruction or operation). For example, a first operation may be referred to as a second operation, and a second operation may be referred to as a first operation, without departing from the scope of the invention, the first operation and the second operation being operations, except that they are not the same operation.
The steps in the embodiment of the present invention are not necessarily processed according to the described step sequence, and may be optionally rearranged in a random manner, or steps in the embodiment may be deleted, or steps in the embodiment may be added according to requirements.
The term "and/or" in embodiments of the present invention refers to any and all possible combinations including one or more of the associated listed items. It is also to be noted that: when used in this specification, the term "comprises/comprising" specifies the presence of stated features, integers, steps, operations, elements and/or components but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements and/or components and/or groups thereof.
The intelligent terminal (e.g., mobile terminal) of the embodiments of the present invention may be implemented in various forms. For example, the mobile terminal described in the embodiments of the present invention may include a mobile terminal such as a mobile phone, a smart phone, a notebook computer, a Digital broadcast receiver, a Personal Digital Assistant (PDA), a tablet computer (PAD), a Portable Multimedia Player (PMP), a navigation device, and the like, and a fixed terminal such as a Digital TV, a desktop computer, and the like. In the following, it is assumed that the terminal is a mobile terminal. However, it will be understood by those skilled in the art that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for moving purposes.
Fig. 1 is a schematic diagram of an alternative hardware structure of a mobile terminal implementing various embodiments of the present invention.
The mobile terminal 100 may include a communication unit 110, an audio/video (a/V) input unit 120, a user input unit 130, a first request unit 140, a cache processing unit 141, a listening unit 142, a second request unit 143, a restoration processing unit 144, an output unit 150, a storage unit 160, an interface unit 170, a processing unit 180, and a power supply unit 190, and the like. Fig. 1 illustrates a mobile terminal having various components, but it is to be understood that not all illustrated components are required to be implemented. More or fewer components may alternatively be implemented. Elements of the mobile terminal will be described in detail below.
The communication unit 110 typically includes one or more components that allow radio communication between the mobile terminal 100 and a wireless communication system or network (or may be in electrical communication by wire if the mobile terminal is replaced with a fixed terminal). For example, when the communication unit is embodied as a wireless communication unit, it may include at least one of the broadcast receiving unit 111, the mobile communication unit 112, the wireless internet unit 113, the short range communication unit 114, and the location information unit 115, which are optional and may be added or deleted according to different requirements.
The broadcast receiving unit 111 receives a broadcast signal and/or broadcast associated information from an external broadcast management server via a broadcast channel. The broadcast channel may include a satellite channel and/or a terrestrial channel. The broadcast management server may be a server that generates and transmits a broadcast signal and/or broadcast associated information or a server that receives a previously generated broadcast signal and/or broadcast associated information and transmits it to a terminal. The broadcast signal may include a TV broadcast signal, a radio broadcast signal, a data broadcast signal, and the like. Also, the broadcast signal may further include a broadcast signal combined with a TV or radio broadcast signal. The broadcast associated information may also be provided via a mobile communication network, and in this case, the broadcast associated information may be received by the mobile communication unit 112. The broadcast signal may exist in various forms, for example, it may exist in the form of an Electronic Program Guide (EPG) of Digital Multimedia Broadcasting (DMB), an Electronic Service Guide (ESG) of Digital Video Broadcasting Handheld (DVB-H), and the like. The broadcast receiving unit 111 can receive signal broadcasts by using various types of broadcast systems. In particular, the broadcast receiving unit 111 may receive Digital broadcasts by using a Digital Broadcasting system such as a Digital Multimedia Broadcasting-Terrestrial (DMB-T), a Digital Multimedia Broadcasting-Satellite (DMB-S), DVB-H, a data Broadcasting system of a Forward Link Media (Media Forward Link Only), an Integrated Services Digital Broadcasting-Terrestrial (ISDB-T), and the like. The broadcast receiving unit 111 may be configured to be suitable for various broadcast systems that provide broadcast signals as well as the above-described digital broadcast system. The broadcast signal and/or the broadcast-related information received via the broadcast receiving unit 111 may be stored in the storage unit 160 (or other type of storage medium).
The mobile communication unit 112 transmits and/or receives radio signals to and/or from at least one of a base station (e.g., access point, node B, etc.), an external terminal, and a server. Such radio signals may include voice call signals, video call signals, or various types of data transmitted and/or received according to text and/or multimedia messages.
The wireless internet unit 113 supports wireless internet access of the mobile terminal. The unit may be internally or externally coupled to the terminal. The Wireless internet Access technology related to the unit may include a Wireless Local Area network (Wi-Fi), a Wireless broadband (Wibro), a worldwide interoperability for microwave Access (Wimax), a High Speed Downlink Packet Access (HSDPA), and the like.
The short-range communication unit 114 is a unit for supporting short-range communication. Some examples of short-range communication technologies include bluetooth, Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wideband (UWB), zigbee, and so forth.
The location information unit 115 is a unit for checking or acquiring location information of the mobile terminal. A typical example of the location information unit is a Global Positioning System (GPS). According to the current technology, the location information unit 115 calculates distance information and accurate time information from three or more satellites and applies triangulation to the calculated information, thereby accurately calculating three-dimensional current location information according to longitude, latitude, and altitude. Currently, a method for calculating position and time information uses three satellites and corrects an error of the calculated position and time information by using another satellite. Further, the position information unit 115 can calculate the speed information by continuously calculating the current position information in real time.
The a/V input unit 120 is for receiving an audio or video signal. The a/V input unit 120 may include a camera 121 and a microphone 122, and the camera 121 processes image data of still pictures or video obtained by an image capturing apparatus in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 151. The image frames processed by the cameras 121 may be stored in the storage unit 160 (or other storage medium) or transmitted via the communication unit 110, and two or more cameras 121 may be provided according to the construction of the mobile terminal. The microphone 122 may receive sounds (audio data) via the microphone in a phone call mode, a recording mode, a voice recognition mode, or the like, and can process such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the mobile communication unit 112 in case of the phone call mode. The microphone 122 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The user input unit 130 may generate key input data to control various operations of the mobile terminal according to a command input by the user. The user input unit 130 allows a user to input various types of information, and may include a keyboard, a mouse, a touch pad (e.g., a touch-sensitive member that detects changes in resistance, pressure, capacitance, and the like due to being touched), a wheel, a joystick, and the like. In particular, when the touch pad is superimposed on the display unit 151 in the form of a layer, a touch screen may be formed.
The first request unit 140 is configured to initiate a first request in a login state, and execute an operation process corresponding to the first request, where the first request is a service request. A cache processing unit 141, configured to cache the operation processing corresponding to the first request. A monitoring unit 142, configured to interrupt the first request after the login state fails, monitor that the first request is interrupted, and trigger an input area for login on the current page of the operation processing. A second request unit 143, configured to obtain login information in the input area, initiate a second request according to the login information, where the second request is a login request, and request to verify whether the second request is the same login request as a login request initiated before the first request is triggered. A recovery processing unit 144, configured to, in the case of the same login request, extract the operation processing corresponding to the first request from the cache, interrupt and recover the operation processing, and continue to execute the operation processing.
The interface unit 170 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification unit, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The identification unit may store various information for authenticating a User using the mobile terminal 100 and may include a User identification Unit (UIM), a Subscriber identification unit (SIM), a Universal Subscriber Identity Unit (USIM), and the like. In addition, a device having an identification unit (hereinafter, referred to as an "identification device") may take the form of a smart card, and thus, the identification device may be connected with the mobile terminal 100 via a port or other connection means. The interface unit 170 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal and the external device.
In addition, when the mobile terminal 100 is connected with an external cradle, the interface unit 170 may serve as a path through which power is supplied from the cradle to the mobile terminal 100 or may serve as a path through which various command signals input from the cradle are transmitted to the mobile terminal. Various command signals or power input from the cradle may be used as signals for recognizing whether the mobile terminal is accurately mounted on the cradle. The output unit 150 is configured to provide output signals (e.g., audio signals, video signals, vibration signals, etc.) in a visual, audio, and/or tactile manner. The output unit 150 may include a display unit 151, an audio output unit 152, and the like.
The display unit 151 may display information processed in the mobile terminal 100. For example, the mobile terminal 100 may display a related User Interface (UI) or a Graphical User Interface (GUI). When the mobile terminal 100 is in a video call mode or an image capturing mode, the display unit 151 may display a captured image and/or a received image, a UI or GUI showing a video or an image and related functions, and the like.
Meanwhile, when the display unit 151 and the touch pad are overlapped with each other in the form of a layer to form a touch screen, the display unit 151 may serve as an input device and an output device. The Display unit 151 may include at least one of a Liquid Crystal Display (LCD), a Thin Film Transistor LCD (TFT-LCD), an Organic Light-Emitting Diode (OLED) Display, a flexible Display, a three-dimensional (3D) Display, and the like. Some of these displays may be configured to be transparent to allow a user to see from the outside, which may be referred to as transparent displays, and a typical transparent display may be, for example, a Transparent Organic Light Emitting Diode (TOLED) display or the like. Depending on the particular desired implementation, the mobile terminal 100 may include two or more display units (or other display devices), for example, the mobile terminal may include an external display unit (not shown) and an internal display unit (not shown). The touch screen may be used to detect a touch input pressure as well as a touch input position and a touch input area.
The audio output unit 152 may convert audio data received by the communication unit 110 or stored in the storage unit 160 into an audio signal and output as sound when the mobile terminal is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 152 may provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 152 may include a speaker, a buzzer, and the like.
The storage unit 160 may store software programs or the like for processing and controlling operations performed by the processing unit 180, or may temporarily store data (e.g., a phonebook, messages, still images, videos, and the like) that has been output or is to be output. Also, the storage unit 160 may store data regarding various ways of vibration and audio signals output when a touch is applied to the touch screen.
The storage unit 160 may include at least one type of storage medium including a flash Memory, a hard disk, a multimedia card, a card-type Memory (e.g., SD or DX Memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic Memory, a magnetic disk, an optical disk, and so on. Also, the mobile terminal 100 may cooperate with a network storage device that performs a storage function of the storage unit 160 through a network connection.
The processing unit 180 generally controls the overall operation of the mobile terminal. For example, the processing unit 180 performs control and processing related to voice calls, data communications, video calls, and the like. As another example, the processing unit 180 may perform a pattern recognition process to recognize a handwriting input or a picture drawing input performed on the touch screen as a character or an image.
The power supply unit 190 receives external power or internal power and provides appropriate power required to operate the elements and components under the control of the processing unit 180.
The various embodiments described herein may be implemented in a computer-readable medium using, for example, computer software, hardware, or any combination thereof. For a hardware implementation, the embodiments described herein may be implemented using at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a processor, a controller, a microcontroller, a microprocessor, and an electronic unit designed to perform the functions described herein, and in some cases, such embodiments may be implemented in the Processing unit 180. For a software implementation, the implementation such as a procedure or a function may be implemented with separate software units allowing to perform at least one function or operation. The software codes may be implemented by software applications (or programs) written in any suitable programming language, which may be stored in the memory unit 160 and executed by the processing unit 180. A specific hardware entity of the storage unit 160 may be a memory, and a specific hardware entity of the processing unit 180 may be a controller.
Up to now, the mobile terminal has been described in terms of its functions. Hereinafter, a slide-type mobile terminal among various types of mobile terminals, such as a folder-type, bar-type, swing-type, slide-type mobile terminal, and the like, will be described as an example for the sake of brevity. Accordingly, the present invention can be applied to any type of mobile terminal, and is not limited to a slide type mobile terminal.
The mobile terminal 100 as shown in fig. 1 may be configured to operate with communication systems such as wired and wireless communication systems and satellite-based communication systems that transmit data via frames or packets.
A communication system in which a mobile terminal according to an embodiment of the present invention is operable will now be described with reference to fig. 2.
Such communication systems may use different air interfaces and/or physical layers. For example, the air interface used by the communication System includes, for example, Frequency Division Multiple Access (FDMA), Time Division Multiple Access (TDMA), Code Division Multiple Access (CDMA), and Universal Mobile Telecommunications System (UMTS) (in particular, Long Term Evolution (LTE)), global System for Mobile communications (GSM), and the like. By way of non-limiting example, the following description relates to a CDMA communication system, but such teachings are equally applicable to other types of systems.
Referring to fig. 2, the CDMA wireless communication system may include a plurality of Mobile terminals 100, a plurality of Base Stations (BSs) 270, a Base Station Controller (BSC) 275, and a Mobile Switching Center (MSC) 280. The MSC280 is configured to interface with a Public Switched Telephone Network (PSTN) 290. The MSC280 is also configured to interface with a BSC275, which may be coupled to the BS270 via a backhaul. The backhaul may be constructed according to any of several known interfaces including, for example, E1/T1, ATM, IP, PPP, frame Relay, HDSL, ADSL, or xDSL. It will be understood that a system as shown in fig. 2 may include multiple BSCs 275.
Each BS270 may serve one or more sectors (or regions), each sector covered by a multi-directional antenna or an antenna pointing in a particular direction being radially distant from the BS 270. Alternatively, each partition may be covered by two or more antennas for diversity reception. Each BS270 may be configured to support multiple frequency allocations, with each frequency allocation having a particular frequency spectrum (e.g., 1.25MHz, 5MHz, etc.).
The intersection of partitions with frequency allocations may be referred to as a CDMA channel. The BS270 may also be referred to as a Base Transceiver Subsystem (BTS) or other equivalent terminology. In such a case, the term "base station" may be used to generically refer to a single BSC275 and at least one BS 270. The base stations may also be referred to as "cells". Alternatively, each sector of a particular BS270 may be referred to as a plurality of cell sites.
As shown in fig. 2, a Broadcast Transmitter (BT) 295 transmits a Broadcast signal to the mobile terminal 100 operating within the system. A broadcast receiving unit 111 as shown in fig. 1 is provided at the mobile terminal 100 to receive a broadcast signal transmitted by the BT 295. In fig. 2, several satellites 300 are shown, for example, GPS satellites 300 may be employed. The satellite 300 assists in locating at least one of the plurality of mobile terminals 100.
In fig. 2, a plurality of satellites 300 are depicted, but it is understood that useful positioning information may be obtained with any number of satellites. The location information unit 115 as shown in fig. 1 is generally configured to cooperate with the satellites 300 to obtain desired positioning information. Other techniques that can track the location of the mobile terminal may be used instead of or in addition to GPS tracking techniques. In addition, at least one GPS satellite 300 may selectively or additionally process satellite DMB transmission.
As a typical operation of the wireless communication system, the BS270 receives reverse link signals from various mobile terminals 100. The mobile terminal 100 is generally engaged in conversations, messaging, and other types of communications. Each reverse link signal received by a particular base station is processed within a particular BS 270. The obtained data is forwarded to the associated BSC 275. The BSC275 provides call resource allocation and mobility management functions including coordination of soft handoff procedures between the BSs 270. The BSCs 275 also route the received data to the MSC280, which provides additional routing services for interfacing with the PSTN 290. Similarly, the PSTN290 interfaces with the MSC280, the MSC280 interfaces with the BSCs 275, and the BSCs 275 accordingly control the BS270 to transmit forward link signals to the mobile terminal 100.
The mobile communication unit 112 of the communication unit 110 in the mobile terminal accesses the mobile communication network based on the necessary data (including the user identification information and the authentication information) of the mobile communication network (such as the mobile communication network of 2G/3G/4G, etc.) built in the mobile terminal to transmit the mobile communication data (including the uplink mobile communication data and the downlink mobile communication data) for the services of web browsing, network multimedia playing, etc. of the mobile terminal user.
The wireless internet unit 113 of the communication unit 110 performs a function of a wireless hotspot by operating a related protocol function of the wireless hotspot, the wireless hotspot supports access by a plurality of mobile terminals (any mobile terminal other than the mobile terminal), transmits mobile communication data (including uplink mobile communication data and downlink mobile communication data) for mobile terminal user's web browsing, network multimedia playing and other services by multiplexing the mobile communication connection between the mobile communication unit 112 and the mobile communication network, since the mobile terminal essentially multiplexes the mobile communication connection between the mobile terminal and the communication network for transmitting mobile communication data, the traffic of mobile communication data consumed by the mobile terminal is charged to the communication tariff of the mobile terminal by a charging entity on the side of the communication network, thereby consuming the data traffic of the mobile communication data included in the communication tariff contracted for use by the mobile terminal.
It should be noted that: the verification logic can be executed on a background server, and can also be executed locally on a terminal through a login verification component (such as the PTLogin), the PTLogin is used for enabling a community unified login page provided by an application platform for each service, and when a certain service needs to be logged in by a user, a Ptlogin login box can be embedded, so that a webpage login function can be realized quickly and conveniently. Specifically, before entering a login state to trigger a first request (such as a service request for image-text editing, form processing, etc., and corresponding service operation processing is executed for the service request), the terminal initiates a login request (initial login request) to be authenticated by the background server, after the background server confirms that an account and a password in the login request are valid and the authentication is passed, the terminal enters the login state, and after entering the login state, various service operations triggered by the service request can be executed. When the service operation processing triggered by the service request is interrupted due to the failure of the login state, the login needs to be performed again (namely, the login state is continued), and secondary account verification of the login performed twice is required. The terminal acquires new login information in the input area, initiates a second request (new login request) according to the new login information, requests to verify whether the second request (new login request) and the login request (initial login request) initiated before triggering the first request are the same login request, and performs the secondary account verification.
The secondary account authentication may perform authentication logic through the server, for example, the login information used by the second request (new login request) is the second account information and the second login password information, and the login information used by the login request (initial login request) initiated before the first request is triggered is the first account information and the first login password information. And the terminal packages the second account information and the second login password information into the second request and sends the second request to the server. And after the server compares and verifies the second account information and the second login password information with the first account information and the first login password information, feeding back a response of logging in for the same login request for multiple times to the terminal. And after the verification is passed, the continuous processing after the login state is invalid is realized, the operation processing corresponding to the first request is extracted from the cache and is interrupted and recovered, and the operation processing is continuously executed.
The second account authentication may also execute authentication logic locally at the terminal through a login authentication component (e.g., the PTLogin), for example, the login information used by the second request (new login request) is the second account information and the second login password information, and the login information used by the login request (initial login request) initiated before the first request is triggered is the first account information and the first login password information. And the terminal packages the second account information and the second login password information into the second request and sends the second request to a local login verification component of the terminal. The first account information and the first login password information can be locally stored in the terminal when the first account information and the first login password information are sent to the server for initial login verification, so that the second account information and the second login password information can be compared with the first account information and the first login password information which are stored before through the login verification component and verified, and then the multiple logins are shown as the same login request. And after the verification is passed, the continuous processing after the login state is invalid is realized, the operation processing corresponding to the first request is extracted from the cache and is interrupted and recovered, and the operation processing is continuously executed.
Fig. 3 is a schematic diagram of a scenario in which an embodiment of the present invention is applied, where an interface identified by a1 is an example of a user interface when a user logs in, for example, the user inputs registered account information and login password information on a login/registration interface, initiates a login authentication request to a background, and after the background authenticates the login authentication request, the user logs in, and enters a login state at this time. After entering the login state, the user can execute various operation processes according to actual requirements, the user interface of the software to be tested identified by A2 is used for example, the user can perform answering operation, the content of the question is acquired according to the question stem, the alternative answer is obtained from the option, and the selected answer is filled in the answer. The whole processing process can be automatically stored according to the setting until all answers of the questions are summarized and submitted after the answers of all the questions are finished. If the software under test cannot interact with the background due to network abnormality, network disconnection and the like in the whole process, the user interface of the software under test identified by A2' is entered, that is, a login box pops up on the user interface of the software under test identified by A2, that is, a login box pops up in the current operation page processed before, and the login box can be in any position of the current operation page, such as the positions identified by B1 or B2 in FIG. 3, are all feasible. Initiating a new login authentication request to the background again by the account information and the login password information in the pop-up login frame, and authenticating the new login authentication request by the background, namely: and comparing the new login authentication request with the account information and the login password information submitted in the previous login request, and if the comparison result is consistent, passing the authentication. The processing of the operation that was interrupted previously, for example, previously solved to the 10 th question, can be continued and answered starting with the 11 th question after the interruption is resumed.
Fig. 4 is a schematic diagram of hardware entities performing information interaction in an embodiment of the present invention, where fig. 4 includes: terminal equipment 1 and a server 2. The terminal device 1 is composed of terminal devices 11-14, and the terminal devices 11-14 perform information interaction with a server through a wired network or a wireless network. The terminal devices 11-14 include cell phones, desktop computers, PCs, all-in-one machines and the like. By adopting the embodiment of the invention, the main processing logic is executed at the terminal, and the server only carries out verification and feedback response on the request submitted by the terminal. Wherein the processing logic 10 of the terminal comprises: and S1, inputting the registered account information and login password information at the terminal side, initiating a login authentication request to the background server, and after the background server passes the authentication of the login authentication request, realizing the user login and entering a login state. S2, when the log-in state is executed, the operation process based on the request interaction is buffered, and the operation process may be stored in a first-in first-out data queue. And S3, interrupting the operation processing based on the request interaction after the login state is invalid, monitoring that the request is interrupted, and popping up a login frame. S4, inputting the account information and the login password information again, initiating a login authentication request to the background server, and the background server authenticating the login authentication request, that is, the background server verifies whether the two login requests are the same as the request for the same operation, specifically, the server may compare the new login authentication request with the account information and the login password information submitted in the previous login request, and if the comparison result is the same, the authentication is passed. And S5, after the verification is passed, implementing the continuous processing after the login state is invalid, extracting the operation processing corresponding to the first request from the cache, interrupting and recovering the operation processing, and continuously executing the operation processing.
By adopting the embodiment of the invention, the operation processing corresponding to the first request in the login state is cached in advance, after the interruption of the first request caused by the failure of the login state is monitored, the input area for login is triggered on the current page of the operation processing, the login information can be directly acquired on the current page for verification, and the user does not need to manually execute the login operations such as account input before, so that the current page does not need to be refreshed and loaded again and jump to the initial login page. And if the login information initiated in the login state and the login information reinitiated after the login state is invalid are verified to be based on the same login request, extracting the operation processing corresponding to the first request saved in advance from the cache, and resuming the execution of the operation processing interrupted before. That is to say, although the current operation of the user is interrupted, the current operation state is cached, so that the recovery request is directly initiated next time, the time cost and the labor cost of the whole operation processing are reduced, and the processing efficiency is improved.
The above example of fig. 4 is only an example of a system architecture for implementing the embodiment of the present invention, and the embodiment of the present invention is not limited to the system architecture described in the above fig. 4, and various embodiments of the method of the present invention are proposed based on the system architecture described in the above fig. 4.
As shown in fig. 5, the method for processing the renewal after the login status fails according to the embodiment of the present invention includes: and initiating a first request in a login state, and executing operation processing corresponding to the first request, wherein the first request is a service request (101). In an actual application, account information and a login password are input in a user interface (such as a webpage accessed by opening a browser) of a terminal, the account information and the login password are encapsulated into a request and can be sent to a background server for login verification, and after the verification is passed, the terminal enters a login state. After entering the login state, the user can edit pictures in the personal space, edit mails to be sent out (including editing processes of pictures, texts, and the like) and the like according to the received operation request. Caching (102) the operational treatment corresponding to the first request. After entering a login state, a user can execute various operation processing according to actual requirements, if the software to be tested cannot interact with the background server due to network abnormity, network breaking and the like in the whole processing process, the login state is invalid, the first request is interrupted due to login state invalidation, when the first request is interrupted, specific services are prevented from performing any response processing on the abnormal interruption condition, and an input area (103) for login is triggered on the current page of the operation processing. In an actual application, after entering the login state, according to a received operation request, such as editing a picture in a personal space, editing a mail to be sent (including editing processing of a picture, a text and the like), and the like, if a network is abnormal or disconnected in the process of executing the operation processing by a user, the result of the authentication performed by the background server is that the login state fails, and account information and a login password need to be re-input for background authentication. Obtaining login information (such as account information or account information and a login password) in the input area, initiating a second request according to the login information, wherein the second request is a login request, and requesting to verify whether the second request and the login request initiated before triggering the first request are the same login request (104). And when the login request is the same, extracting the operation processing corresponding to the first request from the cache, interrupting and recovering the operation processing, and continuously executing the operation processing (105).
In the embodiment of the invention, after the terminal enters the login state and is invalid, the current operation processing cannot be continued, and the request related to the operation processing is interrupted. The network anomaly includes at least: 1) the network itself is unstable; 2) the terminal and the background server have excessive data interaction, so that network congestion is caused, and the terminal request cannot be responded to immediately. For background verification by re-inputting account information and a login password under the condition of failure in a login state, an existing implementation manner is as follows: as shown in fig. 6, the processing of the forward skip mode is: and jumping back to the page where the user is located before, wherein the processing process comprises the following steps: the user triggers an AJAX request on the page A to request the server to verify. And when the verification shows that the login state is invalid, the page jumps to the login page. At this time, the user is required to input the current user name and password on the login page and submit the authentication again, and the user jumps to the page a after the authentication is successful. Another existing implementation is: as shown in fig. 7, the post jump mode, i.e. page refresh, includes the following steps: the user triggers an AJAX request on the page A to request the server to verify. When the verification is that the login state is invalid, a login box is popped up. And the user inputs the current user name and the password in the login box and submits the verification again, and the page A is refreshed after the verification is successful.
Aiming at the defects of the implementation mode, the embodiment of the invention is adopted, a browser is taken as an example, the browser on a mobile phone and a computer is suitable for the background authentication by re-inputting account information and a login password under the condition that the login state is invalid, and the monitoring, control and other processing for login state duration processing in the embodiment are realized by adopting components in the browser. The login state duration is as follows: and after the login state of the current website account is invalid, the user re-inputs the account and the password and submits the account and the password to the website background, and the login state is successfully verified by the server, so that the continuation of the login state is realized. Specifically, an REST component and a PTLogin component based on AJAX can be adopted, and a specific processing process can be realized based on PTLogin, an AJAX request caching strategy and an account front-end secondary verification mechanism. The PTLogin is used for starting a community unified login page provided by an application platform for each service, and when a certain service needs user login, a Ptlogin box can be embedded to realize a webpage login function quickly and conveniently. The AJAX is an abbreviation of Asynchronous JavaScript And XML, refers to Asynchronous JavaScript And XML, is used for creating webpage development of interactive webpage application, And can enable the webpage to realize Asynchronous updating by exchanging a small amount of data with a server in an application background. This means that certain parts of the web page can be updated without reloading the entire web page. In one practical application, the REST component listens for a request exception, blocks, takes over processing logic, and performs request caching before the exception is snooped for subsequent relay processing, thereby directly resending the cached data (i.e., the request). And after taking over the processing logic, the REST component triggers the PTLogin component to pop up a login box, and after account information is input, the PTLogin component logs in. In order to ensure the consistency of the login requests, the account information of the previous and next login requests is subjected to secondary verification. Through these processes, the previously stored request is cached and then re-extracted and resumed for execution, which may be referred to as asynchronous processing of the request, and this asynchronous processing causes the network element to be asynchronously updated, which means that some part of the operation processing of the web page may be updated without reloading the entire web page. That is to say, after the login state of the website account is invalid, the login state can be continued without refreshing the whole webpage, so that coherent and light good experience is brought to the website user, unnecessary repeated loading of static resources of the website can be avoided, unnecessary repeated operations of the user are reduced, particularly, the user edits a form and other heavy operations, labor and time cost are reduced, and the overall processing efficiency is improved.
The method for processing the continuous period after the login state fails comprises the following steps: and initiating a first request in a login state, and executing operation processing corresponding to the first request. In a practical application, account information and a login password are input in a user interface (such as a webpage accessed by opening a browser) of a terminal, the account information and the login password are encapsulated into a request and can be sent to a server at a background for login verification, and after the verification is passed, the terminal enters a login state. After entering the login state, the user can edit pictures in the personal space, edit mails to be sent out (including editing processes of pictures, texts, and the like) and the like according to the received operation request. Caching the operation processing corresponding to the first request. In an actual application, when the first request is at least one, at least one operation process corresponding to the first request is buffered in a first-in first-out data queue according to a time sequence. The data queue is distinguished from the data stack, and the data queue is: a first-in-first-out (FIFO) data structure. Generally speaking, the concept of queue is that at ordinary times, people queue up and order, you rank at the 1 st, and then you turn to the first, that is, first in first out, first come, first stored, and first read (or called extraction). The data stack is also called a stack, one end of which is called the top of the stack, and the other end of which is called the bottom of the stack. Inserting a new element into a stack, also called pushing, stacking or pushing, is to put the new element on the top of the stack element to make it become a new top element, and deleting the element from a stack, also called popping or popping, is to delete the top element to make its adjacent element become a new top element, the mechanism of the data stack is first in and last out, and last in and first out.
In this embodiment, after entering the login state, the user may perform various operation processes according to actual requirements, if the software to be tested cannot interact with the background server due to network abnormality or network disconnection, and the like in the whole processing process, it indicates that the login state has failed, the first request may be interrupted due to the failure of the login state, and after it is monitored that the first request is interrupted, service response processing on the first request is blocked, for example, a specific service is prevented from performing any response processing on the abnormal interruption condition, and thus, the abnormal processing on the interruption of the first request is taken over. And triggering an input area for login on the current page of the operation processing. In an actual application, after entering the login state, according to a received operation request, such as editing a picture in a personal space, editing a mail to be sent (including editing processing of a picture, a text and the like), and the like, if a network is abnormal or disconnected in the process of executing the operation processing by a user, the result of the authentication performed by the background server is that the login state fails, and account information and a login password need to be re-input for background authentication. Obtaining login information (such as account information or account information and a login password) in the input area, initiating a second request according to the login information, and requesting to verify whether the second request and the login request initiated before triggering the first request are the same login request or not. And when the login requests are the same, extracting the operation processing corresponding to the first request from the cache, interrupting and recovering the operation processing, and continuously executing the operation processing.
By adopting the embodiment of the invention, in a practical application, monitoring and control processing can be executed through a component (such as a REST component) in a terminal browser. Wherein, the REST component is a component which takes AJAX as core and realizes asynchronous operation control and monitoring processing of RESTFUL interface standard. The REST component completes the AJAX request, AJAX response status code (status code), snoop processing and the like of the whole station. The monitoring process may be: and monitoring the AJAX response status code which is fed back by the background server and has failed in the login status, and interrupting the first request. The control process includes: 1) and buffering operation processes corresponding to the one or more first requests, such as one or more operation processes (including specific business processes of graphs, text editing and the like) into a first-in first-out data queue according to a time sequence. 2) Blocking service response processing to the first request; 3) taking over and starting exception handling of the first request interrupt; 4) and informing the Ptlogic component to pop up an input area (such as a login box) for login in the current operation processing page so as to re-input login information (account information and login password information) in the login box for secondary login verification. The purpose of the secondary login verification is to ensure that the two login operations before and after are based on the same login request, so as to directly extract the interrupted processing in the same service operation request from the cache and recover the processing. Specifically, after the REST component caches the AJAX request, the AJAX request is sent to the background server, meanwhile, the REST component caches the request objects (such as operation processing corresponding to the request) in sequence to the sending queue, and if the background server detects that the account login state is overtime and invalid, the background server returns a response state code indicating that the login state is invalid. And the REST component monitors the response state code of the failure of the login state, and executes the control processing of the login state duration. In the process of control processing, when the response status code is monitored, the ptlogic component is notified to pop up a login frame on the current operation processing page, and login information (account information, and login password information) with a login state disabled on the current operation processing page is marked at the same time. The account information and the login password information which are input again after the login state is invalid are represented by an account B and a password B respectively. Whether login information input for the first time and the second time is required to be verified, whether the account A and the password A and the account B and the password B are based on the same login request or not is verified, if the login information input for the first time and the second time is proved to be the same after verification of the background server, the login information input for the first time and the login information input for the second time and the previous login request are both based on the same login request, refreshing or returning to a previous operation processing page is not required, the cached requests are directly and automatically extracted from a cached sending data queue in sequence, namely, interrupted processing in the same service operation request is extracted and recovered, and therefore the purpose of not interrupting user operation is achieved. That is, the continuous login after the login state is invalid after the secondary login verification is passed is successful, otherwise, the continuous login is regarded as failure. Specifically, if the login information input in the previous and subsequent two times is different, which indicates that the user logs in another account again, the system automatically jumps to a set operation processing page (such as a website home page or an email login initial page).
Based on the foregoing embodiment, in an implementation manner of an embodiment of the present invention, in a previous login process, the first account information and the first login password information are sent to the server for login authentication, and after the server passes the authentication, a login operation is performed to enter the login state. And when the login state is invalid, initiating a second request according to the login information (such as second account information and second login password information), and verifying whether the second request is the same login request as the login request initiated before triggering the first request by a request server. Specifically, the login information is second account information and second login password information, the second account information and the second login password information are packaged into the second request, and the second request is sent to the server for verification. And in the process of server verification, comparing the second account information and the second login password information with the first account information and the first login password information, and if the comparison is consistent, passing the verification. After the verification is passed, the verification result is compared to be consistent and is used as response feedback aiming at the second request to be sent to the terminal, so that the terminal receives the response feedback which is logged into the same login request for multiple times. In a practical application, the server may also feed back a response status code to the terminal, and a component of the terminal (for example, after the REST component monitors the response status code of the failed login status, knowing that the request is interrupted, if the REST component monitors the response status code, the ptlogic component is notified to pop up a login box, so that the user re-inputs a new account and a password in the login box and submits the new account and the password to a background service area of the website for verification after the current login status of the website is failed, and after the verification of the website successfully passes through the server, continuation of the login status can be realized.
By adopting the embodiment of the invention, the current page can not be refreshed again due to overtime of the login state, the user can return to the previous state only by inputting the account password again in the popup frame, the feeling is very smooth, the unnecessary waiting time of the user is reduced, the current operation processing of the user is not disturbed, for example, the thinking of the user cannot be influenced by breaking the network when the user writes a novel, and the user can continue the thinking to create the novel after the login state is invalid. For another example, when a user creates a new image-text message, because a large number of pages of the form editing content exist, if the page is interrupted, the loss is large, and by adopting the embodiment of the invention, the user does not worry about the influence of network interruption completely, the user can concentrate all efforts on the editing and typesetting work, and the system can reduce the risk of losing the current editing content to the minimum.
Based on the foregoing embodiment, in an implementation manner of the embodiment of the present invention, when whether the second request is the same as a login request initiated before the first request is triggered or not, the operation process corresponding to the first request is extracted from the cache and is interrupted for recovery. Specifically, the analysis server feeds back a response feedback to the terminal, and multiple logins are obtained from the response feedback as the same login request. For two previous and subsequent login requests, the two previous and subsequent login requests are the same login request. When the two previous login requests and the two subsequent login requests are the same login requests, at least one operation process corresponding to the first request is extracted from the buffered data queue according to a first-in first-out sequence, and the at least one operation process corresponding to the first request is continuously executed according to a time sequence.
As shown in fig. 8, the system for processing a renewal after a login status failure according to an embodiment of the present invention includes: the terminal and 41 server 42; the registered account information and login password information may be input in a web page opened by the terminal 41 through a browser, a login authentication request is initiated to the server 42, and the server 42 authenticates the login authentication request, and then the user logs in, and enters a login state. And executing operation processing based on request interaction and caching in the login state, interrupting the operation processing based on the request interaction after the login state is invalid, monitoring that the request is interrupted, and popping up a login frame. The account information and the login password information are input again at the terminal 41, a login authentication request is initiated to the server 42, the server 42 authenticates the newly initiated login authentication request and after the authentication is passed, the operation processing corresponding to the first request is extracted from the cache, the operation processing is interrupted and recovered, and the operation processing is continuously executed at the terminal 41 side. Wherein, the terminal 41 includes: a first request unit 411, configured to initiate a first request in a login state, and execute an operation process corresponding to the first request, where the first request is a service request; a cache processing unit 412, configured to cache the operation processing corresponding to the first request; a monitoring unit 413, configured to interrupt the first request after the login state fails, monitor that the first request is interrupted, and trigger an input area for login on a current page of the operation processing; a second request unit 414, configured to obtain login information in the input area, initiate a second request according to the login information, where the second request is a login request, and request to verify whether the second request is the same login request as a login request initiated before the first request is triggered; a recovery processing unit 415, configured to, in the case of the same login request, extract the operation processing corresponding to the first request from the cache, interrupt and recover the operation processing, and continue to execute the operation processing.
By adopting the embodiment of the invention, the browser is taken as an example, the browser on a mobile phone and a computer is suitable, and the monitoring, control and other processing for login state duration processing in the embodiment are realized by adopting the components in the browser. Specifically, a specific processing procedure can be realized by adopting an REST component and a PTLogin component based on AJAX and based on a PTLogin + AJAX request caching strategy + account front-end secondary verification mechanism. In one practical application, the REST component listens for a request exception, blocks, takes over processing logic, and performs request caching before the exception is snooped for subsequent relay processing, thereby directly resending the cached data (i.e., the request). And after taking over the processing logic, the REST component triggers the PTLogin component to pop up a login box, and after account information is input, the PTLogin component logs in. In order to ensure the consistency of the login requests, the account information of the previous and the next login requests is subjected to secondary verification. Through these processes, the previously saved request is cached and then re-extracted and resumed for execution, which may be referred to as asynchronous processing of the request, and this asynchronous processing causes the network element to be updated asynchronously, which means that some part of the operation processing of the web page may be updated without reloading the entire web page. That is to say, after the login state of the website account is invalid, the login state can be continued without refreshing the whole webpage, so that coherent and light good experience is brought to the website user, unnecessary repeated loading of static resources of the website can be avoided, unnecessary repeated operations of the user are reduced, particularly, the user edits a form and other heavy operations, labor and time cost are reduced, and the overall processing efficiency is improved.
In an embodiment of the present invention, the cache processing unit is further configured to: and when the first request is at least one, caching at least one operation process corresponding to the first request into a first-in first-out data queue according to a time sequence.
In an implementation manner of the embodiment of the present invention, the terminal further includes: a blocking unit to: and blocking the service response processing of the first request, and taking over the exception processing of the first request interrupt.
In an implementation manner of the embodiment of the present invention, the terminal further includes: a login request unit to: before triggering the first request, packaging first account information and first login password information into the login request, and sending the login request to a server for login verification; and executing login operation after the server passes the verification, and entering the login state.
In an implementation manner of the embodiment of the present invention, the second request unit has two specific implementations. One specific implementation of the second request unit is: the second request unit is further configured to, when the login information is second account information and second login password information, encapsulate the second account information and the second login password information into the second request, and send the second request to the server; and after the server compares and verifies the second account information and the second login password information with the first account information and the first login password information, response feedback of the same login request for multiple logins is received. Another specific implementation of the second request unit is as follows: the second request unit is further configured to, when the login information is second account information and second login password information, encapsulate the second account information and the second login password information into the second request, and send the second request to a local login verification component of the terminal; and after the login verification component compares the second account information and the second login password information with the first account information and the first login password information which are stored before and verifies that the second account information and the second login password information pass, response feedback of the same login request for multiple logins is received.
In an implementation manner of the embodiment of the present invention, the recovery processing unit is further configured to: and analyzing the response feedback to obtain that the multiple logins are the same login request, and extracting at least one operation process corresponding to the first request from the cached data queue according to a first-in first-out sequence so as to continuously execute the at least one operation process corresponding to the first request according to a time sequence.
Here, it should be noted that: the above description related to the terminal and the server items is similar to the above description of the method, and the description of the beneficial effects of the same method is omitted for brevity. For technical details not disclosed in the embodiments of the terminal and the server of the present invention, please refer to the description of the embodiments of the method flow of the present invention.
The embodiment of the invention is explained by taking a real application scene as an example as follows:
taking a scene of logging in a webpage through a browser as an example, because the existing login state failure duration implementation scheme is adopted, the current webpage where the user is located before can be refreshed or re-skipped. The method can be roughly divided into a front-jump method as shown in fig. 6 and a back-refresh method as shown in fig. 7 according to the specific implementation manner of refresh or jump. The forward jump mode shown in fig. 6 includes: the user triggers an AJAX request on a page A, the background verification is that the login state fails, the page jumps to the login page, the user inputs a current user name and a password and submits, the background verification succeeds, and the page jumps to the page A. The back jump method shown in fig. 7 includes: the user triggers an AJAX request on the page A, the background verification is that the login state is invalid, the login box is popped up, the user inputs the current user name and password and submits, the background verification is successful, and the page A is refreshed.
Whether the page where the user is located before is refreshed or re-jumped back to, labor and time costs are brought, for example, the user name and the password need to be manually input again, and the previous operation is manually re-completed; for example, the current operation processing of the user is interrupted, and the user service site of the previous page cannot be reserved; the target page can go through a reloading process, even jump to the login page, the flow is too long, and the time is wasted.
The embodiment of the invention is adopted in the scene of the browser login webpage, and is a scheme which is based on the AJAX technology, does not refresh and renew after the login state is invalid and does not interrupt the operation of a user. The embodiment of the invention enhances the traditional website login duration technology, aims to realize login status duration without refreshing the whole webpage after the login status of the website account is invalid, brings coherent and light good experience to website users, and can avoid unnecessary repeated loading of static resources of the website. After the non-refresh period is finished, the page automatically resends the AJAX asynchronous request interrupted due to the failure of the login state, so that unnecessary repeated operations of the user are reduced, particularly the heavy operations of editing the form and the like of the user are avoided, the operation of the user is not interrupted due to the re-login period, the previously interrupted AJAX request can be continuously finished, and a more coherent, lighter and faster processing flow is brought.
In the embodiment of the invention, a user logs in a website page by using an account _ A, a user clicking action triggers two AJAX requests (such as req _1 and req _2), a REST component sends the requests to a server, and simultaneously, request objects are sequentially cached in a sending queue, if the server detects that the login state of the account is overtime and invalid, the server returns invalid status code, namely a status code, which is a number used for marking the account state of the user agreed by a website front stage and a website background. The REST component monitors that the status code informs the Ptlogic component to pop up a login box at the current page, and marks that the account with the failed login state of the current page is account _ A.
In the embodiment of the invention, the user re-inputs the account number _ A and the password and submits the account number _ A and the password to the server, the server returns logSuccess information after verification is successful, and the Ptlogin component removes a login bullet frame and executes account number secondary verification after monitoring the logInSuccess, namely: verifying whether the account number successfully logged in newly is the same as the previously marked login-state failure account number, and if so, automatically sending the cached requests in the requestQueue in sequence, thereby achieving the purpose of not interrupting the user operation; if the difference is different, the system automatically jumps to the set website home page when the account number is other than the account number which indicates that the user logs in again.
Fig. 9 is a schematic diagram of a processing procedure for implementing an embodiment of the present invention, including: the method comprises the following steps: the terminal initiates at least one AJAX request (req _1, req _ 2); secondly, the step of: the terminal adds at least one AJAX request into the cache, and the cache queue of the AJAX request is [ req _1, req _2 ]](ii) a ③: the server detects that the login state is invalid, feeds back the invalid status code to the terminal, and the terminal receives the status code, specifically, the REST component on the terminal side monitors that the status code is received and informs the Ptlogic component to pop up a login frame, and it needs to be noted that the invalid account number 'account number A' is recorded and does not need to be manually input again by the user; sixthly, the method comprises the following steps: submitting the account A and the password in a login box to carry out server verification (such as authentication through a Ptlogin authentication server); seventhly-eight: after authentication, if the login success (loginSuccess) is returned to Ptlogin component, then remove login box, indicate account number secondary verification success, go to execute in the vehicle (r); ninthly, if the login is unsuccessfully returned to the Ptlogic component after authentication, the account number is described to fail in secondary verification, the new login account number is not the account number A, the website is jumped to the website home page, and the processing is finishedAnd (5) carrying out the process. R: after the account number is successfully verified for the second time, a cache queue [ req _1, req _2 ] is requested from AJAX]The method comprises the steps of sequentially acquiring AJAX requests and automatically sending the AJAX requests (req _1 and req _ 2);
Figure BDA0001246745880000271
and (4) after detecting that the login duration after the login state failure is normal, ending the duration processing flow, and continuing the request data interaction between the terminal and the server.
In the above processing procedure, for the REST component taking AJAX as a core, the REST component is used for unified global state code monitoring. Specifically, the REST component is an asynchronous operation controller and a listener which realize the RESTFUL interface standard, and the monitoring processing of the AJAX request of the whole station and the status code of the AJAX request is completed by the REST component. The REST component is also used to create an AJAX request buffer queue. Specifically, the REST component may cache the AJAX request(s) in an AJAX request cache queue to facilitate fetching and resending after the login state is resumed. The REST component is also used for blocking and taking over of the business exception handling logic. Specifically, when the REST component monitors the status code of the failure in the login state, the REST component manages the processing logic of the abnormal condition, prevents the specific service from performing any processing on the abnormal condition, and simultaneously informs the PtLogin component to pop up the login box.
In the above processing procedure, for the PtLogin component, the PtLogin component is used for secondary verification of the login account. Specifically, a secondary verification logic for consistency between login accounts is added to the PtLogin component, namely: when a login box is popped up, recording account information (expiredAccount) with a login state invalid by reading a cookie mode; after the account information is input into the login box and login is successful, whether the new login account information (renewalcount) is the same as the previous failure account information (expiredAccount) or not is verified. If the renewalcount is the same as expiredAccount, the renewal login is successful, otherwise, the renewal login is considered as failure.
After the verification of the PtLogin component is successful and the renewal login is successful, the REST component is also used for AJAX request relay. Specifically, an AJAX request relay strategy is added to the REST component, and the strategy can sequentially take out requests in an AJAX request cache queue and resend the requests to a background of the website. And when the secondary verification result of the login account is 'successful login for a long time', the PtLogin component calls a relay strategy of the REST component to send the AJAX request cached before.
Through the coordination processing of the 2 core components (REST component and PtLogin component), the processing purposes of 'no refreshing of login duration page' and 'no interruption of user operation' are finally achieved. By adopting the embodiment of the invention in the scene of the browser logging in the webpage, taking a financial management service as an example, any AJAX asynchronous operation is carried out on all pages in the financial account center, the current page cannot be refreshed again due to overtime of the logging state, the previous state can be returned only by re-inputting the account password in the popup box, the feeling is very smooth, the unnecessary waiting time is reduced, and when the logging state is continuously operated every time, the network flow of about 80KB (HTML loads 2KB, pictures 15KB, Javascript files 50KB and CSS files 15KB) can be saved, the page jumping time of about 4 seconds can be saved, and the processing efficiency is obviously enhanced.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit may be implemented in the form of hardware, or in the form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A method for processing a renewal period after a login state is invalid is applied to a browser, and comprises the following steps:
packaging the first account information and the first login password information into a login request, and sending the login request to a server for login verification;
after the server passes the verification, executing login operation and entering a login state;
initiating a service request in the login state, and executing operation processing corresponding to the service request;
caching the operation processing corresponding to the service request;
when the REST component in the browser monitors the AJAX response state code which is sent by the server and fails in the login state, executing the following processing: blocking the service response processing of the service request, taking over and starting the exception processing of the service request interruption, and informing a login verification component to pop up an input area for login on the current page of the operation processing; the server sends the login state invalidation AJAX response state code after detecting that the login state of the first account is overtime and invalidation;
acquiring login information in the input area, and packaging second account information and second login password information included in the login information into a new login request;
sending the new login request to the login verification component so that the login verification component compares second account information and second login password information included in the new login request with the first account information and first login password information which are stored before;
when the new login request is the same login request as the login request initiated before the service request, removing the input area for login from the current page of the operation processing, extracting the operation processing corresponding to the service request from the cache, interrupting and recovering the operation processing, and continuously executing the operation processing;
and when the new login request is different from the login request initiated before the service request, automatically jumping to a set operation processing page, wherein the set operation processing page comprises a website home page or an email login initial page.
2. The method of claim 1, wherein caching the operation processing corresponding to the service request comprises:
and when the number of the service requests is at least one, caching at least one operation process corresponding to at least one service request into a first-in first-out data queue according to a time sequence.
3. The method of claim 2, further comprising:
and sending the new login request to a server, wherein the server is used for replacing the login verification component, so that the server compares the second account information and the second login password information with the first account information and the first login password information and sends response feedback of logging in the same login request for multiple times to the browser after the verification is passed.
4. The method of claim 3, wherein when the new login request is the same login request as a login request initiated before the service request, extracting the operation process corresponding to the service request from the cache and resuming the operation process by interrupting the operation process, comprises:
and analyzing the response feedback to obtain that the multiple logins are the same login request, and extracting at least one operation process corresponding to at least one service request from the cached data queue according to a first-in first-out sequence so as to continuously execute the at least one operation process corresponding to the service request according to a time sequence.
5. A terminal, characterized in that the terminal comprises:
the login request unit is used for packaging the first account information and the first login password information into a login request and sending the login request to the server for login verification; after the server passes the verification, executing login operation and entering a login state;
a first request unit, configured to initiate a service request in the login state, and execute an operation process corresponding to the service request;
a cache processing unit, configured to cache the operation processing corresponding to the service request;
a monitoring unit, configured to, when the REST component in the browser monitors an AJAX response status code sent by the server and in which the login status fails, execute the following processing: blocking the service response processing of the service request, taking over and starting the exception processing of the service request interruption, and informing a login verification component to pop up an input area for login on the current page of the operation processing; the server detects that the login state of the first account number is overtime and invalid, and then sends the login state invalid AJAX response state code;
the second request unit is used for acquiring login information in the input area and packaging second account information and second login password information included in the login information into a new login request; sending the new login request to the login verification component so that the login verification component compares second account information and second login password information included in the new login request with the first account information and first login password information which are stored before;
a recovery processing unit, configured to, when the new login request is the same login request as a login request initiated before the service request, remove the input area for login from the current page of the operation processing, extract the operation processing corresponding to the service request from the cache, interrupt and recover, and continue to execute the operation processing; and when the new login request is different from the login request initiated before the service request, automatically jumping to a set operation processing page, wherein the set operation processing page comprises a website home page or an email login initial page.
6. The terminal of claim 5, wherein the cache processing unit is further configured to:
and when the number of the service requests is at least one, caching at least one operation process corresponding to at least one service request into a first-in first-out data queue according to a time sequence.
7. The terminal of claim 6, wherein the second request unit is further configured to:
and sending the new login request to a server, wherein the server is used for replacing the login verification component, so that the server compares the second account information and the second login password information with the first account information and the first login password information and sends response feedback of logging in the same login request for multiple times to the browser after the verification is passed.
8. The terminal of claim 7, wherein the recovery processing unit is further configured to:
and analyzing the response feedback to obtain that the multiple logins are the same login request, and extracting at least one operation process corresponding to the service request from the cached data queue according to a first-in first-out sequence so as to continuously execute the at least one operation process corresponding to the service request according to a time sequence.
9. An electronic device, characterized in that the electronic device comprises:
a memory for storing executable instructions;
a processor, configured to implement the method for processing a continuation after a failure of a logged state of any one of claims 1 to 4 when executing the executable instructions stored in the memory.
10. A computer-readable storage medium storing executable instructions for implementing the method of processing a continuation of a login-state invalidation of any of claims 1 to 4 when executed by a processor.
CN201710154898.1A 2017-03-15 2017-03-15 Method and terminal for processing duration after login state failure Active CN108632301B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710154898.1A CN108632301B (en) 2017-03-15 2017-03-15 Method and terminal for processing duration after login state failure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710154898.1A CN108632301B (en) 2017-03-15 2017-03-15 Method and terminal for processing duration after login state failure

Publications (2)

Publication Number Publication Date
CN108632301A CN108632301A (en) 2018-10-09
CN108632301B true CN108632301B (en) 2022-08-30

Family

ID=63686763

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710154898.1A Active CN108632301B (en) 2017-03-15 2017-03-15 Method and terminal for processing duration after login state failure

Country Status (1)

Country Link
CN (1) CN108632301B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110166529A (en) * 2019-04-16 2019-08-23 平安普惠企业管理有限公司 It keeps logging in state method, apparatus, equipment and storage medium
CN110321195B (en) * 2019-05-29 2022-07-08 平安科技(深圳)有限公司 Data caching method for operation page, electronic device and readable storage medium
CN111131619B (en) * 2019-12-30 2021-04-27 广州酷狗计算机科技有限公司 Account switching processing method, device and system
CN111460411B (en) * 2020-04-17 2023-08-04 支付宝(杭州)信息技术有限公司 Method and system for keeping login state
CN111654453B (en) * 2020-04-23 2023-04-18 平安国际智慧城市科技股份有限公司 Form data offline caching method and device, terminal and storage medium
CN112069476B (en) * 2020-09-16 2022-07-12 杭州安恒信息技术股份有限公司 Login state detection method, device, equipment and readable storage medium
CN114650147A (en) * 2020-12-02 2022-06-21 成都鼎桥通信技术有限公司 Login method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102131152A (en) * 2010-01-15 2011-07-20 中兴通讯股份有限公司 Method and system for maintaining continuity of instant message service
CN102546538A (en) * 2010-12-15 2012-07-04 中兴通讯股份有限公司 Business continuity implementation method and business continuity implementation system
CN102982044A (en) * 2011-09-07 2013-03-20 腾讯科技(深圳)有限公司 Method and device for webpage browsing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4774375B2 (en) * 2007-02-20 2011-09-14 株式会社リコー Network communication equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102131152A (en) * 2010-01-15 2011-07-20 中兴通讯股份有限公司 Method and system for maintaining continuity of instant message service
CN102546538A (en) * 2010-12-15 2012-07-04 中兴通讯股份有限公司 Business continuity implementation method and business continuity implementation system
CN102982044A (en) * 2011-09-07 2013-03-20 腾讯科技(深圳)有限公司 Method and device for webpage browsing

Also Published As

Publication number Publication date
CN108632301A (en) 2018-10-09

Similar Documents

Publication Publication Date Title
CN108632301B (en) Method and terminal for processing duration after login state failure
US10291771B2 (en) Method for managing electric quantity of battery, mobile terminal and computer storage medium
CN104731712B (en) Method for automatically cleaning cache data and mobile terminal
CN104883658B (en) The processing method of virtual card information and system
CN106912034B (en) Short message processing method, system and terminal
CN104660912A (en) Photographing method and photographing device
CN105760057A (en) Screenshot device and method
CN106487812A (en) A kind of method for authenticating and device
CN104768198A (en) Mobile terminal and intelligent switching method and device for terminal network of mobile terminal
CN108965365B (en) Data processing method, terminal and computer storage medium
CN106506548A (en) The defence installation of cross-site scripting attack and method
CN106547439B (en) Method and device for processing message
CN106331767B (en) Data error correction processing method, terminal, server and system
WO2017032118A1 (en) Incoming call processing method, apparatus, and system
CN106534158A (en) Account login control device and method
CN106603707B (en) Data processing method, terminal and server
CN106682062B (en) Website navigation processing method and terminal
CN109240579B (en) Touch operation method, equipment and computer storage medium
CN104932785A (en) Processing method and processing device for mobile terminal
CN105263195A (en) Data transmission device and method
CN105205159B (en) Device and method for automatically feeding back information
CN106547565B (en) Browser exception reporting method and system
CN105224647A (en) Image display method and device
CN105991293A (en) Verification method and verification device
CN105827531A (en) Routing access method and terminal

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