CN109885408A - Lightweight browsers method for optimizing resources based on android system - Google Patents

Lightweight browsers method for optimizing resources based on android system Download PDF

Info

Publication number
CN109885408A
CN109885408A CN201910191759.5A CN201910191759A CN109885408A CN 109885408 A CN109885408 A CN 109885408A CN 201910191759 A CN201910191759 A CN 201910191759A CN 109885408 A CN109885408 A CN 109885408A
Authority
CN
China
Prior art keywords
path
kernel
resources
resource
content
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910191759.5A
Other languages
Chinese (zh)
Other versions
CN109885408B (en
Inventor
曾祥阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN201910191759.5A priority Critical patent/CN109885408B/en
Publication of CN109885408A publication Critical patent/CN109885408A/en
Application granted granted Critical
Publication of CN109885408B publication Critical patent/CN109885408B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of method for optimizing resources of lightweight browsers based on android system, are optimized by the access mode to kernel resources, reduce time and kernel resources the space occupied of lightweight browsers load kernel resources.

Description

Lightweight browsers method for optimizing resources based on android system
Technical field
The present invention relates to browser technology field more particularly to a kind of lightweight browsers based on android system Method for optimizing resources.
Background technique
Currently, popularizing with Android intelligent television, the application performance and user experience of Android TV Ask also higher and higher, as first application entered after android system starting, the property of Android desktop management application The quality of energy is even more to directly affect the experience of whole system.
Android television table facial canal manages application developer to solve the above-mentioned problems, is opened using the browser of lightweight Power generation view desktop management application.The resource of common lightweight browsers needs more space and time to be accessed.Nowadays TV applications are more and more, under the more and more abundant background of function, in the case where not influencing function, reduce the money of all applications Source occupies, and has decisive role for improving Android TV performance.So the resource to lightweight browsers optimizes It is the most important thing of Android TV performance optimization.
Existing issue is that the resource of common lightweight browsers needs more space and time to be accessed, this is because Using general resource access mode.General resource access mode is that all resources are first written, the rear resource for reading write-in, The operation of write-in resource just consumes more space and time.
In order to provide the user with better user experience, in order to make light weight browser faster run and account on Android With less space, the present invention optimizes kernel resources using the access mode for changing kernel resources.
Summary of the invention
For above-mentioned problems, the invention proposes a kind of moneys of lightweight browsers based on android system Source optimization method and method are optimized by the access mode to kernel resources, reduce lightweight browsers load kernel money The time in source and kernel resources the space occupied.
In the present invention, the core component of browser is browser kernel, and browser kernel is exactly that browser is used Rendering engine.Browser rendering engine is also become into browser kernel, referred to as kernel in the present invention.Kernel is responsible for webpage Grammer explain and show webpage.
Resource, resource involved in the present invention is kernel resources, and kernel resources are to show net after kernel explains webpage grammer Text in the resource that page content will use, such as display webpage can use font resource.
Lightweight browsers refer to the browser that a small amount of resource is occupied when operation, the kernel operation of the primary browser of Android The more resource of Shi Zhanyong.The kernel that lightweight browsers in the present invention use compared with the kernel of the primary browser of Android, Occupy less system resource.
The kernel resources of lightweight browsers are usually to pass through write-in storage into android system.Kernel explains webpage The resource that calling is written in android system when webpage is shown afterwards.
The present invention through the following technical solutions to achieve the above objectives:
A kind of method for optimizing resources of the lightweight browsers based on android system, comprising the following steps:
Step s1 defines the corresponding system path SYSTEM_PATH of kernel resources and write paths in kernel CONTENT_PATH;
Step s2 starts desktop management application, browser kernel initialization;
Step s3, step s2 start the initialization of browser kernel during carrying out, according to defined in step s1 SYSTEM_PATH sweeps correspondence and retouches system path, and s4 is entered step if having system resource, does not enter step s6;
Step s4, according to the scanning result of step s3, judge target resource whether all with, have, enter step s5, it is no Then enter step s6;
Resource in step s5, SYSTEM_PATH is as corresponding kernel resources, and at this moment kernel resources complete storage;
Step s6, catalogue CONTENT_PATH is written in establishing resource, and kernel resources are written;
Required kernel resources are stored in step s7, CONTENT_PATH, at this moment kernel resources complete storage;
Step s8, catalogue CONTENT_PATH is written in establishing resource, and the kernel resources lacked are written, at this time part kernel Resource is stored in SYSTEM_PATH and CONTENT_PATH;
Step s9, kernel resources storage terminate, and kernel starts the reading to kernel resources;
Whether step s10, scanning in SYSTEM_PATH has target resource, has, enters step s12, does not enter step then Rapid s11;
Step s11 is scanned and is read the target resource in CONTENT_PATH;
Step s12, kernel renders webpage using kernel resources, final to show desktop management application.
Further embodiment is, in step s1, defines font resource path are as follows: "/system/fonts ", it can also be according to being The specific path definition of resource in system, multiple resources correspond to multiple paths.
Further embodiment is, in step s1, modification kernel first reads system path resource, does not find and just reads write-in road Diameter CONTENT_PATH.
The beneficial effects of the present invention are:
The method for optimizing resources of a kind of lightweight browsers based on android system of the invention, by being provided to kernel The access mode in source optimizes, and reduces time and kernel resources the space occupied of lightweight browsers load kernel resources; It include: kernel resources of the system resource of 1, android system storage as lightweight browsers;2, lightweight browsers exist When Android system is run, first scanning system resource path;3, lightweight browsers are when Android system is run, system money Target resource file is arrived in scanning under source path, then corresponding resource is not written to system disk;And changes lightweight browsers and exist To the reading of kernel resources on Android system, comprising: when 1, reading kernel resources, first scan corresponding system resource path; 2, system resource path scanning is then directly read to target, and system resource does not scan under path, then scans write-in resource path It is read out;3, kernel is scanned under system path to target resource, using the system resource of reading as kernel resources, to the page It is rendered.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art In required practical attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only the one of the present embodiment A little embodiments for those of ordinary skill in the art without creative efforts, can also be according to these Attached drawing obtains other attached drawings.
The access flow chart of kernel resources when Fig. 1 is the lightweight browsers starting of the prior art;
Fig. 2 is the flow chart of present invention method.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, technical solution of the present invention will be carried out below Detailed description.Obviously, the described embodiment is only a part of the embodiment of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art without making creative work it is obtained it is all its Its embodiment belongs to the range that the present invention is protected.
The access flow chart of kernel resources when Fig. 1 is the lightweight browsers starting of the prior art;It is in dotted line frame wherein Process is read, it is main time-consuming and consumption resource part that outer frame, which is Stored Procedure, and the module of font-weight carries out write operation;
Fig. 2 is the flow chart of present invention method, for describing the resource access process after optimizing;It is in dotted line frame Process is read, outer frame is Stored Procedure;S6 and s8 step is time-consuming and consumption resource operation, when the system resource as kernel resources In the presence of, these operations are not executed.
In a specific embodiment, as shown in Fig. 2, a kind of lightweight browsing based on android system of the invention The method for optimizing resources of device, comprising the following steps:
Step s1 defines the corresponding system path SYSTEM_PATH of kernel resources and write paths in kernel CONTENT_PATH;
Step s2 starts desktop management application, browser kernel initialization;
Step s3, step s2 start the initialization of browser kernel during carrying out, according to defined in step s1 SYSTEM_PATH sweeps correspondence and retouches system path, and s4 is entered step if having system resource, does not enter step s6;
Step s4, according to the scanning result of step s3, judge target resource whether all with, have, enter step s5, it is no Then enter step s6;
Resource in step s5, SYSTEM_PATH is as corresponding kernel resources, and at this moment kernel resources complete storage;
Step s6, catalogue CONTENT_PATH is written in establishing resource, and kernel resources are written;
Required kernel resources are stored in step s7, CONTENT_PATH, at this moment kernel resources complete storage;
Step s8, catalogue CONTENT_PATH is written in establishing resource, and the kernel resources lacked are written, at this time part kernel Resource is stored in SYSTEM_PATH and CONTENT_PATH;
Step s9, kernel resources storage terminate, and kernel starts the reading to kernel resources;
Whether step s10, scanning in SYSTEM_PATH has target resource, has, enters step s12, does not enter step then Rapid s11;
Step s11 is scanned and is read the target resource in CONTENT_PATH;
Step s12, kernel renders webpage using kernel resources, final to show desktop management application.
In the present embodiment, in step s1, font resource path is defined are as follows: "/system/fonts ", it can also be according in system The specific path definition of resource, multiple resources correspond to multiple paths.
In the present embodiment, in step s1, modification kernel first reads system path resource, does not find just reading write paths CONTENT_PATH。
First aspect present invention changes kernel resources storage of the lightweight browsers on Android system, comprising:
1, kernel resources of the system resource of android system storage as lightweight browsers;
2, lightweight browsers are when Android system is run, first scanning system resource path;
3, for lightweight browsers when Android system is run, target resource file is arrived in scanning under system resource path, then Corresponding resource is not written to system disk;
Second aspect of the present invention changes lightweight browsers on Android system to the reading of kernel resources, comprising:
1, when reading kernel resources, corresponding system resource path is first scanned;
2, system resource path scanning is then directly read to target, and system resource does not scan under path, then scans write-in Resource path is read out;
3, kernel is scanned under system path to target resource, using the system resource of reading as kernel resources, to the page It is rendered.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims. It is further to note that specific technical features described in the above specific embodiments, in reconcilable situation Under, it can be combined in any appropriate way, in order to avoid unnecessary repetition, the present invention is to various possible combinations No further explanation will be given for mode.In addition, various embodiments of the present invention can be combined randomly, as long as its Without prejudice to thought of the invention, it should also be regarded as the disclosure of the present invention.

Claims (3)

1. a kind of method for optimizing resources of the lightweight browsers based on android system, which is characterized in that including following step It is rapid:
Step s1 defines kernel resources corresponding system path SYSTEM_PATH and write paths CONTENT_ in kernel PATH;
Step s2 starts desktop management application, browser kernel initialization;
Step s3, step s2 start the initialization of browser kernel during carrying out, according to SYSTEM_ defined in step s1 PATH sweeps correspondence and retouches system path, and s4 is entered step if having system resource, does not enter step s6;
Step s4, according to the scanning result of step s3, judge target resource whether all with, have, enter step s5, otherwise into Enter step s6;
Resource in step s5, SYSTEM_PATH is as corresponding kernel resources, and at this moment kernel resources complete storage;
Step s6, catalogue CONTENT_PATH is written in establishing resource, and kernel resources are written;
Required kernel resources are stored in step s7, CONTENT_PATH, at this moment kernel resources complete storage;
Step s8, catalogue CONTENT_PATH is written in establishing resource, and the kernel resources lacked are written, at this time part kernel resources It is stored in SYSTEM_PATH and CONTENT_PATH;
Step s9, kernel resources storage terminate, and kernel starts the reading to kernel resources;
Whether step s10, scanning in SYSTEM_PATH has target resource, has, enters step s12, do not enter step then s11;
Step s11 is scanned and is read the target resource in CONTENT_PATH;
Step s12, kernel renders webpage using kernel resources, final to show desktop management application.
2. a kind of method for optimizing resources of the lightweight browsers based on android system as described in claim 1, feature It is, in step s1, defines font resource path are as follows: "/system/fonts ", it can also be according to the specific path of resource in system Definition, multiple resources correspond to multiple paths.
3. a kind of method for optimizing resources of the lightweight browsers based on android system as described in claim 1, feature It is, in step s1, modification kernel first reads system path resource, does not find just reading write paths CONTENT_PATH.
CN201910191759.5A 2019-03-13 2019-03-13 Lightweight browser resource optimization method based on Android system Active CN109885408B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910191759.5A CN109885408B (en) 2019-03-13 2019-03-13 Lightweight browser resource optimization method based on Android system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910191759.5A CN109885408B (en) 2019-03-13 2019-03-13 Lightweight browser resource optimization method based on Android system

Publications (2)

Publication Number Publication Date
CN109885408A true CN109885408A (en) 2019-06-14
CN109885408B CN109885408B (en) 2022-05-03

Family

ID=66932186

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910191759.5A Active CN109885408B (en) 2019-03-13 2019-03-13 Lightweight browser resource optimization method based on Android system

Country Status (1)

Country Link
CN (1) CN109885408B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101447937A (en) * 2009-02-27 2009-06-03 北京理工大学 Rapid data positioning method based on path division and multi-distributed-directory
US20130036102A1 (en) * 2011-08-02 2013-02-07 Rajan Goyal Incremental update
US8402018B2 (en) * 2010-02-12 2013-03-19 Korea Advanced Institute Of Science And Technology Semantic search system using semantic ranking scheme
CN103902696A (en) * 2014-03-28 2014-07-02 广州华多网络科技有限公司 Method and device for loading resource files
CN104657193A (en) * 2013-11-21 2015-05-27 华为技术有限公司 Method and device for accessing to physical resources
CN105511864A (en) * 2015-11-30 2016-04-20 青岛海信移动通信技术股份有限公司 Resource positioning method and device
CN105549993A (en) * 2015-12-09 2016-05-04 Tcl集团股份有限公司 Android system resource switching method and system
CN107436810A (en) * 2017-07-03 2017-12-05 北京东土科技股份有限公司 A kind of resource for computer system dispatching method and device
CN108182090A (en) * 2016-12-08 2018-06-19 腾讯科技(深圳)有限公司 Flash plug-in loading methods and device based on blink kernels
CN108549556A (en) * 2018-04-16 2018-09-18 腾讯科技(深圳)有限公司 A kind of application program accelerated method, device, terminal and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101447937A (en) * 2009-02-27 2009-06-03 北京理工大学 Rapid data positioning method based on path division and multi-distributed-directory
US8402018B2 (en) * 2010-02-12 2013-03-19 Korea Advanced Institute Of Science And Technology Semantic search system using semantic ranking scheme
US20130036102A1 (en) * 2011-08-02 2013-02-07 Rajan Goyal Incremental update
CN104657193A (en) * 2013-11-21 2015-05-27 华为技术有限公司 Method and device for accessing to physical resources
CN103902696A (en) * 2014-03-28 2014-07-02 广州华多网络科技有限公司 Method and device for loading resource files
CN105511864A (en) * 2015-11-30 2016-04-20 青岛海信移动通信技术股份有限公司 Resource positioning method and device
CN105549993A (en) * 2015-12-09 2016-05-04 Tcl集团股份有限公司 Android system resource switching method and system
CN108182090A (en) * 2016-12-08 2018-06-19 腾讯科技(深圳)有限公司 Flash plug-in loading methods and device based on blink kernels
CN107436810A (en) * 2017-07-03 2017-12-05 北京东土科技股份有限公司 A kind of resource for computer system dispatching method and device
CN108549556A (en) * 2018-04-16 2018-09-18 腾讯科技(深圳)有限公司 A kind of application program accelerated method, device, terminal and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
SMILE_XXX: ""Python+Selenium基础篇-打开和关闭火狐浏览器"", 《HTTPS://WWW.CNBLOGS.COM/BABY0511/P/7873880.HTML》 *
段虎才: ""WebKit内核的嵌入式浏览器磁盘缓存方法"", 《计算机工程与设计.2015》 *
涂云山: ""面向新硬件的数据处理软件技术"", 《华东师范大学学报(自然科学版).2018》 *

Also Published As

Publication number Publication date
CN109885408B (en) 2022-05-03

Similar Documents

Publication Publication Date Title
US8941663B2 (en) Method and device for rendering user interface font
CN111639289A (en) Webpage loading method and device
CN103605502B (en) Form page display method and server
CN104462312A (en) Web page displaying method and browser client side
CN104951326A (en) Web access method and device
CN103699674A (en) Webpage storing method, webpage opening method, webpage storing device, webpage opening device and webpage browsing system
CN103440127A (en) Software graphical interface drawing method and system
CN106095437A (en) The implementation method of the layout type of user interface RTL from right to left and device
CN109783442A (en) A kind of IFC model storage mode based on Redis and Mongodb
CN107436786A (en) Using starting guide method, apparatus and computer-readable recording medium
CN105528389A (en) A logic control method and device based on mobile phone browser core
CN113703893B (en) Page rendering method, device, terminal and storage medium
CN110618850A (en) UI (user interface) loading method and system and related device
CN106709025A (en) Method and device for updating aggregation objects
CN104915186A (en) Method and device for making page
CN103631777A (en) Method and system for browsing image
CN106201155A (en) Method for displaying user interface and system
CN111880813A (en) Method and storage medium for realizing UI (user interface) of android card
CN109885408A (en) Lightweight browsers method for optimizing resources based on android system
CN106488298A (en) A kind of method and device of image rendering in UI and TV
CN112559172A (en) Method, system, equipment and storage medium for optimizing memory of web browser
CN109543127B (en) Page refreshing method, device and equipment and readable storage medium
JP2008176777A (en) Web document style change system and its method
US9158749B2 (en) Smart form completion of form values
CN106776360B (en) A kind of chip and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant