CN109800367A - Webpage loading method, device, computer equipment and storage medium - Google Patents

Webpage loading method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN109800367A
CN109800367A CN201811527348.0A CN201811527348A CN109800367A CN 109800367 A CN109800367 A CN 109800367A CN 201811527348 A CN201811527348 A CN 201811527348A CN 109800367 A CN109800367 A CN 109800367A
Authority
CN
China
Prior art keywords
webpage
local
web page
load request
mapping
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
CN201811527348.0A
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811527348.0A priority Critical patent/CN109800367A/en
Publication of CN109800367A publication Critical patent/CN109800367A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention discloses a kind of webpage loading method, device, computer equipment and storage mediums.The present invention relates to development fields, are particularly applicable in the HTML5 page in UI design.The described method includes: if detecting, webpage control initiates webpage load request, is intercepted by Web page-container to webpage load request;Judge webpage load request with the presence or absence of local page File Mapping according to the mapping table of pre-configuration;If webpage load request there are local page File Mapping, judges in local with the presence or absence of corresponding web page files;If there are corresponding web page files in local, corresponding web page files are obtained from local be back to webpage control and loaded;If local page File Mapping is not present in webpage load request, corresponding web page files are obtained from server be back to webpage control and loaded.Method by implementing the embodiment of the present invention can make dynamic page load saving resource space from network, not need frequently to dispose offline resources packet saving human resources.

Description

Webpage loading method, device, computer equipment and storage medium
Technical field
The present invention relates to Internet technical field more particularly to a kind of webpage loading method, device, computer equipment and deposit Storage media.
Background technique
As science and technology and expanding economy, people more pursue the recreation of high-quality after the leisure that works, give pleasure to Happy feature-rich smart phone enters in daily life and becomes indispensable one in people's daily life Part.User usually uses Hybrid application using smart phone browsing webpage to browse webpage.Current Hybrid application The mode for opening webpage be usually HTML5 resource, that is, web page files is packaged it is locally downloading, then loaded from local again from The line HTML5 page opens webpage.But it will lead to HTML5 resource packet failed download in network signal difference to open Webpage, and for Quick thread again quick offline dynamic page, the page that different users is seen is different , in order to which user can open such dynamic page, developer is not only needed frequently to dispose HTML5 resource packet in the development phase, But also need for HTML5 resource packet to be packaged locally downloading, occupancy resource, waste memory space.
Summary of the invention
The embodiment of the invention provides a kind of webpage loading method, device, computer equipment and storage mediums, it is intended to solve Dynamic page needs frequently the problem of deployment offline resources packet, waste local resource.
In a first aspect, the embodiment of the invention provides a kind of webpage loading methods comprising: if detecting, webpage control is sent out Webpage load request is played, the webpage load request is intercepted by Web page-container;Judged according to the mapping table of pre-configuration The webpage load request whether there is local page File Mapping;If there are local page files to reflect for the webpage load request It penetrates, judges in local with the presence or absence of corresponding web page files;If obtaining phase from local there are corresponding web page files in local The web page files answered are back to the webpage control and are loaded;If the webpage load request is reflected there is no local page file It penetrates, corresponding web page files are obtained from server is back to the webpage control and loaded.
Second aspect, the embodiment of the invention also provides a kind of webpage loading devices comprising: interception unit, if for It detects that webpage control initiates webpage load request, the webpage load request is intercepted by Web page-container;First sentences Disconnected unit judges the webpage load request with the presence or absence of local page File Mapping for the mapping table according to pre-configuration;The Two judging units, if judging in local for the webpage load request there are local page File Mapping with the presence or absence of corresponding Web page files;Local loading unit, if obtaining corresponding webpage from local for there are corresponding web page files in local File is back to the webpage control and is loaded;First network loading unit, if being not present for the webpage load request Local page File Mapping, corresponding web page files is obtained from server is back to the webpage control and loaded.
The third aspect, the embodiment of the invention also provides a kind of computer equipments comprising memory and processor, it is described Computer program is stored on memory, the processor realizes the above method when executing the computer program.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage medium, the storage medium storage There is computer program, the computer program can realize the above method when being executed by a processor.
The embodiment of the invention provides a kind of webpage loading method, device, computer equipment and storage mediums.Wherein, institute If the method for stating include: detect webpage control initiate webpage load request, by Web page-container to the webpage load request into Row intercepts;Judge the webpage load request with the presence or absence of local page File Mapping according to the mapping table of pre-configuration;If described Webpage load request judges in local there are local page File Mapping with the presence or absence of corresponding web page files;If being deposited in local In corresponding web page files, corresponding web page files are obtained from local be back to the webpage control and loaded;If described Local page File Mapping is not present in webpage load request, and corresponding web page files are obtained from server and are back to the webpage Control is loaded.The embodiment of the present invention judges that web page files add from local or from network by the mapping table of pre-configuration It carries, dynamic page can be made to load from network, save resource space, do not need frequently to dispose offline resources packet, save manpower Resource.
Detailed description of the invention
Technical solution in order to illustrate the embodiments of the present invention more clearly, below will be to needed in embodiment description Attached drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the invention, general for this field For logical technical staff, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is the application scenarios schematic diagram of webpage loading method provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of webpage loading method provided in an embodiment of the present invention;
Fig. 3 is the sub-process schematic diagram of webpage loading method provided in an embodiment of the present invention;
Fig. 4 is the sub-process schematic diagram of webpage loading method provided in an embodiment of the present invention;
Fig. 5 be another embodiment of the present invention provides webpage loading method flow diagram;
Fig. 6 is the schematic block diagram of webpage loading device provided in an embodiment of the present invention;
Fig. 7 is the schematic block diagram of the specific unit of webpage loading device provided in an embodiment of the present invention;And
Fig. 8 is the schematic block diagram of computer equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " and "comprising" instruction Described feature, entirety, step, operation, the presence of element and/or component, but one or more of the other feature, whole is not precluded Body, step, operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this description of the invention merely for the sake of description specific embodiment And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is Refer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
Fig. 1 and Fig. 2 are please referred to, Fig. 1 is the application scenarios schematic diagram of webpage loading method provided in an embodiment of the present invention.Figure 2 be the schematic flow chart of webpage loading method provided in an embodiment of the present invention.The present invention, which is particularly applicable in, is mounted with hybrid guided mode In the terminal of formula mobile application (Hybrid APP), mixed mode mobile application refers between the application (Web-APP) based on Web With the application between localization application (Native-APP) the two, the good user interaction body that not only there is localization to apply The advantage of the advantage but also the Cross-border congestion management with the application based on Web tested.Generally speaking, mixed mode mobile application refers to Be one while being developed using homepages language and program language, pass through application shop and distinguish Mobile operating system distribution, user The mobile application for needing to install and use.Webpage loading method of the invention is realized by the interaction between terminal and server.
Fig. 2 is the flow diagram of webpage loading method provided in an embodiment of the present invention.As shown, this method include with Lower step S110-S140.
If S110, detecting that webpage control initiates webpage load request, by Web page-container to the webpage load request It is intercepted.
In one embodiment, user using Hybrid App browsing webpage is browsed by Webview.Webview Refer to webpage control, for showing Web page, i.e., the webpage for showing user to browse by webpage control.Web page-container Specially HTML5 container hereinafter referred to as H5 container, refers to the tool for handling HTML5 webpage.Wherein, it is encapsulated in H5 container One interception class, for intercepting webpage load request.It specifically, is abstract class due to intercepting class, it is necessary first to create and infuse Volume becomes its subclass for intercepting webpage load request;When listening to network request initiation in systems, class is intercepted to the net Network request carries out judging whether it is webpage load request, if webpage load request, then intercepts class and asks to the webpage load of initiation It asks and is intercepted.
S120, judged the webpage load request with the presence or absence of local page File Mapping according to the mapping table of pre-configuration.
In one embodiment, the mapping table of pre-configuration is pre-configured before webpage load, is configured in the mapping table Mapping between webpage load request and local page file.For dynamic page, different user is in different time institute The page seen is different, therefore is not necessarily to configure local page file for the webpage load request of dynamic page, and waste is deposited Store up space.For static page, such page is usually continually accessed by the user, and is the webpage load request of static page The response speed of webpage can be improved in configuration local page file.
In one embodiment, as shown in figure 3, the step S120 may include step S121-S123.
S121, it is parsed by mapping table of the Web page-container to pre-configuration to search the webpage load request institute Corresponding local page File Mapping.
In one embodiment, it after intercepting webpage load request, is parsed by mapping table of the H5 container to pre-configuration.It reflects It is configured with the mapping of multiple webpage load requests in firing table, the mapping of multiple webpage load requests is obtained after the completion of H5 container analysis Relationship.Corresponding reflect is searched in the webpage load request mapping relations that parsing obtains according to the webpage load request intercepted It penetrates.
If S122, finding local page File Mapping corresponding to the webpage load request, the webpage is determined There are local page File Mappings for load request.
In one embodiment, if finding the webpage load request in the webpage load request mapping relations that parsing obtains Corresponding local page File Mapping illustrates that there are local page File Mappings for the webpage load request.Local page file reflects Penetrate the address that concrete form is local page file.For example, institute's webpage load request to be loaded is http: // Sports.qq.com/a/20180812/047851.html configures sdcard/a/20180812/ in the mapping table 047851.html is the local page File Mapping of the webpage load request.It searches and is somebody's turn to do in the mapping relations that parsing obtains The corresponding local page File Mapping of webpage load request, i.e. sdcard/a/20180812/047851.html, if finding this Corresponding local page File Mapping illustrates that there are local page File Mappings for the webpage load request.
If S123, not finding local page File Mapping corresponding to the webpage load request, the net is determined Local page File Mapping is not present in page load request.
In one embodiment, it is asked if not finding webpage load in the webpage load request mapping relations that parsing obtains Corresponding local page File Mapping is sought, illustrates that the webpage load request is the webpage load request of dynamic page, is not reflecting It is configured in firing table, therefore local page File Mapping is not present.
If S130, the webpage load request there are local page File Mapping, judge in local with the presence or absence of corresponding Web page files.
In one embodiment, after obtaining local page File Mapping, it is necessary first to first judge whether to have downloaded the net The corresponding web page files of page load request specifically search net according to local page File Mapping, that is, local page file address Page file determines that there are web page files if finding web page files in local page file address;If in local page file Web page files are not found in address, then determine that web page files are not present.
If there are corresponding web page files in S140, local, obtained from local corresponding web page files be back to it is described Webpage control is loaded.
In one embodiment, if finding web page files in local page file address, from the local page file Acquisition web page files return to webpage control and are loaded in location.For example, institute's webpage load request to be loaded is http: // Sports.qq.com/a/20180812/047851.html, according to local page file address sdcard/a/20180812/ 047851.html obtains web page files, and acquired web page files are back to webpage control and are loaded.
In one embodiment, as shown in figure 4, after the step S140 further include: S141.
If corresponding web page files are not present in S141, local, corresponding web page files are obtained from server and are back to The webpage control is loaded.
In one embodiment, it if not finding the web page files in local page file address, sends webpage load and asks It asks and obtains web page files from server to server and loaded with returning to webpage control.Such as institute's webpage to be loaded adds Carrying request is http://sports.qq.com/a/20180812/047851.html, if in local page file address not Web page files are found, then directly transmit the webpage load request i.e. http://sports.qq.com/a/20180812/ 047851.html, which pulls web page files from server to server and is back to webpage control, to be loaded.
In one embodiment, as described in Figure 4, after the step S141, S142 is further comprised the steps of:.
S142, it is stored from the web page files are downloaded in server into local according to the webpage load request.
In one embodiment, since web page files being not present in local page file address, but load next time for convenience Same webpage, by web page files from web page files locally downloading in server address, so as to the same net of subsequent load When page, web page files are obtained directly from local, without removing access server again, improve the response speed of webpage.
If corresponding local page File Mapping is not present in S150, the webpage load request, phase is obtained from server The web page files answered are back to the webpage control and are loaded.
In one embodiment, it is reflected if being previously not configured the corresponding local page file of the webpage load request in mapping table It penetrates, illustrates that the webpage load request loaded is the webpage of dynamic class, server is directly accessed for such webpage and obtains net Page file is back to webpage control and is loaded, and can save memory space, and does not need developer and frequently dispose offline money Human resources are saved in source.For example, institute's webpage load request to be loaded is http://sports.qq.com/a/20180812/ 047851.html, and the corresponding local page File Mapping of the webpage load request is not present in mapping table, then directly transmit this Webpage load request, that is, http://sports.qq.com/a/20180812/047851.html to server is drawn from server It takes web page files to be back to webpage control to be loaded.
In one embodiment, as described in Figure 5, after the step S150, further includes: S160-S170.
If S160, receiving more new command, store from more new resources packet is downloaded in server into local.
In one embodiment, developer is optimized web page files or is repaired to the loophole of web page files It resumes a session and generates more new resources packet, the more new resources packet is for storing updated web page files.In order to update offline resources, take Business device can push more new command into mobile phone, after mobile phone receives more new command, be downloaded from server according to more new command The storage of more new resources packet is into local to be updated.
S170, the more new resources packet is decompressed, the more new resources packet after decompression is closed with the former web page files And the web page files updated.
In one embodiment, after obtaining more new resources packet, it is necessary first to the integrality of more new resources packet is verified, If the more new resources packet is not downloaded completely, i.e., more new resources packet is imperfect without updating;If the more new resources packet has been downloaded Entirely, i.e., more new resources packet is completely then updated.More new resources packet is decompressed to obtain updated web page files when update, Updated web page files and original web page files are compared, if updated web page files and original web page files Updated web page files are then replaced original web page files by difference, to complete to update.
The embodiment of the present invention illustrates a kind of webpage loading method, if being asked by detecting that webpage control initiates webpage load It asks, the webpage load request is intercepted by Web page-container;The webpage load is judged according to the mapping table of pre-configuration Request whether there is local page File Mapping;If the webpage load request judges local there are local page File Mapping In whether there is corresponding web page files;If there are corresponding web page files in local, corresponding webpage text is obtained from local Part is back to the webpage control and is loaded;If local page File Mapping is not present in the webpage load request, from service Corresponding web page files are obtained in device being back to the webpage control and loaded, dynamic page can be made to load section from network Resource-saving space does not need frequently to dispose offline resources packet saving human resources.
Fig. 6 is a kind of schematic block diagram of webpage loading device 200 provided in an embodiment of the present invention.As shown in fig. 6, corresponding In the above webpage loading method, the present invention also provides a kind of webpage loading devices 200.The webpage loading device 200 includes being used for Execute the unit of above-mentioned webpage loading method, the device can be configured in desktop computer, tablet computer, laptop computer, etc. eventually In end.Specifically, referring to Fig. 6, the webpage loading device 200 is sentenced including interception unit 210, the first judging unit 220, second Disconnected unit 230, local loading unit 240 and first network loading unit 250.
Interception unit 210, if for detecting that webpage control initiates webpage load request, by Web page-container to the net Page load request is intercepted.
In one embodiment, user using Hybrid App browsing webpage is browsed by Webview.Webview Refer to webpage control, for showing Web page, i.e., the webpage for showing user to browse by webpage control.Web page-container Specially HTML5 container hereinafter referred to as H5 container, refers to the tool for handling HTML5 webpage.Wherein, it is encapsulated in H5 container One interception class, for intercepting webpage load request.It specifically, is abstract class due to intercepting class, it is necessary first to create and infuse Volume becomes its subclass for intercepting webpage load request;When listening to network request initiation in systems, class is intercepted to the net Network request carries out judging whether it is webpage load request, if webpage load request, then intercepts class and asks to the webpage load of initiation It asks and is intercepted.
First judging unit 220 judges the webpage load request with the presence or absence of this for the mapping table according to pre-configuration The mapping of ground web page files.
In one embodiment, the mapping table of pre-configuration is pre-configured before webpage load, is configured in the mapping table Mapping between webpage load request and local page file.For dynamic page, different user is in different time institute The page seen is different, therefore is not necessarily to configure local page file for the webpage load request of dynamic page, and waste is deposited Store up space.For static page, such page is usually continually accessed by the user, and is the webpage load request of static page The response speed of webpage can be improved in configuration local page file.
In one embodiment, as shown in fig. 7, first judging unit 220 may include subelement: resolution unit 221, One judging unit 222 and the second judging unit 223.
Resolution unit 221, for being parsed by mapping table of the Web page-container to pre-configuration to search the net Local page File Mapping corresponding to page load request.
In one embodiment, it after intercepting webpage load request, is parsed by mapping table of the H5 container to pre-configuration.It reflects It is configured with the mapping of multiple webpage load requests in firing table, the mapping of multiple webpage load requests is obtained after the completion of H5 container analysis Relationship.Corresponding reflect is searched in the webpage load request mapping relations that parsing obtains according to the webpage load request intercepted It penetrates.
First judging unit 222, if for finding local page File Mapping corresponding to the webpage load request, Then determine that there are local page File Mappings for the webpage load request.
In one embodiment, if finding the webpage load request in the webpage load request mapping relations that parsing obtains Corresponding local page File Mapping illustrates that there are local page File Mappings for the webpage load request.Local page file reflects Penetrate the address that concrete form is local page file.For example, institute's webpage load request to be loaded is http: // Sports.qq.com/a/20180812/047851.html configures sdcard/a/20180812/ in the mapping table 047851.html is the local page File Mapping of the webpage load request.It searches and is somebody's turn to do in the mapping relations that parsing obtains The corresponding local page File Mapping of webpage load request, i.e. sdcard/a/20180812/047851.html, if finding this Corresponding local page File Mapping illustrates that there are local page File Mappings for the webpage load request.
Second judging unit 223, if being reflected for not finding local page file corresponding to the webpage load request It penetrates, then determining the webpage load request, there is no local page File Mappings.
In one embodiment, it is asked if not finding webpage load in the webpage load request mapping relations that parsing obtains Corresponding local page File Mapping is sought, illustrates that the webpage load request is the webpage load request of dynamic page, is not reflecting It is configured in firing table, therefore local page File Mapping is not present.
Second judgment unit 230, if judging in local for the webpage load request there are local page File Mapping With the presence or absence of corresponding web page files.
In one embodiment, after obtaining local page File Mapping, it is necessary first to first judge whether to have downloaded the net The corresponding web page files of page load request specifically search net according to local page File Mapping, that is, local page file address Page file determines that there are web page files if finding web page files in local page file address;If in local page file Web page files are not found in address, then determine that web page files are not present.
Local loading unit 240, if obtaining corresponding webpage from local for there are corresponding web page files in local File is back to the webpage control and is loaded.
In one embodiment, if finding web page files in local page file address, from the local page file Acquisition web page files return to webpage control and are loaded in location.For example, institute's webpage load request to be loaded is http: // Sports.qq.com/a/20180812/047851.html, according to local page file address sdcard/a/20180812/ 047851.html obtains web page files, and acquired web page files are back to webpage control and are loaded.
In one embodiment, as shown in fig. 7, the network loading device: further include: the second network loading unit 241 with And storage unit 242.
Second network loading unit 241, if obtaining phase from server for corresponding web page files to be not present in local The web page files answered are back to the webpage control and are loaded.
In one embodiment, it if not finding the web page files in local page file address, sends webpage load and asks It asks and obtains web page files from server to server and loaded with returning to webpage control.Such as institute's webpage to be loaded adds Carrying request is http://sports.qq.com/a/20180812/047851.html, if in local page file address not Web page files are found, then directly transmit the webpage load request i.e. http://sports.qq.com/a/20180812/ 047851.html, which pulls web page files from server to server and is back to webpage control, to be loaded.
Storage unit 242, for according to the webpage load request downloaded from server web page files storage to In local.
In one embodiment, since web page files being not present in local page file address, but load next time for convenience Same webpage, by web page files from web page files locally downloading in server address, so as to the same net of subsequent load When page, web page files are obtained directly from local, without removing access server again, improve the response speed of webpage.
First network loading unit 250, if local page File Mapping is not present for the webpage load request, from clothes It obtains corresponding web page files in business device and is back to the webpage control and loaded.
In one embodiment, it is reflected if being previously not configured the corresponding local page file of the webpage load request in mapping table It penetrates, illustrates that the webpage load request loaded is the webpage of dynamic class, server is directly accessed for such webpage and obtains net Page file is back to webpage control and is loaded, and can save memory space, and does not need developer and frequently dispose offline money Human resources are saved in source.For example, institute's webpage load request to be loaded is http://sports.qq.com/a/20180812/ 047851.html, and the corresponding local page File Mapping of the webpage load request is not present in mapping table, then directly transmit this Webpage load request, that is, http://sports.qq.com/a/20180812/047851.html to server is drawn from server It takes web page files to be back to webpage control to be loaded.
In one embodiment, as described in Figure 7, the webpage loading device further include: download unit 260 and updating unit 270。
Download unit 260, if downloading the storage of more new resources packet from server to local for receiving more new command In.
In one embodiment, developer is optimized web page files or is repaired to the loophole of web page files It resumes a session and generates more new resources packet, the more new resources packet is for storing updated web page files.In order to update offline resources, take Business device can push more new command into mobile phone, after mobile phone receives more new command, be downloaded from server according to more new command The storage of more new resources packet is into local to be updated.
Updating unit 270, for decompressing the more new resources packet, by the more new resources packet and the former webpage after decompression File merges the web page files updated.
In one embodiment, after obtaining more new resources packet, it is necessary first to the integrality of more new resources packet is verified, If the more new resources packet is not downloaded completely, i.e., more new resources packet is imperfect without updating;If the more new resources packet has been downloaded Entirely, i.e., more new resources packet is completely then updated.More new resources packet is decompressed to obtain updated web page files when update, Updated web page files and original web page files are compared, if updated web page files and original web page files Updated web page files are then replaced original web page files by difference, to complete to update.
The embodiment of the present invention illustrates a kind of webpage loading device, if being asked by detecting that webpage control initiates webpage load It asks, the webpage load request is intercepted by Web page-container;The webpage load is judged according to the mapping table of pre-configuration Request whether there is local page File Mapping;If the webpage load request judges local there are local page File Mapping In whether there is corresponding web page files;If there are corresponding web page files in local, corresponding webpage text is obtained from local Part is back to the webpage control and is loaded;If local page File Mapping is not present in the webpage load request, from service Corresponding web page files are obtained in device being back to the webpage control and loaded, dynamic page can be made to load section from network Resource-saving space does not need frequently to dispose offline resources packet saving human resources.
Above-mentioned webpage loading device can be implemented as a kind of form of computer program, which can such as scheme It is run in computer equipment shown in 8.
Referring to Fig. 8, Fig. 8 is a kind of schematic block diagram of computer equipment provided by the embodiments of the present application.The computer Equipment 500 can be terminal, wherein terminal can be smart phone, tablet computer, laptop, desktop computer, a number Word assistant and wearable device etc. have the electronic equipment of communication function.
Refering to Fig. 8, which includes processor 502, memory and the net connected by system bus 501 Network interface 505, wherein memory may include non-volatile memory medium 503 and built-in storage 504.
The non-volatile memory medium 503 can storage program area 5031 and computer program 5032.The computer program 5032 include program instruction, which is performed, and processor 502 may make to execute a kind of webpage loading method.
The processor 502 is for providing calculating and control ability, to support the operation of entire computer equipment 500.
The built-in storage 504 provides environment for the operation of the computer program 5032 in non-volatile memory medium 503, should When computer program 5032 is executed by processor 502, processor 502 may make to execute a kind of webpage loading method.
The network interface 505 is used to carry out network communication with other equipment.It will be understood by those skilled in the art that in Fig. 8 The structure shown, only the block diagram of part-structure relevant to application scheme, does not constitute and is applied to application scheme The restriction of computer equipment 500 thereon, specific computer equipment 500 may include more more or fewer than as shown in the figure Component perhaps combines certain components or with different component layouts.
Wherein, the processor 502 is for running computer program 5032 stored in memory, to realize following step Rapid: if detecting, webpage control initiates webpage load request, is intercepted by Web page-container to the webpage load request;Root Judge the webpage load request with the presence or absence of local page File Mapping according to the mapping table of pre-configuration;If the webpage load is asked It asks there are local page File Mapping, judges in local with the presence or absence of corresponding web page files;If there are corresponding nets in local Page file, corresponding web page files is obtained from local is back to the webpage control and loaded;If the webpage load is asked It asks there is no local page File Mapping, corresponding web page files are obtained from server is back to the webpage control and added It carries.
In one embodiment, processor 502 judges that the webpage load is asked in the realization mapping table according to pre-configuration When asking with the presence or absence of local page File Mapping step, it is implemented as follows step: by the Web page-container to pre-configuration Mapping table is parsed to search local page File Mapping corresponding to the webpage load request;If finding the webpage Local page File Mapping corresponding to load request then determines that there are local page File Mappings for the webpage load request; If not finding local page File Mapping corresponding to the webpage load request, determine that the webpage load request is not deposited In local page File Mapping.
In one embodiment, processor 502 whether there is corresponding web page files step in realizing the judgement local Later, following steps are also realized: if corresponding web page files are not present in local, corresponding web page files are obtained from server The webpage control is back to be loaded.
In one embodiment, if corresponding web page files are not present in realizing the local in processor 502, from server The middle corresponding web page files of acquisition are back to after the webpage control progress load step, also realization following steps: according to institute It states webpage load request and stores from the web page files are downloaded in server into local.
In one embodiment, if processor 502 is realizing the webpage load request, there is no local page files Mapping is back to after the webpage control carries out load step from corresponding web page files are obtained in server, also realizes such as Lower step: it if receiving more new command, stores from more new resources packet is downloaded in server into local;It will the more new resources packet More new resources packet after decompression is merged the web page files updated with the former web page files by decompression.
It should be appreciated that in the embodiment of the present application, processor 502 can be central processing unit (Central Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic Device, discrete gate or transistor logic, discrete hardware components etc..Wherein, general processor can be microprocessor or Person's processor is also possible to any conventional processor etc..
Those of ordinary skill in the art will appreciate that be realize above-described embodiment method in all or part of the process, It is that relevant hardware can be instructed to complete by computer program.The computer program includes program instruction, computer journey Sequence can be stored in a storage medium, which is computer readable storage medium.The program instruction is by the department of computer science At least one processor in system executes, to realize the process step of the embodiment of the above method.
Therefore, the present invention also provides a kind of storage mediums.The storage medium can be computer readable storage medium.This is deposited Storage media is stored with computer program, and wherein computer program includes program instruction.The program instruction makes when being executed by processor Processor executes following steps: if detecting, webpage control initiates webpage load request, is added by Web page-container to the webpage Request is carried to be intercepted;Judge that the webpage load request is reflected with the presence or absence of local page file according to the mapping table of pre-configuration It penetrates;If the webpage load request there are local page File Mapping, judges in local with the presence or absence of corresponding web page files;If There are corresponding web page files in local, corresponding web page files are obtained from local are back to the webpage control and added It carries;If local page File Mapping is not present in the webpage load request, corresponding web page files are obtained from server and are returned It is loaded to the webpage control.
In one embodiment, the processor realizes the mapping table according to pre-configuration executing described program instruction When judging the webpage load request with the presence or absence of local page File Mapping step, it is implemented as follows step: by described Web page-container parses the mapping table of pre-configuration to search local page file corresponding to the webpage load request and reflect It penetrates;If finding local page File Mapping corresponding to the webpage load request, determine that the webpage load request is deposited In local page File Mapping;If not finding local page File Mapping corresponding to the webpage load request, determine Local page File Mapping is not present in the webpage load request.
In one embodiment, the processor is instructed in execution described program and realizing in the judgement local whether there is After corresponding web page files step, it is implemented as follows step: if there is no corresponding web page files in local, from server The middle corresponding web page files of acquisition are back to the webpage control and are loaded.
In one embodiment, if the processor realizes that there is no corresponding in the local executing described program instruction Web page files, be back to after the webpage control carries out load step from corresponding web page files are obtained in server, also It realizes following steps: being stored from the web page files are downloaded in server into local according to the webpage load request.
In one embodiment, if the processor realizes the webpage load request executing described program instruction There is no local page File Mappings, corresponding web page files are obtained from server are back to the webpage control and loaded After step, following steps are also realized: if receiving more new command, the storage of more new resources packet is downloaded from server to local In;The more new resources packet is decompressed, the more new resources packet after decompression is merged with the former web page files and is updated Web page files.
The storage medium can be USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), magnetic disk Or the various computer readable storage mediums that can store program code such as CD.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware With the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.This A little functions are implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Specially Industry technical staff can use different methods to achieve the described function each specific application, but this realization is not It is considered as beyond the scope of this invention.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary.For example, the division of each unit, only Only a kind of logical function partition, there may be another division manner in actual implementation.Such as multiple units or components can be tied Another system is closed or is desirably integrated into, or some features can be ignored or not executed.
The steps in the embodiment of the present invention can be sequentially adjusted, merged and deleted according to actual needs.This hair Unit in bright embodiment device can be combined, divided and deleted according to actual needs.In addition, in each implementation of the present invention Each functional unit in example can integrate in one processing unit, is also possible to each unit and physically exists alone, can also be with It is that two or more units are integrated in one unit.
If the integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product, It can store in one storage medium.Based on this understanding, technical solution of the present invention is substantially in other words to existing skill The all or part of part or the technical solution that art contributes can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, terminal or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
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 readily occur in various equivalent modifications or replace It changes, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with right It is required that protection scope subject to.

Claims (10)

1. a kind of webpage loading method characterized by comprising
If detecting, webpage control initiates webpage load request, is intercepted by Web page-container to the webpage load request;
Judge the webpage load request with the presence or absence of local page File Mapping according to the mapping table of pre-configuration;
If the webpage load request there are local page File Mapping, judges in local with the presence or absence of corresponding web page files;
If there are corresponding web page files in local, obtained from local corresponding web page files be back to the webpage control into Row load;
If local page File Mapping is not present in the webpage load request, corresponding web page files are obtained from server and are returned It is loaded to the webpage control.
2. webpage loading method according to claim 1, which is characterized in that the mapping table according to pre-configuration judges institute Webpage load request is stated with the presence or absence of local page File Mapping, comprising:
It is parsed by mapping table of the Web page-container to pre-configuration to search sheet corresponding to the webpage load request The mapping of ground web page files;
If finding local page File Mapping corresponding to the webpage load request, determine that the webpage load request is deposited In local page File Mapping;
If not finding local page File Mapping corresponding to the webpage load request, the webpage load request is determined There is no local page File Mappings.
3. webpage loading method according to claim 1, which is characterized in that with the presence or absence of corresponding in the judgement local After web page files, further includes:
If corresponding web page files are not present in local, corresponding web page files are obtained from server and are back to the webpage control Part is loaded.
4. webpage loading method according to claim 3, which is characterized in that if corresponding webpage is not present in the local File is back to after the webpage control loaded from corresponding web page files are obtained in server, further includes:
It is stored from the web page files are downloaded in server into local according to the webpage load request.
5. webpage loading method according to claim 1, which is characterized in that further include:
If receiving more new command, store from more new resources packet is downloaded in server into local;
The more new resources packet is decompressed, the more new resources packet after decompression is merged with the former web page files and is updated Web page files.
6. a kind of webpage loading device characterized by comprising
Interception unit, if being loaded by Web page-container to the webpage for detecting that webpage control initiates webpage load request Request is intercepted;
First judging unit judges the webpage load request with the presence or absence of local page text for the mapping table according to pre-configuration Part mapping;
Second judgment unit, if judging whether deposit in local for the webpage load request there are local page File Mapping In corresponding web page files;
Local loading unit, if obtaining corresponding web page files from local for there are corresponding web page files in local and returning The webpage control is back to be loaded;
First network loading unit, if local page File Mapping is not present for the webpage load request, from server It obtains corresponding web page files and is back to the webpage control and loaded.
7. webpage loading device according to claim 6 characterized by comprising
Resolution unit is searched the webpage load for being parsed by mapping table of the Web page-container to pre-configuration and is asked Seek corresponding local page File Mapping;
First judging unit, if determining for finding local page File Mapping corresponding to the webpage load request There are local page File Mappings for the webpage load request;
Second judging unit, if sentencing for not finding local page File Mapping corresponding to the webpage load request Local page File Mapping is not present in the fixed webpage load request.
8. webpage loading device according to claim 6 characterized by comprising
Second network loading unit, if obtaining corresponding net from server for corresponding web page files to be not present in local Page file is back to the webpage control and is loaded.
9. a kind of computer equipment, which is characterized in that the computer equipment includes memory and processor, on the memory It is stored with computer program, the processor is realized as described in any one of claim 1-5 when executing the computer program Method.
10. a kind of computer readable storage medium, which is characterized in that the storage medium is stored with computer program, the meter Calculation machine program can realize method according to any one of claims 1 to 5 when being executed by a processor.
CN201811527348.0A 2018-12-13 2018-12-13 Webpage loading method, device, computer equipment and storage medium Pending CN109800367A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811527348.0A CN109800367A (en) 2018-12-13 2018-12-13 Webpage loading method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811527348.0A CN109800367A (en) 2018-12-13 2018-12-13 Webpage loading method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109800367A true CN109800367A (en) 2019-05-24

Family

ID=66556659

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811527348.0A Pending CN109800367A (en) 2018-12-13 2018-12-13 Webpage loading method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109800367A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110413921A (en) * 2019-06-21 2019-11-05 深圳壹账通智能科技有限公司 Webpage loading method, device, computer equipment and storage medium
CN110955856A (en) * 2019-10-14 2020-04-03 北京奇艺世纪科技有限公司 Webpage loading method and device, server and storage medium
CN111176754A (en) * 2019-12-25 2020-05-19 搜游网络科技(北京)有限公司 HTML5 application running method, device, runner and computer readable storage medium
CN111176655A (en) * 2019-12-09 2020-05-19 国电南瑞科技股份有限公司 Web application packaging method, storage medium and computing device
CN111741100A (en) * 2020-06-17 2020-10-02 北京三快在线科技有限公司 Method, device and equipment for verifying and selling electronic bills and storage medium
CN113037814A (en) * 2021-02-25 2021-06-25 平安壹钱包电子商务有限公司 Web container injection implementation method and device, computer equipment and storage medium
CN113342424A (en) * 2021-08-04 2021-09-03 北京拓课网络科技有限公司 Method and device for loading H5 resource and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729352A (en) * 2017-08-30 2018-02-23 上海壹账通金融科技有限公司 page resource loading method and terminal device
CN108520059A (en) * 2018-04-09 2018-09-11 世纪龙信息网络有限责任公司 Loading method, system, computer equipment and the storage medium of the client H5 pages

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729352A (en) * 2017-08-30 2018-02-23 上海壹账通金融科技有限公司 page resource loading method and terminal device
CN108520059A (en) * 2018-04-09 2018-09-11 世纪龙信息网络有限责任公司 Loading method, system, computer equipment and the storage medium of the client H5 pages

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110413921A (en) * 2019-06-21 2019-11-05 深圳壹账通智能科技有限公司 Webpage loading method, device, computer equipment and storage medium
CN110955856A (en) * 2019-10-14 2020-04-03 北京奇艺世纪科技有限公司 Webpage loading method and device, server and storage medium
CN111176655A (en) * 2019-12-09 2020-05-19 国电南瑞科技股份有限公司 Web application packaging method, storage medium and computing device
CN111176754A (en) * 2019-12-25 2020-05-19 搜游网络科技(北京)有限公司 HTML5 application running method, device, runner and computer readable storage medium
CN111176754B (en) * 2019-12-25 2023-11-10 北京蓝亚盒子科技有限公司 HTML5 application running method, device, running machine and computer readable storage medium
CN111741100A (en) * 2020-06-17 2020-10-02 北京三快在线科技有限公司 Method, device and equipment for verifying and selling electronic bills and storage medium
CN113037814A (en) * 2021-02-25 2021-06-25 平安壹钱包电子商务有限公司 Web container injection implementation method and device, computer equipment and storage medium
CN113342424A (en) * 2021-08-04 2021-09-03 北京拓课网络科技有限公司 Method and device for loading H5 resource and electronic equipment

Similar Documents

Publication Publication Date Title
CN109800367A (en) Webpage loading method, device, computer equipment and storage medium
CN112000348A (en) Control method and device for service gray release and computer equipment
US10242023B2 (en) Programming model for synchronizing browser caches across devices and web services
US8438251B2 (en) Methods and systems for implementing a virtual storage network
CN112118565A (en) Multi-tenant service gray level publishing method and device, computer equipment and storage medium
CN106569856B (en) A kind of loading method and device of application view resource file
CN111737609B (en) WEB system menu bar display method, terminal and storage medium
CN104125308B (en) For the method and domain name analysis system of the domain name mapping of multi-user
CN109462650A (en) Data file downloading method, device, computer equipment and storage medium
CN106681749A (en) Local code patch updating method and device based on Android platform
US11610155B2 (en) Data processing system and data processing method
CN110968331A (en) Method and device for running application program
US8600960B2 (en) Processing proposed changes to data
CN110045998B (en) Method and device for loading dynamic library
US9971611B2 (en) Monitoring a mobile device application
CN112115056B (en) Project deployment method and device, server and storage medium
CN109408256B (en) Application calling method and device
CN104008096B (en) A kind of application operating method and apparatus based on browser
CN106095486A (en) Online updating method, system, terminal unit and the server of application program
CN109582889A (en) Picture loading method, device, computer equipment and storage medium
CN107045452B (en) Virtual machine scheduling method and device
JP2018510428A (en) Code caching system
CN111679842A (en) Application program hot update processing method, device and system
CN115348246A (en) Method, equipment, system and medium for packet capture debugging of multi-user online agent
US9811333B2 (en) Using a version-specific resource catalog for resource management

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190524

RJ01 Rejection of invention patent application after publication