CN111753235B - Page loading method, device and storage medium - Google Patents
Page loading method, device and storage medium Download PDFInfo
- Publication number
- CN111753235B CN111753235B CN202010597766.8A CN202010597766A CN111753235B CN 111753235 B CN111753235 B CN 111753235B CN 202010597766 A CN202010597766 A CN 202010597766A CN 111753235 B CN111753235 B CN 111753235B
- Authority
- CN
- China
- Prior art keywords
- loading
- loading request
- request
- current
- target page
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9574—Browsing 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)
Abstract
The present disclosure relates to a method, a device and a medium for loading a page, wherein the method includes that when a loading request of a target page is received, a loading request in a current loading request queue is obtained; processing the loading request in the current loading request queue according to a first preset rule; and executing the loading request of the target page. In the page loading method provided by the disclosure, in order to make the loading of the target page be processed preferentially, all the loading requests in the current loading request queue are obtained and processed according to the first preset rule, and then the loading requests of the target page required by the user can be executed preferentially, so that the loading efficiency is improved, and the user experience is improved.
Description
Technical Field
The disclosure relates to the field of page processing, and in particular relates to a method, a device and a storage medium for page loading.
Background
In the related art, web page loading speed is one of the problems that are more and more concerned. Preloading techniques are used in the prior art. The preloading is to load the required resource extraction request to the local, so that the request is not required to be made when the information flow service is needed to be used, and the information flow service efficiency is improved by the mode. But the preloading is done sequentially in load order. When the network environment is relatively poor, the disadvantage that the loading requests in the loading queue are sequentially completed according to the loading sequence is particularly obvious, and the user experience is relatively poor. The method for conveniently loading the page is provided, and is a technical problem to be solved.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a method, apparatus, and storage medium for page loading.
According to a first aspect of an embodiment of the present disclosure, there is provided a method for page loading, including:
When a loading request of a target page is received, acquiring a loading request in a current loading request queue;
processing the loading request in the current loading request queue according to a first preset rule;
And executing the loading request of the target page.
The processing the load request in the current load request queue according to the first preset rule includes:
determining whether the current loading request queue has the loading request of the target page;
If yes, suspending other loading requests except the loading request of the target page in the current loading request queue, and processing the loaded contents of the other loading requests except the loading request of the target page in the current loading request queue according to a second preset rule;
If not, suspending all the loading requests in the current loading request queue, and processing the loaded contents of all the loading requests in the current loading request queue according to a second preset rule.
Wherein the second preset rule includes one of the following rules:
rule one: the contents loaded by other loading requests except the loading request of the target page in the current loading request queue are emptied or the contents loaded by all the loading requests in the current loading request queue are emptied;
Rule II: and determining the loading requests of which the loading contents exceed a first preset threshold value in the current loading request queue, and caching the contents loaded by other loading requests except the loading request of the target page in the loading requests of which the determined loading contents exceed the first preset threshold value or caching the contents loaded by all the loading requests of which the determined loading contents exceed the first preset threshold value.
The processing the load request in the current load request queue according to the first preset rule includes:
determining whether the current loading request queue has the loading request of the target page;
If yes, determining a loading request of which the loading content in the current loading request queue exceeds a second preset threshold and the loading priority level is higher than that of the loading request of the target page, and continuously executing the determined loading request;
if not, determining the loading request of which the loading content in the current loading request queue exceeds a second preset threshold value, and continuing to execute the determined loading request.
Wherein the method further comprises:
and after the loading of the target page is completed, restoring and executing the loading request in the current loading request queue.
According to a second aspect of embodiments of the present disclosure, there is provided an apparatus for page loading, the apparatus comprising:
The acquisition module is configured to acquire a loading request in a current loading request queue when receiving a loading request of a target page;
The processing module is configured to process the loading requests in the current loading request queue according to a first preset rule;
and the execution module is configured to execute the loading request of the target page.
Wherein the processing module is configured to:
determining whether the current loading request queue has the loading request of the target page;
If yes, suspending other loading requests except the loading request of the target page in the current loading request queue, and processing the loaded contents of the other loading requests except the loading request of the target page in the current loading request queue according to a second preset rule;
If not, suspending all the loading requests in the current loading request queue, and processing the loaded contents of all the loading requests in the current loading request queue according to a second preset rule.
Wherein the second preset rule includes one of the following rules:
rule one: the contents loaded by other loading requests except the loading request of the target page in the current loading request queue are emptied or the contents loaded by all the loading requests in the current loading request queue are emptied;
Rule II: and determining the loading requests of which the loading contents exceed a first preset threshold value in the current loading request queue, and caching the contents loaded by other loading requests except the loading request of the target page in the loading requests of which the determined loading contents exceed the first preset threshold value or caching the contents loaded by all the loading requests of which the determined loading contents exceed the first preset threshold value.
Wherein the processing module is configured to:
determining whether the current loading request queue has the loading request of the target page;
If yes, determining a loading request of which the loading content in the current loading request queue exceeds a second preset threshold and the loading priority level is higher than that of the loading request of the target page, and continuously executing the determined loading request;
if not, determining the loading request of which the loading content in the current loading request queue exceeds a second preset threshold value, and continuing to execute the determined loading request.
Wherein the execution module is configured to:
and after the loading of the target page is completed, restoring and executing the loading request in the current loading request queue.
According to a third aspect of embodiments of the present disclosure, there is provided an apparatus for page loading, the apparatus comprising:
A processor;
a memory for storing the processor-executable instructions;
Wherein the processor is configured to:
When a loading request of a target page is received, acquiring a loading request in a current loading request queue;
processing the loading request in the current loading request queue according to a first preset rule;
And executing the loading request of the target page.
According to a first aspect of embodiments of the present disclosure, there is provided a non-transitory computer readable storage medium, which when executed by a processor of a mobile terminal, causes the mobile terminal to perform a method of page loading, the method comprising:
When a loading request of a target page is received, acquiring a loading request in a current loading request queue;
processing the loading request in the current loading request queue according to a first preset rule;
And executing the loading request of the target page.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects: when the network environment is relatively poor, for example, the network speed is relatively slow, i.e. in a weak network environment, a user needs to load the target page, in order to make the loading of the target page be preferentially processed, all the loading requests in the current loading request queue are obtained and processed according to a first preset rule, and then the loading requests of the target page required by the user can be preferentially executed, so that the loading efficiency is improved, and the user experience 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 invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flowchart illustrating a method of page loading, according to an example embodiment.
FIG. 2 is a flow chart illustrating the method of processing the load request in the current load request queue according to the first preset rule at step S12 in FIG. 1.
A flow chart illustrating the method of step S12 of fig. 1 for processing the load request in the current load request queue according to the first preset rule is shown in fig. 3.
Fig. 4 is a flow chart of the page loading method of this particular embodiment.
FIG. 5 is a block diagram of an apparatus for page loading, according to an example embodiment.
Fig. 6 is a block diagram (general structure of a mobile terminal) illustrating an apparatus for page loading according to an exemplary embodiment.
Fig. 7 is a block diagram (general structure of a server) of an apparatus 700 for page loading, according to an example embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the invention. Rather, they are merely examples of apparatus and methods consistent with aspects of the invention as detailed in the accompanying claims.
FIG. 1 is a flowchart illustrating a method of page loading, as shown in FIG. 1, for use in an electronic device, according to an exemplary embodiment, comprising the steps of:
in step S11, when a load request of a target page is received, a load request in a current load request queue is obtained;
in step S12, processing the load request in the current load request queue according to the first preset rule;
in step S13, a load request of the target page is performed.
In the page loading method provided by the disclosure, when a loading request of a target page is received, the loading request of a current loading request queue is acquired first, and is processed according to a first preset rule, and then the loading request of the target page is executed. That is, in the page loading method provided by the present disclosure, in order to process a loading request of a target page preferentially, after the loading request that has been preloaded in a loading queue is processed according to a first preset rule, the loading request of the target page is executed.
When the network environment is relatively poor, for example, the network speed is relatively slow, i.e. in a weak network environment, a user needs to load the target page, in order to make the loading of the target page be preferentially processed, all the loading requests in the current loading request queue are obtained and processed according to a first preset rule, and then the loading requests of the target page required by the user can be preferentially executed, so that the loading efficiency is improved, and the user experience is improved.
The target page can be a first screen page or any other page needing to be loaded preferentially, for example, a page needing to be preloaded, which is clicked randomly by a user, can be used as a page needing to be loaded preferentially.
The embodiment of the disclosure provides a method for loading a page, as shown in fig. 2, fig. 2 shows a method flowchart of step S12 in fig. 1, where a load request in the current load request queue is processed according to a first preset rule:
in step S121, it is determined whether there is a load request of the target page in the current load request queue;
In step S122, if any, suspending other load requests except the load request of the target page in the current load request queue, and processing the contents loaded by the other load requests except the load request of the target page in the current load request queue according to a second preset rule;
in step S123, if not, suspending all the load requests in the current load request queue, and processing the contents loaded by all the load requests in the current load request queue according to the second preset rule.
In the page loading method provided by the disclosure, whether a loading request of a target page exists in a current loading queue can be determined, if the loading request of the target page is in the current loading request queue, other loading requests except the loading request of the target page in the current loading request queue are suspended; if not, suspending all the loading requests in the current loading request queue to ensure that the target page required by the user is loaded preferentially; while suspending, processing the content loaded by each suspended loading request according to a second preset rule to process the loaded content according to the requirement.
The electronic device may be a terminal device or a server device, and the terminal device may be a mobile phone or a computer, for example.
In the page loading method provided by the disclosure, when a target page loading demand event occurs, firstly checking whether a loading request of a target page to be loaded currently exists in a current loading queue, and if so, suspending other loading requests except the loading request of the target page to be loaded in the current loading queue; if not, suspending all loading requests in the current loading queue, ensuring that the target page needing to be loaded currently is loaded preferentially, ensuring that the loading efficiency of the page needed by the user can be improved under various network conditions, and improving the user experience.
In the method for loading a page provided by the present disclosure, the second preset rule may include one of the following rules:
Rule one: the method comprises the steps of clearing the contents loaded by other loading requests except the loading request of a target page in a current loading request queue or clearing the contents loaded by all the loading requests of the current loading request queue;
Rule II: determining a loading request with loading content exceeding a first preset threshold value in a current loading request queue, and caching contents loaded by other loading requests except the loading request of the target page in the determined loading requests with loading content exceeding the first preset threshold value or caching contents loaded by all loading requests with the determined loading content exceeding the first preset threshold value.
For rule one, after suspending other load requests except the load request of the target page in the current load request queue or all load requests in the current load request queue, in order to ensure sufficient cache space, further ensure that the target page is loaded preferentially and smoothly, all suspended load requests can be emptied. Under the condition of poor network environment, enough cache space can be ensured to load the target page preferentially, the requirements of users are met timely, and the user experience is improved.
For rule two, after suspending other load requests except the load request of the target page in the current load request queue or all load requests in the current load request queue, in order to process the loaded content of the load request in the current load request queue as required, the load request of which the loaded content exceeds the first preset threshold value in the current load request queue can be determined, and the loaded content of other load requests except the load request of the target page in the load request of which the determined loaded content exceeds the first preset threshold value or the loaded content of all load requests of which the determined loaded content exceeds the first preset threshold value can be cached.
Caching the content loaded by the load request with the loaded content exceeding the first preset threshold value in the suspended load request so as to improve the load efficiency of the load request in the current load request queue after the load request is restored to be executed. The first preset threshold may be set as desired, for example, the first preset threshold may be fifty percent or sixty percent or eighty percent, or the like. And for the loaded content of the loading request with the loaded content less than the first preset threshold value, emptying the loaded content so as to ensure enough cache space and ensure the loading efficiency of the target page.
In the method for loading the page provided by the disclosure, each loading request in the current loading request queue except the loading request of the target page can be paused, and meanwhile, the content loaded by the loading request of which the loaded content reaches and exceeds the first preset threshold value is cached so as to be continuously loaded later, or each loading request in the current loading request queue except the loading request of the target page is paused and all loaded content is emptied, so that the execution efficiency of the loading request of the target page is further improved. Thus, the processing mode of the loading request can be set according to different network environments so as to meet the loading requirement of the user target page.
In the embodiment of the disclosure, as shown in fig. 3, a method for loading a page is provided, and in fig. 3, a method flowchart showing step S12 in fig. 1, where a load request in the current load request queue is processed according to a first preset rule is shown in fig. 3:
In step S124, it is determined whether there is a load request of the target page in the current load request queue;
in step S125, if any, determining that the loading content in the current loading request queue exceeds the second preset threshold and the loading priority level is higher than the loading request of the target page, and continuing to execute the determined loading request;
In step S126, if not, it is determined that the loading request of which the loading content in the current loading request queue exceeds the second preset threshold value, and the determined loading request is continuously executed.
In the method for loading the page provided by the disclosure, whether the loading request of the target page exists in the current loading queue can be determined, if the loading request of the target page exists in the current loading request queue, the loading request of which the loading content exceeds a second preset threshold value in the current loading request queue is determined, the determined loading request is continuously executed, and after the determined loading request is loaded, the loading request of the target page is executed. When the load request of the target page is in the current load queue, two factors may be considered, namely, whether the content loaded by the load request in the current load queue exceeds a second preset threshold, and whether the priority level of the load request of which the load content exceeds the second preset threshold is higher than that of the load request of the target page. For example, when there are 5 load requests whose load content exceeds the second preset threshold, where the load request priority level of the target page is fourth, then execution of the first three load requests is continued. After the first three loading requests are completed, the loading requests of the target page are executed.
And if the priority levels of the loading requests with the loading contents exceeding the second preset threshold value exceed the loading requests of the target page, executing the loading requests of the target page after loading all the loading requests with the loading contents exceeding the second preset threshold value.
For a load request that does not satisfy the load content exceeding the second preset threshold, execution of the corresponding load request may be suspended, and the loaded related content may be emptied or cached. The second preset threshold may be selected and set in conjunction with the current web speed, e.g., the second preset threshold may be set to a value near the completion of loading, i.e., a value near 100%, e.g., 98%, 99.5%, or 99.8%, etc. And continuing to execute the load request with the load content in the current load request queue which is close to the completion without being paused, so that the loaded content is not excessively wasted under the condition that the target page is preferentially loaded, and the loading efficiency of the target page and other preloading items is considered.
The embodiment of the disclosure provides a method for loading a page, which further comprises the following steps:
And after loading of the target page is completed, restoring and executing the loading request in the current loading request queue.
In the page loading method provided by the disclosure, after the recording of the target page is completed, the loading of the loading content corresponding to each suspended loading request in the current loading request queue is resumed. Wherein, the loading request for the process of loading the content which has been cached can be continuously loaded, and the loading request for the process of loading the content which has been emptied is re-loaded.
According to the page loading method provided by the disclosure, the loading request in the current loading request queue is suspended to preferentially load the target page required by the user, so that the user experience is improved. When the loading of the target page is completed, each loading request in the current loading request queue which is suspended needs to be resumed to be executed, and the execution is continued according to the original execution sequence and rules.
Next, a specific embodiment of a page loading method according to the present disclosure is described, and fig. 4 is a flowchart of the page loading method of the specific embodiment. In this embodiment, the page loading method is implemented at a computer end or a mobile phone end. Referring to fig. 4, the page loading method includes the steps of:
in step S201, when a load request of a target page is received, a load request in a current load request queue is obtained;
in step S202, it is determined whether there is a load request of the target page in the current load request queue:
in step S2021, if any, suspending other load requests except the load request of the target page in the current load request queue;
In step S2022, if not, suspending all load requests in the current load request queue;
Then processing the content loaded by each suspended loading request, namely completely emptying, or caching the content loaded by the loading request with the loading content reaching a first preset threshold value, and emptying the other content;
In step S203, a load request of the target page is executed;
In step S204, after loading the target page is completed, the execution of the load request in the current load request queue is resumed, the execution of the load request corresponding to the cached load content is continued, and the execution of the load request corresponding to the emptied load content is resumed.
According to the page loading method, the target page required by the user can be loaded timely and preferentially in the weak network environment, then other preloading items are loaded, the page loading efficiency in the weak network environment can be greatly improved, and the user experience is improved. In the process, the loaded content can be continuously loaded, cached or emptied by combining the current network speed, and the loading efficiency of other preloading items is considered under the condition of ensuring the loading efficiency of the user target page.
FIG. 5 is a block diagram of an apparatus for page loading, according to an example embodiment. Referring to fig. 5, the apparatus includes an acquisition module 501, a processing module 502, and an execution module 503, wherein,
The obtaining module 501 is configured to obtain a loading request in a current loading request queue when receiving a loading request of a target page;
a processing module 502 configured to process the load request in the current load request queue according to a first preset rule;
an execution module 503 is configured to execute the loading request of the target page.
Wherein the processing module 502 is configured to:
determining whether the current loading request queue has the loading request of the target page;
If yes, suspending other loading requests except the loading request of the target page in the current loading request queue, and processing the loaded contents of the other loading requests except the loading request of the target page in the current loading request queue according to a second preset rule;
If not, suspending all the loading requests in the current loading request queue, and processing the loaded contents of all the loading requests in the current loading request queue according to a second preset rule.
Wherein the second preset rule includes one of the following rules:
rule one: the contents loaded by other loading requests except the loading request of the target page in the current loading request queue are emptied or the contents loaded by all the loading requests in the current loading request queue are emptied;
Rule II: and determining the loading requests of which the loading contents exceed a first preset threshold value in the current loading request queue, and caching the contents loaded by other loading requests except the loading request of the target page in the loading requests of which the determined loading contents exceed the first preset threshold value or caching the contents loaded by all the loading requests of which the determined loading contents exceed the first preset threshold value.
Wherein the processing module 502 is configured to:
determining whether the current loading request queue has the loading request of the target page;
If yes, determining a loading request of which the loading content in the current loading request queue exceeds a second preset threshold and the loading priority level is higher than that of the loading request of the target page, and continuously executing the determined loading request;
if not, determining the loading request of which the loading content in the current loading request queue exceeds a second preset threshold value, and continuing to execute the determined loading request.
Wherein the execution module 503 is further configured to:
and after the loading of the target page is completed, restoring and executing the loading request in the current loading request queue.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
According to the page loading device, the target page required by the user can be loaded timely and preferentially in the weak network environment, then other preloading items are loaded, the page loading efficiency in the weak network environment can be greatly improved, and the user experience is improved.
FIG. 6 is a block diagram illustrating an apparatus 600 for page loading, according to an example embodiment. For example, apparatus 600 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 6, apparatus 600 may include one or more of the following components: a processing component 602, a memory 604, a power component 606, a multimedia component 608, an audio component 610, an input/output (I/O) interface 612, a sensor component 614, and a communication component 616.
The processing component 602 generally controls overall operation of the apparatus 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 602 can include one or more modules that facilitate interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.
The memory 604 is configured to store various types of data to support operations at the device 600. Examples of such data include instructions for any application or method operating on the apparatus 600, contact data, phonebook data, messages, pictures, videos, and the like. The memory 604 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power component 606 provides power to the various components of the device 600. The power components 606 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 600.
The multimedia component 608 includes a screen between the device 600 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and/or a rear camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 600 is in an operational mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 610 is configured to output and/or input audio signals. For example, the audio component 610 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 600 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 604 or transmitted via the communication component 616. In some embodiments, audio component 610 further includes a speaker for outputting audio signals.
The I/O interface 612 provides an interface between the processing component 602 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 614 includes one or more sensors for providing status assessment of various aspects of the apparatus 600. For example, the sensor assembly 614 may detect the on/off state of the device 600, the relative positioning of the components, such as the display and keypad of the apparatus 600, the sensor assembly 614 may also detect a change in position of the apparatus 600 or one of the components of the apparatus 600, the presence or absence of user contact with the apparatus 600, the orientation or acceleration/deceleration of the apparatus 600, and a change in temperature of the apparatus 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. The sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 616 is configured to facilitate communication between the apparatus 600 and other devices in a wired or wireless manner. The device 600 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In one exemplary embodiment, the communication component 616 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 616 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 600 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer-readable storage medium is also provided, such as memory 604, including instructions executable by processor 620 of apparatus 600 to perform the method of page loading described above. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
A non-transitory computer readable storage medium, which when executed by a processor of a mobile terminal, causes the mobile terminal to perform a method of page loading, the method comprising: when a loading request of a target page is received, acquiring a loading request in a current loading request queue; processing a loading request in a current loading request queue according to a first preset rule; and executing the loading request of the target page.
FIG. 7 is a block diagram illustrating an apparatus 700 for page loading, according to an example embodiment. For example, the apparatus 700 may be provided as a server. Referring to fig. 7, apparatus 700 includes a processing component 722 that further includes one or more processors and memory resources represented by memory 732 for storing instructions, such as applications, executable by processing component 722. The application programs stored in memory 732 may include one or more modules that each correspond to a set of instructions. Further, the processing component 722 is configured to execute instructions to perform the above-described methods: when a loading request of a target page is received, acquiring a loading request in a current loading request queue; processing a loading request in a current loading request queue according to a first preset rule; and executing the loading request of the target page.
The apparatus 700 may further comprise a power component 726 configured to perform power management of the apparatus 700, a wired or wireless network interface 750 configured to connect the apparatus 700 to a network, and an input output (I/O) interface 758. The apparatus 700 may operate based on an operating system stored in memory 732, such as Windows Server, mac OSXTM, unixTM, linuxTM, freeBSDTM, or the like.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the invention is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
Claims (10)
1. A method for loading a page, applied to an electronic device, the method comprising:
When a loading request of a target page is received, acquiring a loading request in a current loading request queue;
processing the loading request in the current loading request queue according to a first preset rule;
executing the loading request of the target page;
the processing the load request in the current load request queue according to the first preset rule includes:
determining whether the current loading request queue has the loading request of the target page;
If yes, determining a loading request of which the loading content in the current loading request queue exceeds a second preset threshold and the loading priority level is higher than that of the loading request of the target page, and continuously executing the determined loading request;
if not, determining the loading request of which the loading content in the current loading request queue exceeds a second preset threshold value, and continuing to execute the determined loading request.
2. The method of claim 1, wherein processing the load request in the current load request queue according to the first preset rule comprises:
and determining that the loading content in the current loading request queue does not exceed the loading request of the second preset threshold value, and suspending executing the determined loading request.
3. The method of claim 1, wherein processing the load request in the current load request queue according to the first preset rule comprises:
and determining that the loading content in the current loading request queue does not exceed the loading request of the second preset threshold, and emptying or caching the loading content in the determined loading request.
4. The method according to claim 1, wherein the method further comprises:
and after the loading of the target page is completed, restoring and executing the loading request in the current loading request queue.
5. An apparatus for page loading, the apparatus comprising:
The acquisition module is configured to acquire a loading request in a current loading request queue when receiving a loading request of a target page;
The processing module is configured to process the loading requests in the current loading request queue according to a first preset rule;
The execution module is configured to execute the loading request of the target page;
wherein the processing module is configured to:
determining whether the current loading request queue has the loading request of the target page;
If yes, determining a loading request of which the loading content in the current loading request queue exceeds a second preset threshold and the loading priority level is higher than that of the loading request of the target page, and continuously executing the determined loading request;
if not, determining the loading request of which the loading content in the current loading request queue exceeds a second preset threshold value, and continuing to execute the determined loading request.
6. The apparatus of claim 5, wherein the processing module is configured to:
and determining that the loading content in the current loading request queue does not exceed the loading request of the second preset threshold value, and suspending executing the determined loading request.
7. The apparatus of claim 5, wherein the processing module is configured to:
and determining that the loading content in the current loading request queue does not exceed the loading request of the second preset threshold, and emptying or caching the loading content in the determined loading request.
8. The apparatus of claim 5, wherein the execution module is configured to:
and after the loading of the target page is completed, restoring and executing the loading request in the current loading request queue.
9. An apparatus for page loading, the apparatus comprising:
A processor;
a memory for storing the processor-executable instructions;
Wherein the processor is configured to:
When a loading request of a target page is received, acquiring a loading request in a current loading request queue;
processing the loading request in the current loading request queue according to a first preset rule;
executing the loading request of the target page;
the processing the load request in the current load request queue according to the first preset rule includes:
determining whether the current loading request queue has the loading request of the target page;
If yes, determining a loading request of which the loading content in the current loading request queue exceeds a second preset threshold and the loading priority level is higher than that of the loading request of the target page, and continuously executing the determined loading request;
if not, determining the loading request of which the loading content in the current loading request queue exceeds a second preset threshold value, and continuing to execute the determined loading request.
10. A non-transitory computer readable storage medium, which when executed by a processor of a mobile terminal, causes the mobile terminal to perform a method of page loading, the method comprising:
When a loading request of a target page is received, acquiring a loading request in a current loading request queue;
processing the loading request in the current loading request queue according to a first preset rule;
executing the loading request of the target page;
the processing the load request in the current load request queue according to the first preset rule includes:
determining whether the current loading request queue has the loading request of the target page;
If yes, determining a loading request of which the loading content in the current loading request queue exceeds a second preset threshold and the loading priority level is higher than that of the loading request of the target page, and continuously executing the determined loading request;
if not, determining the loading request of which the loading content in the current loading request queue exceeds a second preset threshold value, and continuing to execute the determined loading request.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010597766.8A CN111753235B (en) | 2020-06-28 | 2020-06-28 | Page loading method, device and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010597766.8A CN111753235B (en) | 2020-06-28 | 2020-06-28 | Page loading method, device and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111753235A CN111753235A (en) | 2020-10-09 |
| CN111753235B true CN111753235B (en) | 2024-10-01 |
Family
ID=72677522
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010597766.8A Active CN111753235B (en) | 2020-06-28 | 2020-06-28 | Page loading method, device and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111753235B (en) |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106294609A (en) * | 2016-07-29 | 2017-01-04 | 北京小米移动软件有限公司 | Page loading method and device |
| CN108846113A (en) * | 2018-06-25 | 2018-11-20 | 郑州云海信息技术有限公司 | A kind of method, system and associated component that picture preloads |
Family Cites Families (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20040030882A1 (en) * | 2002-08-08 | 2004-02-12 | Forman George Henry | Managed application pre-launching |
| US7581067B2 (en) * | 2006-03-16 | 2009-08-25 | International Business Machines Corporation | Load when reservation lost instruction for performing cacheline polling |
| US9342616B2 (en) * | 2013-03-04 | 2016-05-17 | International Business Machines Corporation | User influenced asynchronous module definition loader |
| CN103699670B (en) * | 2013-12-30 | 2016-09-28 | 北京奇虎科技有限公司 | A kind of electronic chart tile request queue processing means and processing method |
| US9384137B2 (en) * | 2014-02-24 | 2016-07-05 | Dataram, Inc. | Progressive pre-caching |
| CN105824533B (en) * | 2016-03-21 | 2019-06-18 | 青岛海信移动通信技术股份有限公司 | A picture loading method, device and terminal |
| CN105955766B (en) * | 2016-04-22 | 2019-08-30 | 北京小米移动软件有限公司 | Application preloading method and device |
| CN107398070B (en) * | 2017-07-19 | 2018-06-12 | 腾讯科技(深圳)有限公司 | Display control method and device, the electronic equipment of a kind of game picture |
| CN108509243A (en) * | 2018-03-15 | 2018-09-07 | 广州虎牙信息科技有限公司 | The method, apparatus and electronic equipment of a kind of page load in application |
| CN108595228B (en) * | 2018-05-10 | 2021-03-12 | Oppo广东移动通信有限公司 | Application program prediction model establishing method and device, storage medium and mobile terminal |
| CN108762831B (en) * | 2018-05-15 | 2021-11-09 | 上海瑾盛通信科技有限公司 | Application program preloading method and device, storage medium and terminal |
-
2020
- 2020-06-28 CN CN202010597766.8A patent/CN111753235B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106294609A (en) * | 2016-07-29 | 2017-01-04 | 北京小米移动软件有限公司 | Page loading method and device |
| CN108846113A (en) * | 2018-06-25 | 2018-11-20 | 郑州云海信息技术有限公司 | A kind of method, system and associated component that picture preloads |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111753235A (en) | 2020-10-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN105338409B (en) | Network video preloading method and device | |
| CN106033397B (en) | Memory buffer area adjusting method, device and terminal | |
| CN109600303B (en) | Content sharing method, device and storage medium | |
| CN109388625B (en) | Method and device for processing configuration file in multi-distributed file system | |
| CN109521918B (en) | Information sharing method and device, electronic equipment and storage medium | |
| CN111259289B (en) | Picture loading method and device, electronic equipment and storage medium | |
| CN106254467A (en) | Sharing files method and device | |
| CN107529065A (en) | Multi-medium data caching method, device and computer-readable recording medium | |
| CN112291631A (en) | Information acquisition method, device, terminal and storage medium | |
| CN111314426A (en) | Webpage resource obtaining method and device, electronic equipment and storage medium | |
| CN111241134B (en) | Data processing method and device | |
| CN114339320B (en) | Virtual resource processing method, device, equipment and storage medium | |
| CN104572230B (en) | Script file loading method and device and script file generating method and device | |
| US9774730B2 (en) | Method, device, and system for telephone interaction | |
| CN112102009B (en) | Advertisement display method, device, equipment and storage medium | |
| CN109245992B (en) | Request processing method and device, electronic equipment and storage medium | |
| CN114077461A (en) | Application running method, device, device and storage medium | |
| CN111753235B (en) | Page loading method, device and storage medium | |
| CN113885986B (en) | Data transmission method and device and electronic equipment | |
| CN107026941B (en) | Method and device for processing reply of unread message | |
| CN111290843A (en) | Process management method and device | |
| CN109981729B (en) | File processing method and device, electronic equipment and computer readable storage medium | |
| CN112732098B (en) | Input method and related device | |
| CN107016081A (en) | page loading method and device | |
| CN113259995A (en) | Information processing method, device and storage medium |
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 |