CN113301148A - Page display method, device, server, terminal and storage medium - Google Patents

Page display method, device, server, terminal and storage medium Download PDF

Info

Publication number
CN113301148A
CN113301148A CN202110560626.8A CN202110560626A CN113301148A CN 113301148 A CN113301148 A CN 113301148A CN 202110560626 A CN202110560626 A CN 202110560626A CN 113301148 A CN113301148 A CN 113301148A
Authority
CN
China
Prior art keywords
page
terminal
content information
display page
display
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110560626.8A
Other languages
Chinese (zh)
Other versions
CN113301148B (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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202110560626.8A priority Critical patent/CN113301148B/en
Publication of CN113301148A publication Critical patent/CN113301148A/en
Application granted granted Critical
Publication of CN113301148B publication Critical patent/CN113301148B/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/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • 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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Abstract

The disclosure relates to a page display method, a page display device, a server, a terminal and a storage medium, and relates to the technical field of internet. The embodiment of the disclosure provides a page display method, wherein when a server detects that a first display page displayed currently by a terminal is loaded incorrectly, the server firstly sends first content information for page shielding to the terminal, so that the terminal shields the first display page firstly, and then sends second content information corresponding to a theoretical display page to the terminal, so that the terminal changes the shielded display page into the theoretical display page, and therefore, in the time from the loading error of the terminal page to the display of a correct page, because the terminal shields the first display page, the page with the loading error cannot be displayed all the time on the terminal, and the page display effect is improved.

Description

Page display method, device, server, terminal and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a page display method and apparatus, a server, a terminal, and a storage medium.
Background
In the process of accessing an application program or a webpage, a page loading error inevitably occurs. When a page is loaded incorrectly, the page needs to be reloaded before the correct page can be displayed.
In the related art, when a page loading error occurs, a user initiates a request again through a terminal, the request is used for re-accessing the interface, the server reloads the page based on the request, and finally the terminal displays the correct page.
However, in the related art, if the user does not request to revisit the page, the wrong page always exists, resulting in poor page display effect.
Disclosure of Invention
The disclosure provides a page display method, a page display device, a server, a terminal and a storage medium, which can improve the page display effect. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a page display method, performed by a server, the method including:
if the first display page currently displayed by the terminal is detected to be different from the theoretical display page, acquiring first content information for carrying out page shielding on the terminal;
sending the first content information to the terminal, so that the terminal changes a current display page from the first display page to a second display page based on the first content information;
and acquiring second content information corresponding to the theoretical display page, and sending the second content information to the terminal, so that the terminal changes the current display page from the second display page to the theoretical display page based on the second content information.
In a possible implementation manner, the sending the first content information to the terminal, so that the terminal changes a current display page from the first display page to a second display page based on the first content information, includes:
and establishing bidirectional communication websocket connection with the terminal, and sending the first content information to the terminal based on the websocket connection, so that the terminal changes the current display page from the first display page to a second display page based on the first content information.
In another possible implementation manner, the sending the first content information to the terminal based on the websocket connection, so that the terminal changes a current display page from a first display page to a second display page based on the first content information, includes:
packaging the first content information into a message body in a data exchange json format based on the websocket connection and then sending the message body to the terminal, so that the terminal obtains the first content information after decapsulating the message body in the json format in which the first content information is packaged, and changing the current display page from the first display page to a second display page by adopting a predefined shielding routing method based on the first content information; the message body of the json format encapsulated with the first content information comprises the behavior type of the changed page and the page change content.
In another possible implementation manner, the obtaining second content information corresponding to the theoretical display page and sending the second content information to the terminal, so that the terminal changes a current display page from a second display page to the theoretical display page based on the second content information, includes:
acquiring second content information corresponding to the theoretical display page based on rollback code operation, and after the second content information is successfully acquired, sending a prompt message to the terminal based on websocket connection established with the terminal so that the terminal prompts a page to be updated in a popup mode;
and packaging the second content information into a json format message body based on the websocket connection and then sending the json format message body to the terminal, so that the terminal unpacks the json format message body packaged with the second content information, acquires the second content information, and changes the current display page from the second display page to the theoretical display page based on the second content information by adopting a predefined page refreshing method.
In another possible implementation manner, the acquiring, if it is detected that a first display page currently displayed by the terminal is different from a theoretical display page, first content information for page shielding of the terminal includes:
and detecting whether a first display page currently displayed by the terminal is different from a theoretical display page or not based on a detection program pre-configured in a gateway code of the server, and if so, acquiring first content information for page shielding of the terminal.
In another possible implementation manner, the method further includes:
receiving an error display log sent by the terminal based on websocket connection, wherein the error display log records detailed information of a first display page currently displayed by the terminal and different from the theoretical display page; and the error display log is generated by the terminal based on a method of outputting the console.
According to a second aspect of the embodiments of the present disclosure, there is provided a page display method, performed by a terminal, the method including:
receiving first content information which is sent by a server and used for shielding a page;
changing the current display page from the first display page to a second display page based on the first content information;
receiving second content information which is sent by the server and corresponds to a theoretical display page;
and changing the current display page from the second display page to the theoretical display page based on the second content information.
In a possible implementation manner, the receiving first content information for page shielding sent by a server includes:
and establishing a websocket connection with the server, and receiving the first content information based on the websocket connection.
In another possible implementation manner, the receiving the first content information based on the websocket connection includes:
receiving a json format message body which is packaged with first content information and is sent by the server based on the websocket connection, wherein the json format message body packaged with the first content information comprises a behavior type of a modified page and page modified content;
and decapsulating the message body in the json format, in which the first content information is encapsulated, to obtain the first content information.
In another possible implementation manner, the changing a currently displayed page from the first displayed page to a second displayed page based on the first content information includes:
and changing the current display page from the first display page to a second display page by adopting a predefined shielding routing method based on the first content information.
In another possible implementation manner, the receiving the second content information sent by the server includes:
receiving a message body in a json format, which is sent by the server and is packaged with second content information, based on the websocket connection established with the server;
and decapsulating the json-formatted message body in which the second content information is encapsulated to obtain the second content information.
In another possible implementation manner, the changing the current display page from the second display page to the theoretical display page based on the second content information includes:
and changing the current display page from the second display page to the theoretical display page by adopting a predefined page refreshing method based on the second content information.
In another possible implementation manner, the method further includes:
and receiving a prompt message sent by the server, and prompting the page to be updated in a popup window mode based on the prompt message.
In another possible implementation manner, the method further includes:
generating an error display log based on rewriting a console.log and a console.error method, wherein the error display log records detailed information that a first display page displayed currently is different from a theoretical display page;
and sending the error display log to the server.
According to a third aspect of the embodiments of the present disclosure, there is provided a page display apparatus, executed by a server, the apparatus including:
the terminal comprises a first acquisition unit, a second acquisition unit and a display unit, wherein the first acquisition unit is configured to execute the steps of acquiring first content information for carrying out page shielding on the terminal if detecting that a first display page currently displayed by the terminal is different from a theoretical display page;
a first sending unit configured to execute sending the first content information to the terminal, so that the terminal changes a current display page from the first display page to a second display page based on the first content information;
and the second acquisition unit is configured to execute acquisition of second content information corresponding to the theoretical display page and send the second content information to the terminal, so that the terminal changes the current display page from the second display page to the theoretical display page based on the second content information.
In a possible implementation manner, the first sending unit is configured to execute establishing a two-way communication websocket connection with the terminal, and send the first content information to the terminal based on the websocket connection, so that the terminal changes a current display page from the first display page to a second display page based on the first content information.
In another possible implementation manner, the first sending unit is configured to perform encapsulation of the first content information into a message body in a data exchange json format based on the websocket connection and send the encapsulated message body to the terminal, so that the terminal decapsulates the message body in the json format in which the first content information is encapsulated and obtains the first content information, and changes a current display page from the first display page to a second display page based on the first content information by using a predefined shielding routing device; the message body of the json format encapsulated with the first content information comprises the behavior type of the changed page and the page change content.
In another possible implementation manner, the second obtaining unit is configured to perform operation based on a rollback code, obtain second content information corresponding to the theoretical display page, and after the second content information is successfully obtained, send a prompt message to the terminal based on a websocket connection established with the terminal, so that the terminal prompts that the page is to be updated in a popup mode; and packaging the second content information into a json format message body based on the websocket connection and then sending the json format message body to the terminal, so that the terminal unpacks the json format message body packaged with the second content information, acquires the second content information, and changes the current display page from the second display page to the theoretical display page based on the second content information by adopting a predefined page refreshing device.
In another possible implementation manner, the first obtaining unit is configured to execute a detection program configured in a gateway code of the server in advance, detect whether a first display page currently displayed by the terminal is different from a theoretical display page, and if so, obtain first content information for performing page shielding on the terminal.
In another possible implementation manner, the apparatus further includes:
the first receiving unit is configured to execute receiving of an error display log sent by the terminal based on websocket connection, and the error display log records detailed information that a first display page currently displayed by the terminal is different from the theoretical display page; wherein the error display log is generated by the terminal based on the rewrite console output console.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a page display apparatus, executed by a terminal, the apparatus including:
the second receiving unit is configured to execute the first content information which is sent by the receiving server and is subjected to page shielding;
a first changing unit configured to perform changing of a current display page from the first display page to a second display page based on the first content information;
a third receiving unit configured to perform receiving second content information corresponding to a theoretical display page sent by the server;
a second changing unit configured to perform changing of the current display page from the second display page to the theoretical display page based on the second content information.
In a possible implementation manner, the second receiving unit is configured to perform establishing a websocket connection with the server, and receive the first content information based on the websocket connection.
In another possible implementation manner, the second receiving unit is configured to execute receiving, based on the websocket connection, a json-format message body encapsulated with first content information and sent by the server, where the json-format message body encapsulated with the first content information includes a behavior type of a modified page and page modification content; and decapsulating the message body in the json format, in which the first content information is encapsulated, to obtain the first content information.
In another possible implementation manner, the first changing unit is configured to change the current display page from the first display page to the second display page by using a predefined mask routing device based on the first content information.
In another possible implementation manner, the third receiving unit is configured to execute a websocket connection established with the server, and receive a json-format message body encapsulated with second content information and sent by the server; and decapsulating the json-formatted message body in which the second content information is encapsulated to obtain the second content information.
In another possible implementation manner, the second changing unit is configured to perform, based on the second content information, changing a current display page from the second display page to the theoretical display page by using a predefined page refreshing apparatus.
In another possible implementation manner, the apparatus further includes:
and the fourth receiving unit is configured to execute receiving of a prompt message sent by the server, and prompt a page to be updated in a popup mode based on the prompt message.
In another possible implementation manner, the apparatus further includes:
a generating unit configured to execute generating an error display log in which detailed information that a first display page currently displayed is different from the theoretical display page is recorded, based on the rewritten console.
A second transmission unit configured to perform transmission of the error display log to the server.
According to a fifth aspect of embodiments of the present disclosure, there is provided a server comprising a processor and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the page display method in the first aspect.
According to a sixth aspect of embodiments of the present disclosure, there is provided a terminal comprising a processor and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the page display method in the second aspect.
According to a seventh aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions, when executed by a processor, enable the processor to perform the page display method of the first and second aspects.
According to an eighth aspect of embodiments of the present disclosure, there is provided a computer program product comprising computer programs/instructions which, when executed by a processor, implement the page display methods in the first and second aspects described above.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
the embodiment of the disclosure provides a page display method, wherein when a server detects that a first display page displayed currently by a terminal is loaded incorrectly, the server firstly sends first content information for page shielding to the terminal, so that the terminal shields the first display page firstly, and then sends second content information corresponding to a theoretical display page to the terminal, so that the terminal changes the shielded display page into the theoretical display page, and therefore, in the time from the loading error of the terminal page to the display of a correct page, because the terminal shields the first display page, the page with the loading error cannot be displayed all the time on the terminal, and the page display effect is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a diagram illustrating an environment for implementing a page display method according to an exemplary embodiment.
FIG. 2 is a flowchart illustrating a page display method according to an example embodiment.
FIG. 3 is a flowchart illustrating a page display method according to an example embodiment.
FIG. 4 is a flowchart illustrating a page display method according to an example embodiment.
Fig. 5 is a diagram illustrating a server sending information or a prompt message to a terminal based on a websocket connection, according to an example embodiment.
Fig. 6 is a diagram illustrating a server control terminal displaying a theoretical display page according to an example embodiment.
Fig. 7 is a block diagram illustrating a page display apparatus according to an exemplary embodiment.
Fig. 8 is a block diagram illustrating a page display apparatus according to an exemplary embodiment.
FIG. 9 is a block diagram illustrating a server in accordance with an example embodiment.
Fig. 10 is a block diagram illustrating a terminal according to an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The user information to which the present disclosure relates may be information authorized by the user or sufficiently authorized by each party.
Fig. 1 is a diagram illustrating an implementation environment of a page display method according to an exemplary embodiment, and referring to fig. 1, the implementation environment includes: a terminal 101 and a server 102. The terminal 101 and the server 102 are connected by a wireless or wired network.
The terminal 101 is installed with a client of the network application, and the server 102 is a server 102 corresponding to the client. The client can be a webpage client and a browser client. In the embodiments of the present disclosure, this is not particularly limited.
In the embodiment of the disclosure, the page display method can be applied to various scenes. For example, when the client is a browser client, a user may browse a web page, short videos, news, or purchase goods through the browser client, and during browsing or purchasing, a page loading error of the web page may be caused due to a network environment and the like. For another example, when the client may also be a web page client, a page loading error may occur during a process of browsing a web page or a process of searching through a web page by a user. When a page loading error occurs, the server 102 can control the terminal 101 to automatically display a correct page by the method provided by the embodiment of the present disclosure without requiring a user to request for loading again, thereby improving the page display effect.
The terminal 101 is at least one of a mobile phone, a tablet computer, and a pc (personal computer) device. The server 102 may be at least one of a server, a server cluster composed of a plurality of servers, a cloud server, a cloud computing platform, and a virtualization center.
Fig. 2 is a flowchart illustrating a page display method according to an exemplary embodiment, where the page display method is performed by a server, as shown in fig. 2, and includes the following steps:
in step S201, if it is detected that the first display page currently displayed by the terminal is different from the theoretical display page, first content information for performing page shielding on the terminal is obtained.
In step S202, the first content information is sent to the terminal, so that the terminal changes the current display page from the first display page to the second display page based on the first content information.
In step S203, second content information corresponding to the theoretical display page is obtained, and the second content information is sent to the terminal, so that the terminal changes the current display page from the second display page to the theoretical display page based on the second content information.
In one possible implementation manner, sending the first content information to the terminal, so that the terminal changes the current display page from the first display page to the second display page based on the first content information, includes:
and establishing bidirectional communication websocket connection with the terminal, and sending the first content information to the terminal based on the websocket connection, so that the terminal changes the current display page from the first display page to the second display page based on the first content information.
In another possible implementation manner, sending the first content information to the terminal based on the websocket connection, so that the terminal changes the current display page from the first display page to the second display page based on the first content information, including:
packaging the first content information into a message body in a data exchange json format based on the websocket connection and then sending the message body to the terminal, so that the terminal unpacks the message body in the json format packaged with the first content information to obtain the first content information and changes the current display page from the first display page to a second display page based on the first content information by adopting a predefined shielding routing method; the message body of the json format, which is packaged with the first content information, comprises the behavior type of the modified page and the modified content of the page.
In another possible implementation manner, acquiring second content information corresponding to the theoretical display page, and sending the second content information to the terminal, so that the terminal changes the current display page from the second display page to the theoretical display page based on the second content information, including:
acquiring second content information corresponding to the theoretical display page based on rollback code operation, and after the second content information is successfully acquired, sending a prompt message to the terminal based on websocket connection established with the terminal so that the terminal prompts that the page is to be updated in a popup mode;
and packaging the second content information into a json-format message body based on the websocket connection and then sending the json-format message body to the terminal, so that the terminal unpacks the json-format message body packaged with the second content information, acquires the second content information, and changes the current display page from the second display page to a theoretical display page based on the second content information by adopting a predefined page refreshing method.
In another possible implementation manner, if it is detected that a first display page currently displayed by the terminal is different from a theoretical display page, acquiring first content information for page shielding of the terminal, including:
the method comprises the steps of detecting whether a first display page displayed currently by a terminal is different from a theoretical display page or not based on a detection program configured in a gateway code of a server in advance, and if so, acquiring first content information for shielding the page of the terminal.
In another possible implementation manner, the method further includes:
receiving an error display log sent by a terminal based on websocket connection, wherein the error display log records detailed information of a first display page currently displayed by the terminal and different from a theoretical display page; wherein the error display log is generated by the terminal based on the method of outputting the console log and the console error by rewriting.
The embodiment of the disclosure provides a page display method, wherein when a server detects that a first display page displayed currently by a terminal is loaded incorrectly, the server firstly sends first content information for page shielding to the terminal, so that the terminal shields the first display page firstly, and then sends second content information corresponding to a theoretical display page to the terminal, so that the terminal changes the shielded display page into the theoretical display page, and therefore, in the time from the loading error of the terminal page to the display of a correct page, because the terminal shields the first display page, the page with the loading error cannot be displayed all the time on the terminal, and the page display effect is improved.
Fig. 3 is a flowchart illustrating a page display method according to an exemplary embodiment, where the page display method is executed by a terminal, as shown in fig. 3, and includes the following steps:
in step S301, first content information for page masking transmitted by a server is received.
In step S302, the current display page is changed from the first display page to the second display page based on the first content information.
In step S303, the second content information corresponding to the theoretical display page sent by the server is received.
In step S304, the current display page is changed from the second display page to the theoretical display page based on the second content information.
In a possible implementation manner, receiving first content information for page screening sent by a server includes:
and establishing a websocket connection with the server, and receiving the first content information based on the websocket connection.
In another possible implementation manner, receiving the first content information based on the websocket connection includes:
receiving a json format message body which is packaged with first content information and is sent by a server based on websocket connection, wherein the json format message body packaged with the first content information comprises a behavior type of a modified page and page modified content;
and decapsulating the message body in the json format, in which the first content information is encapsulated, to obtain the first content information.
In another possible implementation manner, changing the current display page from the first display page to the second display page based on the first content information includes:
and changing the current display page from the first display page to the second display page by adopting a predefined shielding routing method based on the first content information.
In another possible implementation manner, the receiving the second content information sent by the server includes:
receiving a message body in a json format, which is sent by the server and is packaged with second content information, based on the websocket connection established with the server;
and decapsulating the json-formatted message body in which the second content information is encapsulated to obtain the second content information.
In another possible implementation manner, changing the current display page from the second display page to the theoretical display page based on the second content information includes:
and based on the second content information, changing the current display page from the second display page to a theoretical display page by adopting a predefined page refreshing method.
In another possible implementation manner, the method further includes:
and receiving a prompt message sent by the server, and prompting the page to be updated in a popup window mode based on the prompt message.
In another possible implementation manner, the method further includes:
generating an error display log based on rewriting a console.log and a console.error method, wherein the error display log records detailed information that a first display page displayed currently is different from a theoretical display page;
and sending an error display log to the server.
The disclosed embodiment provides a page display method, wherein when a terminal receives first content which is sent by a server and used for page shielding, the first display page which is displayed at present is shielded according to first content information, and then when content information corresponding to a theoretical display page sent by the server is received, the shielded display page is changed into the theoretical display page according to second content information, so that in the time from the loading error of a terminal page to the display of a correct page, because the terminal shields the first display page, the page with the loading error cannot be displayed all the time on the terminal, and the page display effect is improved.
Fig. 4 is a flowchart illustrating a page display method according to an exemplary embodiment, where the page display method is performed by a server and a terminal, as shown in fig. 4, and includes the following steps:
in step S401, if it is detected that the first display page currently displayed by the terminal is different from the theoretical display page, the server obtains first content information for performing page shielding on the terminal.
In the process of loading the page by the terminal, page loading errors may occur, so that the currently displayed first display page is different from the theoretical display page. The theoretical display page is a correct page corresponding to the current display page. The page can be a webpage, a short video playing page or a shopping page. The page loading error may be a permission loading error, a data loading error, or a page information display error. For example, the user only has viewing right but not editing right on the theoretical display page, and the right loading error may be that after the page is loaded, the user has not only viewing right but also editing right. In this case, if the user performs an incorrect operation based on the editing authority, there is a possibility that a loss may be caused to other users. Or, if the user has the editing right but does not have the editing right after loading the page, the user cannot operate the page, and the user is lost. For another example, in the process of browsing the short video, the page loading is wrong, the short video playing page cannot be displayed, and the user cannot watch the short video.
In this step, the first content information is information for shielding a page, and the server may be implemented by the following steps (1) to (2), including:
(1) the server detects whether a first display page currently displayed by the terminal is different from a theoretical display page or not based on a detection program pre-configured in a gateway code of the server.
In this step, the server may first obtain a page identifier of a currently displayed first display page, then obtain a page code of a theoretical display page corresponding to the page identifier, and detect whether the page code of the first display page currently displayed by the terminal is different from the page code of the theoretical display page. If the two are different, the step (2) is executed, and if the two are the same, the detection is continued.
The server can detect in real time or periodically. The period may be set and changed as needed, and is not particularly limited in the embodiment of the present disclosure.
(2) And if the first display page is different from the theoretical display page, acquiring first content information for page shielding of the terminal.
In this step, the server may obtain the first content information through any one of the following implementation manners.
The first implementation mode comprises the following steps: the server acquires content information corresponding to the page identifier according to a pre-stored corresponding relationship between the page identifier and the content information, and takes the content information as first content information.
In a second implementation manner, the server obtains first page information of the first display page and second page information of the theoretical display page, and determines third page information corresponding to different page resources between the first display page and the theoretical display page according to the first page information and the second page information. And acquiring content information corresponding to the third page information according to the corresponding relation between the pre-stored page information and the content information, and taking the content information as the first content information.
For example, if the third page information is data page information, the server selects content information corresponding to the mask data. And if the third page information is video page information, the server selects content information corresponding to the shielded video.
In this step, the server may also generate, according to the page identifier of the first display page, first content information corresponding to the page identifier when detecting that the first display page is different from the theoretical display page; or generating first content information corresponding to the third page information according to the third page information.
Before step S401, a bidirectional communication websocket connection may be established between the server and the terminal, and the terminal may send a message to the server based on the established websocket connection.
It should be noted that, after the websocket connection is established, the server and the terminal may perform bidirectional information exchange at any time, that is, any one of the parties may send a message to the other party at any time. The websocket connection gives the server the ability to push messages or instructions to the terminal, based on which the server can control the pages displayed by the terminal by sending messages or instructions to the terminal. In the embodiment of the disclosure, the interaction between the terminal and the server is performed based on the websocket connection. Referring to fig. 5, it can be seen from fig. 5 that: and the server sends information or prompt messages to the terminal based on the websocket connection.
In the embodiment of the disclosure, when detecting that the first display page is different from the theoretical display page, the server may send a first prompt message to the terminal based on the websocket connection, where the first prompt message is used to prompt the user that the current display page is in a loading error. After receiving the first prompt message, the terminal may display the first prompt message in a pop-up window manner.
The popup window can be a prompt box, a script box or a warning box. For example, the popup may be a prompt box and the first prompt message may be "current page load error". And, the terminal may also display the first prompt message by a different color. For example, when the data loading is wrong, the terminal pops up a blue prompting message. And when the authority is loaded incorrectly, the terminal pops up a red prompt message. Or when the data loading is wrong, the terminal pops up a blue script box prompting message. And when the authority is loaded incorrectly, the terminal pops up a red warning frame prompting message. The terminal can display the first prompt message through different colors, and the server controls the terminal to display the first prompt message through different colors based on websocket connection.
In a possible implementation manner, the first prompt message may further carry a prompt time, and the first prompt message may automatically disappear after the prompt time is reached.
In step S402, the server transmits the first content information to the terminal.
In this step, the server may send the first content information to the terminal based on the websocket connection established with the terminal.
The server may directly send the first content information to the terminal, or may perform serialization processing on the first content information, that is, encapsulate the first content information into a message body in a json (data exchange) format, and send the message body in the json format, in which the first content information is encapsulated, to the terminal. In the embodiment of the present disclosure, an example is described in which a server packages first content information into a json-formatted message body and sends the json-formatted message body to a terminal.
In the embodiment of the disclosure, the server may control the terminal to change the page content by any method based on the websocket connection, and the server may also control the terminal to change the page content by a predefined route shielding method, where the route shielding method is a method for changing the page content. If the server control terminal changes the page content by adopting the predefined route shielding method, the first content information can also comprise a behavior type of the changed page besides the page change content, and the behavior type is a behavior parameter of the route shielding method. Accordingly, the json formatted message body includes the behavior type of the modified page and the page modification content.
And the message body in the json format is a message body in a format which is agreed by the terminal and the server in advance. The json format can be { type: xx, data: xx }, and the message format comprises two fields of type and data, wherein the type field is used for describing the behavior type of the modified page, and the data field is used for describing the page modification content.
In the embodiment of the disclosure, the server and the terminal interact with each other through the message body with a good protocol, which is beneficial to improving the interaction efficiency. In addition, different page contents are shielded by adopting different shielding routing methods, so that the diversity and the flexibility of page shielding can be improved.
In step S403, the terminal receives the first content information, and changes the current display page from the first display page to the second display page based on the first content information.
In this step, the server may be implemented by the following steps (1) to (2), including:
(1) the terminal decapsulates, i.e., deserializes, the js-formatted message body in which the first content information is encapsulated to obtain the js-formatted message body, and acquires the first content information in the js-formatted message body.
Figure BDA0003078868230000131
Figure BDA0003078868230000141
(2) And the terminal changes the current display page from the first display page to the second display page by adopting a predefined shielding routing method based on the first content information.
The first content information comprises a behavior type of a changed page and page change content, the terminal stores the corresponding relation between the behavior type of the changed page and the route shielding method in advance, the terminal can determine the route shielding method corresponding to the behavior type according to the behavior type of the changed page in the first content information, and the current display page is changed from the first display page to the second display page through the route shielding method.
For example, the corresponding relationship between the behavior type and the mask routing method is if (type ═ 1), { eval (data) }, that is, type ═ 1 indicates that the terminal is to use the mask routing method, namely eval, to execute the page change content in the data.
In a possible implementation manner, the terminal may shield the entire page of the first display page, that is, change the entire page of the first display page into the second display page, and the process may be: and the terminal loads a blank page on the first display page to obtain a second display page, wherein no information is displayed in the second display page. Or the terminal loads a preset picture or animation effect on the first display page to obtain a second display page.
In another possible implementation manner, the terminal may also mask only the page with the loading error in the first display page, and the process may be: and the terminal loads a blank page on the page corresponding to the third page information to obtain a second display page. Or the terminal loads a preset picture or animation effect on the page corresponding to the third page information to obtain a second display page. And the third page information is page information corresponding to different page resources between the first display page and the theoretical display page.
In the embodiment of the disclosure, after the server sends the first content information to the terminal, a second prompt message may also be sent to the terminal, where the second prompt message is used to remind the user that the page is being maintained. The terminal receives the second prompting message, and can display the second prompting message on the second display page in a popup window mode. For example, the second prompting message may be "the current page is maintaining, please patience wait".
In the embodiment of the disclosure, as soon as the server detects that the first display page currently displayed by the terminal is different from the theoretical display page, the server can acquire the first content information and send the first content information to the terminal, so that the terminal can timely shield a wrong page, the speed can be fastest, wrong guidance brought to a user due to a page loading error is reduced to the greatest extent, the user is prevented from carrying out misoperation on the wrong page, and the user is prevented from being lost.
In step S404, the server acquires second content information corresponding to the theoretical display page, and transmits the second content information to the terminal.
In this step, the server may be implemented by the following steps (1) to (2), including:
(1) and the server acquires second content information corresponding to the theoretical display page based on the rollback code operation.
The server may determine a page code, that is, an error code, corresponding to the third page information based on a rollback code operation, that is, a code rollback function, and then reconfigure a page code of the theoretical display page in a gateway code of the server, and run the page code of the theoretical display page, thereby obtaining second content information corresponding to the theoretical display page.
(2) The server transmits the second content information to the terminal.
And the server sends the second content information to the terminal based on the websocket connection established with the terminal in advance.
In the embodiment of the present disclosure, the first content information is mainly used for controlling the terminal to perform page shielding, and the second content information is mainly used for controlling the terminal to perform page refreshing, so as to obtain a correct display page, that is, a theoretical display page. The server can control the terminal to refresh the page content by any method, and can also control the terminal to refresh the page content by a predefined page refresh method. If the server control terminal refreshes the page content by adopting the predefined page refreshing method, the second content information comprises the behavior type of the refreshed page besides the page refreshing content.
In this step, the server may directly send the second content information to the terminal, or may package the second content information into a json-formatted message body and send the json-formatted message body to the terminal. In the embodiment of the present disclosure, an example is described in which the server packages the second content information into a json-formatted message body and sends the json-formatted message body to the terminal.
In a possible implementation manner, the terminal may send the acquisition request to the server after changing the current display page from the first display page to the second display page, and the server may acquire the second content information based on the acquisition request and then send the second content information to the terminal. In another possible implementation manner, the server may immediately start the code rollback function after sending the first content information to the terminal to obtain the second content information corresponding to the theoretical display page, and then send the second content information to the terminal, so that the terminal may be controlled to display the correct page as soon as possible while avoiding the user from being lost, thereby improving the page display effect. In the embodiments of the present disclosure, this is not particularly limited.
In step S405, the terminal receives the second content information, and changes the current display page from the second display page to the theoretical display page based on the second content information.
In this step, the terminal may be implemented by the following steps (1) to (2), including:
(1) and the terminal decapsulates the json-format message body encapsulated with the second content information to obtain a js-format message body, and acquires the second content information in the js-format message body.
This step is similar to step (1) in step S403, and is not described herein again.
(2) And the server adopts a predefined page refreshing method based on the second content information to change the current display page from the second display page to the theoretical display page.
The second content information comprises a behavior type of a refreshed page and page refreshing content, the terminal stores the corresponding relation between the behavior type of the refreshed page and the page refreshing method in advance, the terminal can determine the page refreshing method corresponding to the behavior type according to the behavior type of the refreshed page in the second content information, and the current display page is refreshed from the second display page to the theoretical display page through the page refreshing method.
In the embodiment of the disclosure, the server sends the first content information to the terminal to control the terminal to shield the first display page with the current loading error and display the second display page, so that the terminal can be prevented from always displaying the page with the loading error, and the page display effect is improved. The second content information is sent to the terminal to control the terminal to refresh the second display page and display the correct theoretical display page, so that the terminal can automatically display the correct page without requiring the user to access the page again, and the page display effect is further improved.
In a possible implementation manner, after the server successfully obtains the second content information, a prompt message may be sent to the terminal based on the websocket connection established with the terminal, where the prompt message is used to prompt that the page is to be updated. For the sake of distinction, this prompting message is referred to as a third prompting message. Correspondingly, the terminal receives the third prompting message, and can display the third prompting message on the second display page in a popup window mode. For example, the third prompting message may be "page is about to be updated". The third prompt message may also carry a prompt time, which is the time from the current time to the theoretical page display. And after the prompt time is reached, the terminal refreshes the second display page to be a theoretical display page.
In the implementation mode, the server control terminal reminds the user through the third prompt message, so that the user can know the maintenance progress of the currently displayed page, and the user is prevented from losing patience when waiting for a long time.
In a possible implementation manner, referring to fig. 6, when it is detected that a first display page currently displayed by the terminal is different from a theoretical display page, the server acquires first content information, packages the first content information into a json-format message body, and sends the json-format message body to the terminal. And the terminal decapsulates the message body in the json format, which is encapsulated with the first content information, to obtain the first content information, and shields wrong page routing by adopting a corresponding routing shielding method according to the behavior type of the modified page in the first content information. And displaying the prompt message on the shielded page, namely the second display page. And then refreshing the page according to the second content information subsequently sent by the server, and displaying the correct display page.
It should be noted that the error of the network application is difficult to avoid, and the method in the related art is to wait for the update when the error occurs, and the user is required to manually access the latest resource. In the embodiment of the disclosure, in the application of the web page with a large access amount, when an error or a data error occurs in the web page, the server actively sends an instruction to the terminal based on the websocket connection pre-established with the terminal, and shields and processes the error phenomenon existing in the terminal, that is, fault-tolerant processing is performed on the error data or content in the web page in time and in real time, and then the environment of the user is controlled at the fastest speed to update resources, so that error guidance brought to the user by the web page error is reduced to the greatest extent, and the user does not need to re-access, thereby improving the display effect of the web page. In addition, in the process of displaying the correct page, relevant prompts can be given in time, so that a user can know the page maintenance progress, and the user is prevented from losing patience after waiting for a long time.
In the embodiment of the present disclosure, the terminal may generate an error display log in which detailed information that a first display page currently displayed is different from a theoretical display page is recorded, based on a rewrite console output (hereinafter, referred to as console output) method and a console output (hereinafter, referred to as console output) method, and transmit the error display log to the server. For example, error stack information and a point in time when an error occurs may be included in the error display log. The terminal may send the error display log to the server when receiving the first content information, or after performing page shielding based on the first content information, or after displaying a correct page. With continued reference to fig. 6, in fig. 6, the terminal sends an error display log to the server after performing page masking based on the first content information.
After receiving the error display log, the server can store the error display log, and can track the local specific error information of the user in such a way, and subsequent related personnel can analyze the error stack information in the error display log and the error occurrence time point to obtain the reason of the page loading error and maintain the page according to the reason, thereby reducing the occurrence of the page loading error.
For example, the reason for a page loading error is that the number of servers is small, and the access amount is large, exceeding the loading capacity of the servers. Under the condition, a server cluster can be built, and the page loading capacity is improved by loading the pages through a plurality of servers.
It should be noted that the page shielding method, the page refreshing method, and the rewriting of the console. When the page loading is wrong, the terminal can directly call the method, so that the terminal can display the correct page at the fastest speed, and the page display efficiency is improved.
In the embodiment of the present disclosure, the server may obtain user information of the current online user, where the user information may include a user account, a number of users, or address information of the current login. The server can control the number of users of the current online users, can also control which users are online, and can also control the current displayed page of any user.
In a possible implementation manner, the process of the server controlling the currently displayed page of any user may be: and if the current displayed page of the terminal is detected to be the page including the restrictive content, acquiring third content information for changing the page of the terminal, and sending the third content information to the terminal. And the terminal receives the third content information, and changes the currently displayed theoretical display page into a third display page by adopting a predefined page changing method based on the third content information. Wherein the page comprising the restrictive content is loaded with pictures or videos of objectionable content.
In this implementation, the server may obtain the third content information when detecting that the page currently displayed by the terminal is a page including restrictive content. The server may also obtain an age parameter of the user when detecting that the page currently displayed by the terminal is a page including restrictive content, and if the age parameter of the user is smaller than a preset age parameter, the server obtains the third content information.
In the embodiment of the present disclosure, by establishing the background system, the user information of the current connection number may be obtained, and also the information in the page that the user is accessing may be obtained, and corresponding instruction operation is performed, for example, the server may control the information that the user accesses by controlling the page that is currently displayed by the user, so that it may be avoided that the user browses a bad page or has a malicious application program to pop up the bad page. For example, the user is currently browsing a bad web page, and the server may change the bad page to a healthy page through this implementation. In addition, the server can also control the terminal to change the bad page into the healthy page according to the age of the user, especially for the underage user, the mode can prevent the underage user from browsing the bad page or a malicious application program from popping up the bad page to influence the normal browsing of the underage user
In a possible implementation manner, the server may further obtain a time length from the page loading error to the display of the correct page each time when the page loading error occurs within the historical time range, and maintain the page by counting the time length, so as to shorten the time length, reduce the waiting time of the user, and improve the page display effect.
The embodiment of the disclosure provides a page display method, wherein a server firstly sends first content information for page shielding to a terminal when detecting that a first display page currently displayed by the terminal is loaded incorrectly, and the terminal shields the first display page currently displayed according to the first content information; and then the server sends second content information corresponding to the theoretical display page to the terminal, and the terminal changes the shielded display page into the theoretical display page according to the second content information, so that the terminal cannot always display the page with the loading error in the time from the loading error of the terminal page to the display of the correct page because the terminal shields the first display page, thereby improving the page display effect.
Fig. 7 is a block diagram illustrating an information acquisition apparatus according to an exemplary embodiment, the apparatus being executed by a server, as illustrated in fig. 7, and the apparatus including:
a first obtaining unit 701, configured to obtain first content information for performing page shielding on a terminal if it is detected that a first display page currently displayed by the terminal is different from a theoretical display page;
a first sending unit 702 configured to perform sending the first content information to the terminal, so that the terminal changes the current display page from the first display page to the second display page based on the first content information;
a second obtaining unit 703 configured to perform obtaining second content information corresponding to the theoretical display page, and send the second content information to the terminal, so that the terminal changes the current display page from the second display page to the theoretical display page based on the second content information.
In a possible implementation manner, the first sending unit 702 is configured to perform establishing a two-way communication websocket connection with the terminal, and send the first content information to the terminal based on the websocket connection, so that the terminal changes the current display page from the first display page to the second display page based on the first content information.
In another possible implementation manner, the first sending unit 702 is configured to perform encapsulation of the first content information into a data exchange json format message body based on the websocket connection and send the data exchange json format message body to the terminal, so that the terminal obtains the first content information after decapsulating the json format message body in which the first content information is encapsulated and changes the current display page from the first display page to the second display page based on the first content information by using a predefined shielded routing device; the message body of the json format, which is packaged with the first content information, comprises the behavior type of the modified page and the modified content of the page.
In another possible implementation manner, the second obtaining unit 703 is configured to perform an operation based on a rollback code, obtain second content information corresponding to the theoretical display page, and after the obtaining is successful, send a prompt message to the terminal based on a websocket connection established with the terminal, so that the terminal prompts that the page is to be updated in a popup mode; and packaging the second content information into a json-format message body based on the websocket connection and then sending the json-format message body to the terminal, so that the terminal unpacks the json-format message body packaged with the second content information, acquires the second content information, and changes the current display page from the second display page to a theoretical display page based on the second content information by adopting a predefined page refreshing device.
In another possible implementation manner, the first obtaining unit 701 is configured to execute a detection program configured in a gateway code of a server in advance, detect whether a first display page currently displayed by the terminal is different from a theoretical display page, and if so, obtain first content information for page shielding of the terminal.
In another possible implementation manner, the apparatus further includes:
the first receiving unit is configured to execute an error display log sent by the receiving terminal based on websocket connection, and the error display log records detailed information of a first display page currently displayed by the terminal, which is different from a theoretical display page; wherein the error display log is generated by the terminal based on the rewrite console output console.
The embodiment of the disclosure provides a page display device, when a server detects that a first display page displayed at present by a terminal is loaded with an error, the server firstly sends first content information for page shielding to the terminal, so that the terminal shields the first display page firstly, and then sends second content information corresponding to a theoretical display page to the terminal, so that the terminal changes the shielded display page into the theoretical display page, and thus, in the time from the loading error of the terminal page to the display of a correct page, because the terminal shields the first display page, the page with the loading error cannot be always displayed on the terminal, and the page display effect is improved.
Fig. 8 is a block diagram illustrating an information acquisition apparatus according to an exemplary embodiment, the apparatus being executed by a terminal, as illustrated in fig. 8, and the apparatus including:
a second receiving unit 801 configured to perform receiving the first content information for page shielding sent by the server;
a first changing unit 802 configured to perform changing a current display page from a first display page to a second display page based on the first content information;
a third receiving unit 803 configured to perform receiving second content information corresponding to the theoretical display page transmitted by the server;
a second changing unit 804 configured to perform changing the current display page from the second display page to the theoretical display page based on the second content information.
In one possible implementation manner, the second receiving unit 801 is configured to perform establishing a websocket connection with the server, and receive the first content information based on the websocket connection.
In another possible implementation manner, the second receiving unit 801 is configured to execute a json-format message body encapsulated with first content information and sent by a receiving server based on a websocket connection, where the json-format message body encapsulated with the first content information includes a behavior type of a modified page and page modification content; and decapsulating the message body in the json format, in which the first content information is encapsulated, to obtain the first content information.
In another possible implementation manner, the first changing unit 802 is configured to perform changing the current display page from the first display page to the second display page by using a predefined mask routing apparatus based on the first content information.
In another possible implementation manner, the third receiving unit 803 is configured to execute receiving, based on the websocket connection established with the server, a message body in json format and encapsulated with the second content information, where the message body is sent by the server; and decapsulating the json-formatted message body in which the second content information is encapsulated to obtain the second content information.
In another possible implementation manner, the second changing unit 804 is configured to perform changing the current display page from the second display page to the theoretical display page by using a predefined page refreshing apparatus based on the second content information.
In another possible implementation manner, the apparatus further includes:
and the fourth receiving unit is configured to execute receiving of the prompt message sent by the server, and prompt the page to be updated in a popup mode based on the prompt message.
In another possible implementation manner, the apparatus further includes:
a generating unit configured to perform generating an error display log in which detailed information that a first display page currently displayed is different from a theoretical display page is recorded, based on the rewritten console.
A second transmission unit configured to perform transmission of the error display log to the server.
The embodiment of the disclosure provides a page display device, wherein when a terminal receives first content which is sent by a server and used for page shielding, the first display page which is displayed at present is shielded according to first content information, and then when content information corresponding to a theoretical display page sent by the server is received, the shielded display page is changed into the theoretical display page according to second content information, so that in the time from the loading error of a terminal page to the display of a correct page, because the terminal shields the first display page, the page with the loading error cannot be displayed all the time on the terminal, and the page display effect is improved.
With regard to the apparatus in the above-described embodiment, the specific manner in which each unit performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.
Fig. 9 is a schematic structural diagram of a server 900 according to an embodiment of the present invention, where the server 900 may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 901 and one or more memories 902, where the memory 902 stores at least one instruction, and the at least one instruction is loaded and executed by the processors 901 to implement the methods provided by the above method embodiments. Certainly, the server 900 may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input and output, and the server 900 may also include other components for implementing device functions, which are not described herein again.
Fig. 10 is a block diagram illustrating a terminal 1000 in accordance with an exemplary embodiment. In some embodiments, terminal 1000 can be: smart phones, tablet computers, notebook computers, desktop computers, or the like. Terminal 1000 can also be referred to as user equipment, portable terminal, laptop terminal, desktop terminal, or the like by other names.
In general, terminal 1000 can include: a processor 1001 and a memory 1002.
Processor 1001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so forth. The processor 1001 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1001 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also referred to as a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1001 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content that the display screen needs to display. In some embodiments, the processor 1001 may further include an AI (Artificial Intelligence) processor for processing a computing operation related to machine learning.
Memory 1002 may include one or more computer-readable storage media, which may be non-transitory. The memory 1002 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 1002 is used to store at least one instruction for execution by the processor 1001 to implement the page display method provided by the disclosed method embodiments.
In some embodiments, terminal 1000 can also optionally include: a peripheral interface 1003 and at least one peripheral. The processor 1001, memory 1002 and peripheral interface 1003 may be connected by a bus or signal line. Various peripheral devices may be connected to peripheral interface 1003 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1004, display screen 1005, camera assembly 1006, audio circuitry 1007, positioning assembly 1008, and power supply 1009.
The peripheral interface 1003 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 1001 and the memory 1002. In some embodiments, processor 1001, memory 1002, and peripheral interface 1003 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1001, the memory 1002, and the peripheral interface 1003 may be implemented on separate chips or circuit boards, which are not limited by this embodiment.
The Radio Frequency circuit 1004 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 1004 communicates with communication networks and other communication devices via electromagnetic signals. The radio frequency circuit 1004 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1004 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuit 1004 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, generations of mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the radio frequency circuit 1004 may also include NFC (Near Field Communication) related circuits, which are not limited by this disclosure.
The display screen 1005 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 1005 is a touch display screen, the display screen 1005 also has the ability to capture touch signals on or over the surface of the display screen 1005. The touch signal may be input to the processor 1001 as a control signal for processing. At this point, the display screen 1005 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, display screen 1005 can be one, disposed on a front panel of terminal 1000; in other embodiments, display 1005 can be at least two, respectively disposed on different surfaces of terminal 1000 or in a folded design; in other embodiments, display 1005 can be a flexible display disposed on a curved surface or a folded surface of terminal 1000. Even more, the display screen 1005 may be arranged in a non-rectangular irregular figure, i.e., a shaped screen. The Display screen 1005 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The camera assembly 1006 is used to capture images or video. Optionally, the camera assembly 1006 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 1006 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuit 1007 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 1001 for processing or inputting the electric signals to the radio frequency circuit 1004 for realizing voice communication. For stereo sound collection or noise reduction purposes, multiple microphones can be provided, each at a different location of terminal 1000. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 1001 or the radio frequency circuit 1004 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuit 1007 may also include a headphone jack.
A Location component 1008 is employed to locate a current geographic Location of terminal 1000 for purposes of navigation or LBS (Location Based Service). The Positioning component 1008 may be a Positioning component based on the Global Positioning System (GPS) in the united states, the beidou System in china, the graves System in russia, or the galileo System in the european union.
Power supply 1009 is used to supply power to various components in terminal 1000. The power source 1009 may be alternating current, direct current, disposable batteries, or rechargeable batteries. When the power source 1009 includes a rechargeable battery, the rechargeable battery may support wired charging or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 1000 can also include one or more sensors 1010. The one or more sensors 1010 include, but are not limited to: acceleration sensor 1011, gyro sensor 1012, pressure sensor 1013, fingerprint sensor 1014, optical sensor 1015, and proximity sensor 1016.
Acceleration sensor 1011 can detect acceleration magnitudes on three coordinate axes of a coordinate system established with terminal 1000. For example, the acceleration sensor 1011 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 1001 may control the display screen 1005 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1011. The acceleration sensor 1011 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 1012 may detect a body direction and a rotation angle of the terminal 1000, and the gyro sensor 1012 and the acceleration sensor 1011 may cooperate to acquire a 3D motion of the user on the terminal 1000. From the data collected by the gyro sensor 1012, the processor 1001 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensor 1013 can be disposed on a side frame of terminal 1000 and/or underneath display screen 1005. When pressure sensor 1013 is disposed on a side frame of terminal 1000, a user's grip signal on terminal 1000 can be detected, and processor 1001 performs left-right hand recognition or shortcut operation according to the grip signal collected by pressure sensor 1013. When the pressure sensor 1013 is disposed at a lower layer of the display screen 1005, the processor 1001 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 1005. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 1014 is used to collect a fingerprint of the user, and the processor 1001 identifies the user according to the fingerprint collected by the fingerprint sensor 1014, or the fingerprint sensor 1014 identifies the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, the processor 1001 authorizes the user to perform relevant sensitive operations including unlocking a screen, viewing encrypted information, downloading software, paying, and changing settings, etc. Fingerprint sensor 1014 may be disposed on a front, back, or side of terminal 1000. When a physical key or vendor Logo is provided on terminal 1000, fingerprint sensor 1014 can be integrated with the physical key or vendor Logo.
The optical sensor 1015 is used to collect the ambient light intensity. In one embodiment, the processor 1001 may control the display brightness of the display screen 1005 according to the ambient light intensity collected by the optical sensor 1015. Specifically, when the ambient light intensity is high, the display brightness of the display screen 1005 is increased; when the ambient light intensity is low, the display brightness of the display screen 1005 is turned down. In another embodiment, the processor 1001 may also dynamically adjust the shooting parameters of the camera assembly 1006 according to the intensity of the ambient light collected by the optical sensor 1015.
Proximity sensor 1016, also known as a distance sensor, is typically disposed on a front panel of terminal 1000. Proximity sensor 1016 is used to gather the distance between the user and the front face of terminal 1000. In one embodiment, when proximity sensor 1016 detects that the distance between the user and the front surface of terminal 1000 is gradually reduced, processor 1001 controls display screen 1005 to switch from a bright screen state to a dark screen state; when proximity sensor 1016 detects that the distance between the user and the front of terminal 1000 is gradually increased, display screen 1005 is controlled by processor 1001 to switch from a breath-screen state to a bright-screen state.
Those skilled in the art will appreciate that the configuration shown in FIG. 10 is not intended to be limiting and that terminal 1000 can include more or fewer components than shown, or some components can be combined, or a different arrangement of components can be employed.
In an exemplary embodiment, there is also provided a computer-readable storage medium in which instructions, when executed by a processor, enable the processor to perform the page display method in the above-described embodiments.
In an exemplary embodiment, there is also provided a computer program product comprising computer programs/instructions which, when executed by a processor, implement the page display method in the above-described embodiments. A
In an exemplary embodiment, a computer program according to an embodiment of the present disclosure may be deployed to be executed on one computer device or on multiple computer devices located at one site, or may be executed on multiple computer devices distributed at multiple sites and interconnected by a communication network, and the multiple computer devices distributed at the multiple sites and interconnected by the communication network may constitute a block chain system.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A page display method, performed by a server, the method comprising:
if the first display page currently displayed by the terminal is detected to be different from the theoretical display page, acquiring first content information for carrying out page shielding on the terminal;
sending the first content information to the terminal, so that the terminal changes a current display page from the first display page to a second display page based on the first content information;
and acquiring second content information corresponding to the theoretical display page, and sending the second content information to the terminal, so that the terminal changes the current display page from the second display page to the theoretical display page based on the second content information.
2. The method according to claim 1, wherein the sending the first content information to the terminal, so that the terminal changes a current display page from the first display page to a second display page based on the first content information, comprises:
and establishing bidirectional communication websocket connection with the terminal, and sending the first content information to the terminal based on the websocket connection, so that the terminal changes the current display page from the first display page to a second display page based on the first content information.
3. The method according to claim 1, wherein the obtaining second content information corresponding to the theoretical display page and sending the second content information to the terminal, so that the terminal changes a current display page from the second display page to the theoretical display page based on the second content information comprises:
acquiring second content information corresponding to the theoretical display page based on rollback code operation, and after the second content information is successfully acquired, sending a prompt message to the terminal based on websocket connection established with the terminal so that the terminal prompts a page to be updated in a popup mode;
and packaging the second content information into a json format message body based on the websocket connection and then sending the json format message body to the terminal, so that the terminal unpacks the json format message body packaged with the second content information, acquires the second content information, and changes the current display page from the second display page to the theoretical display page based on the second content information by adopting a predefined page refreshing method.
4. A page display method, performed by a terminal, the method comprising:
receiving first content information which is sent by a server and used for shielding a page;
changing the current display page from the first display page to a second display page based on the first content information;
receiving second content information which is sent by the server and corresponds to a theoretical display page;
and changing the current display page from the second display page to the theoretical display page based on the second content information.
5. The method of claim 4, wherein the changing the current display page from the second display page to the theoretical display page based on the second content information comprises:
and changing the current display page from the second display page to the theoretical display page by adopting a predefined page refreshing method based on the second content information.
6. A page display apparatus, performed by a server, the apparatus comprising:
the terminal comprises a first acquisition unit, a second acquisition unit and a display unit, wherein the first acquisition unit is configured to execute the steps of acquiring first content information for carrying out page shielding on the terminal if detecting that a first display page currently displayed by the terminal is different from a theoretical display page;
a first sending unit configured to execute sending the first content information to the terminal, so that the terminal changes a current display page from the first display page to a second display page based on the first content information;
and the second acquisition unit is configured to execute acquisition of second content information corresponding to the theoretical display page and send the second content information to the terminal, so that the terminal changes the current display page from the second display page to the theoretical display page based on the second content information.
7. A page display apparatus, performed by a terminal, the apparatus comprising:
the second receiving unit is configured to execute the first content information which is sent by the receiving server and is subjected to page shielding;
a first changing unit configured to perform changing of a current display page from the first display page to a second display page based on the first content information;
a third receiving unit configured to perform receiving second content information corresponding to a theoretical display page sent by the server;
a second changing unit configured to perform changing of the current display page from the second display page to the theoretical display page based on the second content information.
8. A server, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the page display method of any of claims 1 to 3.
9. A terminal, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the page display method of any of claims 4 to 5.
10. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor, enable the processor to perform the page display method of any one of claims 1 to 5.
CN202110560626.8A 2021-05-21 2021-05-21 Page display method, device, server, terminal and storage medium Active CN113301148B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110560626.8A CN113301148B (en) 2021-05-21 2021-05-21 Page display method, device, server, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110560626.8A CN113301148B (en) 2021-05-21 2021-05-21 Page display method, device, server, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN113301148A true CN113301148A (en) 2021-08-24
CN113301148B CN113301148B (en) 2022-10-28

Family

ID=77323832

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110560626.8A Active CN113301148B (en) 2021-05-21 2021-05-21 Page display method, device, server, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN113301148B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804515A (en) * 2018-04-25 2018-11-13 网宿科技股份有限公司 A kind of webpage loading method, webpage loading system and server
CN110119290A (en) * 2019-04-12 2019-08-13 平安科技(深圳)有限公司 The spare page switching method of application program, device, computer equipment and storage medium
CN111290797A (en) * 2020-01-20 2020-06-16 北京字节跳动网络技术有限公司 Page switching method, client, server, electronic equipment and system
CN112307381A (en) * 2020-10-14 2021-02-02 北京三快在线科技有限公司 Page loading method and device, storage medium and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804515A (en) * 2018-04-25 2018-11-13 网宿科技股份有限公司 A kind of webpage loading method, webpage loading system and server
US20200319954A1 (en) * 2018-04-25 2020-10-08 Wangsu Science & Technology Co., Ltd. Webpage loading method, webpage loading system and server
CN110119290A (en) * 2019-04-12 2019-08-13 平安科技(深圳)有限公司 The spare page switching method of application program, device, computer equipment and storage medium
CN111290797A (en) * 2020-01-20 2020-06-16 北京字节跳动网络技术有限公司 Page switching method, client, server, electronic equipment and system
CN112307381A (en) * 2020-10-14 2021-02-02 北京三快在线科技有限公司 Page loading method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN113301148B (en) 2022-10-28

Similar Documents

Publication Publication Date Title
US20210326145A1 (en) Method and apparatus for starting application, computer device, and storage medium
CN109327608B (en) Song sharing method, terminal, server and system
CN110278464B (en) Method and device for displaying list
CN111092809B (en) Method and device for pushing information in real time, computer equipment and storage medium
CN112965683A (en) Volume adjusting method and device, electronic equipment and medium
CN113204298A (en) Method and device for displaying release progress, electronic equipment and storage medium
EP4093032A1 (en) Method and apparatus for displaying data
CN111159604A (en) Picture resource loading method and device
CN112749362A (en) Control creating method, device, equipment and storage medium
CN110290191B (en) Resource transfer result processing method, device, server, terminal and storage medium
CN108038232B (en) Webpage editing method, device and system and storage medium
CN112118353A (en) Information display method, device, terminal and computer readable storage medium
CN111258683A (en) Detection method, detection device, computer equipment and storage medium
CN110366044B (en) Method, device and system for acquiring target object
CN107800720B (en) Hijacking reporting method, device, storage medium and equipment
CN113377647B (en) Page processing method, device, server, terminal and readable storage medium
CN113301148B (en) Page display method, device, server, terminal and storage medium
CN110971692B (en) Method and device for opening service and computer storage medium
CN111131619B (en) Account switching processing method, device and system
CN110708582B (en) Synchronous playing method, device, electronic equipment and medium
CN112260845B (en) Method and device for accelerating data transmission
CN113051494A (en) Information display method and device, electronic equipment and storage medium
CN111241451A (en) Webpage processing method and device, computer equipment and storage medium
CN112597417A (en) Page updating method and device, electronic equipment and storage medium
CN113312249A (en) Log data generation method, log data display 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