Web page data loading method, device, electronic device and storage medium

By setting random delay length and dynamic configuration for web page data to be loaded, combined with prioritization and throttling functions, the problem of long server response time in online activities is solved, and server stability and user experience are improved.

CN111783002BActive Publication Date: 2024-09-20BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010612721.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-30
Publication Date
2024-09-20
Estimated Expiration
2040-09-20

AI Technical Summary

Technical Problem

In online activities, the traditional lazy loading method cannot effectively solve the problems of long server response time, page freeze or crash under high traffic conditions.

Method used

By setting a random delay time for the web page data to be loaded, dynamically configuring the delay time based on real-time visits, and dividing data loading according to priority, using throttling functions to control the data loading process, disperse loading times, and reduce server load.

Benefits of technology

It effectively reduces the problems of long server response time, page freezes and crashes, and improves server stability and user experience, especially under high traffic conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111783002B
    Figure CN111783002B
Patent Text Reader

Abstract

The present disclosure relates to a web page data loading method, device, electronic device and storage medium. The web page data loading method includes: obtaining a web page data set to be loaded; setting a random delay time for each web page data to be loaded in the web page data set to be loaded; in response to a received web page data loading instruction, starting timing, and loading the corresponding web page data to be loaded after the random delay time corresponding to each web page data to be loaded has passed. Among them, after receiving the web page data loading instruction, after each web page data to be loaded in the web page data set to be loaded has passed the corresponding random delay time, a request is sent to the server to request to load the corresponding web page data to be loaded, which can disperse the loading time of the web page data to be loaded corresponding to the web page data loading instruction, reduce the number of visits received by the server at the same time, and overcome the problems of long server response time, page freeze and server crash caused by concentrated access of a large number of data sets when the server resources are limited.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a web page data loading method, device, electronic device and storage medium. Background Art

[0002] With the rapid development of Internet technology, various online network technologies are becoming more and more mature. The maturity of online technologies has spawned a large number of online activities, such as various e-commerce marketing or festival red envelope grabbing activities. In various online activities (such as various rush purchases, New Year's Festival, red envelope grabbing, etc.), a large number of users send a large number of requests to the server at one time within a short period of time at the beginning of the activity, resulting in a huge amount of access and concentrated access, which can easily lead to problems such as long server response time, page freezes, and server crashes. In order to solve the problems caused by concentrated large access, traditional data loading methods use lazy loading to prioritize loading the content that needs to be loaded at the moment to reduce the pressure on the server.

[0003] However, due to the large number of users, the content that needs to be loaded at present may also be very large. The data lazy loading method cannot solve the problem of long server response time when there is also a lot of content that needs to be loaded at present. Summary of the invention

[0004] The present disclosure provides a webpage data loading method, device, electronic device and storage medium to at least solve the problem of long server response time in the related art. The technical solution of the present disclosure is as follows:

[0005] According to a first aspect of an embodiment of the present disclosure, a method for loading webpage data is provided, comprising:

[0006] Get the web page dataset to be loaded;

[0007] Setting a random delay time for each web page data to be loaded in the web page data set to be loaded;

[0008] In response to the received web page data loading instruction, timing is started, and after the random delay time corresponding to each web page data to be loaded has elapsed, the corresponding web page data to be loaded is loaded.

[0009] In an exemplary embodiment, before setting a random delay time for each web page data to be loaded in the web page data set to be loaded, the method includes:

[0010] Get the real-time visits of web page data loading;

[0011] The random delay duration is configured according to the real-time access volume.

[0012] In an exemplary embodiment, configuring the random delay duration according to the real-time access volume includes:

[0013] If the real-time access volume is less than a first preset threshold, the pre-created dynamic configuration interface is closed; wherein the dynamic configuration interface is an interface for configuring the random delay duration.

[0014] In an exemplary embodiment, configuring the random delay duration according to the real-time access volume includes:

[0015] If the real-time access volume is greater than or equal to a first preset threshold and less than a second preset threshold, the random delay duration is set through the dynamic configuration interface within a range less than a preset first delay duration; wherein the first preset threshold is less than or equal to the second preset threshold;

[0016] If the real-time access volume is greater than or equal to the second preset threshold and less than the third preset threshold, the random delay duration is set through the dynamic configuration interface within a range greater than or equal to the preset first delay duration and less than the preset second delay duration; wherein the second preset threshold is less than or equal to the third preset threshold;

[0017] If the real-time access amount is greater than or equal to the third preset threshold, the random delay duration is set through the dynamic configuration interface within a range greater than or equal to the second delay duration.

[0018] In an exemplary embodiment, the step of setting a random delay duration for each web page data to be loaded in the web page data set to be loaded includes:

[0019] Dividing the priorities of the web page data to be loaded in the web page data set to be loaded to obtain at least one subset of the web page data to be loaded, each subset of the web page data to be loaded corresponding to a priority;

[0020] According to the priority of each subset of web page data to be loaded, a random delay duration is set for each web page data to be loaded in the subset of web page data to be loaded.

[0021] In an exemplary embodiment, the step of setting a random delay duration for each web page data to be loaded in the web page data subset to be loaded according to the priority of each web page data subset to be loaded includes:

[0022] Setting different time intervals for different priority levels of web page data subsets to be loaded; wherein the time interval refers to the interval range of setting a random delay time for each web page data to be loaded;

[0023] Within the time interval corresponding to the subset of web page data to be loaded, a random delay time is set for each web page data to be loaded in the subset of web page data to be loaded.

[0024] In an exemplary embodiment, in response to a received webpage data loading instruction, starting timing, and loading corresponding webpage data to be loaded after a random delay time corresponding to each webpage data to be loaded has elapsed, includes:

[0025] In response to a received web page data loading instruction, timing is started, and under the control of a preset throttling function, the web page data to be loaded is loaded after a random delay time corresponding to each web page data to be loaded has passed; wherein the throttling function is used to control each web page data to be loaded to pass a corresponding random delay time when loading the web page data to be loaded.

[0026] In an exemplary embodiment, the web page data set to be loaded includes web page data to be loaded in a visible area of ​​the web page;

[0027] The step of loading the corresponding web page data to be loaded after the random delay time corresponding to each web page data to be loaded has passed includes:

[0028] After a random delay time corresponding to each web page data to be loaded has elapsed, the web page data to be loaded is loaded into the visible area.

[0029] According to a second aspect of an embodiment of the present disclosure, a webpage data loading device is provided, comprising:

[0030] A to-be-loaded web page data set acquisition unit is configured to execute acquisition of the to-be-loaded web page data set;

[0031] A random delay setting unit, configured to set a random delay duration for each web page data to be loaded in the web page data set to be loaded;

[0032] The web page data loading unit is configured to execute in response to the received web page data loading instruction, start timing, and load the corresponding web page data to be loaded after the random delay time corresponding to each web page data to be loaded has passed.

[0033] In an exemplary embodiment, the webpage data loading device further includes a delay duration configuration unit configured to execute:

[0034] Get the real-time visits of web page data loading;

[0035] The random delay duration is configured according to the real-time access volume.

[0036] In an exemplary embodiment, the delay duration configuration unit is further configured to execute:

[0037] If the real-time access volume is less than a first preset threshold, the pre-created dynamic configuration interface is closed; wherein the dynamic configuration interface is an interface for configuring the random delay duration.

[0038] In an exemplary embodiment, the delay duration configuration unit is further configured to execute:

[0039] If the real-time access volume is greater than or equal to a first preset threshold and less than a second preset threshold, the random delay duration is set through the dynamic configuration interface within a range less than a preset first delay duration; wherein the first preset threshold is less than or equal to the second preset threshold;

[0040] If the real-time access volume is greater than or equal to the second preset threshold and less than the third preset threshold, the random delay duration is set through the dynamic configuration interface within a range greater than or equal to the preset first delay duration and less than the preset second delay duration; wherein the second preset threshold is less than or equal to the third preset threshold;

[0041] If the real-time access amount is greater than or equal to the third preset threshold, the random delay duration is set through the dynamic configuration interface within a range greater than or equal to the second delay duration.

[0042] In an exemplary embodiment, the random delay setting unit is further configured to perform:

[0043] Dividing the priorities of the web page data to be loaded in the web page data set to be loaded to obtain at least one subset of the web page data to be loaded, each subset of the web page data to be loaded corresponding to a priority;

[0044] According to the priority of each subset of web page data to be loaded, a random delay duration is set for each web page data to be loaded in the subset of web page data to be loaded.

[0045] In an exemplary embodiment, the random delay setting unit is further configured to perform:

[0046] Setting different time intervals for different priority levels of web page data subsets to be loaded; wherein the time interval refers to the interval range of setting a random delay time for each web page data to be loaded;

[0047] Within the time interval corresponding to the subset of web page data to be loaded, a random delay time is set for each web page data to be loaded in the subset of web page data to be loaded.

[0048] In an exemplary embodiment, the web page data loading unit is further configured to execute:

[0049] In response to a received web page data loading instruction, timing is started, and under the control of a preset throttling function, the web page data to be loaded is loaded after a random delay time corresponding to each web page data to be loaded has passed; wherein the throttling function is used to control each web page data to be loaded to pass a corresponding random delay time when loading the web page data to be loaded.

[0050] In an exemplary embodiment, the web page data set to be loaded includes web page data to be loaded in a visible area of ​​the web page; the web page data loading unit is further configured to execute:

[0051] After a random delay time corresponding to each web page data to be loaded, the web page data to be loaded is loaded into the visible area. According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising:

[0052] processor;

[0053] a memory for storing instructions executable by the processor;

[0054] The processor is configured to execute the instructions to implement the web page data loading method described in any one of the embodiments of the first aspect above.

[0055] According to a fourth aspect of an embodiment of the present disclosure, a storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the web page data loading method described in any one of the embodiments of the first aspect above.

[0056] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, the program product comprising a computer program, the computer program being stored in a readable storage medium, at least one processor of a device reading and executing the computer program from the readable storage medium, so that the device executes the web page data loading method described in any one of the embodiments of the first aspect above.

[0057] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0058] Obtain a data set of web pages to be loaded; set a random delay time for each web page data to be loaded in the data set of web pages to be loaded; start timing in response to the received web page data loading instruction, and load the corresponding web page data to be loaded after the random delay time corresponding to each web page data to be loaded has passed. Wherein, after receiving the web page data loading instruction, after each web page data to be loaded in the web page data set to be loaded has passed the corresponding random delay time, a request is sent to the server to request to load the corresponding web page data to be loaded, which can disperse the loading time of the web page data to be loaded corresponding to the web page data loading instruction, reduce the number of visits received by the server at the same time, and overcome the problems of long server response time, page freeze, and server crash caused by concentrated access of a large number of data sets when the server resources are limited. It should be understood that the above general description and the detailed description below are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0060] Figure 1 The figure is a flow chart of a method for loading web page data according to an exemplary embodiment.

[0061] Figure 2 is a flowchart of an implementable method of step S200 according to an exemplary embodiment.

[0062] Figure 3 is a flowchart of an implementable method of step S220 according to an exemplary embodiment.

[0063] Figure 4 The figure is a flow chart of a method for loading web page data according to a specific exemplary embodiment.

[0064] Figure 5 The figure is a block diagram of a web page data loading device according to an exemplary embodiment.

[0065] Figure 6 The figure is a diagram showing the internal structure of an electronic device for loading web page data according to an exemplary embodiment. DETAILED DESCRIPTION

[0066] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0067] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0068] Figure 1 is a flow chart of a method for loading web page data according to an exemplary embodiment. Figure 1 As shown, the following steps are included:

[0069] In step S100, a web page data set to be loaded is obtained.

[0070] In step S200, a random delay duration is set for each web page data to be loaded in the web page data set to be loaded.

[0071] In step S300, in response to the received web page data loading instruction, timing is started, and after the random delay time corresponding to each web page data to be loaded has elapsed, the corresponding web page data to be loaded is loaded.

[0072] Among them, the web page data to be loaded refers to the web page data that may need to be loaded. The data type of the web page data to be loaded can be image data or other types of data. The web page data set to be loaded includes one or more web page data to be loaded. For example, a rush purchase page corresponds to multiple different pictures (web page data to be loaded). After entering this page, the user only views the pictures on the first screen of this page, and does not slide down to view the pictures below the page, or the user slides down to view other pictures except the first screen pictures, but there are still some pictures that have not been viewed. At this time, only the first screen pictures or the pictures of the interface to which the user slides down need to be loaded, and the pictures of the interface to which the user has not slid do not need to be loaded. The first screen pictures and the pictures of the interface to which the user slides down are the pictures that need to be loaded, that is, the web page data set to be loaded. The random delay time is a randomly set time length used to delay the loading of the web page data to be loaded. Optionally, the random delay time can be 100ms, 500ms, 1000ms, 5000ms, etc. The data loading instruction is an instruction to start loading the web page data to be loaded. Optionally, in data lazy loading, the picture in the screen display area is loaded. The data loading instruction is an instruction generated when the user clicks to enter the activity interface or slides the screen to the corresponding interface at a certain moment according to a specific activity (for example, a rush sale), and is used to instruct the loading of image data.

[0073] Specifically, after obtaining the web page data set to be loaded, a random delay duration is set for each web page data to be loaded in the web page data set to be loaded, and the timing starts after the web page data loading instruction is received. After each web page data to be loaded has passed the random delay duration corresponding to it, a data loading request is sent to the server to load the web page data to be loaded corresponding to the random delay duration.

[0074] For example, under normal circumstances, when a user needs to browse a page with 100 pictures, the number of pictures that need to be loaded on the interface the user is browsing is 5, and the number of pictures that may need to be loaded later is 95. When the user enters the current interface, 5 pictures need to be loaded. For example, 5 pictures need to be loaded within 100ms of the user entering the current interface. At this time, the query rate per second of the server is 50qps. If the above method is adopted, a random delay time is randomly set for the five pictures, assuming that the five pictures are picture 1, picture 2, picture 3, picture 4, and picture 5, and the random delay time corresponding to picture 1 is 100ms, the random delay time corresponding to picture 2 is 200ms, the random delay time corresponding to picture 3 is 300ms, the random delay time corresponding to picture 4 is 400ms, and the random delay time corresponding to picture 5 is 500ms. Based on the time when the user enters the current interface, after 100ms, request 1 is sent to the server to request to load picture 1. Similarly, after 200ms, request 2 is sent to the server to request to load picture 2. Similarly, after 500ms, request 5 is sent to the server to request to load picture 5. In this way, the server receives a request every once in a while, and the query rate per second of the server at this time is 10qps. It can be seen that after setting the delay time, the same server, the same access volume and load volume can be distributed in different time periods, and the query rate per second of the server is reduced from 50qps to 10qps. By reducing the server's query rate per second, the server responds faster to requests to load data, which can avoid page freezes or server crashes.

[0075] The web page data loading method described above obtains a web page data set to be loaded; sets a random delay time for each web page data to be loaded in the web page data set to be loaded; starts timing in response to a received web page data loading instruction, and loads the corresponding web page data to be loaded after the random delay time corresponding to each web page data to be loaded has passed. After receiving the web page data loading instruction, after each web page data to be loaded in the web page data set to be loaded has passed the corresponding random delay time, a request is sent to the server to request loading of the corresponding web page data to be loaded, which can disperse the loading time of the web page data to be loaded corresponding to the web page data loading instruction, reduce the number of visits received by the server at the same time, and overcome the problems of long server response time, page freeze, and server crash caused by concentrated access of a large number of data sets when the server resources are limited.

[0076] In an exemplary embodiment, it is an implementable method before step S100, wherein before step S100, it includes:

[0077] Get the real-time page views of web page data loading; configure the random delay duration based on the real-time page views.

[0078] The real-time access volume is the real-time access volume of the server, which can be represented by the query rate per second of the server.

[0079] Specifically, the query rate per second of the server is proportional to the number of visits and inversely proportional to the time it takes to load data. Since the random delay time can limit the time it takes to load data, the query rate per second of the server is also inversely proportional to the random delay time. When the real-time number of visits to the server is large, the random delay time can be set to a larger value to reduce the real-time number of visits to the server and maintain the stability of data loading. When the real-time number of visits to the server is small, the random delay time can be set to a smaller value to increase the speed of data loading.

[0080] Optionally, if the real-time access volume is less than a first preset threshold, the pre-created dynamic configuration interface is closed; wherein the dynamic configuration interface is an interface for configuring the random delay duration. If the real-time access volume is greater than or equal to the first preset threshold and less than the second preset threshold, the random delay duration is set through the dynamic configuration interface within a range less than the preset first delay duration; wherein the first preset threshold is less than or equal to the second preset threshold. If the real-time access volume is greater than or equal to the second preset threshold and less than the third preset threshold, the random delay duration is set through the dynamic configuration interface within a range greater than or equal to the preset first delay duration and less than the preset second delay duration. If the real-time access volume is greater than or equal to the third preset threshold, the random delay duration is set through the dynamic configuration interface within a range greater than or equal to the second delay duration.

[0081] Among them, the first preset threshold, the second preset threshold, and the third preset threshold are all preset numerical demarcation boundaries of a visit volume, the first preset threshold is less than or equal to the second preset threshold, and the second preset threshold is less than or equal to the third preset threshold. The first delay time and the second delay time are both preset delay times for data loading, optionally, the first delay time can be 1000ms, 2000ms, 3000ms, etc., and the second delay time can be 2000ms, 3000ms, 4000ms, etc. The first delay time is less than or equal to the second delay time.

[0082] Specifically, when the real-time access volume is very small, normal access to the server can be satisfied in a short time. The pre-created dynamic configuration interface can be closed, the function of setting the random delay time can be closed, and the delay is not set for the data to be loaded, or the random delay time is set to 0. When the user needs to load web page data, a web page data loading request is directly sent to the server without delay. When the real-time access volume is greater than or equal to the first preset threshold and less than the second preset threshold, it means that the server has received a small amount of access. A relatively small random delay time can be set for the data to be loaded within a range less than the first preset time through the dynamic configuration interface to increase the data loading speed. When the real-time access volume is greater than or equal to the second preset threshold and less than the third preset threshold, it means that the server has received a certain amount of access, but the access volume is small. A random delay time can be set for the data to be loaded within a range greater than or equal to the preset first delay time and less than the preset second delay time through the dynamic configuration interface to increase the data loading speed. When the real-time access volume is greater than or equal to the third preset threshold, it means that the server receives a large amount of access. Through the dynamic configuration interface, a relatively large random delay time can be set for the data to be loaded within a range greater than or equal to the first delay time to reduce the real-time access volume of the server and maintain the stability of data loading.

[0083] In the above exemplary embodiment, the real-time page views of web page data loading are obtained, and the random delay duration is configured according to the real-time page views. A stable or relatively low query rate per second can be obtained when the server resources remain unchanged, thereby further improving the speed of data loading while ensuring the stability of data loading.

[0084] Figure 2 is a flowchart of an implementable method of step S200 according to an exemplary embodiment. Figure 2 As shown, step S200, setting a random delay time for each web page data to be loaded in the web page data set to be loaded, includes the following steps:

[0085] In step S210, the priorities of the web page data to be loaded in the web page data set to be loaded are divided to obtain at least one subset of the web page data to be loaded, and each subset of the web page data to be loaded corresponds to a priority.

[0086] In step S220, a random delay duration is set for each web page data to be loaded in the web page data subset to be loaded according to the priority of each web page data subset to be loaded.

[0087] Specifically, loading the web page data to be loaded based on the random delay time corresponding to each web page data to be loaded can achieve the purpose of reducing the query rate per second of the server. However, if all the data are randomly loaded together, there will be no distinction between primary and secondary in the data loading. Therefore, in order to achieve orderly loading of data, the priority of the web page data to be loaded can be divided, and the delay time of the data to be loaded with higher importance can be set shorter, and the more important data can be loaded first, and the delay time of the data to be loaded with lower importance can be set longer, and the loading of the data with lower importance can be delayed. Optionally, data with the same importance and expected to be loaded in the same time period are set as a group to obtain at least one subset of web page data to be loaded, and priorities are set for these subsets according to their importance and loading time. According to the priority of each subset of web page data to be loaded, a random delay time is set for each web page data to be loaded in the subset of web page data to be loaded, and the data is loaded one by one.

[0088] In the above exemplary embodiment, the priorities of the web page data to be loaded in the web page data set to be loaded are divided to obtain at least one subset of web page data to be loaded, and each subset of web page data to be loaded corresponds to a priority; according to the priority of each subset of web page data to be loaded, a random delay duration is set for each web page data to be loaded in the subset of web page data to be loaded. This enables the subsequent process of loading the web page data to be loaded to have a higher priority according to the random delay duration corresponding to each web page data to be loaded in the web page data set to be loaded, thereby improving the user experience.

[0089] Figure 3 is a flowchart of an implementable method of step S220 according to an exemplary embodiment. Figure 3 As shown, step S220, according to the priority of each subset of web page data to be loaded, sets a random delay time for each web page data to be loaded in the subset of web page data to be loaded, including the following steps:

[0090] In step S221, different time intervals are set for the subsets of web page data to be loaded with different priorities, wherein the time interval refers to the interval range of the random delay time interval set for each web page data to be loaded.

[0091] In step S222, within the time interval corresponding to the subset of web page data to be loaded, a random delay time is set for each web page data to be loaded in the subset of web page data to be loaded.

[0092] Specifically, different duration intervals are set according to the priorities of the subsets of web page data to be loaded, and the random delay duration of the data to be loaded with the same priority is set within a duration interval. In this way, during the data loading process, it is possible to preferentially load the web page data sets to be loaded with higher priorities, and then load the web page data sets to be loaded with lower priorities. For example, an interface has 3 picture parts, with priorities 1, 2, and 3, respectively. The overall delay time of these 3 picture parts is 3 seconds. For pictures with a priority of 1, a random delay duration is set between 0-1000ms, for pictures with a priority of 2, a random delay duration is set between 1000-2000ms, and for pictures with a priority of 3, a random delay duration is set between 2000-3000ms. Optionally, duration intervals corresponding to different priorities may have overlapping parts.

[0093] In the above exemplary embodiment, different time intervals are set for the subsets of web page data to be loaded with different priorities; within the time interval corresponding to the subset of web page data to be loaded, a random delay time is set for each web page data to be loaded in the subset of web page data to be loaded. This enables the subsequent process of loading the web page data to be loaded to have a higher priority according to the random delay time corresponding to each web page data to be loaded in the web page data set to be loaded, and after the web page data set with a higher priority to be loaded is loaded, the web page data set with a lower priority to be loaded is randomly delayed, thereby improving the user experience.

[0094] In an exemplary embodiment, a possible implementation of step S300 is shown, wherein step S300 includes:

[0095] In response to the received webpage data loading instruction, timing is started, and under the control of a preset throttling function, after a random delay time corresponding to each webpage data to be loaded, the webpage data to be loaded is loaded.

[0096] The throttling function is used to control each web page data to be loaded to go through a corresponding random delay time when loading the web page data to be loaded. The throttling function is a function that ensures that an event is triggered only a specific number of times.

[0097] Specifically, upon receiving the data loading instruction, the timing is started, and after the timing reaches the random delay time length set for the web page data to be loaded, the corresponding web page data to be loaded is loaded, so that data with different random delay time lengths are loaded at different times. When the web page data to be loaded is loaded, a throttling function is set in the loading process, so that after the random delay time length corresponding to each web page data to be loaded, only one delay is executed when loading the corresponding web page data to be loaded, avoiding the situation where one delay is executed twice or more, so as to ensure the normal loading of the data to be loaded. For example, the random delay time length set for the first web page data to be loaded is 100ms, and the random delay time length set for the second web page data to be loaded is 200ms. The expectation of data loading is to load the first web page data to be loaded at the 100th ms and load the second web page data to be loaded at the 200th ms. However, if the loading is performed twice after the random delay time length when loading the first web page data to be loaded, and the loading is performed once after the random delay time length when loading the second web page data to be loaded, then the first web page data to be loaded and the first web page data to be loaded will be loaded at the same time at the 200th ms, and the expected purpose cannot be achieved. When loading the web page data to be loaded, a throttling function is set during the loading process to ensure that only one delay is executed when loading the corresponding web page data to be loaded. The first web page data to be loaded is loaded at 100ms, and the second web page data to be loaded is loaded at 200ms. While realizing the distributed execution of data loading, the normal loading of the data to be loaded is guaranteed, thereby reducing the server's query rate per second.

[0098] In the above exemplary embodiment, in response to the received web page data loading instruction, the timing starts, and under the control of the preset throttling function, after the random delay time corresponding to each web page data to be loaded, the web page data to be loaded is loaded. This enables only one delay to be executed when loading the corresponding web page data to be loaded, while achieving decentralized execution of data loading, ensuring the normal loading of the data to be loaded, and reducing the query rate per second of the server.

[0099] In an exemplary embodiment, it is an implementable method after step S300, wherein the method after step S300 includes:

[0100] After a random delay time corresponding to each web page data to be loaded, the web page data to be loaded is loaded into the visible area.

[0101] The web page data set to be loaded includes the web page data to be loaded in the visible area of ​​the web page.

[0102] Specifically, the web page data to be loaded may be pictures or texts in the web page. After a random delay time corresponding to each web page data to be loaded, the pictures or texts waiting to be loaded are loaded into the visible area for user browsing.

[0103] In the above exemplary embodiment, after the random delay time corresponding to each web page data to be loaded, the web page data to be loaded is loaded into the visible area. When the server resources are limited, the number of loading requests sent to the server at the same time can be reduced, the query rate per second of the server can be reduced, and the corresponding data to be loaded can be intuitively displayed in the visible area, thereby improving the user experience.

[0104] Figure 4 is a flow chart of a web page data loading method according to a specific exemplary embodiment. Figure 4 As shown in the figure, during an online shopping event, when the event starts, the user enters the event page and accesses the event page list. At this time, a request is sent to the server in a lazy loading manner, and the server returns the data corresponding to the request to the image server based on the received request. In the event page list, the images in the image server are loaded in sequence according to the priority and random delay time, and the images are displayed to the user.

[0105] Take the data to be loaded as an example. First, randomly delay the loading of the image for a certain period of time to break up the image requests. Add a throttling function to the image loading part and set a random delay time by taking a random number within a certain range of values. When the image is scrolled to the visible area, it is not loaded immediately, but waits until the delay time to load it. At the same time, throttling is used to ensure that it is only executed once during this period. The random time delay loading of the image is realized to achieve the purpose of breaking up the image requests.

[0106] Prioritize the images, load and display them in order of priority, and prioritize the images while implementing random delayed loading of the images, and load them in order of priority. For example, a card has three image parts, with priorities 1, 2, and 3, and the overall delay time is 3 seconds. Set the random loading delay of 0-1000 milliseconds for images with priority 1, 1000-2000 milliseconds for images with priority 2, 2000-3000 milliseconds for images with priority 2, and so on, so that the images are loaded in sequence, with a basic distinction between primary and secondary, to reduce the server's query rate per second.

[0107] Optionally, the interface can be configured to reduce the query rate per second of the server and perform real-time configuration according to the online traffic situation. Given that the actual online traffic situation is unpredictable, the maximum delay time cannot be fixed. Therefore, the interface can be used to flexibly configure whether to use the above optimization strategy and the maximum delay time. When the online traffic is large, the optimization strategy can be turned on, and the delay degree can be set according to the actual situation to ensure service stability. When the traffic is small, the strategy can be turned off to ensure user experience.

[0108] The above exemplary embodiments enable the loading of images in high-traffic marketing activities to be based on the original lazy loading, from the whole to the part, with a more detailed and targeted loading strategy for the first screen or the image within a single screen, and at the same time provide flexible and configurable capabilities in combination with the actual online situation. Using this list image loading method, a good user experience can be provided and service stability can be guaranteed when server capacity resources are limited.

[0109] It should be understood that although Figure 1-Figure 4 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-Figure 4 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0110] Figure 5 is a block diagram of a web page data loading device according to an exemplary embodiment. Figure 5 The device includes a to-be-loaded web page data set acquisition unit 501, a random delay setting unit 502 and a data loading unit 503:

[0111] The to-be-loaded web page data set acquisition unit 501 is configured to execute acquisition of the to-be-loaded web page data set;

[0112] A random delay setting unit 502 is configured to set a random delay duration for each to-be-loaded web page data in the to-be-loaded web page data set;

[0113] The web page data loading unit 503 is configured to execute in response to the received web page data loading instruction, start timing, and load the corresponding web page data to be loaded after the random delay time corresponding to each web page data to be loaded has elapsed.

[0114] In an exemplary embodiment, the web page data loading device further includes a delay duration configuration unit configured to execute: obtaining real-time page views for web page data loading; and configuring a random delay duration according to the real-time page views.

[0115] In an exemplary embodiment, the delay duration configuration unit is further configured to execute: if the real-time access volume is less than a first preset threshold, closing a pre-created dynamic configuration interface; wherein the dynamic configuration interface is an interface for configuring the random delay duration.

[0116] In an exemplary embodiment, the delay duration configuration unit is also configured to execute: if the real-time access volume is greater than or equal to a first preset threshold and less than a second preset threshold, then within a range less than the preset first delay duration, a random delay duration is set through a dynamic configuration interface; wherein the first preset threshold is less than or equal to the second preset threshold; if the real-time access volume is greater than or equal to the second preset threshold and less than a third preset threshold, then within a range greater than or equal to the preset first delay duration and less than the preset second delay duration, a random delay duration is set through a dynamic configuration interface; wherein the second preset threshold is less than or equal to the third preset threshold; if the real-time access volume is greater than or equal to the third preset threshold, then within a range greater than or equal to the second delay duration, a random delay duration is set through the dynamic configuration interface.

[0117] In an exemplary embodiment, the random delay setting unit 502 is also configured to perform: dividing the priority of the web page data to be loaded in the web page data set to be loaded to obtain at least one subset of the web page data to be loaded, each subset of the web page data to be loaded corresponds to a priority; according to the priority of each subset of the web page data to be loaded, setting a random delay duration for each web page data to be loaded in the subset of the web page data to be loaded.

[0118] In an exemplary embodiment, the random delay setting unit 502 is further configured to perform: setting different duration intervals for subsets of web page data to be loaded with different priorities; wherein the duration interval refers to the interval range for setting a random delay duration for each web page data to be loaded; within the duration interval corresponding to the subset of web page data to be loaded, setting a random delay duration for each web page data to be loaded in the subset of web page data to be loaded.

[0119] In an exemplary embodiment, the web page data loading unit 503 is also configured to execute: in response to a received web page data loading instruction, start timing, and under the control of a preset throttling function, load the web page data to be loaded after a random delay time corresponding to each web page data to be loaded; wherein the throttling function is used to control each web page data to be loaded to pass a corresponding random delay time when loading the web page data to be loaded.

[0120] In an exemplary embodiment, the web page data set to be loaded includes web page data to be loaded in the visible area of ​​the web page; the web page data loading unit 503 is also configured to execute: after a random delay time corresponding to each web page data to be loaded, load the web page data to be loaded into the visible area.

[0121] Regarding the device in the above embodiment, the specific manner in which each unit performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here.

[0122] Figure 6 1 is a block diagram of an electronic device 600 for web page data loading according to an exemplary embodiment. For example, the device 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.

[0123] Reference Figure 6 , 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 .

[0124] 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.

[0125] 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.

[0126] The power supply component 606 provides power to the various components of the device 600. The power supply 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.

[0127] 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 the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0128] 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.

[0129] 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.

[0130] 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 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 gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0131] 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, a carrier network (such as 2G, 3G, 4G or 5G), 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.

[0132] In an exemplary embodiment, the device 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 methods.

[0133] 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 perform the above 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.

[0134] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0135] It should be understood that the present disclosure is not limited to the exact structures that have 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 disclosure is limited only by the appended claims.

Claims

1. A web page data loading method, characterized in that: include: Get the web page dataset to be loaded; Setting a random delay time for each web page data to be loaded in the web page data set to be loaded; In response to the received web page data loading instruction, start timing, and after the random delay time corresponding to each web page data to be loaded has passed, send a data loading request to the server to load the web page data to be loaded corresponding to the random delay time; The method of setting a random delay time for each web page data to be loaded in the web page data set to be loaded includes: obtaining the real-time page views of the web page data to be loaded; and configuring the random delay time according to the real-time page views.

2. The webpage data loading method according to claim 1, characterized in that: The configuring the random delay duration according to the real-time access volume includes: If the real-time access volume is less than a first preset threshold, the pre-created dynamic configuration interface is closed; wherein the dynamic configuration interface is an interface for configuring the random delay duration.

3. The webpage data loading method according to claim 2, characterized in that: The configuring the random delay duration according to the real-time access volume includes: If the real-time access volume is greater than or equal to a first preset threshold and less than a second preset threshold, the random delay duration is set through the dynamic configuration interface within a range less than a preset first delay duration; wherein the first preset threshold is less than or equal to the second preset threshold; If the real-time access volume is greater than or equal to the second preset threshold and less than the third preset threshold, the random delay duration is set through the dynamic configuration interface within a range greater than or equal to the preset first delay duration and less than the preset second delay duration; wherein the second preset threshold is less than or equal to the third preset threshold; If the real-time access amount is greater than or equal to the third preset threshold, the random delay duration is set through the dynamic configuration interface within a range greater than or equal to the second delay duration.

4. The webpage data loading method according to claim 1, characterized in that: The step of setting a random delay time for each web page data to be loaded in the web page data set to be loaded includes: Dividing the priorities of the web page data to be loaded in the web page data set to be loaded to obtain at least one subset of the web page data to be loaded, each subset of the web page data to be loaded corresponding to a priority; According to the priority of each subset of web page data to be loaded, a random delay duration is set for each web page data to be loaded in the subset of web page data to be loaded.

5. The webpage data loading method according to claim 4, characterized in that: The step of setting a random delay time for each web page data to be loaded in the web page data subset to be loaded according to the priority of each web page data subset to be loaded includes: Setting different time intervals for different priority levels of web page data subsets to be loaded; wherein the time interval refers to the interval range of setting a random delay time for each web page data to be loaded; Within the time interval corresponding to the subset of web page data to be loaded, a random delay time is set for each web page data to be loaded in the subset of web page data to be loaded.

6. The webpage data loading method according to claim 1, characterized in that: The method of starting timing in response to the received webpage data loading instruction and loading the corresponding webpage data to be loaded after the random delay time corresponding to each webpage data to be loaded has elapsed comprises: In response to a received web page data loading instruction, timing is started, and under the control of a preset throttling function, the web page data to be loaded is loaded after a random delay time corresponding to each web page data to be loaded has passed; wherein the throttling function is used to control each web page data to be loaded to pass a corresponding random delay time when loading the web page data to be loaded.

7. The webpage data loading method according to any one of claims 1 to 6, characterized in that: The web page data set to be loaded includes web page data to be loaded in the visible area of ​​the web page; The step of loading the corresponding web page data to be loaded after the random delay time corresponding to each web page data to be loaded has passed includes: After a random delay time corresponding to each web page data to be loaded has elapsed, the web page data to be loaded is loaded into the visible area.

8. A web page data loading device, characterized in that: include: A to-be-loaded web page data set acquisition unit is configured to execute acquisition of the to-be-loaded web page data set; A random delay setting unit, configured to set a random delay duration for each web page data to be loaded in the web page data set to be loaded; The web page data loading unit is configured to execute in response to the received web page data loading instruction, start timing, and after the random delay time corresponding to each web page data to be loaded has passed, send a data loading request to the server to load the web page data to be loaded corresponding to the random delay time; The web page data loading device further includes a delay duration configuration unit configured to execute: obtaining the real-time page views of the web page data loading; and configuring the random delay duration according to the real-time page views.

9. The webpage data loading device according to claim 8, characterized in that: The delay duration configuration unit is further configured to execute: If the real-time access volume is less than a first preset threshold, the pre-created dynamic configuration interface is closed; wherein the dynamic configuration interface is an interface for configuring the random delay duration.

10. The webpage data loading device according to claim 9, characterized in that: The delay duration configuration unit is further configured to execute: If the real-time access volume is greater than or equal to a first preset threshold and less than a second preset threshold, the random delay duration is set through the dynamic configuration interface within a range less than a preset first delay duration; wherein the first preset threshold is less than or equal to the second preset threshold; If the real-time access volume is greater than or equal to the second preset threshold and less than the third preset threshold, the random delay duration is set through the dynamic configuration interface within a range greater than or equal to the preset first delay duration and less than the preset second delay duration; wherein the second preset threshold is less than or equal to the third preset threshold; If the real-time access amount is greater than or equal to the third preset threshold, the random delay duration is set through the dynamic configuration interface within a range greater than or equal to the second delay duration.

11. The webpage data loading device according to claim 8, characterized in that: The random delay setting unit is further configured to perform: Dividing the priorities of the web page data to be loaded in the web page data set to be loaded to obtain at least one subset of the web page data to be loaded, each subset of the web page data to be loaded corresponding to a priority; According to the priority of each subset of web page data to be loaded, a random delay duration is set for each web page data to be loaded in the subset of web page data to be loaded.

12. The webpage data loading device according to claim 11, characterized in that: The random delay setting unit is further configured to perform: Setting different time intervals for different priority levels of web page data subsets to be loaded; wherein the time interval refers to the interval range of setting a random delay time for each web page data to be loaded; Within the time interval corresponding to the subset of web page data to be loaded, a random delay time is set for each web page data to be loaded in the subset of web page data to be loaded.

13. The webpage data loading device according to claim 8, characterized in that: The web page data loading unit is further configured to execute: In response to a received web page data loading instruction, timing is started, and under the control of a preset throttling function, the web page data to be loaded is loaded after a random delay time corresponding to each web page data to be loaded has passed; wherein the throttling function is used to control each web page data to be loaded to pass a corresponding random delay time when loading the web page data to be loaded.

14. The webpage data loading device according to any one of claims 8 to 13, characterized in that: The web page data set to be loaded includes web page data to be loaded in the visible area of ​​the web page; the web page data loading unit is further configured to execute: After a random delay time corresponding to each web page data to be loaded has elapsed, the web page data to be loaded is loaded into the visible area.

15. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the web page data loading method as described in any one of claims 1 to 7.

16. A storage medium, when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the web page data loading method according to any one of claims 1 to 7.