A method, device and storage medium for loading a page
By processing the loading request queue when the page is loading, and giving priority to the loading request of the target page, it solves the problem of slow page loading speed when the network environment is poor, and improves the user experience.
Patent Information
- Application Number
- CN202010597766.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-28
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2040-06-28
AI Technical Summary
When the network environment is poor, the page loading speed in the existing technology is slow, resulting in poor user experience. In particular, preloading completes loading requests in sequence according to the loading order, which cannot be effectively optimized.
When receiving a load request from the target page, obtain the request in the current load request queue and process it according to the preset rules. Pause or cache other load requests to prioritize the load request of the target page to ensure that the target page is loaded first when the network environment is poor. .
In a weak network environment, by giving priority to the loading request of the target page, the page loading efficiency and user experience are improved, ensuring that the target page can be loaded in time when the network environment is poor.
Smart Images

Figure CN111753235B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of page processing, and in particular to a method, device and storage medium for page loading. Background Art
[0002] In the related technology, the speed of web page loading is one of the issues that has received more and more attention. Preloading technology is used in the prior art. Preloading is to extract the required resources and load them locally, so that when they are needed, there is no need to make a request and they can be directly obtained from the cache. This method improves the efficiency of information flow services. However, preloading completes the loading requests in sequence according to the loading order. When the network environment is relatively poor, the disadvantage of completing the loading requests in the loading queue in sequence according to the loading order is particularly obvious, and the user experience is relatively poor. Providing a convenient method for page loading is a technical problem that needs to be solved urgently. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides a page loading method, device and storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, a method for loading a page is provided, comprising:
[0005] When receiving a loading request for a target page, obtain the loading request in the current loading request queue;
[0006] Processing the load requests in the current load request queue according to a first preset rule;
[0007] Execute a load request for the target page.
[0008] The processing of the load request in the current load request queue according to the first preset rule includes:
[0009] Determine whether there is a load request for the target page in the current load request queue;
[0010] If yes, suspend the other loading requests in the current loading request queue except the loading request of the target page, and process the contents loaded by the other loading requests in the current loading request queue except the loading request of the target page according to the second preset rule;
[0011] If not, all the loading requests in the current loading request queue are suspended, and the contents loaded by all the loading requests in the current loading request queue are processed according to a second preset rule.
[0012] The second preset rule includes one of the following rules:
[0013] Rule 1: Clear the contents loaded by other load requests except the load request of the target page in the current load request queue or clear the contents loaded by all load requests in the current load request queue;
[0014] Rule 2: Determine the load requests in the current load request queue whose loading content exceeds the first preset threshold, cache the content loaded by other load requests except the load request of the target page among the load requests whose loading content determined by the cache exceeds the first preset threshold, or cache the content loaded by all load requests whose loading content determined by the cache exceeds the first preset threshold.
[0015] The processing of the load request in the current load request queue according to the first preset rule includes:
[0016] Determine whether there is a load request for the target page in the current load request queue;
[0017] If yes, determine the load request in the current load request queue whose loading content exceeds the second preset threshold and whose loading priority is higher than the load request of the target page, and continue to execute the determined load request;
[0018] If not, determine the load request in the current load request queue whose loading content exceeds the second preset threshold, and continue to execute the determined load request.
[0019] Wherein, the method further comprises:
[0020] After the loading of the target page is completed, the execution of the loading requests in the current loading request queue is resumed.
[0021] According to a second aspect of an embodiment of the present disclosure, a device for page loading is provided, the device comprising:
[0022] The acquisition module is configured to acquire the load request in the current load request queue when receiving the load request of the target page;
[0023] a processing module, configured to process the load requests in the current load request queue according to a first preset rule;
[0024] The execution module is configured to execute the loading request of the target page.
[0025] Wherein, the processing module is configured as follows:
[0026] Determine whether there is a load request for the target page in the current load request queue;
[0027] If yes, suspend the other loading requests in the current loading request queue except the loading request of the target page, and process the contents loaded by the other loading requests in the current loading request queue except the loading request of the target page according to the second preset rule;
[0028] If not, all the loading requests in the current loading request queue are suspended, and the contents loaded by all the loading requests in the current loading request queue are processed according to a second preset rule.
[0029] The second preset rule includes one of the following rules:
[0030] Rule 1: Clear the contents loaded by other load requests except the load request of the target page in the current load request queue or clear the contents loaded by all load requests in the current load request queue;
[0031] Rule 2: Determine the load requests in the current load request queue whose loading content exceeds the first preset threshold, cache the content loaded by other load requests except the load request of the target page among the load requests whose loading content determined by the cache exceeds the first preset threshold, or cache the content loaded by all load requests whose loading content determined by the cache exceeds the first preset threshold.
[0032] Wherein, the processing module is configured as follows:
[0033] Determine whether there is a load request for the target page in the current load request queue;
[0034] If yes, determine the load request in the current load request queue whose loading content exceeds the second preset threshold and whose loading priority is higher than the load request of the target page, and continue to execute the determined load request;
[0035] If not, determine the load request in the current load request queue whose loading content exceeds the second preset threshold, and continue to execute the determined load request.
[0036] Wherein, the execution module is configured as follows:
[0037] After the loading of the target page is completed, the execution of the loading requests in the current loading request queue is resumed.
[0038] According to a third aspect of an embodiment of the present disclosure, a device for page loading is provided, the device comprising:
[0039] processor;
[0040] a memory for storing instructions executable by the processor;
[0041] Wherein, the processor is configured to:
[0042] When receiving a loading request for a target page, obtain the loading request in the current loading request queue;
[0043] Processing the load requests in the current load request queue according to a first preset rule;
[0044] Execute a load request for the target page.
[0045] According to a first aspect of an embodiment of the present disclosure, a non-transitory computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal is enabled to perform a page loading method, the method comprising:
[0046] When receiving a loading request for a target page, obtain the loading request in the current loading request queue;
[0047] Processing the load requests in the current load request queue according to a first preset rule;
[0048] Execute a load request for the target page.
[0049] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: when the network environment is relatively poor, for example, the network speed is relatively slow, that is, in a weak network environment, the user needs to load the target page. In order to give priority to the loading of the target page, all loading requests in the current loading request queue are obtained and processed according to the first preset rule. Then, the loading request of the target page required by the user can be executed first to improve the loading efficiency and enhance the user experience.
[0050] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] 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.
[0052] Figure 1 The figure is a flow chart of a page loading method according to an exemplary embodiment.
[0053] Figure 2 Shows Figure 1 In step S12, a flow chart of a method for processing the load requests in the current load request queue according to a first preset rule.
[0054] Figure 3 It is shown in Figure 1In step S12, a flow chart of a method for processing the load requests in the current load request queue according to a first preset rule.
[0055] Figure 4 It is a flow chart of the page loading method of this specific embodiment.
[0056] Figure 5 The invention is a block diagram of a device for page loading according to an exemplary embodiment.
[0057] Figure 6 It is a block diagram of a device for loading a page according to an exemplary embodiment (general structure of a mobile terminal).
[0058] Figure 7 It is a block diagram of a device 700 for page loading according to an exemplary embodiment (general structure of a server). DETAILED DESCRIPTION
[0059] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0060] Figure 1 is a flow chart of a method for loading a page according to an exemplary embodiment. Figure 1 As shown, the page loading method is used in an electronic device, comprising the following steps:
[0061] In step S11, when a loading request of a target page is received, a loading request in a current loading request queue is obtained;
[0062] In step S12, the load request in the current load request queue is processed according to the first preset rule;
[0063] In step S13, a load request of the target page is executed.
[0064] In the page loading method provided by the present disclosure, when a loading request of a target page is received, the loading request of the current loading request queue is first obtained, and the loading request is processed according to the first preset rule before executing the loading request of the target page. That is, in the page loading method provided by the present disclosure, in order to give priority to the loading request of the target page, the loading request that has been preloaded in the loading queue is processed according to the first preset rule before executing the loading request of the target page.
[0065] When the network environment is poor, for example, the network speed is slow, that is, in a weak network environment, the user needs to load the target page. In order to give priority to the loading of the target page, all loading requests in the current loading request queue are obtained and processed according to the first preset rule. Then, the loading request of the target page required by the user can be executed first to improve loading efficiency and enhance user experience.
[0066] The target page may be the home page or any other page that needs to be loaded first. For example, any page that needs to be preloaded and is clicked by the user may be used as the page that is loaded first.
[0067] The present disclosure provides a method for loading a page. Figure 2 As shown, Figure 2 Shows Figure 1 In step S12, a flow chart of a method for processing the load request in the current load request queue according to the first preset rule:
[0068] In step S121, it is determined whether there is a load request for the target page in the current load request queue;
[0069] In step S122, if yes, suspend the other loading requests in the current loading request queue except the loading request of the target page, and process the contents loaded by the other loading requests in the current loading request queue except the loading request of the target page according to the second preset rule;
[0070] In step S123, if not, all the loading requests in the current loading request queue are suspended, and the contents loaded by all the loading requests in the current loading request queue are processed according to the second preset rule.
[0071] In the page loading method provided by the present invention, it can be determined first whether there is a loading request for the target page in the current loading queue. If the loading request for the target page is in the current loading request queue, then other loading requests except the loading request for the target page in the current loading request queue are paused; if not, then all loading requests in the current loading request queue are paused to ensure that the target page required by the user is loaded first; while pausing, the content loaded by each suspended loading request is processed according to a second preset rule to process the loaded content as needed.
[0072] The electronic device may be a terminal device or a server device. The terminal device may be, for example, a mobile phone or a computer.
[0073] In the page loading method provided by the present invention, when a target page loading demand event occurs, first check whether there is a loading request for the target page that needs to be loaded in the current loading queue. If so, then pause all loading requests except the loading request for the target page that needs to be loaded in the current loading queue; if not, then pause all loading requests in the current loading queue to ensure that the target page that needs to be loaded is loaded first, to ensure that the loading efficiency of the page required by the user can be improved in various network conditions, thereby improving the user experience.
[0074] In the page loading method provided by the present disclosure, the second preset rule may include one of the following rules:
[0075] Rule 1: Clear the contents loaded by other load requests except the load request of the target page in the current load request queue or clear the contents loaded by all load requests in the current load request queue;
[0076] Rule 2: Determine the loading requests in the current loading request queue whose loading content exceeds the first preset threshold, the content loaded by other loading requests except the loading request of the target page among the loading requests whose loading content determined by the cache exceeds the first preset threshold, or the content loaded by all loading requests whose loading content determined by the cache exceeds the first preset threshold.
[0077] For rule 1, after pausing other loading requests except the loading request of the target page in the current loading request queue or all loading requests in the current loading request queue, in order to ensure sufficient cache space and further ensure that the target page is loaded first and smoothly, the content already loaded by all the suspended loading requests can be cleared. In this way, in the case of a poor network environment, it can be guaranteed that there is enough cache space to load the target page first, ensuring that the user's needs are met in a timely manner and improving the user experience.
[0078] For rule two, after pausing other loading requests in the current loading request queue except the loading request for the target page or all loading requests in the current loading request queue, in order to be able to process the content already loaded by the loading requests in the current loading request queue as needed, it is possible to determine the loading requests in the current loading request queue whose loading content exceeds a first preset threshold, cache the content loaded by other loading requests except the loading request for the target page among the loading requests whose loading content determined by the cache exceeds the first preset threshold, or cache the content loaded by all loading requests whose loading content determined by the cache exceeds the first preset threshold.
[0079] The content loaded by the loading request whose loaded content exceeds the first preset threshold in the suspended loading request is cached, so as to improve the loading efficiency of the loading request in the current loading request queue after the execution is resumed. The first preset threshold can be set as needed, for example, the first preset threshold can be 50%, 60%, 80%, etc. For the content loaded by the loading request whose loaded content is less than the first preset threshold, it is cleared to ensure that there is enough cache space to ensure the loading efficiency of the target page.
[0080] In the page loading method provided by the present disclosure, each loading request in the current loading request queue except the loading request of the target page can be paused, and the content loaded by the loading request whose loaded content reaches and exceeds the first preset threshold is cached so as to continue to load 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 cleared to further improve the execution efficiency of the loading request for the target page. In this way, the processing method of the loading request can be set according to different network environments to meet the user's target page loading needs.
[0081] In an embodiment of the present disclosure, a method for loading a page is provided. Figure 3 As shown, Figure 3 It is shown in Figure 1 In step S12, a flow chart of a method for processing the load request in the current load request queue according to the first preset rule:
[0082] In step S124, it is determined whether there is a load request for the target page in the current load request queue;
[0083] In step S125, if there is, determine the load request in the current load request queue whose loading content exceeds the second preset threshold and whose loading priority is higher than the load request of the target page, and continue to execute the determined load request;
[0084] In step S126 , if not, determine the load request in the current load request queue whose loading content exceeds the second preset threshold, and continue to execute the determined load request.
[0085] In the page loading method provided by the present disclosure, it can be determined whether there is a load request for the target page in the current load queue. If the load request for the target page is in the current load request queue, the load request in the current load request queue whose loading content exceeds the second preset threshold is determined, and the determined load request is continued to be executed. After the determined load request is loaded, the load request for the target page is executed. When the load request for the target page is in the current load queue, two factors can be considered, namely, whether the content loaded by the load request in the current load queue exceeds the second preset threshold, and whether the priority of the load request whose loading content exceeds the second preset threshold is higher than that of the load request for the target page. For example, when there are 5 load requests whose loading content exceeds the second preset threshold, and the priority of the load request for the target page is the fourth, then the first three load requests are continued to be executed. After the first three load requests are completed, the load request for the target page is executed.
[0086] If the priority levels of the loading requests with loading contents exceeding the second preset threshold all exceed the loading request of the target page, then after all the loading requests with loading contents exceeding the second preset threshold are loaded, the loading request of the target page is executed.
[0087] For loading requests that do not meet the requirements of loading content exceeding the second preset threshold, the corresponding loading requests can be suspended, and the relevant loaded content can be cleared or cached. The selection and setting of the second preset threshold can be matched and set in combination with the current network speed. For example, the second preset threshold can be set to a value close to the completion of loading, that is, a value close to 100%, such as 98%, 99.5% or 99.8%. The loading requests in the current loading request queue whose loading content is close to completion will not be suspended but will continue to be executed, so as to ensure that the loaded content will not be excessively wasted while ensuring that the target page is loaded first, and to take into account the loading efficiency of the target page and other pre-loaded items.
[0088] An embodiment of the present disclosure provides a method for loading a page, and the method for loading a page further includes:
[0089] After the target page is loaded, the loading request in the current loading request queue is resumed.
[0090] In the page loading method provided by the present disclosure, after the target page is recorded, the loading of the loading contents corresponding to the suspended loading requests in the current loading request queue is resumed. The loading requests whose loading contents have been cached can continue to be loaded, and the loading requests whose loading contents have been cleared are reloaded.
[0091] In the page loading method provided in the present disclosure, the loading requests in the current loading request queue are suspended to preferentially load the target page required by the user, so as to improve the user experience. When the target page is loaded, the loading requests in the current loading request queue that have been suspended need to be resumed and continued to be executed according to the original execution order and rules.
[0092] A specific embodiment of the page loading method according to the present disclosure is described below. Figure 4 is a flow chart of the page loading method of this specific embodiment. In this embodiment, the page loading method is implemented on a computer or a mobile phone. Figure 4 As shown, the page loading method includes the following steps:
[0093] In step S201, when a loading request of a target page is received, a loading request in a current loading request queue is obtained;
[0094] In step S202, it is determined whether there is a target page loading request in the current loading request queue:
[0095] In step S2021, if yes, suspend other loading requests in the current loading request queue except the loading request of the target page;
[0096] In step S2022, if not, all loading requests in the current loading request queue are suspended;
[0097] Then, the contents loaded by the suspended loading requests are processed, which may be cleared completely, or the contents loaded by the loading requests whose loading contents reach a first preset threshold are cached, and the others are cleared;
[0098] In step S203, a loading request of a target page is executed;
[0099] In step S204, after the target page is loaded, the loading requests in the current loading request queue are resumed, the loading requests corresponding to the cached loading content are continued to be executed, and the loading requests corresponding to the cleared loading content are re-executed.
[0100] The page loading method disclosed in the present invention can load the target page required by the user in a timely and preferential manner in a weak network environment, and then load other pre-loaded items, which can greatly improve the page loading efficiency in a weak network environment and improve the user experience. In this process, the already loaded content can also be continuously loaded, cached, or cleared in combination with the current network speed, while ensuring the loading efficiency of the user's target page, taking into account the loading efficiency of other pre-loaded items.
[0101] Figure 5 is a block diagram of a device for page loading according to an exemplary embodiment. Figure 5 The device includes an acquisition module 501, a processing module 502 and an execution module 503, wherein:
[0102] The acquisition module 501 is configured to acquire the load request in the current load request queue when receiving the load request of the target page;
[0103] The processing module 502 is configured to process the load request in the current load request queue according to a first preset rule;
[0104] The execution module 503 is configured to execute the loading request of the target page.
[0105] The processing module 502 is configured as follows:
[0106] Determine whether there is a load request for the target page in the current load request queue;
[0107] If yes, suspend the other loading requests in the current loading request queue except the loading request of the target page, and process the contents loaded by the other loading requests in the current loading request queue except the loading request of the target page according to the second preset rule;
[0108] If not, all the loading requests in the current loading request queue are suspended, and the contents loaded by all the loading requests in the current loading request queue are processed according to a second preset rule.
[0109] The second preset rule includes one of the following rules:
[0110] Rule 1: Clear the contents loaded by other load requests except the load request of the target page in the current load request queue or clear the contents loaded by all load requests in the current load request queue;
[0111] Rule 2: Determine the load requests in the current load request queue whose loading content exceeds the first preset threshold, cache the content loaded by other load requests except the load request of the target page among the load requests whose loading content determined by the cache exceeds the first preset threshold, or cache the content loaded by all load requests whose loading content determined by the cache exceeds the first preset threshold.
[0112] Wherein, the processing module 502 is configured to:
[0113] Determine whether there is a load request for the target page in the current load request queue;
[0114] If yes, determine the load request in the current load request queue whose loading content exceeds the second preset threshold and whose loading priority is higher than the load request of the target page, and continue to execute the determined load request;
[0115] If not, determine the load request in the current load request queue whose loading content exceeds the second preset threshold, and continue to execute the determined load request.
[0116] Wherein, the execution module 503 is further configured to:
[0117] After the loading of the target page is completed, the execution of the loading requests in the current loading request queue is resumed.
[0118] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0119] The page loading device disclosed in the present invention can timely and preferentially load the target page required by the user in a weak network environment, and then load other pre-loaded items, which can greatly improve the page loading efficiency in a weak network environment and enhance the user experience.
[0120] Figure 6 6 is a block diagram of a page loading apparatus 600 according to an exemplary embodiment. For example, the apparatus 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0121] Reference Figure 6 , the device 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 .
[0122] The processing component 602 generally controls the overall operation of the device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.
[0123] The memory 604 is configured to store various types of data to support operations on the device 600. Examples of such data include instructions for any application or method operating on the device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, 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 disk or optical disk.
[0124] The power component 606 provides power to the various components of the device 600. The power component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 600.
[0125] The multimedia component 608 includes a screen that provides an output interface between the device 600 and the user. 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 the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect 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. When the device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0126] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the device 600 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.
[0127] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0128] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the device 600. For example, the sensor assembly 614 can detect the open / closed state of the device 600, the relative positioning of components, such as the display and keypad of the device 600, and the sensor assembly 614 can also detect the position change of the device 600 or a component of the device 600, the presence or absence of user contact with the device 600, the orientation or acceleration / deceleration of the device 600, and the temperature change of the device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 614 may also include an optical 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 accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0129] The communication component 616 is configured to facilitate wired or wireless communication between the device 600 and other devices. The device 600 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0130] 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 components to perform the above method.
[0131] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by a processor 620 of the device 600 to complete the above-mentioned page loading method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0132] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by the processor of a mobile terminal, enables the mobile terminal to execute a page loading method, the method comprising: when receiving a loading request for a target page, obtaining the loading requests in the current loading request queue; processing the loading requests in the current loading request queue according to a first preset rule; and executing the loading request for the target page.
[0133] Figure 7 is a block diagram of a device 700 for page loading according to an exemplary embodiment. For example, the device 700 may be provided as a server. Figure 7 , the device 700 includes a processing component 722, which further includes one or more processors, and a memory resource represented by a memory 732, for storing instructions that can be executed by the processing component 722, such as an application. The application stored in the memory 732 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 722 is configured to execute instructions to perform the above method: when receiving a load request for a target page, obtain a load request in a current load request queue; process the load request in the current load request queue according to a first preset rule; and execute the load request of the target page.
[0134] The device 700 may also include a power supply component 726 configured to perform power management of the device 700, a wired or wireless network interface 750 configured to connect the device 700 to a network, and an input / output (I / O) interface 758. The device 700 may operate based on an operating system stored in the memory 732, such as Windows Server™, Mac OSX™, Unix™, Linux™, FreeBSD™, or the like.
[0135] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0136] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A page loading method, applied to an electronic device, characterized in that: The method comprises: When receiving a loading request for a target page, obtain the loading request in the current loading request queue; Processing the load requests in the current load request queue according to a first preset rule; Execute a loading request of the target page; The processing of the load request in the current load request queue according to the first preset rule includes: Determine whether there is a load request for the target page in the current load request queue; If yes, determine the load request in the current load request queue whose loading content exceeds the second preset threshold and whose loading priority is higher than the load request of the target page, and continue to execute the determined load request; If not, determine the load request in the current load request queue whose loading content exceeds the second preset threshold, and continue to execute the determined load request.
2. The method according to claim 1, characterized in that The processing of the load request in the current load request queue according to the first preset rule includes: Determine that the loading content in the current loading request queue does not exceed the loading request of the second preset threshold, and suspend execution of the determined loading request.
3. The method according to claim 1, characterized in that: The processing of the load request in the current load request queue according to the first preset rule includes: Determine that the content loaded in the current loading request queue does not exceed the loading request of the second preset threshold, and clear or cache the content loaded in the determined loading request.
4. The method according to claim 1, characterized in that: The method further comprises: After the loading of the target page is completed, the execution of the loading requests in the current loading request queue is resumed.
5. A device for loading a page, characterized in that: The device comprises: The acquisition module is configured to acquire the load request in the current load request queue when receiving the load request of the target page; a processing module, configured to process the load requests in the current load request queue according to a first preset rule; An execution module, configured to execute the loading request of the target page; Wherein, the processing module is configured as follows: Determine whether there is a load request for the target page in the current load request queue; If yes, determine the load request in the current load request queue whose loading content exceeds the second preset threshold and whose loading priority is higher than the load request of the target page, and continue to execute the determined load request; If not, determine the load request in the current load request queue whose loading content exceeds the second preset threshold, and continue to execute the determined load request.
6. The device according to claim 5, characterized in that The processing module is configured to: Determine that the loading content in the current loading request queue does not exceed the loading request of the second preset threshold, and suspend execution of the determined loading request.
7. The device according to claim 5, characterized in that The processing module is configured to: Determine that the content loaded in the current loading request queue does not exceed the loading request of the second preset threshold, and clear or cache the content loaded in the determined loading request.
8. The device according to claim 5, characterized in that The execution module is configured as follows: After the loading of the target page is completed, the execution of the loading requests in the current loading request queue is resumed.
9. A device for loading a page, characterized in that: The device comprises: processor; a memory for storing instructions executable by the processor; Wherein, the processor is configured to: When receiving a loading request for a target page, obtain the loading request in the current loading request queue; Processing the load requests in the current load request queue according to a first preset rule; Execute a loading request of the target page; The processing of the load request in the current load request queue according to the first preset rule includes: Determine whether there is a load request for the target page in the current load request queue; If yes, determine the load request in the current load request queue whose loading content exceeds the second preset threshold and whose loading priority is higher than the load request of the target page, and continue to execute the determined load request; If not, determine the load request in the current load request queue whose loading content exceeds the second preset threshold, and continue to execute the determined load request.
10. A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform a page loading method, the method comprising: When receiving a loading request for a target page, obtain the loading request in the current loading request queue; Processing the load requests in the current load request queue according to a first preset rule; Execute a loading request of the target page; The processing of the load request in the current load request queue according to the first preset rule includes: Determine whether there is a load request for the target page in the current load request queue; If yes, determine the load request in the current load request queue whose loading content exceeds the second preset threshold and whose loading priority is higher than the load request of the target page, and continue to execute the determined load request; If not, determine the load request in the current load request queue whose loading content exceeds the second preset threshold, and continue to execute the determined load request.
Citation Information
Patent Citations
Processing device and method for E-map tile request queues
CN103699670A
Method and device for loading picture and terminal
CN105824533A
Method and device for application preloading
CN105955766A
Page loading method and apparatus
CN106294609A
Game screen display control method and device, and electronic equipment
CN107398070A
