CN112214699B - Page processing method and related device - Google Patents

Page processing method and related device Download PDF

Info

Publication number
CN112214699B
CN112214699B CN201910623707.0A CN201910623707A CN112214699B CN 112214699 B CN112214699 B CN 112214699B CN 201910623707 A CN201910623707 A CN 201910623707A CN 112214699 B CN112214699 B CN 112214699B
Authority
CN
China
Prior art keywords
request message
login
preset
server
target
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
CN201910623707.0A
Other languages
Chinese (zh)
Other versions
CN112214699A (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 CN201910623707.0A priority Critical patent/CN112214699B/en
Publication of CN112214699A publication Critical patent/CN112214699A/en
Application granted granted Critical
Publication of CN112214699B publication Critical patent/CN112214699B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • 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/0807Network architectures or network communication protocols for network security for authentication of entities using tickets, e.g. Kerberos
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a page processing method and a related device, which can save resources consumed in the process of generating a request message on one hand, and can improve the page loading efficiency on the other hand, thereby realizing the efficient access of a new page. The method comprises the following steps: acquiring a first request message, wherein the first request message is used for requesting page data from a server; if the login operation is determined to be executed according to the first request message, adding the first request message to a preset request queue; executing login operation; receiving a first login identification sent by a server; updating a first request message in a preset request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier; and sending a target request message to the server so that the server sends the page data according to the target request message.

Description

Page processing method and related device
Technical Field
The present application relates to the field of network technologies, and in particular, to a method and an apparatus for processing a page.
Background
When a user accesses a page through a browser, some pages often require the user to log in to continue browsing pages.
In the prior art, when a user starts a browser on a client to browse a page, the client generates a page data request message and sends the page data request message to a background server. If the page data request message does not carry a user login identification (token) or carries an invalid token, the client is required to log in again, and after logging in, the client can obtain a new token and re-request the page data to complete page rendering.
However, when the client requests the page data again, that is, the page needs to be reloaded, the current page of the browser is refreshed, so that the page is flashed, and the display efficiency of the page is reduced.
Disclosure of Invention
The embodiment of the application provides a page processing method and a related device, which can save resources consumed in the process of generating a request message on one hand, and can improve the page loading efficiency on the other hand, thereby realizing the efficient access of a new page.
An embodiment of the present application provides a method for processing a page, including:
acquiring a first request message, wherein the first request message is used for requesting page data from a server;
if the login operation is determined to be executed according to the first request message, adding the first request message to a preset request queue;
Executing login operation;
receiving a first login identification sent by the server;
updating the first request message in the preset request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier;
and sending the target request message to the server so that the server sends the page data according to the target request message.
A second aspect of an embodiment of the present application provides a page processing apparatus, including:
the acquisition module is used for acquiring a first request message, wherein the first request message is used for requesting page data from a server;
the adding module is used for adding the first request message to a preset request queue if the login operation is determined to be executed according to the first request message;
the login module is used for executing login operation;
the receiving module is used for receiving the first login identification sent by the server;
the updating module is used for updating the first request message in the preset request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier;
And the sending module is used for sending the target request message to the server so that the server can send the page data according to the target request message.
Based on the second aspect, the embodiment of the present application further provides a first implementation manner of the second aspect:
the adding module is further configured to:
if the first request message does not carry the second login identification, adding the first request message to a preset first request queue;
updating the first request message in the preset request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier and comprises the following steps:
updating the first request message in the preset first request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier.
Based on the second aspect, embodiments of the present application further provide a second implementation manner of the second aspect:
the adding module is further configured to:
if the first request message carries a second login identifier, sending the first request message to the server;
receiving a first response message, wherein the first response message corresponds to the first request message;
Determining that the second login identifier is an invalid identifier according to the first response message;
adding the first request message to a preset second request queue;
updating the first request message in the preset request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier and comprises the following steps:
updating the first request message in the preset second request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier.
Based on the second aspect, or the first implementation manner of the second aspect, or the second implementation manner of the second aspect, embodiments of the present application further provide a third implementation manner of the second aspect:
the login module is further configured to:
and sending a second request message to the server, wherein the second request message is used for logging in the server.
Based on the third implementation manner of the second aspect, an embodiment of the present application further provides a fourth implementation manner of the second aspect:
the receiving module is further configured to:
and receiving a second response message of the server, wherein the second response message corresponds to the second request message, and the second response message carries the first login identification.
Based on the second aspect, or the first implementation manner of the second aspect, or the second implementation manner of the second aspect, embodiments of the present application further provide a fifth implementation manner of the second aspect:
the update module is further configured to:
and adding the first login identification into the first request message in the preset request queue to obtain a target request message.
Based on the first implementation manner of the second aspect, or the second implementation manner of the second aspect, embodiments of the present application further provide a fifth implementation manner of the second aspect:
the page processing apparatus further includes:
and the emptying module is used for emptying the preset first request queue or the preset second request queue.
The embodiment of the application also provides a terminal device, which comprises: memory, transceiver, processor, and bus system;
wherein the memory is used for storing programs;
the processor is used for executing the program in the memory, and comprises the following steps:
acquiring a first request message, wherein the first request message is used for requesting page data from a server;
if the login operation is determined to be executed according to the first request message, adding the first request message to a preset request queue;
Executing login operation;
receiving a first login identification sent by the server;
updating the first request message in the preset request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier;
sending the target request message to the server so that the server sends the page data according to the target request message;
the bus system is used for connecting the memory and the processor so as to enable the memory and the processor to communicate.
Embodiments of the present application also provide a computer readable storage medium comprising instructions which, when run on a computer, cause the computer to perform the method according to the first aspect.
From the above technical solutions, the embodiment of the present application has the following advantages:
the embodiment of the application provides a page processing method and a related device, wherein after a first request message for requesting page data is acquired, the method judges whether login operation is needed according to the first request message. When logging in is needed, the first request message is put into a preset request queue, after logging in is completed, the first login identification sent by the server is received, the first request message can be updated to obtain the target request message carrying the first login identification, and then page data is successfully requested.
Drawings
FIG. 1 is a schematic diagram of a page processing system according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of page processing according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an application of the method of page processing in an embodiment of the present application;
FIG. 4 is a schematic diagram of another application of the method of page processing in an embodiment of the present application;
FIG. 5 is a schematic diagram of a page processing apparatus according to an embodiment of the present application;
fig. 6 is a block diagram of a part of a structure of a mobile phone related to a terminal provided in an embodiment of the present application.
Detailed Description
The embodiment of the application provides a page processing method and a related device, which can save resources consumed in the process of generating a request message on one hand, and can improve the page loading efficiency on the other hand, thereby realizing the efficient access of a new page.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented, for example, in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "includes" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that the present application applies to page access scenarios, in particular, where the scenario generally refers to a data interaction process with a background server when a user browses a page through a browser on a client.
For easy understanding, an embodiment of the present application provides a method for processing a page, which is applied to a page processing system shown in fig. 1, please refer to fig. 1, fig. 1 is a schematic diagram of an architecture of a page processing system according to an embodiment of the present application, and the system includes: the system comprises a client and a server, wherein the client is in communication connection with the server.
It should be understood that the client may include, but is not limited to, a terminal device such as a smart phone, a personal computer, a palm computer, a television set-top box, etc., for outputting an application graphical interface, and transmitting an operation instruction input by a user through an input device such as a mouse, a keyboard, etc., to the server through a network.
When a user accesses a page for the first time through a browser on a client, a login operation, i.e., sending user data to a server for verification, is typically required. After passing the verification, the server returns a login identification token of the user to the client, and the client stores the token, generates a page data request carrying the token and sends the page data request to the server. Due to the existence of the token, the server can provide corresponding page data to the client to render the page for the user to use.
The following describes a page processing method provided by the embodiment of the present application from the perspective of a client. Fig. 2 is a schematic flow chart of a method of page processing in an embodiment of the present application, referring to fig. 2, and one embodiment of the method of page processing in an embodiment of the present application includes:
201. acquiring a first request message, wherein the first request message is used for requesting page data from a server;
in this embodiment, when a user needs to access a page on a browser on a client, a first request message, which may be an ajax request, is generated, where the message is used to request page data from a server to perform page rendering for use by the user.
202. If the login operation is determined to be executed according to the first request message, adding the first request message to a preset request queue;
the client judges whether a login operation is needed or not based on the first request message. It should be noted that, the client may determine, based on the first request message, multiple cases, where two kinds of login operations are required, and the two cases will be described below respectively:
(1) When a second login identifier of the user exists in the local cache of the browser, the first request message generated by the client side carries the second login identifier, and the second login identifier characterizes that the user has logged in the page before. However, after the server receives the first request message, the server may parse the first request message to obtain a second login identifier, and perform state detection on the second login identifier, and if the second login identifier is an invalid identifier, the server notifies the client, so that the client determines that the second login identifier is invalid, and needs to perform login operation again.
(2) When the second login identifier of the user does not exist in the local cache of the browser, the first request message generated by the client does not carry the second login identifier, and it can be determined that the user has not logged in the page before. At this time, the client itself may determine that a login operation is required based on the first request message.
In this embodiment, after the client determines that the login operation is required according to the first request message, the client places the first request message in a preset request queue, and it should be understood that the preset request queue may be a plurality of sets, and the first request message placed in the queue is in a pending state and may be used continuously in a subsequent flow.
203. Executing login operation;
after the client adds the first request message to the preset request queue, a login operation may be performed. It may be appreciated that the login operation is a verification process between the client and the server regarding the user data, and when the login operation is completed, the server may return a valid first login identifier to the client.
204. Receiving a first login identification sent by a server;
after the client finishes the login operation, namely the user passes the login verification, at this time, the server side generates a first login identifier corresponding to the user and returns the first login identifier to the client, and the client can store the first login identifier in a local cache of the browser to become the latest login identifier representing the user.
205. Updating a first request message in a preset request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier;
in this embodiment, after the client obtains the first login identifier, the first request message in the preset request queue may be updated according to the first login identifier to obtain the target request message, and it is noted that the target request message is the updated first request message, which is equivalent to updating the parameter included in the original first request message, so as to obtain the target request message carrying the first login identifier.
206. And sending a target request message to the server so that the server sends the page data according to the target request message.
After the target request message is obtained, the client sends the target request message to the server, after the server receives the target request message, the target request message is analyzed to obtain a first login identification, and the server can return corresponding page data, so that the client renders a complete page according to the page data for a user to use.
In this embodiment, since the preset request queue stores the first request message, the original first request message can be directly updated and used for the data request again, and no new request message is required to be regenerated, that is, no page is required to be reloaded, on one hand, resources consumed in the process of generating the request message are saved, and on the other hand, the efficiency of page loading can be improved, so that efficient access of the new page is realized.
Based on the above embodiment, since there are two cases in which the client determines that the login operation needs to be performed, there are differences in the subsequent processing of the first request message in the two cases according to the embodiment of the present application, and the two cases will be described below respectively.
Optionally, based on the embodiment corresponding to fig. 2, in an optional embodiment of the method for processing a page in the embodiment of the present application, if it is determined that a login operation needs to be performed according to the first request message, adding the first request message to the preset request queue includes:
if the first request message does not carry the second login identification, adding the first request message to a preset first request queue;
updating a first request message in a preset request queue according to a first login identifier to obtain a target request message, wherein the target request message carries the first login identifier and comprises the following steps:
updating a first request message in a preset first request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier.
The embodiment corresponds to the case that the first request message does not carry the second login identifier. And when the client determines that the first request message does not carry the second login identification, adding the first request message to a preset first request queue. It should be noted that, the first request queue is preset to store the page data request without login identifier.
Further, after the client finishes logging in to obtain the first login identifier, the first request message in the preset first request queue can be updated to obtain the target request message carrying the first login identifier.
Optionally, based on the embodiment corresponding to fig. 2, in an optional embodiment of the method for processing a page in the embodiment of the present application, if it is determined that a login operation needs to be performed according to the first request message, adding the first request message to the preset request queue includes:
if the first request message carries the second login identification, sending the first request message to a server;
receiving a first response message, wherein the first response message corresponds to the first request message;
determining the second login identifier as an invalid identifier according to the first response message;
adding the first request message to a preset second request queue;
updating a first request message in a preset request queue according to a first login identifier to obtain a target request message, wherein the target request message carries the first login identifier and comprises the following steps:
and updating the first request message in the preset second request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier.
The present embodiment corresponds to the case where the first request message carries an invalid second login identifier. Specifically, the client first sends a first request message carrying a second login identifier to the server, and the server analyzes the first request message to obtain the second login identifier. And if the server determines that the second login identifier is invalid, if the second login identifier is out of date, and the like, returning a first response message, wherein it can be understood that the first response message corresponds to the first request message, and the first response message is used for indicating the client to determine that the second login identifier is invalid.
After receiving the first response message, the client can determine that the second login identification is invalid according to the first response message, and add the first request message to a preset second request queue, wherein the preset second request queue is used for storing page data requests carrying the invalid login identification.
Further, after the client finishes logging in to obtain the first login identifier, the first request message in the preset second request queue can be updated to obtain the target request message carrying the first login identifier.
Optionally, based on the respective embodiments corresponding to fig. 2, in an optional embodiment of the method for processing a page in the embodiment of the present application, performing the login operation includes:
And sending a second request message to the server, wherein the second request message is used for logging in the server.
The receiving the first login identification of the server comprises:
and receiving a second response message of the server, wherein the second response message corresponds to the second request message, and the second response message carries the first login identification.
In this embodiment, the client may send a second request message to the server when performing the login operation, and it should be understood that the second request message is typically a login request message for logging in the server. Specifically, the second request message typically contains user data, such as a user's account number password, and the like. After receiving the second request message, the server can verify the user data in the second request message, and after the user data passes the verification, a second response message can be returned, wherein the second response message corresponds to the second request message, and the second response message carries the effective first login identification.
Optionally, based on each embodiment corresponding to fig. 2, in an optional embodiment of the method for processing a page in the embodiment of the present application, updating, according to a first login identifier, a first request message in a preset request queue to obtain a target request message, where the target request message carries the first login identifier includes:
And adding the first login identification into a first request message in a preset request queue to obtain a target request message.
In this embodiment, after the client analyzes the second response message to obtain the first login identifier, the first login identifier may be added to the original first request message to obtain the target request message.
It should be noted that, because the first login identifier has two cases, that is, does not carry the second login identifier and carries the invalid second login identifier, after the client adds the first login identifier to the first request message, if the first request message is the first request message which does not carry the second login identifier, the target request message carrying the first login identifier can be obtained. If the first login request carries the invalid second login identifier, the first login request replaces the second login request, and a target request message carrying the first login identifier is obtained.
Optionally, based on each embodiment corresponding to fig. 2, in an optional embodiment of the method for processing a page in the embodiment of the present application, sending a target request message to a server, so that after the server sends page data according to the target request message, the method further includes:
the preset first request queue or the preset second request queue is emptied.
In this embodiment, when the client sends the target request message to the server, so that the server sends the page data according to the target request message, after finishing the page processing, the preset first request queue or the preset second request queue may be emptied for use in the next page processing.
A specific application example will be provided below to further describe the method of page processing in the embodiment of the present application, and fig. 3 is a schematic diagram illustrating an application of the method of page processing in the embodiment of the present application. Referring to fig. 3, the application example includes:
301. entering a page;
the user initiates a browser on the client to access the page.
302. The client judges whether the page data request carries a token or not;
if the page data request carries a token, then 303 is executed, if not, 305 is executed.
303. The server receives the page data request and judges whether the token is out of date;
if the token expires, the client is notified and the client performs step 304.
304. The client puts the page data request into an expiration request queue;
it should be appreciated that the expired request queue, i.e., the preset second request queue described above, is then executed in step 306.
305. The client side puts the page data request into a token-free request queue;
It should be appreciated that there is no token request queue, i.e., the preset first request queue described above, and then step 306 is performed.
306. The client performs login operation;
307. the server sends the logged token to the client;
308. the client updates the request in the queue and resends the page data request to the server;
the client updates the request in the queue based on the logged token to obtain a page data request carrying the valid token, and sends the page data request to the client.
309. The client receives page data;
310. the queue is emptied.
In the above application example, the number of page data requests is one, and for convenience of understanding, the following description will refer to fig. 4, where the number of requests is plural, and fig. 4 is a schematic diagram illustrating another application of the page processing method in the embodiment of the present application. Note that, the overall flow of the application example in fig. 4 is similar to that of the application example corresponding to fig. 3.
When the client side sends multiple page data requests to the server at the same time, if none of the multiple page data requests carries a token, the operation flow of the subsequent client side is the same as that in fig. 3.
If the plurality of page data requests all carry outdated token, the specific process is as shown in fig. 4:
401. The client sends a plurality of requests to the server;
402. the server determines whether the token is invalid;
if yes, notifying the client.
403. The client receives a first request response (corresponding to one of a plurality of page data requests) returned by the server;
the client receives a first request response returned by the server and determines that the token in all the requests is invalid.
404. The client places all page data requests into corresponding queues;
405. the client performs login operation;
and after the client logs in, obtaining a new token.
406. The client updates all page data requests in the queue according to the new token;
407. the client sends an updated page data request to the server, wherein the request corresponds to the first request response;
408. when the client receives each request response successively, the client does not need to log in again and correspondingly sends the rest updated page data requests.
By the method for processing the page in the self-embodiment, on one hand, resources consumed in the process of generating the request message are saved, and on the other hand, the page loading efficiency can be improved, so that the efficient access of the new page is realized.
The foregoing is a detailed description of a method for processing a page in an embodiment of the present application, and the following will describe the structure and connection relationship of the page processing apparatus in the embodiment of the present application, and fig. 5 is a schematic diagram of the structure of the page processing apparatus in the embodiment of the present application, referring to fig. 5, and an embodiment of the page processing apparatus in the embodiment of the present application includes:
an obtaining module 501, configured to obtain a first request message, where the first request message is used to request page data from a server;
the adding module 502 is configured to add the first request message to a preset request queue if it is determined that the login operation needs to be performed according to the first request message;
a login module 503, configured to perform a login operation;
a receiving module 504, configured to receive a first login identifier sent by a server;
the updating module 505 is configured to update the first request message in the preset request queue according to the first login identifier, so as to obtain a target request message, where the target request message carries the first login identifier;
and a sending module 506, configured to send a target request message to the server, so that the server sends the page data according to the target request message.
Optionally, based on the embodiment corresponding to fig. 5, in an optional embodiment of the page processing apparatus in the embodiment of the present application, the adding module is further configured to:
If the first request message does not carry the second login identification, adding the first request message to a preset first request queue;
updating a first request message in a preset request queue according to a first login identifier to obtain a target request message, wherein the target request message carries the first login identifier and comprises the following steps:
updating a first request message in a preset first request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier.
Optionally, based on the embodiment corresponding to fig. 5, in an optional embodiment of the page processing apparatus in the embodiment of the present application, the adding module is further configured to:
if the first request message carries the second login identification, sending the first request message to a server;
receiving a first response message, wherein the first response message corresponds to the first request message;
determining the second login identifier as an invalid identifier according to the first response message;
adding the first request message to a preset second request queue;
updating a first request message in a preset request queue according to a first login identifier to obtain a target request message, wherein the target request message carries the first login identifier and comprises the following steps:
And updating the first request message in the preset second request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier.
Optionally, based on each embodiment corresponding to fig. 5, in an optional embodiment of the page processing apparatus in the embodiment of the present application, the login module is further configured to:
and sending a second request message to the server, wherein the second request message is used for logging in the server.
Optionally, based on each embodiment corresponding to fig. 5, in an optional embodiment of the page processing apparatus in the embodiment of the present application, the receiving module is further configured to:
and receiving a second response message of the server, wherein the second response message corresponds to the second request message, and the second response message carries the first login identification.
Optionally, based on each embodiment corresponding to fig. 5, in an optional embodiment of the page processing apparatus in the embodiment of the present application, the update module is further configured to:
and adding the first login identification into a first request message in a preset request queue to obtain a target request message.
Optionally, based on each embodiment corresponding to fig. 5, in an optional embodiment of the page processing apparatus in the embodiment of the present application, the page processing apparatus further includes:
And the emptying module is used for emptying the preset first request queue or the preset second request queue.
The embodiment of the present application further provides a terminal device, as shown in fig. 6, for convenience of explanation, only the portion relevant to the embodiment of the present application is shown, and specific technical details are not disclosed, please refer to the method portion of the embodiment of the present application. The terminal may be any terminal device including a mobile phone, a tablet computer, a personal digital assistant (personal digital assistant, PDA), a point of sale (POS), a vehicle-mounted computer, and the like, taking the terminal as an example of the mobile phone:
fig. 6 is a block diagram showing a part of a structure of a mobile phone related to a terminal provided by an embodiment of the present application. Referring to fig. 6, the mobile phone includes: radio Frequency (RF) circuitry 610, memory 620, input unit 630, display unit 640, sensor 650, audio circuitry 660, wireless fidelity (wireless fidelity, wiFi) module 670, processor 680, and power supply 690. Those skilled in the art will appreciate that the handset configuration shown in fig. 6 is not limiting of the handset and may include more or fewer components than shown, or may combine certain components, or may be arranged in a different arrangement of components.
The following describes the components of the mobile phone in detail with reference to fig. 6:
the RF circuit 610 may be configured to receive and transmit signals during a message or a call, and in particular, receive downlink information of a base station and process the downlink information with the processor 680; in addition, the data of the design uplink is sent to the base station. Typically, the RF circuitry 610 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (low noise amplifier, LNA), a duplexer, and the like. In addition, the RF circuitry 610 may also communicate with networks and other devices via wireless communications. The wireless communications may use any communication standard or protocol including, but not limited to, global system for mobile communications (global system of mobile communication, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), long term evolution (long term evolution, LTE), email, short message service (short messaging service, SMS), and the like.
The memory 620 may be used to store software programs and modules, and the processor 680 may perform various functional applications and data processing of the cellular phone by executing the software programs and modules stored in the memory 620. The memory 620 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 620 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The input unit 630 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the handset. In particular, the input unit 630 may include a touch panel 631 and other input devices 632. The touch panel 631, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 631 or thereabout using any suitable object or accessory such as a finger, a stylus, etc.), and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 631 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 680 and can receive commands from the processor 680 and execute them. In addition, the touch panel 631 may be implemented in various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 630 may include other input devices 632 in addition to the touch panel 631. In particular, other input devices 632 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 640 may be used to display information input by a user or information provided to the user and various menus of the mobile phone. The display unit 640 may include a display panel 641, and optionally, the display panel 641 may be configured in the form of a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), or the like. Further, the touch panel 631 may cover the display panel 641, and when the touch panel 631 detects a touch operation thereon or thereabout, the touch panel 631 is transferred to the processor 680 to determine the type of the touch event, and then the processor 680 provides a corresponding visual output on the display panel 641 according to the type of the touch event. Although in fig. 6, the touch panel 631 and the display panel 641 are two independent components to implement the input and input functions of the mobile phone, in some embodiments, the touch panel 631 and the display panel 641 may be integrated to implement the input and output functions of the mobile phone.
The handset may also include at least one sensor 650, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 641 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 641 and/or the backlight when the mobile phone is moved to the ear. The accelerometer sensor can be used for detecting the acceleration in all directions (generally three axes), detecting the gravity and the direction when the accelerometer sensor is static, and can be used for identifying the gesture of a mobile phone (such as transverse and vertical screen switching, related games, magnetometer gesture calibration), vibration identification related functions (such as pedometer and knocking), and other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors which are also configured by the mobile phone are not repeated herein.
Audio circuitry 660, speaker 661, microphone 662 may provide an audio interface between a user and the handset. The audio circuit 660 may transmit the received electrical signal converted from audio data to the speaker 661, and the electrical signal is converted into a sound signal by the speaker 661 to be output; on the other hand, microphone 662 converts the collected sound signals into electrical signals, which are received by audio circuit 660 and converted into audio data, which are processed by audio data output processor 680 for transmission to, for example, another cell phone via RF circuit 610, or which are output to memory 620 for further processing.
WiFi belongs to a short-distance wireless transmission technology, and a mobile phone can help a user to send and receive emails, browse webpages, access streaming media and the like through a WiFi module 670, so that wireless broadband Internet access is provided for the user. Although fig. 6 shows a WiFi module 670, it is understood that it does not belong to the necessary constitution of the mobile phone, and can be omitted entirely as required within the scope of not changing the essence of the invention.
Processor 680 is a control center of the handset, connects various parts of the entire handset using various interfaces and lines, performs various functions of the handset and processes data by running or executing software programs and/or modules stored in memory 620, and invoking data stored in memory 620. Optionally, processor 680 may include one or more processing units; alternatively, processor 680 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 680.
The handset further includes a power supply 690 (e.g., a battery) for powering the various components, optionally in logical communication with the processor 680 through a power management system, thereby implementing functions such as charge, discharge, and power management through the power management system.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which will not be described herein.
In the embodiment of the present application, the processor 680 included in the terminal further has a function of executing each step of the page processing method as described above.
Embodiments of the application also relate to a computer-readable storage medium comprising instructions which, when run on a computer, cause the computer to perform, for example, a page processing method.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (12)

1. A method of page processing, comprising:
acquiring a first request message, wherein the first request message is used for requesting page data from a server;
if the login operation is determined to be executed according to the first request message, adding the first request message to a preset request queue;
executing login operation;
receiving a first login identification sent by the server;
updating the first request message in the preset request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier;
sending the target request message to the server so that the server sends the page data according to the target request message;
Wherein if it is determined that the login operation needs to be performed according to the first request message, adding the first request message to a preset request queue includes:
if the first request message does not carry the second login identification, adding the first request message to a preset first request queue;
updating the first request message in the preset request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier and comprises the following steps:
updating the first request message in the preset first request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier;
if the first request message carries a second login identifier, sending the first request message to the server;
receiving a first response message, wherein the first response message corresponds to the first request message;
determining that the second login identifier is an invalid identifier according to the first response message;
adding the first request message to a preset second request queue;
updating the first request message in the preset request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier and comprises the following steps:
Updating the first request message in the preset second request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier.
2. The method of page processing according to claim 1, wherein the performing a login operation includes:
and sending a second request message to the server, wherein the second request message is used for logging in the server.
3. The method of page processing of claim 2, wherein the receiving the first login identification of the server comprises:
and receiving a second response message of the server, wherein the second response message corresponds to the second request message, and the second response message carries the first login identification.
4. The method of page processing according to claim 1, wherein updating the first request message in the preset request queue according to the first login identifier to obtain a target request message, where the target request message carries the first login identifier includes:
and adding the first login identification into the first request message in the preset request queue to obtain a target request message.
5. The method of page processing according to claim 1, wherein the sending the target request message to the server, so that the server further includes, after sending the page data according to the target request message:
and emptying the preset first request queue or the preset second request queue.
6. A page processing apparatus, comprising:
the acquisition module is used for acquiring a first request message, wherein the first request message is used for requesting page data from a server;
the adding module is used for adding the first request message to a preset request queue if the login operation is determined to be executed according to the first request message;
the login module is used for executing login operation;
the receiving module is used for receiving the first login identification sent by the server;
the updating module is used for updating the first request message in the preset request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier;
the sending module is used for sending the target request message to the server so that the server can send the page data according to the target request message;
The adding module is specifically configured to add the first request message to a preset first request queue if the first request message does not carry the second login identifier;
the updating module is specifically configured to update the first request message in the preset first request queue according to the first login identifier, so as to obtain a target request message, where the target request message carries the first login identifier;
the adding module is specifically configured to send the first request message to the server if the first request message carries a second login identifier; receiving a first response message, wherein the first response message corresponds to the first request message; determining that the second login identifier is an invalid identifier according to the first response message; adding the first request message to a preset second request queue;
the updating module is specifically configured to update the first request message in the preset second request queue according to the first login identifier, so as to obtain a target request message, where the target request message carries the first login identifier.
7. The apparatus of claim 6, wherein the login module is further configured to send a second request message to the server, the second request message being used to log in to the server.
8. The apparatus of claim 7, wherein the receiving module is further configured to receive a second response message of the server, the second response message corresponding to the second request message, the second response message carrying the first login identifier.
9. The apparatus of claim 6, wherein the updating module is further configured to add the first login identifier to the first request message in the preset request queue to obtain a target request message.
10. The apparatus of claim 6, wherein the apparatus further comprises:
and the condition module is used for emptying the preset first request queue or the preset second request queue.
11. A terminal device, comprising: memory, transceiver, processor, and bus system;
wherein the memory is used for storing programs;
the processor is used for executing the program in the memory, and comprises the following steps:
acquiring a first request message, wherein the first request message is used for requesting page data from a server;
if the login operation is determined to be executed according to the first request message, adding the first request message to a preset request queue;
Executing login operation;
receiving a first login identification sent by the server;
updating the first request message in the preset request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier;
sending the target request message to the server so that the server sends the page data according to the target request message;
wherein if it is determined that the login operation needs to be performed according to the first request message, adding the first request message to a preset request queue includes:
if the first request message does not carry the second login identification, adding the first request message to a preset first request queue;
updating the first request message in the preset request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier and comprises the following steps:
updating the first request message in the preset first request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier;
If the first request message carries a second login identifier, sending the first request message to the server;
receiving a first response message, wherein the first response message corresponds to the first request message;
determining that the second login identifier is an invalid identifier according to the first response message;
adding the first request message to a preset second request queue;
updating the first request message in the preset request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier and comprises the following steps:
updating the first request message in the preset second request queue according to the first login identifier to obtain a target request message, wherein the target request message carries the first login identifier;
the bus system is used for connecting the memory and the processor so as to enable the memory and the processor to communicate.
12. A computer readable storage medium comprising instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 5.
CN201910623707.0A 2019-07-10 2019-07-10 Page processing method and related device Active CN112214699B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910623707.0A CN112214699B (en) 2019-07-10 2019-07-10 Page processing method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910623707.0A CN112214699B (en) 2019-07-10 2019-07-10 Page processing method and related device

Publications (2)

Publication Number Publication Date
CN112214699A CN112214699A (en) 2021-01-12
CN112214699B true CN112214699B (en) 2023-11-07

Family

ID=74047607

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910623707.0A Active CN112214699B (en) 2019-07-10 2019-07-10 Page processing method and related device

Country Status (1)

Country Link
CN (1) CN112214699B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113448748B (en) * 2021-06-03 2023-09-22 北京致远互联软件股份有限公司 Refreshing method and refreshing system driven by message

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130139043A1 (en) * 2011-11-29 2013-05-30 OneScreen Inc. System, apparatus and method for updating links
CN105141605A (en) * 2015-08-19 2015-12-09 金蝶软件(中国)有限公司 Session method, web server and browser
CN105162591A (en) * 2015-07-07 2015-12-16 腾讯科技(深圳)有限公司 Equipment registration method and device
CN107743134A (en) * 2017-11-28 2018-02-27 湖北三新文化传媒有限公司 Log-on message processing method, client, server and storage medium
CN108769041A (en) * 2018-06-06 2018-11-06 深圳壹账通智能科技有限公司 Login method, system, computer equipment and storage medium
CN109218389A (en) * 2018-07-05 2019-01-15 东软集团股份有限公司 The method, apparatus and storage medium and electronic equipment of processing business request

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130139043A1 (en) * 2011-11-29 2013-05-30 OneScreen Inc. System, apparatus and method for updating links
CN105162591A (en) * 2015-07-07 2015-12-16 腾讯科技(深圳)有限公司 Equipment registration method and device
CN105141605A (en) * 2015-08-19 2015-12-09 金蝶软件(中国)有限公司 Session method, web server and browser
CN107743134A (en) * 2017-11-28 2018-02-27 湖北三新文化传媒有限公司 Log-on message processing method, client, server and storage medium
CN108769041A (en) * 2018-06-06 2018-11-06 深圳壹账通智能科技有限公司 Login method, system, computer equipment and storage medium
CN109218389A (en) * 2018-07-05 2019-01-15 东软集团股份有限公司 The method, apparatus and storage medium and electronic equipment of processing business request

Also Published As

Publication number Publication date
CN112214699A (en) 2021-01-12

Similar Documents

Publication Publication Date Title
CN111064713B (en) Node control method and related device in distributed system
CN110569078B (en) Method and device for preloading webpage-level program
CN108241703B (en) Webpage data transmission method and device
CN104618217A (en) Method, terminal, server and system for sharing resource
CN110378107B (en) Method and related device for detecting installation package
CN106326489B (en) Method and device for updating network resources
CN111259034A (en) Cache data management method and related device
CN103177217B (en) A kind of file scanning method, system and client and server
CN104298666A (en) Web page sharing method and web page sharing device
WO2014194759A1 (en) A method, apparatus, and system for controlling voice data transmission
CN104901992B (en) A kind of method and apparatus of resource transfers
CN106020945B (en) Shortcut item adding method and device
CN111273955A (en) Thermal restoration plug-in optimization method and device, storage medium and electronic equipment
CN104391629A (en) Method for sending message in orientation manner, method for displaying message, server and terminal
CN111177612B (en) Page login authentication method and related device
CN112214699B (en) Page processing method and related device
CN110430252B (en) Resource data processing method and device, equipment and readable storage medium
CN104035888A (en) Data caching method and storage device
CN106339402B (en) Method, device and system for pushing recommended content
CN104702643A (en) A webpage access method, device and system
CN109379394A (en) A kind of method, apparatus and terminal monitoring network request
CN115794654A (en) Test case distribution processing method, system, equipment and storage medium
CN104717283A (en) File downloading control method, terminal and logic processing server
CN113961380B (en) Cross-application repair method, device, equipment and storage medium
CN109002535B (en) Data updating method and device

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