CN108804108A - It is a kind of based on the weak H5 page parsing methods wrapped offline - Google Patents

It is a kind of based on the weak H5 page parsing methods wrapped offline Download PDF

Info

Publication number
CN108804108A
CN108804108A CN201810523932.2A CN201810523932A CN108804108A CN 108804108 A CN108804108 A CN 108804108A CN 201810523932 A CN201810523932 A CN 201810523932A CN 108804108 A CN108804108 A CN 108804108A
Authority
CN
China
Prior art keywords
offline
packet
weak
wrapped
pages
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.)
Pending
Application number
CN201810523932.2A
Other languages
Chinese (zh)
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.)
Beijing Kuwo Technology Co Ltd
Original Assignee
Beijing Kuwo Technology 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 Beijing Kuwo Technology Co Ltd filed Critical Beijing Kuwo Technology Co Ltd
Priority to CN201810523932.2A priority Critical patent/CN108804108A/en
Publication of CN108804108A publication Critical patent/CN108804108A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The present invention relates to a kind of based on the weak H5 page parsing methods wrapped offline, includes the following steps:Generate offline packet and corresponding configuration file, offline packet is preset in server, it is set as only needing the when of using that must just download in the H5 pages, weak offline packet is constituted, APP checks configuration file when the H5 pages need to use, it is determined whether there are weak offline packets, if there is, weak offline packet is then downloaded to client local, when the corresponding H5 pages are wrapped in APP access offline, directly from the weak offline Packet analyzing H5 pages that finish of download.The present invention preferentially updates the H5 pages frequently used, ensures newer promptness and reliability, and update is convenient, fast, takes into account update efficiency and saves flow, promotes user experience, development efficiency and later maintenance are promoted.

Description

It is a kind of based on the weak H5 page parsing methods wrapped offline
Technical field
It is specifically a kind of based on the weak H5 pages wrapped offline the present invention relates to Native and H5 mixed developing technical fields Analytic method.
Background technology
Present APP is much Native and H5 mixed developings, and main realization thought is:The page is done with H5, with JS For bridge, call Native methods, Native to load the H5 pages with WebView, control the H5 pages, be achieved H5 with The interaction of Native.The advantage of doing so is that each end only needs a set of page, maintenance cost is low, and H5 can be repaiied at will Change, APP, which does not have to upgrading, to be updated, and curve realizes " heat update ".But in performance, no pure Native is good certainly, And it is also good not as Native in experience.
H5 is the abbreviation of html5.The newest revision versions of HTML are a kind of hypertext markup language.H5 elder generations calling system Browser kernel, be the equal of being operated in webpage, it is slightly worse compared with Native stability, speed is slower.Advantage is can With cross-platform, while exploitation is easy, efficient, facilitates debugging.
Native uses native system kernel, is equivalent to and is directly operated in system, more stablizes, quickly, can use Extremely more API, therefore the function that developed is preferable.
In general, Native and H5 mixed developings use following scheme:
Important module is Native exploitations, ensure that the fluency of APP and relatively good user experience;
It is required that the module to timely update is H5 exploitations, and the page of such as competing, the advertising campaign page, because being out with the H5 benefits developed The hair period is short, can be with online updating.
Since the parsing of the H5 pages, access need network support, in the case of no network, corresponding network request is not The response that can obtain server in time, will influence user experience, test when being also unfavorable for developing to APP.
Invention content
In view of the deficiencies in the prior art, the purpose of the present invention is to provide a kind of based on the weak H5 pages wrapped offline Analytic method preferentially updates the H5 pages frequently used, ensures newer promptness and reliability, update is convenient, fast, simultaneous Gu Gengxin efficiency and saving flow, promote user experience, development efficiency and later maintenance are promoted.
To achieve the above objectives, the technical solution adopted by the present invention is that:
It is a kind of based on the weak H5 page parsing methods wrapped offline, which is characterized in that include the following steps:
Offline packet is generated, the offline packet uses zip format compressions, wherein including a H5 page or one group associated H5 pages Face,
Offline packet is preset in server, is set as only needing the when of using that must just download in the H5 pages, constitutes weak offline packet,
Configuration file is generated, the configuration file passes through version number's unique mark by wrapping each offline packet of ID unique marks offline The version information wrapped offline identifies the weak offline packet of unique mark by force download,
Configuration file is preset in server,
After APP installation kits are installed to client, when the H5 pages need to use, APP checks configuration file, it is determined whether there are weak Offline packet,
It is asked if it is present being sent to server, weak offline packet is downloaded to client local,
When the corresponding H5 pages are wrapped in APP access offline, directly from the weak offline Packet analyzing H5 pages that finish of download.
Based on the above technical solution, the offline packet wherein at least includes:
HTML code, CSS codes, JS codes and static images.
Based on the above technical solution, the weak offline packet includes the mould that displaying probability is less than 50% after APP starts Block, the module include the H5 pages.
Based on the above technical solution, the client is portable mobile equipment or virtual portable mobile equipment.
Based on the above technical solution, further include in offline packet:
Two level is wrapped offline, and with corresponding same or same group of associated H5 page of offline packet, the version that two level is wrapped offline is less than The version wrapped offline.
Based on the above technical solution, packet is the offline packet of a upper version to two level offline, and offline packet is latest edition This offline packet.
Based on the above technical solution, packet is the offline packet of a upper steady operation version, offline packet to two level offline For the offline packet of newest beta version.
Based on the above technical solution, packet is the offline packet of the version of acquiescence to two level offline, and offline packet is latest edition This offline packet.
Based on the above technical solution, when being wrapped offline comprising two level, as downloaded the weak offline Packet analyzing H5 finished The page fails, it tries wraps the further parsing H5 pages offline from two level.
Based on the above technical solution, it when being wrapped offline comprising two level, breaks down as APP starts, it tries from Packet further parses the H5 pages to two level offline.
It is of the present invention that the H5 pages frequently used are preferentially updated based on the weak H5 page parsing methods wrapped offline, Ensure newer promptness and reliability, update is convenient, fast, takes into account update efficiency and saves flow, promotes user experience, open Hair efficiency and later maintenance are promoted.It has the following advantages:
1, update in time, efficiently, saves flow;
2, client loading velocity is fast;
3, user experience is relatively good;
4, DNS can be avoided to kidnap to a certain extent.
Description of the drawings
The present invention has following attached drawing:
The flow chart of Fig. 1 present invention.
Specific implementation mode
Below in conjunction with attached drawing, invention is further described in detail.
As shown in Figure 1, it is of the present invention based on the weak H5 page parsing methods wrapped offline, include the following steps:
Offline packet is generated, the offline packet uses zip format compressions, wherein including a H5 page or one group associated H5 pages Face,
Offline packet is preset in server, is set as only needing the when of using that must just download in the H5 pages, constitutes weak offline packet,
Configuration file is generated, the configuration file passes through version number's unique mark by wrapping each offline packet of ID unique marks offline The version information wrapped offline, identifying the weak offline packet of unique mark by force download further can be unique by failure indication Whether the offline packet of mark enables,
Configuration file is preset in server,
After APP installation kits are installed to client, when the H5 pages need to use, APP checks configuration file, it is determined whether there are weak Offline packet,
It is asked if it is present being sent to server, weak offline packet is downloaded to client local,
When the corresponding H5 pages are wrapped in APP access offline, directly from the weak offline Packet analyzing H5 pages that finish of download.
If weak offline packet failed download, or parsing mistake, can attempt the address from line and access.
Further, after the use of the H5 pages, a delay time is preset, the H5 pages are made again within delay time With, then delay time recalculate, if beyond delay time the H5 pages be not used by, delete weak offline packet.
The weak target wrapped offline is:In order to save phone memory and flow design, be for some visit capacities not The big page, such as the user feedback page.What this page most users will not access, so, this offline packet is only worked as After user accessed once, can just it download.
Based on the above technical solution, the offline packet wherein at least includes:
HTML code, CSS codes, JS codes and static images.
Further, further include in offline packet:
Two level is wrapped offline, and with corresponding same or same group of associated H5 page of offline packet, the version that two level is wrapped offline is less than The version wrapped offline.Further include that a two level is wrapped offline in i.e. weak offline packet, so as to reasonable selection as needed.
Such as:
Packet is the offline packet of a upper version to two level offline, and offline packet is the offline packet of latest edition.
Again for example:
Packet is the offline packet of a upper steady operation version to two level offline, and offline packet is the offline packet of newest beta version.
In another example:
Packet is the offline packet of the version of acquiescence to two level offline, and offline packet is the offline packet of latest edition.
The version of the acquiescence can be:
Give tacit consent to the offline packet of the version of one or a set of predetermined server,
Give tacit consent to the offline packet of last edition steady operation version.
The information that two level is wrapped offline is also stored in configuration file.Two level mark unique mark two level can be used to wrap offline.
When being wrapped offline comprising two level, as downloaded the weak offline Packet analyzing H5 pages failure finished, it tries from two level from Line packet further parses the H5 pages.
Further, it when being wrapped offline comprising two level, breaks down as APP starts, it tries wrapped offline into one from two level The step parsing H5 pages.
Based on the above technical solution, the weak offline packet includes the mould that displaying probability is less than 50% after APP starts Block, the module include the H5 pages.
Show that probability calculation is:Within the unit interval, the sum of certain modules exhibit/enliven APP sums * 100%.It lifts A example, an APP have 100,000 users, the total number of users 10,000 that one day yesterday started, this 10,000 users to have 5000 access The module that this offline packet is realized is arrived, then this displaying probability wrapped offline is exactly 5000/10000*100%=50%.
Based on the above technical solution, the client is portable mobile equipment or virtual portable mobile equipment.
The portable mobile equipment espespecially mobile phone.
The content not being described in detail in this specification belongs to the prior art well known to professional and technical personnel in the field.

Claims (10)

1. a kind of based on the weak H5 page parsing methods wrapped offline, which is characterized in that include the following steps:
Offline packet is generated, the offline packet uses zip format compressions, wherein including a H5 page or one group associated H5 pages Face,
Offline packet is preset in server, is set as only needing the when of using that must just download in the H5 pages, constitutes weak offline packet,
Configuration file is generated, the configuration file passes through version number's unique mark by wrapping each offline packet of ID unique marks offline The version information wrapped offline identifies the weak offline packet of unique mark by force download,
Configuration file is preset in server,
After APP installation kits are installed to client, when the H5 pages need to use, APP checks configuration file, it is determined whether there are weak Offline packet,
It is asked if it is present being sent to server, weak offline packet is downloaded to client local,
When the corresponding H5 pages are wrapped in APP access offline, directly from the weak offline Packet analyzing H5 pages that finish of download.
2. as described in claim 1 based on the weak H5 page parsing methods wrapped offline, it is characterised in that:The offline packet, In include at least:
HTML code, CSS codes, JS codes and static images.
3. as described in claim 1 based on the weak H5 page parsing methods wrapped offline, it is characterised in that:In the weak offline packet Displaying probability is less than 50% module after starting including APP, and the module includes the H5 pages.
4. as described in claim 1 based on the weak H5 page parsing methods wrapped offline, it is characterised in that:The client is just Take mobile device or virtual portable mobile equipment.
5. as claimed in claim 2 based on the weak H5 page parsing methods wrapped offline, it is characterised in that:It is also wrapped in offline packet It includes:
Two level is wrapped offline, and with corresponding same or same group of associated H5 page of offline packet, the version that two level is wrapped offline is less than The version wrapped offline.
6. as claimed in claim 5 based on the weak H5 page parsing methods wrapped offline, it is characterised in that:Packet is upper to two level offline The offline packet of one version, offline packet are the offline packet of latest edition.
7. as claimed in claim 5 based on the weak H5 page parsing methods wrapped offline, it is characterised in that:Packet is upper to two level offline The offline packet of one steady operation version, offline packet are the offline packet of newest beta version.
8. as claimed in claim 5 based on the weak H5 page parsing methods wrapped offline, it is characterised in that:Packet is silent to two level offline The offline packet for the version recognized, offline packet are the offline packet of latest edition.
9. as claimed in claim 5 based on the weak H5 page parsing methods wrapped offline, it is characterised in that:When offline comprising two level Bao Shi, as downloaded the weak offline Packet analyzing H5 pages failure finished, it tries wrap the further parsing H5 pages offline from two level.
10. as claimed in claim 5 based on the weak H5 page parsing methods wrapped offline, it is characterised in that:When comprising two level from It when line packet, breaks down as APP starts, it tries wrap the further parsing H5 pages offline from two level.
CN201810523932.2A 2018-05-28 2018-05-28 It is a kind of based on the weak H5 page parsing methods wrapped offline Pending CN108804108A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810523932.2A CN108804108A (en) 2018-05-28 2018-05-28 It is a kind of based on the weak H5 page parsing methods wrapped offline

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810523932.2A CN108804108A (en) 2018-05-28 2018-05-28 It is a kind of based on the weak H5 page parsing methods wrapped offline

Publications (1)

Publication Number Publication Date
CN108804108A true CN108804108A (en) 2018-11-13

Family

ID=64090555

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810523932.2A Pending CN108804108A (en) 2018-05-28 2018-05-28 It is a kind of based on the weak H5 page parsing methods wrapped offline

Country Status (1)

Country Link
CN (1) CN108804108A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113873013A (en) * 2018-12-25 2021-12-31 创新先进技术有限公司 Offline packet reassembly method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102779128A (en) * 2011-05-10 2012-11-14 北京磊友信息科技有限公司 Method and device for offline running of HTML5 (hypertext markup language 5) application program in mobile terminal
CN107423394A (en) * 2017-07-25 2017-12-01 北京小米移动软件有限公司 Page display method and device
CN108008971A (en) * 2017-12-04 2018-05-08 科大国创软件股份有限公司 A kind of offline compressed package based on HTML5 downloads the method for realizing mobile APP module upgrades

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102779128A (en) * 2011-05-10 2012-11-14 北京磊友信息科技有限公司 Method and device for offline running of HTML5 (hypertext markup language 5) application program in mobile terminal
CN107423394A (en) * 2017-07-25 2017-12-01 北京小米移动软件有限公司 Page display method and device
CN108008971A (en) * 2017-12-04 2018-05-08 科大国创软件股份有限公司 A kind of offline compressed package based on HTML5 downloads the method for realizing mobile APP module upgrades

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113873013A (en) * 2018-12-25 2021-12-31 创新先进技术有限公司 Offline packet reassembly method and system
CN113873013B (en) * 2018-12-25 2023-06-16 创新先进技术有限公司 Offline package reorganization method and system

Similar Documents

Publication Publication Date Title
RU2604326C2 (en) Webpage browsing method, webapp framework, method and device for executing javascript and mobile terminal
RU2673403C2 (en) Website access method, device and website system
US10713034B2 (en) Updating web resources
EP2916243B1 (en) Method, apparatus, server and system for implementing web application
CN100535900C (en) Method and system for rendering asynchronous portal page
US20150301873A1 (en) Method and system for expanding webapp application function
US6964051B1 (en) Enabling and disabling remote features dynamically in software applications
US9781262B2 (en) Methods and apparatus for voice-enabling a web application
US20130024759A1 (en) Shared Script Files in Multi-Tab Browser
CN108717359A (en) A kind of update method based on the APP modules wrapped offline
CN104375808B (en) interface display method and device
US9400633B2 (en) Methods and apparatus for voiced-enabling a web application
CN107704615B (en) Webpage font display method and system based on Chinese font subset
CN108733388A (en) A kind of H5 page parsing methods wrapped offline based on Native
US9292252B2 (en) Methods and apparatus for voiced-enabling a web application
CN112799663A (en) Page display method and device, computer readable storage medium and electronic equipment
CN105808282A (en) Method and device for updating webpage contents of application program
CN108762807A (en) It is a kind of based on the H5 page parsing methods wrapped offline by force
CN108804108A (en) It is a kind of based on the weak H5 page parsing methods wrapped offline
CN105005596B (en) page display method and device
CN108228139B (en) Singlechip development system and device based on HTML5 browser frame
CN111625250B (en) Application updating method and device, storage medium and electronic equipment
CN103139298B (en) Method for transmitting network data and device
WO2014019467A1 (en) A web browser operation method and system
CN102681848A (en) Method, device, terminal and system for developing and accessing web page by Widget method

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