Power consumption optimization method for web browsing in mobile browsers
By using self-organizing map (SOM) networks to cluster webpage features and optimize CPU frequency, the problem of power consumption and performance imbalance during webpage loading and interaction in mobile browsers is solved, achieving power consumption optimization and improved user experience.
Patent Information
- Application Number
- CN202310577183.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-22
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2043-05-22
AI Technical Summary
There are issues of wasted power consumption and performance imbalance in the page loading and interaction phases of mobile browsers. Existing technologies have failed to effectively combine the workload for fine-grained adjustment, which affects user experience and battery life.
A self-organizing map (SOM) network is used to cluster web page features. A page frame rate threshold is set, and the optimal frequency for each type of page is found by traversing the set of CPU frequencies to balance power consumption and performance. This includes page feature extraction, SOM network training, and page frame rate optimization.
It effectively optimizes the power consumption of web browsing on mobile browsers, balances performance and power consumption, reduces unnecessary hardware resource consumption, and improves user experience.
Smart Images

Figure CN116595275B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mobile browser technology, and in particular to a method for optimizing power consumption during web browsing in a mobile browser. Background Technology
[0002] Mobile browsers are among the most popular applications on smartphones, yet page loading performance doesn't match their importance. Compared to desktop browsers, mobile browsers load pages an order of magnitude slower. Currently, mobile browsers face two major but contradictory challenges: performance and power consumption. Page loading performance impacts the user's Quality of Service (QoS) and financials; Amazon estimates it loses approximately $1.6 billion in sales annually due to page lag and other issues, as mobile users may abandon the service entirely if a page doesn't load. Simultaneously, solely pursuing performance is not scalable due to the inherent limitations of mobile devices' battery capacity without external power.
[0003] Mobile browsers, as mainstream apps on the Android system, rely on Android's performance-power-consumption optimizations for their optimization. Currently, Android devices primarily employ two power management technologies: DVFS (Dynamic Voltage and Frequency Scaling) and EAS (Energy Aware Scheduling). DVFS uses a few fixed values to adjust voltage and frequency, while EAS combines CGroup technology to group specific threads and adjust CPU frequency by modifying kernel parameters. Neither of these technologies finely adjusts energy consumption based on the application's current workload. Therefore, there is still room for optimization in the runtime power consumption of mobile browsers and other applications.
[0004] Mobile browser operation can be divided into a webpage loading phase and a post-loading user interaction phase. Once the page loads, the mobile browser runs as a general-purpose application receiving user input and performing functions corresponding to that input. At this point, most tasks have already been completed during the webpage loading phase, and the mobile browser process performs relatively light interactive tasks, such as scrolling the page, touching the screen, and text input. However, the system processes these simple interactive tasks at high speed, keeping the processor running at an unnecessarily high frequency, leading to a waste of hardware resources. Currently, some existing optimization solutions attempt to reduce power consumption during webpage interaction by lowering the processor frequency or dropping some interactive events; however, these solutions negatively impact the user's quality of service. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a power consumption optimization method for web browsing in a mobile browser. The method of the present invention can effectively optimize the power consumption of web browsing in a mobile browser and balance the performance and power consumption of the mobile browser.
[0006] The technical solution adopted by this invention to solve the above-mentioned technical problems is: a power consumption optimization method for web browsing in a mobile browser, comprising the following steps:
[0007] S01, extract page features from the webpage;
[0008] S02, using the SOM network to cluster web pages based on the current page features to obtain multiple page pools, with multiple pages in each page pool;
[0009] S03, for the multiple page pools formed in step S02, set a page frame rate threshold, find the optimal frequency of each page pool in the interaction stage and assign the optimal frequency to the page. The optimal frequency corresponding to each page pool is the optimal frequency of a certain page. The optimal frequency of the page is: on the basis of satisfying that the page frame rate is greater than the page frame rate threshold, find the minimum power consumption value of the page as the minimum power consumption value, and the CPU frequency corresponding to the minimum power consumption value is the optimal frequency of the page.
[0010] Preferably, for the hardware configuration of the current mobile browser, there is a set of CPU frequencies. The set of CPU frequencies includes multiple CPU frequencies. In a certain type of page pool, each page traverses the set of CPU frequencies when it receives an external trigger, and obtains the corresponding page frame rate of each page under each CPU frequency. If all page frame rates of the page are less than the page frame rate threshold, the page is returned and steps S01, S02 to S03 are repeated with other returned pages.
[0011] The preferred method for obtaining the optimal frequency of a particular page is as follows:
[0012] For the hardware configuration of the current mobile browser, there is a set of CPU frequencies. This set of CPU frequencies includes multiple CPU frequencies. In a certain type of page pool, when each page receives an external trigger, it traverses the set of CPU frequencies to obtain the corresponding power consumption values and page frame rates for each CPU frequency. The power consumption values and corresponding page frame rates at each CPU frequency form an array. The array is sorted in ascending order of power consumption values. On the premise that the page frame rate is greater than the page frame rate threshold, the power consumption value with the smallest value is found as the minimum power consumption value. The CPU frequency corresponding to the minimum power consumption value is the optimal frequency for that page.
[0013] Preferably, all individual pages in each type of page pool have the same optimal frequency. If the optimal frequency of a certain page is different from that of other pages, then the page is returned to the other returned pages and steps S01, S02 to S03 are repeated.
[0014] Preferably, in step S01, in order to collect feature values, the feature extractor obtains a reference to each DOM element by traversing the DOM tree, uses the API interface to collect information, and traverses the DOM tree to calculate the style of each element on the page when the page loads.
[0015] Preferably, the extracted features are available before webpage interaction.
[0016] Preferably, in step S01, the extracted features include, but are not limited to, the following features: node depth in the DOM tree; number of lines of code within the script tag; total number of canvas tags; total number of input tags; total number of audio tags; and total number of video tags.
[0017] Preferably, in step S02, the SOM network learns multiple times to make the weight vector and the input vector more consistent.
[0018] Preferably, in step S02, the training process of the SOM network is as follows:
[0019] S201: Randomly initialize the weights between input layer neurons and output layer neurons;
[0020] S202: The features extracted in step S01 are used as the input vector X of the SOM network;
[0021] S203: Traverse each neuron in the output layer and calculate the Euclidean distance d between the input vector X and the output vector.
[0022]
[0023] Select the neuron with the smallest distance as the winning neuron j”;
[0024] S204: Update the weights between the winning neuron j” and its neighboring neurons:
[0025]
[0026] w j It is the weight of the j-th neuron node that needs to be updated within the winning domain, r k It is the learning rate in the kth round, g ij It is the update constraint for the j-th neural node within the winning domain corresponding to the i-th sample, x i W represents the features of the i-th randomly selected page. ijis the weight between the i-th neuron and the j-th neuron, f is the number of features, and m is the page clustering result.
[0027] S205: After completing one iteration, increment the iteration count by 1 and return to S202, continuing until the set number of iterations is met.
[0028] The beneficial effects of this invention are: the method of this invention effectively optimizes the power consumption of web browsing in mobile browsers and balances the performance and power consumption of mobile browsers. Attached Figure Description
[0029] Figure 1 This is a framework diagram of the power consumption optimization method for web browsing in a mobile browser according to the present invention;
[0030] Figure 2 This is a flowchart of the training process of the SOM network of the present invention;
[0031] Figure 3 This is a flowchart of the marking algorithm of the present invention;
[0032] Figure 4 This is the SOM network clustering result of an embodiment of the present invention;
[0033] Figure 5 This is a comparison chart of power consumption when using the default Android schedutil strategy on a mobile browser versus when using this method. Detailed Implementation
[0034] The present application will now be described in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and not intended to limit it. It should be noted that, unless otherwise specified, the embodiments and features described herein can be arbitrarily combined with each other. Furthermore, it should be noted that, for ease of description, only the parts relevant to the present application are shown in the accompanying drawings, not all of them.
[0035] Figure 1 This is a framework diagram of a power consumption optimization method for web browsing in a mobile browser according to the present invention. The power consumption optimization method for web browsing in a mobile browser includes the following steps:
[0036] S01, extract page features from the webpage;
[0037] S02, using the SOM network to cluster web pages based on the current page features to obtain multiple page pools, with multiple pages in each page pool;
[0038] S03, for the multiple page pools formed in step S02, set a page frame rate threshold (FPS). max ,
[0039] Find the optimal frequency for each page pool type during the interaction phase and assign this optimal frequency to the page. The optimal frequency corresponding to each page pool type is the optimal frequency for a specific page. The optimal frequency for this page is defined as: when the page frame rate is greater than the page frame rate threshold (FPS). max Based on this, the minimum power consumption value of the page is found as the minimum power consumption value, and the CPU frequency corresponding to the minimum power consumption value is the optimal frequency of the page.
[0040] As an optional implementation in this embodiment, in step S01, in order to collect feature values, the feature extractor obtains a reference to each DOM element by traversing the DOM tree, uses the API interface to collect information, and traverses the DOM tree to calculate the style of each element on the page when the page is loaded.
[0041] As an optional implementation in this embodiment, the extracted features in step S01 are available before webpage interaction. As an optional implementation in this embodiment, feature extraction in step S01 may refer to the following standard: feature extraction does not affect the browser's operation.
[0042] As an optional implementation in this embodiment, in step S01, 90 web pages are randomly selected, and the extracted features based on the page content include, but are not limited to, the following features: node depth in the DOM tree; number of lines of code within the script tag; total number of canvas tags; total number of input tags; total number of audio tags; and total number of video tags.
[0043] As an optional implementation method in this embodiment, such as Figure 2 As shown, the training process of the SOM network in step S02 is as follows:
[0044] S201: Randomly initialize the weights between input layer neurons and output layer neurons; the parameters of the SOM network include n neurons in the input layer, m neurons in the output layer, and the weight vector W = [w... 11 ,w 12, w 13 ,...w ij ,w nm ], where n is the number of features extracted in step S01, m is the page classification result, and W ij Let be the weight between the i-th neuron and the j-th neuron;
[0045] S202: The features extracted in step S01 are used as the input vector X of the SOM network.
[0046] X = [DOM node depth, number of lines of code within script tags, number of canvas tags]
[0047] [Number of input tags, number of audio tags, number of video tags] T ;
[0048] S203: Traverse each neuron in the output layer and calculate the Euclidean distance d between the input vector X and the output vector.
[0049]
[0050] Select the neuron with the smallest distance as the winning neuron j”;
[0051] S204: Update the weights between the winning neuron j” and its neighboring neurons:
[0052]
[0053] w j It is the weight of the j-th neuron node that needs to be updated within the winning domain, r k It is the learning rate in the kth round, g ij It is the update constraint for the j-th neural node within the winning domain corresponding to the i-th sample, x i W represents the features of the i-th randomly selected page. ij is the weight between the i-th neuron and the j-th neuron, f is the number of features, and m is the page clustering result.
[0054] S205: After completing one iteration, increment the iteration count by 1 and return to S202, continuing until the set number of iterations is met.
[0055] like Figure 4 The image shows the SOM network clustering results of this embodiment. Figure 4 The clustering results show that the 90 web pages are divided into 10 categories. The number in each hexagon is the number of pages contained in that category's page pool. For example, one category of page pool has 22 pages and another category of page pool has 3 pages. Step S03 is performed for each category of page pool.
[0056] As an optional implementation in this embodiment, the hardware configuration for opening the current mobile browser includes a CPU frequency set C. This CPU frequency set C includes multiple CPU frequencies, which are represented by {1, 2, 3...c}. For example, the CPU frequency set C includes frequency c and frequencies corresponding to other numbers. In this embodiment, the SOM network clustering result is 10 classes. For each page in each class's page pool, a labeling algorithm is used to find the optimal frequency for that page. The specific process of the labeling algorithm is described in [reference needed]. Figure 3 In this embodiment, the page frame rate threshold (FPS) maxSet to 60 FPS to meet the refresh rate acceptable to the human eye and satisfy the user's Quality of Service (QoS).
[0057] Perform step S301 for each type of page pool:
[0058] S301: Select n pages (i∈m) from the i-th page pool. When each page receives an external trigger, iterate through the CPU frequency set C and obtain the corresponding page frame rate for each CPU frequency. If the frame rate of all pages of the page is less than the page frame rate threshold FPS... max If this happens, the page will be returned to the previous page, and steps S01, S02, and S03 will be repeated. The page will be marked as C. max and the C max The frequency is assigned to this page, C max This represents the maximum CPU frequency.
[0059] If the frame rate of a certain page on this page is greater than the page frame rate threshold (FPS) max Then proceed to step S302 to find the optimal frequency for that page. Find the page frame rate threshold (FPS) for each type of page pool. max The CPU frequency corresponding to the minimum power consumption under certain conditions is taken as the optimal frequency, so as to achieve a balance between power consumption and user service quality.
[0060] S302: In a certain type of page pool, each page, upon receiving an external trigger, iterates through the CPU frequency set C to obtain the corresponding power consumption values and page frame rates for each CPU frequency. The power consumption values at each CPU frequency and the corresponding page frame rates form an array, which is then sorted in ascending order by power consumption value. This array is used when the page frame rate is greater than the page frame rate threshold (FPS). max Based on this, the minimum power consumption value is identified as the lowest power consumption value. The CPU frequency corresponding to this minimum power consumption value is then considered the optimal frequency for that page. For example, finding the frequency 'c', the page frame rate 'c' at that frequency is... fps Greater than the page frame rate threshold (FPS) max And the power consumption c at this frequency c p For all pages whose frame rate is greater than the page frame rate threshold (FPS) max Based on the minimum power consumption value found, the frequency c corresponding to the minimum power consumption value is the optimal frequency of the page. The page is marked as c and the c frequency is assigned to the page.
[0061] Because the pages in each page pool are similar after clustering through the SOM network, the workload generated by the pages is relatively small, so the optimal frequency of all individual pages in each page pool is the same. If the optimal frequency of a page is different from that of other pages, then that page is returned to the other returned pages and steps S01, S02 to S03 are repeated.
[0062] Figure 5 A comparison chart of power consumption using Android's default schedutil strategy and the proposed method for mobile browser webpages is presented. It can be seen that the power consumption using the proposed method is consistently lower than that using the schedutil strategy. The method of this invention effectively optimizes the power consumption of webpage browsing on mobile browsers and balances the performance and power consumption of mobile browsers. This method is suitable not only for optimizing the webpage interaction stage of the browser, but also for optimizing the entire browser runtime stage and discrete optimizations.
[0063] The above description is a further detailed explanation of the present invention in conjunction with specific preferred embodiments and comparative experiments. It should not be considered that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, several simple deductions or substitutions can be made without departing from the concept of the present invention, and all such deductions or substitutions should be considered to fall within the protection scope of the present invention.
Claims
1. A method for optimizing power consumption during web browsing in a mobile browser, characterized in that: Includes the following steps: S01, extract page features from the webpage; S02, using the SOM network to cluster web pages based on the current page features to obtain multiple page pools, with multiple pages in each page pool; S03, for the multiple page pools formed in step S02, set a page frame rate threshold, find the best frequency of each page pool in the interaction stage and assign the best frequency to the page. The best frequency corresponding to each page pool is the best frequency of a certain page. The best frequency of the page is: on the basis of satisfying that the page frame rate is greater than the page frame rate threshold, find the minimum power consumption value of the page as the minimum power consumption value, and the CPU frequency corresponding to the minimum power consumption value is the best frequency of the page. The optimal frequency for a given page can be determined as follows: For the hardware configuration of the current mobile browser, there is a set of CPU frequencies. This set of CPU frequencies includes multiple CPU frequencies. In a certain type of page pool, when each page receives an external trigger, it traverses the set of CPU frequencies to obtain the corresponding power consumption values and page frame rates for each CPU frequency. The power consumption values and corresponding page frame rates at each CPU frequency form an array. The array is sorted in ascending order of power consumption values. On the premise that the page frame rate is greater than the page frame rate threshold, the power consumption value with the smallest value is found as the minimum power consumption value. The CPU frequency corresponding to the minimum power consumption value is the optimal frequency for that page.
2. The power consumption optimization method for web browsing in a mobile browser according to claim 1, characterized in that: For the hardware configuration of the current mobile browser, there is a set of CPU frequencies. This set of CPU frequencies includes multiple CPU frequencies. In a certain type of page pool, each page traverses the set of CPU frequencies when it receives an external trigger, and obtains the corresponding page frame rate of each page under each CPU frequency. If all page frame rates of the page are less than the page frame rate threshold, then the page is returned and steps S01, S02 to S03 are repeated with other returned pages.
3. The power consumption optimization method for web browsing in a mobile browser according to claim 1, characterized in that: The optimal frequency of all individual pages in each page pool is the same. If the optimal frequency of a certain page is different from that of other pages, then the page is returned to the other returned pages and steps S01, S02 to S03 are repeated.
4. The power consumption optimization method for web browsing in a mobile browser according to claim 1, characterized in that: In step S01, in order to collect feature values, the feature extractor obtains a reference to each DOM element by traversing the DOM tree and uses the API interface to collect information. When the page loads, the DOM tree is traversed to calculate the style of each element on the page.
5. The power consumption optimization method for web browsing in a mobile browser according to claim 1, characterized in that: The extracted features are available before webpage interaction.
6. The power consumption optimization method for web browsing in a mobile browser according to claim 1, characterized in that: In step S01, the extracted features include, but are not limited to, the following features: The node depth in the DOM tree; the number of lines of code within a script tag; the total number of canvas tags; the total number of input tags; the total number of audio tags; and the total number of video tags.
7. The power consumption optimization method for web browsing in a mobile browser according to claim 1, characterized in that: In step S02, the SOM network learns multiple times to make the weight vector and the input vector more consistent.
8. The power consumption optimization method for web browsing in a mobile browser according to claim 1, characterized in that: In step S02, the training process of the SOM network is as follows: S201: Randomly initialize the weights between input layer neurons and output layer neurons; S202: The features extracted in step S01 are used as the input vector X of the SOM network; S203: Traverse each neuron in the output layer and calculate the Euclidean distance d between the input vector X and the output vector. ; The neuron with the smallest distance was selected as the winning neuron. ; S204: Update the winning neuron Weights between it and its neighboring neurons: ; This is the first area in the winning field that needs updating. The weights of each neuron node It is the first Learning rate of the round, It is the first Within the winning field corresponding to the sample, the first Update constraints for each neural node For the randomly selected number Page features, It is the first The first neuron and the second The weights between neurons, f is the number of features, and m is the page clustering result; S205: After completing one iteration, increment the iteration count by 1 and return to S202, continuing until the set number of iterations is met.
Citation Information
Patent Citations
Mobile Web service-oriented CPU resource adaptive scheduling system and method
CN108415770A
Estimation of power consumption of individual websites
IN201847014199A