CN110825994B - Page buffer processing method and device, computer equipment and storage medium - Google Patents

Page buffer processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110825994B
CN110825994B CN201911052652.9A CN201911052652A CN110825994B CN 110825994 B CN110825994 B CN 110825994B CN 201911052652 A CN201911052652 A CN 201911052652A CN 110825994 B CN110825994 B CN 110825994B
Authority
CN
China
Prior art keywords
information
page
value
interactive
counting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911052652.9A
Other languages
Chinese (zh)
Other versions
CN110825994A (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.)
Wanghai Kangxin Beijing Technology Co ltd
Original Assignee
Wanghai Kangxin Beijing 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 Wanghai Kangxin Beijing Technology Co ltd filed Critical Wanghai Kangxin Beijing Technology Co ltd
Priority to CN201911052652.9A priority Critical patent/CN110825994B/en
Publication of CN110825994A publication Critical patent/CN110825994A/en
Application granted granted Critical
Publication of CN110825994B publication Critical patent/CN110825994B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Transfer Systems (AREA)

Abstract

The embodiment of the invention discloses a page buffer processing method, a page buffer processing device, computer equipment and a storage medium, wherein the page buffer processing method comprises the following steps: acquiring interactive information of a target page, wherein the interactive information comprises request information and response information; when the acquired interactive information is request information, triggering the buffering effect of the target page; and when the acquired interaction information is response information, determining whether the target page meets a preset buffering condition according to the counting information of the interceptor, and setting the buffering state of the target page according to a determination result. The method has the advantages that the interceptors are arranged to carry out uniform interception processing on page buffers of all Http requests of all pages of the system, only page buffer codes need to be written in one place, the overall effect can be achieved, when Http requests are too frequent, the workload can be effectively reduced, similar codes are prevented from being written numerous times, the working efficiency is improved, and the code structure is optimized.

Description

Page buffer processing method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a method and an apparatus for processing page buffering, a computer device, and a storage medium.
Background
With the rapid development of the internet, the network 'speed up' is always concerned, people open Web pages faster and faster, and generally, the process of page buffering and loading is almost imperceptible to users. However, in some cases, for example, a website needs to load a large amount of data urgently, or a user request needs to make a complicated logical process in a back end, a user downloads files too large, and the like, a scene that the user needs to wait for is inevitable.
In the face of this situation, the conventional solution requires the developer to process the page load buffer separately for each request, and add the loading effect while waiting for the back-end data response.
This processing method is still easy to meet the demand of a small-scale website system, but for a large website, when Http requests are too many and frequent, the development workload is huge, and similar codes are written numerous times easily, and the coding efficiency is low. Furthermore, if a page has N requests, then the page buffer effect will be written N times in the page, resulting in a bloated code. When the front-end architecture of the website is SPA, a single HTML page is loaded, and the Web application of the page is dynamically updated when the user interacts with the application, which requires more frequent processing of page buffering.
Disclosure of Invention
The embodiment of the invention can provide a page buffering processing method, a page buffering processing device, a computer device and a storage medium, which can improve the working efficiency and optimize the code structure.
In order to solve the above technical problem, the embodiment of the present invention adopts a technical solution that: a page buffer processing method is provided, which comprises the following steps:
acquiring interactive information of a target page, wherein the interactive information comprises request information and response information;
when the acquired interactive information is request information, triggering the buffering effect of the target page;
and when the acquired interaction information is response information, determining whether the target page meets a preset buffering condition according to the counting information of the interceptor, and setting the buffering state of the target page according to a determination result.
Optionally, after the step of obtaining the interaction information of the page, the method includes the following steps:
acquiring counting information of the target page, wherein the counting information is the number of page requests which are not responded by the target page;
and adjusting the value of the counting information according to the interaction information.
Optionally, the step of adjusting the value of the count information according to the interaction information includes the following steps:
when the acquired interactive information is request information, increasing the value of the counting information;
and when the acquired interactive information is response information, reducing the value of the counting information.
Optionally, the buffering condition is that the value of the count information is greater than a preset first threshold, and when the acquired interaction information is response information, the step of determining whether the target page meets the preset buffering condition according to the count information of the interceptor and setting the buffering state of the target page according to a determination result includes the following steps:
comparing the value of the counting information with a preset first threshold value;
when the value of the counting information is larger than the first threshold value, keeping a page buffer state;
ending the page buffer state when the value of the count information is equal to the first threshold.
Optionally, after the step of triggering the buffering effect of the target page when the acquired interaction information is the request information, the method includes the following steps:
comparing the value of the counting information with a preset second threshold value;
when the value of the counting information is larger than the second threshold value, loading a preset interaction assembly;
and loading a preset buffer image when the value of the counting information is not greater than the second threshold value.
Optionally, the types of the interactive components are not less than two, and the step of loading the preset interactive components when the value of the count information is greater than the second threshold value includes the following steps:
acquiring a component switching instruction of a user;
and switching the interactive components according to the component switching instruction of the user.
Optionally, the step of loading a preset interaction component when the value of the count information is greater than the second threshold includes the following steps:
obtaining interest information of a user;
and determining the interactive component according to the interest information and loading.
To solve the foregoing technical problem, an embodiment of the present invention further provides a page buffer processing apparatus, including:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring interactive information of a target page, and the interactive information comprises request information and response information;
the execution module is used for triggering the buffer effect of the target page when the acquired interactive information is the request information;
and the processing module is used for confirming whether the target page meets a preset buffering condition according to the counting information of the interceptor and setting the buffering state of the target page according to a confirmation result when the acquired interaction information is response information.
Optionally, the page buffer processing apparatus further includes:
the first obtaining submodule is used for obtaining counting information of the target page, wherein the counting information is the number of page requests which are not responded by the target page;
and the first processing submodule is used for adjusting the value of the counting information according to the interaction information.
Optionally, the page buffer processing apparatus further includes:
the first execution submodule is used for increasing the value of the counting information when the acquired interactive information is request information;
and the second execution submodule is used for reducing the value of the counting information when the acquired interactive information is response information.
Optionally, the apparatus for processing page buffer further includes:
the first comparison submodule is used for comparing the value of the counting information with a preset first threshold value;
a third execution submodule, configured to maintain a page buffer state when the value of the count information is greater than the first threshold;
and the fourth execution submodule is used for ending the page buffer state when the value of the counting information is equal to the first threshold value.
Optionally, the page buffer processing apparatus further includes:
the second comparison submodule is used for comparing the value of the counting information with a preset second threshold value;
the fifth execution submodule is used for loading a preset interaction assembly when the value of the counting information is larger than the second threshold value;
and the sixth execution submodule is used for loading a preset buffer image when the value of the counting information is not greater than the second threshold value.
Optionally, the page buffer processing apparatus further includes:
the second acquisition sub-module is used for acquiring a component switching instruction of a user;
and the first switching submodule is used for switching the interactive component according to a component switching instruction of a user.
Optionally, the page buffer processing apparatus further includes:
the third obtaining submodule is used for obtaining interest information of the user;
and the second processing submodule is used for determining the interactive component according to the interest information and loading the interactive component.
In order to solve the above technical problem, an embodiment of the present invention further provides a computer device, including a memory and a processor, where the memory stores computer readable instructions, and the computer readable instructions, when executed by the processor, cause the processor to execute the steps of the above page buffering processing method.
In order to solve the above technical problem, an embodiment of the present invention further provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the above page buffering processing method.
The embodiment of the invention has the beneficial effects that: the method comprises the steps of carrying out uniform interception processing on page buffering of all Http requests of all pages of a system by setting an interceptor, triggering a page buffering effect when the requests enter the interceptor, judging the page buffering state when a background response enters the interceptor, continuing to flow when the conditions are met, and ending the buffering when the conditions are not met. When a single HTML page dynamically updates the Web application program of the page when a user interacts with the application program, page buffering needs to be frequently processed, page contents can be uniformly buffered by the method, the condition that partial contents are loaded completely and are not buffered is avoided, and user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of a basic flow of a page buffering processing method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating the process of acquiring and adjusting counting information according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a process of adjusting the value of the count information according to the interaction information according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart illustrating the process of determining the page buffer status after acquiring the response information according to the embodiment of the present invention;
FIG. 5 is a flowchart illustrating a process of determining the loading content of a buffered page according to an embodiment of the present invention;
FIG. 6 is a flowchart illustrating switching of interactive components according to an embodiment of the present invention;
FIG. 7 is a flowchart illustrating the determination of a loaded interactive component according to an embodiment of the present invention;
FIG. 8 is a block diagram illustrating a basic structure of a page buffer processing apparatus according to an embodiment of the present invention;
FIG. 9 is a block diagram of the basic structure of a computer device according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention.
In some flows described in the present specification and claims and above figures, a number of operations are included that occur in a particular order, but it should be clearly understood that these operations may be performed out of order or in parallel as they occur herein, with the order of the operations being given as 101, 102, etc. merely to distinguish between various operations, and the order of the operations itself does not represent any order of performance. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without any inventive step, are within the scope of the present invention.
As will be appreciated by those skilled in the art, "terminal" as used herein includes both devices that are wireless signal receivers, devices that have only wireless signal receivers without transmit capability, and devices that include receive and transmit hardware, devices that have receive and transmit hardware capable of performing two-way communication over a two-way communication link. Such a device may include: a cellular or other communication device having a single line display or a multi-line display or a cellular or other communication device without a multi-line display; PCS (personal communications service), which may combine voice, data processing, facsimile and/or data communications capabilities; a PDA (personal digital assistant), which may include a radio frequency receiver, a pager, internet/intranet access, web browser, notepad, calendar and/or GPS (global positioning system) receiver; a conventional laptop and/or palmtop computer or other device having and/or including a radio frequency receiver. As used herein, a "terminal" or "terminal device" may be portable, transportable, installed in a vehicle (aeronautical, maritime, and/or land-based), or situated and/or configured to operate locally and/or in a distributed fashion at any other location(s) on earth and/or in space. As used herein, the "terminal device" may also be a communication terminal, a internet access terminal, and a music/video playing terminal, for example, a PDA, an MID (mobile internet device), and/or a mobile phone with music/video playing function, and may also be a smart television, a set-top box, and other devices.
Specifically referring to fig. 1, fig. 1 is a basic flow chart illustrating a page buffering processing method according to the present embodiment.
As shown in fig. 1, a method for processing page buffer includes the following steps:
s1100, acquiring interactive information of a target page, wherein the interactive information comprises request information and response information;
and setting an Http request and response global interceptor for the Web application program at the front end, wherein the Http request and response global interceptor is used for acquiring interactive information between the front end and the server, and the interactive information comprises request information of the front end and response information of the server. The interceptors of the HTTP request and response may include a requestinterceptor and a responselnterpretetter for intercepting request information of the front end and response information of the server, respectively. When a page of a front end is loaded or an application program needs to acquire data, the front end establishes connection with a server to construct request information, then transmits information to the server, and waits for the server to reply the information, the request information transmitted to the server firstly enters a request interceptor (a requestInterreceptor) and then is sent to the server. After the request information reaches the server, the server analyzes the request information, verifies that the machine where the server is located has the required service, and the user has the authority to call, then captures the corresponding processing result, namely response information, returns the response information to the requester, finally disconnects the connection ending request, and sends the response content to a response interceptor, namely a ResponseIntercepetor before reaching the application program, and then sends the response content to the front end for analysis and rendering.
S1200, when the acquired interactive information is request information, triggering the buffering effect of the target page;
in this embodiment, a page buffer variable loading is set, when the value of the page buffer variable is true, a page buffer effect is triggered, and when the value of the page buffer variable is false, page buffering is finished.
When the request information enters the request interceptor, that is, the interaction information acquired by the global interceptor is the request information, triggering a page buffering effect, setting a page buffering variable Loading to true, triggering the page buffering effect, and Loading preset buffering transition content in the page, for example, a circling animation, a bar reading animation, or displaying with characters, "… … in page Loading", and the like.
S1300, when the acquired interaction information is response information, determining whether the target page meets a preset buffering condition according to the counting information of the interceptor, and setting the buffering state of the target page according to a determination result;
and when the response information returned by the server enters the response interceptor, namely the interactive information acquired by the global interceptor is the response information, judging the page state, wherein the page state is whether the current page content and the application program are buffered or not, and expressing the page state through the buffer condition. The buffering condition is preset data information used for judging whether the page is buffered, for example, the number of request information sent by the front end and response information returned by the server is larger than the number of the response information, and when the number of the request information is larger than the number of the response information, it is indicated that a part of the sent request is not responded, so that the page still needs time to be buffered, namely, the response information of the server is waited, at the moment, the page is judged to be in line with the buffering condition, and the buffering effect of the page is maintained; and when the quantity of the request information is equal to that of the response information, all the requests are responded, and the page buffering is finished when the buffering condition is judged not to be met.
As shown in fig. 2, step S1100 is followed by the following steps:
s1110, acquiring counting information of the target page, wherein the counting information is the number of page requests which are not responded by the target page;
considering that some user interactions involve multiple Http requests, and that the requests are asynchronous, there is no guarantee that the requests will enter the request interceptor and respond to the interceptor, and therefore a counter, such as a variable count of count information, needs to be maintained to track the request flow. In some embodiments, the initial value of the count information is zero.
S1120, adjusting the value of the counting information according to the interaction information;
when a request enters a request interceptor, triggering a page buffering effect, starting counting by a counter, setting count information count to be automatically increased by 1 (the initial value is 0), when a response enters a response interceptor, setting count information count to be automatically decreased by 1, then judging whether the value of the count information count is 0, if the value of the count information count is 0, finishing the page buffering effect, and restoring the page to be normal; if the answer is not 0, continuing to wait for the background Http response to enter the response interceptor until the last Http response enters the response interceptor and the value of the counting information is changed to 0, and ending the buffering of all pages of the page. In some embodiments, the count information may not have an increase value and a decrease value of 1, as long as counting of the number of requests is achieved.
By setting the counting information and updating the value of the counting information in real time, the number of requests and responses can be effectively monitored, and therefore unified processing of the page buffer state is achieved.
As shown in fig. 3, step S1120 specifically includes the following steps:
s1121, when the acquired interactive information is request information, increasing the value of the counting information;
when a request enters a request interceptor, namely the acquired interactive information is request information, triggering a page buffer effect, starting counting by a counter, and setting count information count to be self-incremented by 1.
S1122, when the acquired interactive information is response information, reducing the value of the counting information;
and when the response enters the response interceptor, namely the acquired interaction information is response information, setting count information count to be self-minus 1.
As shown in fig. 4, step S1300 specifically includes the following steps:
s1310, comparing the value of the counting information with a preset first threshold value;
the system is provided with a first threshold value for judging whether page buffering is finished, and the preset buffering condition is that the value of the counting information is larger than the first threshold value. In some embodiments, the first threshold is an initial value of the count information. For convenience of description, it is assumed in this embodiment that the initial value of the count information is 0, and therefore the first threshold is also 0, when the request information enters the request interceptor, the count information is incremented by 1 to trigger the page buffering effect, when the response information enters the response interceptor, the count information is decremented by 1, and then the count information is compared with the first threshold to determine whether the count information is greater than the first threshold (i.e., whether the count information is greater than 0).
S1320, when the value of the counting information is larger than the first threshold value, keeping a page buffer state;
when the value of the counting information is larger than the first threshold value, the number of the sent requests is larger than the number of the obtained responses, so that a part of the requests are still not responded, at the moment, the page buffering is not finished, the page buffering state is kept, and the background http response is continuously waited to enter the response interceptor.
S1330, ending the page buffer state when the value of the counting information is equal to the first threshold;
when the last response enters the response interceptor, the value of the counting information is equal to the first threshold value, which indicates that the number of the sent requests is equal to the number of the obtained responses, that is, the sent requests are all responded, the page buffering is completed at this time, and the page buffering state is ended.
By comparing the count information with the set threshold, the buffer status can be ended in time after all the transmitted requests are responded, the processing efficiency of the page buffer status is improved as shown in fig. 5, and the following steps are included after step S1200:
s1210, comparing the value of the counting information with a preset second threshold value;
the system is provided with a second threshold used for judging whether the request quantity to be responded is larger, namely whether the buffering needs longer time, the second threshold can be a numerical value larger than the initial value of the counting information, the value of the second threshold can be adjusted according to the actual requirement, the limitation is not limited, for example, the initial value of the counting information is 0, the second threshold can be set to be 30, when the request information enters the request interceptor, the counting information is increased by 1, when the counting information is larger than the second threshold, the number of the requests sent by the front end is far larger than the response number fed back by the server, more requests wait for response, and more buffering time is still needed; when the count information is less than or equal to the second threshold, it indicates that the number of requests waiting for response is small, and the buffering can be completed without much time. The value of the acquired count information is compared with a second threshold value,
s1220, loading a preset interaction assembly when the value of the counting information is larger than the second threshold value;
when the value of the count information is greater than the second threshold, it is indicated that the number of requests sent by the front end is much greater than the number of responses fed back by the server, there are more requests waiting for responses, and still more buffering time is needed. Because the buffering time of the website is not too long, the interactive component can be a module with less content and can send out entertainment in a short time, for example, the game component can be a mine sweeping, continuous watching, three-game-playing game and the like, and can be played by a user after being loaded; the audio component can be an audio player and is used for playing music or radio station texts and the like; the video component can be a video player for playing short videos; the image-text component can be a picture browser or a text reader, the picture browser is used for showing landscape group pictures, story group pictures or short cartoons, and the like, and the text reader is used for showing short stories, and the like.
The interactive component may be obtained or updated through the server side, and then stored locally, for example, when the front end is idle, the interactive component is obtained or updated according to a preset time interval, which is not limited herein.
S1230, when the value of the counting information is not greater than the second threshold value, loading a preset buffer image;
when the count information is less than or equal to the second threshold, it indicates that the number of requests waiting for response is small, and the buffering can be completed without much time, at this time, a buffer image is loaded in the buffer page, and the buffer image is used for transmitting information of "page buffering" to the user, such as a turn animation or a bar reading animation. The buffered image may be an image stored locally, or may be acquired or updated by the server, for example, when the front end is idle, or updated according to a preset time interval, which is not limited herein.
And when the number of the requests waiting for response is large, the corresponding interactive assemblies are loaded for users to enjoy, so that the users can spend the buffering time in an entertainment mode, and the user experience is improved.
As shown in fig. 6, the step S1220 further includes the following steps:
s1221, acquiring a component switching instruction of a user;
the system stores at least two interactive components for users to select interesting contents, one of the interactive components is used as a default loading component, for example, three types of game components, audio components and video components exist at the same time, the game component is the default component, when the interactive component needs to be loaded, the default component is loaded first, a component switching key is displayed in a page, the user is prompted to switch the component if the current component is not interesting, then a component switching instruction triggered by the user is obtained, and in the embodiment, the switching key is clicked.
S1222, switching the interactive component according to a component switching instruction of a user;
after the switching instruction of the user is obtained, the interactive components are switched according to the switching instruction of the user, and the switching manner may be to select the next component in sequence, or to select an interested component from a plurality of components, and the like, which is not limited herein. And after determining the component to be switched, loading the component to be switched into a target page.
By reserving a plurality of components for the user to select, when the user is not interested in the currently loaded component, the user may switch to another component to improve the interest point of the user, and the user experience is improved as shown in fig. 7, step S1220 specifically includes the following steps:
s1223, obtaining interest information of the user;
the system records interest information of different users, and the interest information includes browsing records, click records or download records of the users, but is not limited thereto. Distinguishing different users according to the account number of the current login user, and then acquiring the interest information of the current user so as to reflect the interest points of the user, for example, determining the interest type of the user according to the type of websites browsed by the user, and dividing the interest type of the user into games when the amount of websites browsed by the user exceeds a certain threshold value; or counting the types of websites browsed by the user, and determining the website type with the highest browsing frequency in a certain time as the interest of the user. The threshold or the time in this embodiment can be adjusted according to actual requirements.
S1224, determining the interactive component according to the interest information and loading;
after the interest type of the user is determined according to the interest information of the user, a target interaction component is selected from the existing components according to the interest type and is loaded into a page. The selection mode can be that a corresponding mapping type is constructed for the stored components through mapping, and when the interest type of the user belongs to a certain mapping type, the corresponding component is taken as a target interaction component.
The loaded interactive assembly is determined by using the interest information of the user, so that the interactive assembly can better fit the interest of the user, and the user experience is improved.
In order to solve the above technical problem, an embodiment of the present invention further provides a processing apparatus for page buffering. Referring to fig. 8, fig. 8 is a block diagram of a basic structure of the processing device for implementing page buffering.
As shown in fig. 8, the page buffer processing apparatus includes: an acquisition module 2100, an execution module 2200, and a processing module 2300. The acquisition module is used for acquiring interactive information of a target page, wherein the interactive information comprises request information and response information; the execution module is used for triggering the buffer effect of the target page when the acquired interactive information is the request information; and the processing module is used for confirming whether the target page meets a preset buffering condition according to the counting information of the interceptor and setting the buffering state of the target page according to a confirmation result when the acquired interaction information is response information.
The method comprises the steps of carrying out uniform interception processing on page buffering of all Http requests of all pages of a system by setting an interceptor, triggering a page buffering effect when the requests enter the interceptor, judging the page buffering state when a background response enters the interceptor, continuing to flow when the conditions are met, and ending the buffering when the conditions are not met. When a single HTML page dynamically updates the Web application program of the page when a user interacts with the application program, page buffering needs to be frequently processed, page contents can be uniformly buffered by the method, the condition that partial contents are loaded completely and are not buffered is avoided, and user experience is improved.
In some embodiments, the page buffer processing apparatus further comprises: the device comprises a first acquisition submodule and a first processing submodule. The first obtaining submodule is used for obtaining counting information of the target page, wherein the counting information is the number of page requests which are not responded by the target page; and the first processing submodule is used for adjusting the value of the counting information according to the interaction information.
In some embodiments, the page buffer processing apparatus further comprises: the first execution submodule and the second execution submodule. The first execution submodule is used for increasing the value of the counting information when the acquired interactive information is request information; and the second execution submodule is used for reducing the value of the counting information when the acquired interactive information is response information.
In some embodiments, the page buffer processing apparatus further comprises: a first comparison submodule, a third execution submodule and a fourth execution submodule. The first comparison submodule is used for comparing the value of the counting information with a preset first threshold value; the third execution submodule is used for keeping a page buffer state when the value of the counting information is larger than the first threshold value; and the fourth execution submodule is used for ending the page buffer state when the value of the counting information is equal to the first threshold value.
In some embodiments, the page buffer processing apparatus further comprises: a second comparison submodule, a fifth execution submodule and a sixth execution submodule. The second comparison submodule is used for comparing the value of the counting information with a preset second threshold value; the fifth execution submodule is used for loading a preset interaction assembly when the value of the counting information is larger than the second threshold value; and the sixth execution submodule is used for loading a preset buffer image when the value of the counting information is not greater than the second threshold value.
In some embodiments, the page buffer processing apparatus further comprises: the second acquisition submodule and the first switching submodule. The second obtaining submodule is used for obtaining a component switching instruction of a user; the first switching submodule is used for switching the interactive component according to a component switching instruction of a user.
In some embodiments, the page buffer processing apparatus further comprises: a third obtaining submodule and a second processing submodule. The third obtaining submodule is used for obtaining interest information of the user; and the second processing submodule is used for determining the interactive component according to the interest information and loading the interactive component.
In order to solve the above technical problem, an embodiment of the present invention further provides a computer device. Referring to fig. 9, fig. 9 is a block diagram of a basic structure of a computer device according to the present embodiment.
As shown in fig. 9, the internal structure of the computer device is schematically illustrated. As shown in fig. 9, the computer apparatus includes a processor, a nonvolatile storage medium, a memory, and a network interface connected through a system bus. The non-volatile storage medium of the computer device stores an operating system, a database and computer readable instructions, the database can store control information sequences, and the computer readable instructions can enable the processor to realize a page buffering processing method when being executed by the processor. The processor of the computer device is used for providing calculation and control capability and supporting the operation of the whole computer device. The memory of the computer device may have stored therein computer readable instructions that, when executed by the processor, may cause the processor to perform a method of processing page buffering. The network interface of the computer device is used for connecting and communicating with the terminal. It will be appreciated by those skilled in the art that the configurations shown in the figures are block diagrams of only some of the configurations relevant to the present application, and do not constitute a limitation on the computing devices to which the present application may be applied, and that a particular computing device may include more or less components than those shown in the figures, or may combine certain components, or have a different arrangement of components.
In this embodiment, the processor is configured to execute specific functions of the obtaining module 2100, the executing module 2200, and the processing module 2300 in fig. 8, and the memory stores program codes and various data required for executing the modules. The network interface is used for data transmission to and from a user terminal or a server. The memory in this embodiment stores program codes and data necessary for executing all the submodules in the processing device of the page buffer, and the server can call the program codes and data of the server to execute the functions of all the submodules.
The present invention also provides a storage medium storing computer readable instructions, which when executed by one or more processors, cause the one or more processors to perform the steps of the page buffering processing method according to any one of the above embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by a computer program, which may be stored in a computer readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-only memory (ROM), or a Random Access Memory (RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that various changes and modifications can be made by those skilled in the art without departing from the spirit of the invention, and these changes and modifications are all within the scope of the invention. Therefore, the protection scope of the present patent should be subject to the appended claims.

Claims (7)

1. A page buffer processing method is characterized by comprising the following steps:
acquiring interactive information of a target page according to a preset interceptor, wherein the interactive information comprises request information and response information;
acquiring counting information of the target page, wherein the counting information is the number of page requests which are not responded by the target page;
when the acquired interactive information is request information, increasing the value of the counting information and triggering the buffering effect of the target page;
when the acquired interactive information is response information, reducing the value of the counting information, and comparing the value of the counting information with a preset first threshold value;
when the value of the counting information is larger than the first threshold value, keeping a page buffer state;
ending the page buffer state when the value of the count information is equal to the first threshold.
2. The page buffer processing method according to claim 1, wherein after the step of triggering the buffer effect of the target page when the acquired mutual information is the request information, the method comprises the following steps:
comparing the value of the counting information with a preset second threshold value;
when the value of the counting information is larger than the second threshold value, loading a preset interaction assembly;
and loading a preset buffer image when the value of the counting information is not greater than the second threshold value.
3. The method for processing page buffer according to claim 2, wherein the types of the interactive components are not less than two, and the step of loading the preset interactive components when the value of the count information is greater than the second threshold value comprises the following steps:
acquiring a component switching instruction of a user;
and switching the interactive components according to the component switching instruction of the user.
4. The method for processing page buffer according to claim 2, wherein said step of loading a preset interactive component when the value of said count information is greater than said second threshold value comprises the steps of:
obtaining interest information of a user;
and determining the interactive component according to the interest information and loading.
5. A page buffer processing apparatus, comprising:
the acquisition module is used for acquiring interactive information of a target page according to a preset interceptor, wherein the interactive information comprises request information and response information;
the first obtaining submodule is used for obtaining counting information of the target page, wherein the counting information is the number of page requests which are not responded by the target page;
the first execution submodule is used for increasing the value of the counting information when the acquired interactive information is request information;
the second execution submodule is used for reducing the value of the counting information when the acquired interactive information is response information;
the execution module is used for triggering the buffer effect of the target page when the acquired interactive information is the request information;
the first comparison submodule is used for comparing the value of the counting information with a preset first threshold value when the acquired interactive information is response information;
a third execution submodule, configured to maintain a page buffer state when the value of the count information is greater than the first threshold;
and the fourth execution submodule is used for ending the page buffer state when the value of the counting information is equal to the first threshold value.
6. A computer device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the page buffering processing method of any one of the preceding claims 1 to 4.
7. A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of a mobile terminal, enable the mobile terminal to perform a page buffering processing method, the method comprising the page buffering processing method of any one of claims 1 to 4.
CN201911052652.9A 2019-10-31 2019-10-31 Page buffer processing method and device, computer equipment and storage medium Active CN110825994B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911052652.9A CN110825994B (en) 2019-10-31 2019-10-31 Page buffer processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911052652.9A CN110825994B (en) 2019-10-31 2019-10-31 Page buffer processing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110825994A CN110825994A (en) 2020-02-21
CN110825994B true CN110825994B (en) 2022-08-16

Family

ID=69551657

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911052652.9A Active CN110825994B (en) 2019-10-31 2019-10-31 Page buffer processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110825994B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113703647A (en) * 2021-07-29 2021-11-26 青岛海尔科技有限公司 Method and device for realizing page gradual change effect
CN114706629A (en) * 2022-04-02 2022-07-05 珠海格力电器股份有限公司 Method and module for dispatching time when waiting application response

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106980694A (en) * 2017-04-01 2017-07-25 北京奇虎科技有限公司 Browser page information interacting method, device and mobile terminal
CN109361947A (en) * 2018-09-14 2019-02-19 深圳Tcl数字技术有限公司 Internet resources batch loading method, smart television, storage medium and device
CN109684586A (en) * 2018-11-21 2019-04-26 平安科技(深圳)有限公司 Page layout optimization display methods, device, computer equipment and storage medium
CN110162726A (en) * 2019-05-09 2019-08-23 腾讯科技(深圳)有限公司 Loading method, device and the storage medium of page resource
CN110209601A (en) * 2018-02-28 2019-09-06 畅想科技有限公司 Memory interface
CN113239301A (en) * 2021-04-22 2021-08-10 维沃移动通信(杭州)有限公司 Page loading request method and device and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106980694A (en) * 2017-04-01 2017-07-25 北京奇虎科技有限公司 Browser page information interacting method, device and mobile terminal
CN110209601A (en) * 2018-02-28 2019-09-06 畅想科技有限公司 Memory interface
CN109361947A (en) * 2018-09-14 2019-02-19 深圳Tcl数字技术有限公司 Internet resources batch loading method, smart television, storage medium and device
CN109684586A (en) * 2018-11-21 2019-04-26 平安科技(深圳)有限公司 Page layout optimization display methods, device, computer equipment and storage medium
CN110162726A (en) * 2019-05-09 2019-08-23 腾讯科技(深圳)有限公司 Loading method, device and the storage medium of page resource
CN113239301A (en) * 2021-04-22 2021-08-10 维沃移动通信(杭州)有限公司 Page loading request method and device and electronic equipment

Also Published As

Publication number Publication date
CN110825994A (en) 2020-02-21

Similar Documents

Publication Publication Date Title
EP2075714B1 (en) Apparatus and methods for retrieving/downloading content on a communication device
US8700699B2 (en) Using a proxy server for a mobile browser
CN102468989B (en) The method and system of network data
CN105284075A (en) Optimizing loading of web page based on aggregated user preferences for web page elements of web page
US8884974B2 (en) Managing multiple GPU-based rendering contexts
US9973456B2 (en) Messaging as a graphical comic strip
CN110825994B (en) Page buffer processing method and device, computer equipment and storage medium
CN111866537A (en) Information display method and device in live broadcast room, storage medium and electronic equipment
US20240147050A1 (en) Prop processing method and apparatus, and device and medium
CN106658142A (en) Interface configuration method and device
CN112532998B (en) Method, device and equipment for extracting video frame and readable storage medium
US20240134501A1 (en) Prompt method and apparatus based on document sharing, device, and medium
CN111752426A (en) Chat thread display method, recording medium, and computer device
CN112083853A (en) Account reporting method, account checking device, electronic equipment and storage medium
CN115080816B (en) Summary information generation and search result display method, device, equipment and medium
CN113824979A (en) Live broadcast room recommendation method and device and computer equipment
CN113824980A (en) Video recommendation method, system and device and computer equipment
CN113589991A (en) Text input method and device, electronic equipment and storage medium
CN114416261B (en) Information display method, device, equipment and medium
CN115658209A (en) Notification message display method and device and electronic equipment
EP2997715B1 (en) Transmitting information based on reading speed
CN113542336A (en) Information switching sharing method and device, electronic equipment and storage medium
CN112565666B (en) Method and system for quickly viewing desktop shared historical content
KR102250135B1 (en) Method and apparatus for providind recommandation video contents
CN109684102B (en) Processing method and device for live answer questions, computer readable storage medium and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant