A webpage optimization method, device, storage medium, and electronic device

By automatically analyzing the status parameters when users access web pages, calculating the change rate of web page loading influencing factors and making optimization adjustments, the problem of low web page loading analysis efficiency and poor accuracy in the existing technology is solved, and the monitoring and control of web page loading status is improved. Optimize efficiency.

CN112182454BActive Publication Date: 2024-09-20BEIJING SANKUAI ONLINE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The analysis of web page loading problems in the existing technology relies on manual analysis, which is inefficient and inaccurate, and cannot effectively monitor and optimize the web page loading status.

Method used

By obtaining the status parameters when users access web pages, calculate the change rate of web page loading impact factors, select target impact factors and make optimization adjustments, automatically analyze web page loading status, and improve analysis efficiency and accuracy.

Benefits of technology

It realizes automatic analysis and optimization of web page loading status, improves analysis efficiency and accuracy, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112182454B
    Figure CN112182454B
Patent Text Reader

Abstract

The present specification discloses a method, device, storage medium, and electronic device for optimizing a web page. In the present specification, for each web page, according to the state parameters involved when each user accesses the web page, the first characterization value corresponding to the first time interval and the second characterization value corresponding to the second time interval of each web page loading influence factor of the web page are determined, and according to the first characterization value and the second characterization value, the rate of change of the web page loading influence factor from the first time interval to the second time interval is determined, and then the target influence factor is selected according to the change rate, and the web page is optimized and adjusted according to the optimization strategy corresponding to the target influence factor. Since the web page loading status and the subsequent web page loading influence factors can be automatically analyzed according to the actual situation when each user accesses the web page in the present specification, it can not only effectively improve the accuracy of web page analysis, but also greatly improve the analysis efficiency of web page loading status.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet technology, and in particular to a web page optimization method, device, storage medium, and electronic device. Background Art

[0002] As web applications have the characteristics of rapid iteration, online at any time and low publishing cost, with the development of Internet technology, more and more application developers provide services to users by providing Web applications.

[0003] At present, in order to ensure the user experience, it is necessary to analyze the web page loading of the Web application. When it is determined that there is a problem with the web page loading, measures will be taken to optimize the web page. However, the current analysis and determination of the cause of the web page loading problem is mostly achieved through manual analysis. This analysis method is not only inefficient, but also often has poor accuracy due to over-reliance on manual experience. Summary of the invention

[0004] This specification provides a web page optimization method, device, storage medium, and electronic device to partially solve the above-mentioned problems existing in the prior art.

[0005] This manual adopts the following technical solutions:

[0006] This specification provides a method for web page optimization, including:

[0007] For each web page, obtaining state parameters involved when each user accesses the web page within the determined first time interval and second time interval, wherein the state parameters are used to characterize a loading status of the web page;

[0008] For each webpage loading influence factor corresponding to the state parameter, determine, according to the state parameter, a first characterization value corresponding to the webpage loading influence factor in the first time interval, and determine, according to the state parameter, a second characterization value corresponding to the webpage loading influence factor in the second time interval, wherein the first characterization value is used to reflect the loading characteristics of the webpage in the first time interval under the webpage loading influence factor, and the second characterization value is used to reflect the loading characteristics of the webpage in the second time interval under the webpage loading influence factor;

[0009] Determine, based on the first characterization value and the second characterization value, a change rate of the webpage loading influence factor from the first time interval to the second time interval, wherein the change rate is used to characterize a degree of change of the webpage loading influence factor;

[0010] According to the change rate corresponding to each webpage loading influencing factor, a target influencing factor is selected from the webpage loading influencing factors, and the webpage is optimized and adjusted according to the optimization strategy corresponding to the target influencing factor.

[0011] Optionally, determining the first time interval and the second time interval includes:

[0012] Determine the update time of the client loading the web page;

[0013] A time interval of a first set duration before the update time is used as the first time interval, and a time interval of a second set duration after the update time is used as the second time interval.

[0014] Optionally, for each webpage loading influence factor corresponding to the state parameter, determining, according to the state parameter, a first characterization value corresponding to the webpage loading influence factor at the first time interval, and determining, according to the state parameter, before a second characterization value corresponding to the second time interval of the webpage loading influence factor further includes:

[0015] Determine, according to the state parameter, an average loading duration of the webpage in the first time interval as a first loading duration, and determine an average loading duration of the webpage in the second time interval as a second loading duration;

[0016] If it is determined that the time difference between the first loading time and the second loading time is not less than the set time, for each web page loading influence factor, the first characterization value and the second characterization value corresponding to the web page loading influence factor are determined according to the state parameter.

[0017] Optionally, determining, according to the first characterization value and the second characterization value, a change rate of the webpage loading influence factor from the first time interval to the second time interval includes:

[0018] determining a base rate of change between the first characterizing value and the second characterizing value;

[0019] The change rate of the webpage loading influence factor from the first time interval to the second time interval is determined according to the basic change rate and a preset weight value corresponding to the webpage loading influence factor.

[0020] Optionally, selecting a target impact factor from each webpage loading impact factor according to a change rate corresponding to each webpage loading impact factor includes:

[0021] For each webpage loading influence factor, if it is determined that the change rate corresponding to the webpage loading influence factor is not less than the first change rate, the webpage loading influence factor is selected as the target influence factor.

[0022] Optionally, selecting a target impact factor from each webpage loading impact factor according to a change rate corresponding to each webpage loading impact factor includes:

[0023] For each webpage loading influence factor, if it is determined that the change rate corresponding to the webpage loading influence factor is less than the first change rate and not greater than the second change rate, then the webpage loading influence factor is used as a candidate influence factor, wherein the first change rate is greater than the second change rate;

[0024] Sort the change rates corresponding to the candidate influencing factors in descending order to obtain a sorting result;

[0025] For each candidate influencing factor, if it is determined that the change rate corresponding to the candidate influencing factor is located at a set ranking in the sorting result, the candidate influencing factor is selected as the target influencing factor.

[0026] Optionally, the method further comprises:

[0027] For each webpage loading influence factor, if it is determined that the change rate corresponding to the webpage loading influence factor is less than the second change rate, the webpage loading influence factor is not selected as the target influence factor.

[0028] This specification provides a web page optimization device, including:

[0029] A state parameter determination module, used to obtain, for each web page, state parameters involved when each user accesses the web page within the determined first time interval and second time interval, wherein the state parameters are used to characterize the loading status of the web page;

[0030] a characterization value determination module, for determining, for each webpage loading influence factor corresponding to the state parameter, a first characterization value corresponding to the webpage loading influence factor in the first time interval according to the state parameter, and determining, according to the state parameter, a second characterization value corresponding to the webpage loading influence factor in the second time interval, wherein the first characterization value is used to reflect the loading characteristics of the webpage in the first time interval under the webpage loading influence factor, and the second characterization value is used to reflect the loading characteristics of the webpage in the second time interval under the webpage loading influence factor;

[0031] a change rate determination module, configured to determine a change rate of the webpage loading influence factor from the first time interval to the second time interval according to the first characterization value and the second characterization value, wherein the change rate is used to characterize a degree of change of the webpage loading influence factor;

[0032] The target impact factor determination module is used to select a target impact factor from the web page loading impact factors according to the change rate corresponding to each web page loading impact factor, and optimize and adjust the web page according to the optimization strategy corresponding to the target impact factor.

[0033] This specification provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned web page optimization method is implemented.

[0034] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned web page optimization method when executing the program.

[0035] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:

[0036] In the web page optimization method provided in the present specification, for each web page, the state parameters involved when each user visits the web page within a first time interval and a second time interval are obtained, and a first characterization value corresponding to each web page loading influence factor in the first time interval and a second characterization value corresponding to the second time interval are determined. Subsequently, based on the first characterization value and the second characterization value, the change rate of the web page loading influence factor from the first time interval to the second time interval is determined. Then, based on the change rate corresponding to each web page loading influence factor, a target influence factor is selected from each web page loading influence factor, and the web page is optimized and adjusted according to the optimization strategy corresponding to the target influence factor.

[0037] It can be seen from the above method that since the present specification can automatically analyze the web page loading status and subsequent web page loading influencing factors according to the actual situation when each user visits the web page, it can not only effectively improve the accuracy of web page analysis, but also greatly improve the analysis efficiency of web page loading status. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:

[0039] Figure 1 A schematic diagram of a method for optimizing a web page in this specification;

[0040] Figure 2 A schematic diagram of a method for determining a target impact factor provided in this specification;

[0041] Figure 3A schematic diagram of a webpage optimization device provided in this specification;

[0042] Figure 4 The corresponding Figure 1 Schematic diagram of electronic equipment. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

[0044] In actual applications, application developers can provide business services to users through Web applications. After the Web application is released, the application developer will continue to develop new functions and provide services to customers by updating the Web application. In the meantime, with the iterative update of the Web application, the web page loading status of the Web application may also change. When the web page loading status of the Web application deteriorates due to the application update, it will lead to a worse user experience. Therefore, in order to provide better services to users, after the Web application is released, it is necessary to continuously monitor the web page loading status of the Web application, and when it is determined that there is a large change in the loading status of the web page, analyze the web page, determine the cause of the change in the loading status of the web page, and then take targeted measures to optimize the web page based on the determined cause.

[0045] Currently, there are two ways to detect the loading status of a web page. One is to install a web page loading status analysis tool (such as Lighthouse) on a special test machine, and then run the web page loading status analysis tool while accessing the web page on the test machine to obtain a series of loading status indicator data corresponding to the web page during this visit. In this method, the loading status indicator data obtained is only the loading status indicator data corresponding to the web page accessed by the test machine this time, which cannot accurately reflect the actual access status of most users when accessing the web page. The other is to collect relevant data when different users access the web page in different time periods and different regions. Based on the relevant data, technicians can more clearly see whether the loading status of the web page has changed.

[0046] However, after determining that the webpage loading status has changed through the above two methods, in order to further determine the cause of the change in the webpage loading status, professional technicians need to infer the cause of the change in the loading status based on their years of work experience and the specific operations of the historical update and modification of the Web application. Therefore, the current analysis and determination of the cause of the webpage loading problem relies too much on the personal ability of technicians. This analysis method is not only inefficient, but also often has a poor accuracy rate due to its over-reliance on manual experience.

[0047] Based on this, the present specification provides a method for web page optimization, which is used to continuously monitor the loading status of each web page, analyze the changing trend of the loading status of the web page, and when it is determined that the loading status of the web page has changed significantly, automatically analyze and determine the reason for the change in the loading status of the web page based on the collected status parameters involved when the user visits the web page.

[0048] like Figure 1 As shown, this specification provides a method for optimizing a web page, including:

[0049] Step S100: for each web page, obtaining the state parameters involved when each user accesses the web page within the determined first time interval and second time interval.

[0050] The execution subject of the web page optimization method in this specification can be a server, or a terminal device such as a desktop computer, a laptop computer, etc. For the sake of convenience, the following description only uses the execution subject as a server as an example. When a terminal (such as a mobile phone, a tablet computer, etc.) accesses a web page, the server will obtain the state parameters involved when each user accesses each web page. Among them, the state parameters are used to characterize the loading status of the web page, including but not limited to: the time when the user accesses the web page, the data recorded in the access log when the user accesses the web page, the geographical location of the user when accessing the web page (such as longitude and latitude), the number and size of static resources of the web page visited by the user, the number and size of video stream resources of the web page visited by the user, the loading time when the user accesses the web page, etc.

[0051] The time when the user accesses the webpage is used to determine to which time interval the state parameters involved in each user's access to the webpage belong. The data recorded in the access log when the user accesses the webpage may include the loading result of the webpage, from which the loading status of each user when accessing the webpage can be directly and clearly determined.

[0052] The number of static resources of a web page accessed by a user is the total number of static resources corresponding to the web page, and the size of static resources is the total data volume of static resources corresponding to the web page. The static resources of a web page include, but are not limited to, style resources, text resources, image resources, script resources, etc. Furthermore, in addition to the total static resources, the server also monitors the various types of resources that constitute the static resources. For example, the server can monitor the number of image resources of a web page and the size of the image resources of a web page.

[0053] The number of video stream resources of the web page visited by the user is the number of video resources in the web page, and the size of the video stream resources is the data volume of the video resources in the web page. Both static resources and video stream resources are page resources corresponding to the web page. These page resources have a greater impact on the loading status of the web page, so the server needs to obtain these data.

[0054] In addition, for each web page, the server will also perform real-time statistics to determine the maximum number of users who access the web page at the same time within a period of time, that is, the number of concurrent users corresponding to the web page.

[0055] Furthermore, the first time interval and the second time interval are two selected time intervals of a certain length after being published by the client, wherein the length of the first time interval and the length of the second time interval may be the same or different, and the first time interval and the second time interval may not overlap in time.

[0056] In actual scenarios, the loading status of a webpage is most likely to change before and after the client is updated. Therefore, in this specification, the first time interval and the second time interval can be determined based on the client update time as a dividing point.

[0057] Optionally, when determining the first time interval and the second time interval, first determine the update time of the client that loads the webpage, then use a time interval of a first set duration before the update time as the first time interval, and use a time interval of a second set duration after the update time as the second time interval.

[0058] The update time of the client loading the webpage may be the most recent update time from the current time. Further, for a client, it may be determined that the first time interval does not include other update time points of the client.

[0059] In a specific implementation, this manual can make a preliminary judgment on the loading status of a web page before determining the cause of the change in the loading status of the web page. When it is determined that the loading status of the web page has changed significantly (that is, the loading status of the web page may deteriorate), further analysis can be performed to determine the cause of the change in the loading status of the web page.

[0060] Based on this, the server first determines the average loading time of the webpage in the first time interval as the first loading time according to the acquired state parameters, and determines the average loading time of the webpage in the second time interval as the second loading time. If it is determined that the time difference between the first loading time and the second loading time is not less than the set time, then for each webpage loading influence factor, the first characterization value and the second characterization value corresponding to the webpage loading influence factor can be determined according to the above state parameters.

[0061] The loading duration includes, but is not limited to, some or all of the following: Domain Name System (DNS) resolution duration, Transmission Control Protocol (TCP) link duration, Hypertext Transfer Protocol (HTTP) redirection duration, first byte loading duration, duration consumed for all page contents to be completely loaded, etc. For example, when the loading status of a web page is characterized by the first byte loading duration, for each web page, the server determines, based on the first byte loading duration obtained when each user accesses the web page within the first time interval, the average first byte loading duration when each user accesses the web page within the first time interval as the first loading duration, and then determines, based on the first byte loading duration obtained when each user accesses the web page within the second time interval, the average first byte loading duration when each user accesses the web page within the second time interval as the second loading duration.

[0062] In addition, in the present specification, for each web page, the loading time when the same number of users visit the web page can be randomly selected in the first time interval and the second time interval, and then the sum of the loading time when all users selected in the first time interval visit the web page is determined as the first loading time, and the sum of the loading time when all users selected in the second time interval visit the web page is determined as the second loading time. There are many ways to select the same number of users, for example, first divide a day (24 hours) into several time periods, and then select the loading time when the same number of users visit the web page from the pre-selected time period for each time interval. For example, in a specific example, a day is divided into 24 time periods. For a web page, a first byte loading time (a type of loading time) is set for 240 users visiting the web page within a time interval. The server selects the first byte loading time when 10 users visit the web page from the time period of 0:00 to 1:00 for the first time interval and the second time interval, respectively, and then selects the first byte loading time when 10 users visit the web page from the time period of 1:00 to 2:00, and so on. Finally, the server selects the first byte loading time when 10 users visit the web page from the time period of 23:00 to 24:00, and then determines the sum of the first byte loading times when all users selected within the first time interval visit the web page as the first loading time, and the sum of the first byte loading times when all users selected within the second time interval visit the web page as the second loading time.

[0063] Furthermore, in this specification, when monitoring the loading time of a web page, the throughput and concurrent number of users corresponding to the web page can also be monitored. If it is determined that the actual throughput monitored is not less than the set throughput, and / or the actual concurrent number of users monitored is not less than the set concurrent number of users, then it is determined that the current web page loading status is mainly constrained by the performance of the system hardware. At this time, it is difficult to obtain the expected optimization effect by optimizing the web page loading status through software programs, so it is not necessary to further analyze the factors affecting the loading of each web page. If it is determined that the actual throughput monitored is less than the set throughput, and / or the actual concurrent number of users monitored is less than the set concurrent number of users, then it is determined that the loading time of the web page can be used as a measure of the web page loading status (the shorter the web page loading time, the better the web page loading status).

[0064] After determining the first loading duration corresponding to the first time interval and the second loading duration corresponding to the second time interval, the two can be compared. When the difference between the first loading duration and the second loading duration is greater than the set duration, it is determined that the loading status of the web page has changed significantly, and it is necessary to further analyze the reasons for the loading status changes based on the loading influencing factors of each web page.

[0065] It should be noted that, since the loading status of a web page is characterized by the loading duration of the web page in this specification, for each web page, when judging whether the loading status of the web page in the second time interval has changed compared to the loading status in the first time interval in this specification, it can be first judged whether the second loading duration is less than the first loading duration. Since the purpose of the technical solution provided in this specification is to optimize the loading status of a web page, if it is determined that the second loading duration is less than the first loading duration, it is determined that the loading status of the web page in the second time interval is better than the loading status in the first time interval, and the user can have a better user experience in the second time interval, so the reason for the change in the web page loading status can no longer be analyzed. If it is determined that the second loading duration is greater than the first loading duration, and the time difference between the first loading duration and the second loading duration is greater than the set duration, then at this time, the loading status of the web page in the second time interval is worse than the loading status in the first time interval, and it is very likely that a poor user experience will occur.

[0066] Step S102, for each web page loading influence factor corresponding to the state parameter, determine the first characterization value corresponding to the web page loading influence factor in the first time interval according to the state parameter, and determine the second characterization value corresponding to the web page loading influence factor in the second time interval according to the state parameter.

[0067] In this specification, the webpage loading influencing factor represents the influencing factors that can cause the webpage loading status to change. The webpage loading influencing factor includes but is not limited to: the region where the user is located, the number of concurrent users of the webpage, the number and size of static resources of the webpage, the number and size of image resources of the webpage, the number and size of style resources of the webpage, the number and size of text resources of the webpage, the number and size of script resources of the webpage, the number and size of video stream resources of the webpage, etc.

[0068] In this specification, the first characterization value corresponding to the web page loading influence factor in the first time interval is used to reflect the loading characteristics of the web page in the first time interval under the web page loading influence factor. The second characterization value corresponding to the web page loading influence factor in the second time interval is used to reflect the loading characteristics of the web page in the second time interval under the web page loading influence factor. Among them, the loading characteristics of the web page in each time interval can be used to reflect the inherent properties of the web page or the loading status of the web page when the web page is loaded in the time interval. For example, if the web page loading influence factor is the static resource size of the web page, the first characterization value is used to characterize the amount of static resource data required for the web page to load in the first time interval.

[0069] In this specification, for different web page load impact factors, the corresponding first characterization value and second characterization value are determined in different ways. For example, in the case where the web page load impact factor is the number of concurrent users of the web page, when determining the characterization value corresponding to the number of concurrent users of the web page in each time interval, the server counts the number of users who access the web page in real time online, and uses the maximum number of users who access the web page in real time online in the first time interval as the first characterization value, and the maximum number of users who access the web page in real time online in the second time interval as the second characterization value.

[0070] For the case where the web page loading influencing factor is the number of static resources of the web page, when determining the characterization value corresponding to the number of static resources of the web page in each time interval, the server determines the number of static resources contained in the web page loaded in the first time interval as the first characterization value, and the number of static resources contained in the web page loaded in the second time interval as the second characterization value.

[0071] In addition, the size of static resources of a web page, the number and size of image resources of a web page, the number and size of style resources of a web page, the number and size of text resources of a web page, the number and size of script resources of a web page, the number and size of video stream resources of a web page, etc. are all based on the content of the web page. For the above-mentioned web page loading influencing factors, the corresponding first characterization value and the method of determining the second characterization value are basically the same as when the web page loading influencing factor is the number of static resources in the web page resources, so they will not be elaborated one by one.

[0072] For the case where the web page loading influencing factor is the region where the user is located, when determining the characterization value corresponding to the region where the user is located in each time interval, the server determines the region where each user is located based on the geographical location fed back by each user when accessing the web page. For a region, the server can use the number of users who accessed the web page in the region in the first time interval as the first characterization value corresponding to the time interval, and the number of users who accessed the web page in the region in the second time interval as the second characterization value corresponding to the time interval. For example, the server determines that the number of users who accessed the web page in region A in the first time interval is 150 (i.e., the first characterization value corresponding to the first time interval), and determines that the number of users who accessed the web page in region A in the second time interval is 130 (i.e., the second characterization value corresponding to the second time interval).

[0073] Of course, when determining the characterization value corresponding to the region where the user is located in each time interval, for one region, the server may use the ratio of the number of users who access the webpage in the region in the first time interval to the total number of users who access the webpage as the first characterization value corresponding to the time interval, and the ratio of the number of users who access the webpage in the region in the second time interval to the total number of users who access the webpage as the second characterization value corresponding to the time interval. Continuing with the above example, the server determines that the ratio of the number of users who access the webpage in region A in the first time interval to the total number of users who access the webpage is 9% (the first characterization value corresponding to the first time interval), and the ratio of the number of users who access the webpage in region A in the second time interval to the total number of users who access the webpage is 8% (the second characterization value corresponding to the second time interval).

[0074] In this manual, there are many ways to divide regions, such as by province, by city, or by the service scope of the server, which is not limited in this manual.

[0075] Step S104: determining a change rate of the webpage loading influence factor from the first time interval to the second time interval according to the first characterization value and the second characterization value.

[0076] In this specification, for each webpage loading influence factor, the change rate of the webpage loading influence factor from the first time interval to the second time interval is used to represent the degree of change of the webpage loading influence factor.

[0077] After determining the first characterization value and the second characterization value, first determine the basic change rate between the first characterization value and the second characterization value, and then determine the change rate of the web page loading influence factor from the first time interval to the second time interval based on the basic change rate and the preset weight value corresponding to the web page loading influence factor.

[0078] It should be noted that, for each web page loading influence factor, after determining the basic change rate between the first characterization value and the second characterization value, we can first determine whether the change of the web page loading influence factor has a positive impact (loading time becomes shorter) or a negative impact (loading time becomes longer) on the web page loading status. When it is determined that the change of the web page loading influence factor has a negative impact on the web page loading status, then determine the change rate of the web page loading influence factor from the first time interval to the second time interval.

[0079] The basic change rate between the first characterization value and the second characterization value in this specification can be expressed by the following formula:

[0080] [(A n -B n )÷Bn ]×100%;

[0081] Among them, n represents different factors affecting web page loading, A n The first characterization value corresponding to the first time interval, B n A first characterization value corresponding to the second time interval is characterized.

[0082] After determining the basic change rate through the above formula, the server can directly use the basic change rate as the change rate corresponding to the web page loading influence factor. Of course, after determining the basic change rate, the server can also determine the change rate of the web page loading influence factor from the first time interval to the second time interval based on the basic change rate and the weight value corresponding to the web page loading influence factor.

[0083] For example, if the web page loading influence factor is the number of static resources of the web page, the server will use the number of static resources of the web page within a time interval as the characterization value of the time interval. If it is determined that the first characterization value corresponding to the first time interval is 10, and the second characterization value corresponding to the second time interval is 8, then the basic change rate between the first characterization value and the second characterization value is (10-8) ÷ 8 × 100% = 25%. Furthermore, if the weight value corresponding to the web page loading influence factor of the number of static resources is 5, then the change rate of the web page loading influence factor from the first time interval to the second time interval is 25% × 5 = 125%.

[0084] It should be noted that since the number of static resources of the web page in the second time interval is reduced compared to the first time interval, it can be indicated that the loading condition of the web page is optimized. Therefore, once it is determined that the number of static resources of the web page is reduced in the second time interval compared to the first time interval, it is not necessary to analyze the factors affecting the loading of the web page.

[0085] For another example, if the web page loading influence factor is the image resource size of the web page, the server will use the total data volume of the image resource of the web page within a time interval as the characterization value of the time interval. If it is determined that the first characterization value corresponding to the first time interval is 6M, and the second characterization value corresponding to the second time interval is 5M, then the basic change rate between the first characterization value and the second characterization value is (6-5)÷5×100%=20%. Furthermore, if the weight value corresponding to the web page loading influence factor of the image resource size of the web page is 4, then the change rate of the web page loading influence factor from the first time interval to the second time interval is 20%×4=80%.

[0086] It should be noted that for different web page loading influencing factors, when the second characterization value of some web page loading influencing factors is less than the first characterization value, it indicates that the loading condition of the web page may be optimized, and when the second characterization value of some web page loading influencing factors is greater than the first characterization value, it indicates that the loading condition of the web page may deteriorate.

[0087] For example, if the web page loading influence factor is the region where the user is located, for a certain region, the server will use the total number of users who access the web page in the region within a time interval as the characterization value corresponding to the time interval. If for region A, the server determines that the total number of users who access the web page in region A in the first time interval is 150, and the total number of users who access the web page in region A in the second time interval is 100, then the basic change rate between the first characterization value and the second characterization value is (150-100) ÷ 100 × 100% = 50%. At this time, the total number of users who access the web page in the region in the second time interval is much less than the total number of users who access the web page in the region in the first time interval, that is, there may be users in the region who cannot access the web page and the loading condition of the web page deteriorates. Further, if the weight value corresponding to the web page loading influence factor in the region where the user is located is 2, then the change rate of the web page loading influence factor from the first time interval to the second time interval is 50% × 2 = 100%. The determination method of the corresponding change rate of other web page loading influence factors will not be explained one by one here.

[0088] Step S106 , selecting a target impact factor from the web page loading impact factors according to the change rate corresponding to each web page loading impact factor, and optimizing and adjusting the web page according to the optimization strategy corresponding to the target impact factor.

[0089] In this specification, when determining the optimization and adjustment plan for a web page, a change rate threshold corresponding to the web page loading influence factor can be set based on actual experience, and a target influence factor can be determined based on the change rate threshold and the change rate corresponding to each determined web page loading influence factor, and when optimizing and adjusting the web page, the optimization strategy corresponding to the target influence factor can be adopted to optimize and adjust the web page.

[0090] Optionally, for each webpage loading influence factor, if it is determined that the change rate corresponding to the webpage loading influence factor is not less than the first change rate, the webpage loading influence factor is selected as the target influence factor.

[0091] Among them, in this specification, a corresponding change rate threshold (first change rate) can be set for the change rate corresponding to the web page loading influence factor. When the determined change rate corresponding to the web page loading influence factor is greater than the first change rate, it is determined that the web page loading influence factor is one of the main reasons for the deterioration of the loading condition of the web page, and the web page loading influence factor is determined as the target influence factor, so as to adopt the optimization strategy corresponding to the web page loading influence factor and optimize and adjust the web page.

[0092] Furthermore, in this specification, a second change rate (the second change rate is less than the first change rate) can also be set. For each web page loading influence factor, if it is determined that the change rate corresponding to the web page loading influence factor is less than the second change rate, the web page loading influence factor is not selected as the target influence factor. In other words, when it is determined that the change rate corresponding to the web page loading influence factor is less than the second change rate, it means that it is almost certain that the change of the web page loading influence factor is not the main cause of the loading condition, so the impact of the change of the web page loading influence factor on the loading condition of the web page can be ignored, and the web page loading influence factor is not selected as the target influence factor.

[0093] Furthermore, for each web page loading influence factor, if it is determined that the change rate corresponding to the web page loading influence factor is less than the first change rate and not less than the second change rate, then the web page loading influence factor is used as a candidate influence factor, and the change rates corresponding to the candidate influence factors are sorted in order from large to small to obtain a sorting result. For each candidate influence factor, if it is determined that the change rate corresponding to the candidate influence factor is located at a set ranking in the sorting result, the candidate influence factor is selected as the target influence factor, wherein the second change rate is less than the first change rate.

[0094] For example, Figure 2 As shown, the first change rate preset for the webpage loading influencing factor is R max The second rate of change is R min If the webpage loading factor is the number of static resources, the rate of change of the webpage loading factor from the first time interval to the second time interval is determined to be R. If R ≥ R max When R≤R min , ignoring the web page loading factor. min ≤R <R max , determine the web page loading influencing factor as a candidate influencing factor, and treat the candidate influencing factor as a recommended improvement item.

[0095] In the above steps, by setting the first change rate, the second change rate and the change rates corresponding to the determined web page loading influencing factors, the target influencing factor that causes a large change in the web page loading condition is determined, so as to determine the corresponding adjustment strategy based on the target influencing factor, and use the adjustment strategy to optimize the web page.

[0096] For example, since a large amount of data resources are stored on servers in various regions, if the target influencing factor is the region where the user is located, it may be that the servers in the region do not have excess service resources, resulting in poor loading conditions for users in the region when accessing the web page. At this time, the data resources stored on the servers in the region can be transferred to other servers to improve the service performance of the server.

[0097] For another example, if the target influencing factor is the image resource size of a web page, the server can compress each image to reduce the size of each image while ensuring that the user can browse the web page normally, thereby improving the loading efficiency of the terminal when the user accesses the web page.

[0098] In addition to the above-mentioned server optimizing and adjusting the web page according to the adjustment strategy corresponding to the determined target impact factor, in this specification, after the server determines the target impact factor, the corresponding adjustment strategy can be manually determined based on the target impact factor, and the web page can be optimized and adjusted according to the adjustment strategy.

[0099] For example, if the target influencing factor is the number of image resources on a web page, each image can be manually analyzed to delete or compress some image resources on the web page according to actual needs.

[0100] In the above content, for each web page, the server analyzes the loading status of the web page according to the state parameters involved when each user accesses the web page, and after determining that the loading status of the web page has changed, the server determines the cause of the change in the loading status of the web page according to the state parameters involved when each user accesses the web page, and optimizes and adjusts the web page. Since the web page loading status and subsequent web page loading influencing factors can be automatically analyzed according to the actual situation when each user accesses the web page, it can not only effectively improve the accuracy of web page analysis, but also greatly improve the analysis efficiency of web page loading status.

[0101] The above is a webpage optimization method provided by one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding webpage optimization device, such as Figure 3 shown.

[0102] Figure 3 A webpage optimization device provided in this specification includes:

[0103] The state parameter determination module 300 is used to obtain, for each web page, the state parameters involved when each user accesses the web page within the determined first time interval and second time interval, wherein the state parameters are used to characterize the loading status of the web page;

[0104] The characterization value determination module 301 is used to determine, for each webpage loading influence factor corresponding to the state parameter, a first characterization value corresponding to the webpage loading influence factor in the first time interval according to the state parameter, and to determine, according to the state parameter, a second characterization value corresponding to the webpage loading influence factor in the second time interval, wherein the first characterization value is used to reflect the loading characteristics of the webpage in the first time interval under the webpage loading influence factor, and the second characterization value is used to reflect the loading characteristics of the webpage in the second time interval under the webpage loading influence factor;

[0105] A change rate determination module 302, configured to determine a change rate of the webpage loading influence factor from the first time interval to the second time interval based on the first characterization value and the second characterization value, wherein the change rate is used to characterize a degree of change of the webpage loading influence factor;

[0106] The target impact factor determination module 303 is used to select a target impact factor from the web page loading impact factors according to the change rate corresponding to each web page loading impact factor, and optimize and adjust the web page according to the optimization strategy corresponding to the target impact factor.

[0107] Optionally, the state parameter determination module 300 is also used to determine the update time of the client that loads the web page when determining the first time interval and the second time interval; using the time interval of a first set time length before the update time as the first time interval, and using the time interval of a second set time length after the update time as the second time interval.

[0108] Optionally, the characterization value determination module 301 is also used to determine, for each web page loading influence factor corresponding to the state parameter, the first characterization value corresponding to the web page loading influence factor in the first time interval according to the state parameter, and before determining, according to the state parameter, the second characterization value corresponding to the web page loading influence factor in the second time interval, the average loading time of the web page in the first time interval according to the state parameter as the first loading time, and the average loading time of the web page in the second time interval as the second loading time; if it is determined that the time difference between the first loading time and the second loading time is not less than the set time, for each web page loading influence factor, determine the first characterization value and the second characterization value corresponding to the web page loading influence factor according to the state parameter.

[0109] Optionally, the change rate determination module 302 is specifically used to determine the basic change rate between the first characterization value and the second characterization value; based on the basic change rate and the preset weight value corresponding to the web page loading impact factor, determine the change rate of the web page loading impact factor from the first time interval to the second time interval.

[0110] Optionally, the target impact factor determination module 303 is specifically configured to select, for each webpage loading impact factor, the webpage loading impact factor as the target impact factor if it is determined that the change rate corresponding to the webpage loading impact factor is not less than the first change rate.

[0111] Optionally, the target impact factor determination module 303 is specifically used to, for each web page loading impact factor, if it is determined that the change rate corresponding to the web page loading impact factor is less than the first change rate and not greater than the second change rate, then the web page loading impact factor is used as a candidate impact factor, wherein the first change rate is greater than the second change rate; the change rates corresponding to the candidate impact factors are sorted in order from large to small to obtain a sorting result; for each candidate impact factor, if it is determined that the change rate corresponding to the candidate impact factor is located at a set ranking in the sorting result, the candidate impact factor is selected as the target impact factor.

[0112] Optionally, the target impact factor determination module 303 is further configured to, for each web page loading impact factor, not select the web page loading impact factor as the target impact factor if it is determined that the change rate corresponding to the web page loading impact factor is less than the second change rate.

[0113] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 Provides methods for web page optimization.

[0114] This manual also provides Figure 4 The schematic structure diagram of the electronic device shown in FIG. Figure 4 As mentioned above, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 Of course, in addition to the software implementation, this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0115] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0116] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0117] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0118] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0119] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0120] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0121] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0122] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0123] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0124] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0125] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0126] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0127] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0128] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0129] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0130] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.

Claims

1. A method for optimizing a web page, characterized in that: include: For each web page, obtaining state parameters involved when each user accesses the web page within the determined first time interval and second time interval, wherein the state parameters are used to characterize a loading status of the web page; For each webpage loading influence factor corresponding to the state parameter, determine, according to the state parameter, a first characterization value corresponding to the webpage loading influence factor in the first time interval, and determine, according to the state parameter, a second characterization value corresponding to the webpage loading influence factor in the second time interval, wherein the first characterization value is used to reflect the loading characteristics of the webpage in the first time interval under the webpage loading influence factor, and the second characterization value is used to reflect the loading characteristics of the webpage in the second time interval under the webpage loading influence factor; Determine, based on the first characterization value and the second characterization value, a change rate of the webpage loading influence factor from the first time interval to the second time interval, wherein the change rate is used to characterize a degree of change of the webpage loading influence factor; According to the change rate corresponding to each web page load impact factor, a target impact factor is selected from the web page load impact factors, and the web page is optimized and adjusted according to the optimization strategy corresponding to the target impact factor; The determining the first time interval and the second time interval comprises: Determine the update time of the client loading the web page; A time interval of a first set duration before the update time is used as the first time interval, and a time interval of a second set duration after the update time is used as the second time interval.

2. The method according to claim 1, characterized in that The method further includes: determining, for each webpage loading influence factor corresponding to the state parameter, a first characterization value corresponding to the webpage loading influence factor at the first time interval according to the state parameter, and determining, according to the state parameter, before a second characterization value corresponding to the webpage loading influence factor at the second time interval. Determine, according to the state parameter, an average loading duration of the webpage in the first time interval as a first loading duration, and determine an average loading duration of the webpage in the second time interval as a second loading duration; If it is determined that the time difference between the first loading time and the second loading time is not less than the set time, for each web page loading influence factor, the first characterization value and the second characterization value corresponding to the web page loading influence factor are determined according to the state parameter.

3. The method according to claim 1, characterized in that The determining, according to the first characterization value and the second characterization value, a change rate of the webpage loading influence factor from the first time interval to the second time interval includes: determining a base rate of change between the first characterizing value and the second characterizing value; The change rate of the webpage loading influence factor from the first time interval to the second time interval is determined according to the basic change rate and a preset weight value corresponding to the webpage loading influence factor.

4. The method according to claim 1, characterized in that The selecting a target impact factor from each webpage loading impact factor according to the change rate corresponding to each webpage loading impact factor includes: For each webpage loading influence factor, if it is determined that the change rate corresponding to the webpage loading influence factor is not less than the first change rate, the webpage loading influence factor is selected as the target influence factor.

5. The method according to claim 4, characterized in that The selecting a target impact factor from each webpage loading impact factor according to the change rate corresponding to each webpage loading impact factor includes: For each webpage loading influence factor, if it is determined that the change rate corresponding to the webpage loading influence factor is less than the first change rate and not greater than the second change rate, then the webpage loading influence factor is used as a candidate influence factor, wherein the first change rate is greater than the second change rate; Sort the change rates corresponding to the candidate influencing factors in descending order to obtain a sorting result; For each candidate influencing factor, if it is determined that the change rate corresponding to the candidate influencing factor is located at a set ranking in the sorting result, the candidate influencing factor is selected as the target influencing factor.

6. The method according to claim 5, characterized in that The method further comprises: For each webpage loading influence factor, if it is determined that the change rate corresponding to the webpage loading influence factor is less than the second change rate, the webpage loading influence factor is not selected as the target influence factor.

7. A web page optimization device, characterized in that: include: A state parameter determination module, used to obtain, for each web page, state parameters involved when each user accesses the web page within the determined first time interval and second time interval, wherein the state parameters are used to characterize the loading status of the web page; The determining of the first time interval and the second time interval includes: determining an update time of a client loading the webpage; taking a time interval of a first set time length before the update time as the first time interval, and taking a time interval of a second set time length after the update time as the second time interval; a characterization value determination module, for determining, for each webpage loading influence factor corresponding to the state parameter, a first characterization value corresponding to the webpage loading influence factor in the first time interval according to the state parameter, and determining, according to the state parameter, a second characterization value corresponding to the webpage loading influence factor in the second time interval, wherein the first characterization value is used to reflect the loading characteristics of the webpage in the first time interval under the webpage loading influence factor, and the second characterization value is used to reflect the loading characteristics of the webpage in the second time interval under the webpage loading influence factor; a change rate determination module, configured to determine a change rate of the webpage loading influence factor from the first time interval to the second time interval according to the first characterization value and the second characterization value, wherein the change rate is used to characterize a degree of change of the webpage loading influence factor; The target impact factor determination module is used to select a target impact factor from the web page loading impact factors according to the change rate corresponding to each web page loading impact factor, and optimize and adjust the web page according to the optimization strategy corresponding to the target impact factor.

8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 6 is implemented.