CN112905939B - HTML5 page resource loading method, device, equipment and storage medium - Google Patents

HTML5 page resource loading method, device, equipment and storage medium Download PDF

Info

Publication number
CN112905939B
CN112905939B CN202110213331.3A CN202110213331A CN112905939B CN 112905939 B CN112905939 B CN 112905939B CN 202110213331 A CN202110213331 A CN 202110213331A CN 112905939 B CN112905939 B CN 112905939B
Authority
CN
China
Prior art keywords
page
html5
loaded
server
acquiring
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.)
Active
Application number
CN202110213331.3A
Other languages
Chinese (zh)
Other versions
CN112905939A (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.)
Hangzhou Siyiou Technology Group Co ltd
Shenzhen Lian Intellectual Property Service Center
Original Assignee
Hangzhou Siyiou Technology Group 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 Hangzhou Siyiou Technology Group Co ltd filed Critical Hangzhou Siyiou Technology Group Co ltd
Priority to CN202110213331.3A priority Critical patent/CN112905939B/en
Publication of CN112905939A publication Critical patent/CN112905939A/en
Application granted granted Critical
Publication of CN112905939B publication Critical patent/CN112905939B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/972Access to data in other repository systems, e.g. legacy data or dynamic Web page generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/986Document structures and storage, e.g. HTML extensions
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application relates to the technical field of artificial intelligence and discloses a loading method, a loading device, loading equipment and a storage medium of an HTML5 page resource, wherein the loading method comprises the following steps: carrying out click behavior prediction on the historical access behavior data by adopting a click behavior prediction model, and acquiring H5 resource update local cache from a server; responding to a page loading request, when the H5 resource corresponding to the page identifier to be loaded in the local cache is the same as the H5 resource to be loaded in the server, taking the H5 resource corresponding to the page identifier to be loaded in the local cache as the H5 resource to be loaded, otherwise, acquiring the H5 resource from the server as the H5 resource to be loaded according to the page identifier to be loaded; responding to a page loading request, carrying out preset click level page expansion prediction according to a page identifier to be loaded and a click behavior prediction result, and updating a local cache; and loading and rendering the page according to the H5 resource to be loaded to obtain a target H5 page. And the timeliness and the user experience of loading are improved.

Description

HTML5 page resource loading method, device, equipment and storage medium
Technical Field
The application relates to the technical field of artificial intelligence, in particular to a loading method, a loading device, loading equipment and a storage medium of an HTML5 page resource.
Background
HTML5 combines and innovates the related standard of HTML4.01, meets the development requirement of modern network, is widely applied in the internet, and provides a standard machine for enhancing network application more. The hybrid development of the mobile terminal is widely applied because of the advantages of high development efficiency, simple updating and deployment, more functions than web version realization, off-line operation and the like.
The HTML5 resource of the existing hybrid-developed mobile terminal is either locally cached or directly obtained from the server. The HTML5 resources are all placed in the local cache, although the problem of slow loading is solved, the waste of flow resources can be caused, and if the HTML5 resources are partially placed in the local cache, the problem of slow loading can not be comprehensively solved; the HTML5 resource is placed at the server, which solves the update problem, but can result in slow loading and reduced user experience.
Disclosure of Invention
The main purpose of the application is to provide a loading method, a device, equipment and a storage medium of HTML5 page resources, which aim to solve the technical problems that the prior art adopts a mobile terminal for mixed development to place the HTML5 resources in a local cache and/or a server terminal, and the flow resource waste and slow loading cannot be simultaneously solved.
In order to achieve the above object, the present application proposes a loading method of HTML5 page resources, where the method includes:
acquiring a mobile terminal starting request;
responding to the mobile terminal starting request, acquiring historical access behavior data, and carrying out click behavior prediction on the historical access behavior data by adopting a click behavior prediction model to obtain a click behavior prediction result;
acquiring an HTML5 resource to be initialized sent by a server according to the click behavior prediction result, and updating a local cache according to the HTML5 resource to be initialized;
acquiring a page loading request, wherein the page loading request carries a page identifier to be loaded;
responding to the page loading request, judging whether the HTML5 resource corresponding to the page identifier to be loaded in the local cache is the same as that in the server side, obtaining a judging result, taking the HTML5 resource corresponding to the page identifier to be loaded in the local cache as the HTML5 resource to be loaded when the judging result is the same as that in the server side, otherwise, acquiring the HTML5 resource from the server side as the HTML5 resource to be loaded according to the page identifier to be loaded;
Responding to the page loading request, carrying out preset click level page expansion prediction according to the page identifier to be loaded and the click behavior prediction result to obtain a page identifier prediction result of the next step, and updating the local cache according to the page identifier prediction result of the next step;
and loading and rendering the page according to the HTML5 resource to be loaded to obtain a target HTML5 page.
Further, before the step of predicting the click behavior of the historical access behavior data by using the click behavior prediction model to obtain a click behavior prediction result, the method comprises the following steps:
obtaining a plurality of training samples, the training samples comprising: accessing behavior sequence sample data;
dividing the training samples according to a preset dividing rule to obtain a training set and a verification set;
training the model to be trained by adopting the training set to obtain a model to be verified, wherein the model to be trained comprises: the device comprises a convolution layer, a p-Max pooling layer, an activation layer and a full connection layer;
verifying the model to be verified by adopting the verification set to obtain a verification result;
when the verification result is failure, carrying out parameter updating on the model to be verified according to the verification result to obtain the model to be trained, and repeatedly executing the step of training the model to be trained by adopting the training set to obtain the model to be verified until the verification result is successful;
And determining the model to be verified, of which the verification result is successful, as the click behavior prediction model.
Further, the step of obtaining the HTML5 resource to be initialized sent by the server according to the click behavior prediction result includes:
acquiring page identifiers from the click behavior prediction result by adopting preset duration to obtain a predicted click page identifier set;
acquiring a version number from the local cache according to the page identification set clicked by prediction to obtain a first local version number set;
acquiring a version number from the server according to the page identification set clicked by prediction to obtain a first server version number set;
comparing version numbers of the same page identifier according to the first local version number set and the first server version number set to obtain a plurality of first comparison results;
when the first comparison results are different, the page identifier corresponding to the first comparison results is used as a page identifier to be initialized;
obtaining a page identification set to be initialized according to all the page identifications to be initialized;
and acquiring the HTML5 resource from the server according to the page identification set to be initialized, and obtaining the HTML5 resource to be initialized.
Further, the step of obtaining the page identifier set for predicting clicking from the click behavior prediction result by using a preset duration includes:
acquiring page classification data, preset initialization progression and preset duration;
and acquiring the page identifier from the click behavior prediction result by adopting the page classification data, the preset initialization level and the preset duration to obtain a page identifier set for predicting clicking.
Further, the step of determining whether the HTML5 resource corresponding to the page identifier to be loaded in the local cache is the same as that in the server to obtain a determination result includes:
acquiring a version number from the local cache according to the page identifier to be loaded to obtain a second local version number;
acquiring a version number from the server according to the page identifier to be loaded to obtain a second server version number;
and when the second local version number is the same as the second server version number, determining that the judging result is the same as the server, otherwise, determining that the judging result is different from the server.
Further, the step of performing preset click progression page expansion prediction according to the page identifier to be loaded and the click behavior prediction result to obtain a page identifier prediction result of the next step, and updating the local cache according to the page identifier prediction result of the next step includes:
Searching the page identifier to be loaded in the click behavior prediction result, and taking all page identifiers of preset click progression corresponding to the page identifiers searched in the click behavior prediction result as page identifier prediction results of the next step;
acquiring a version number from the local cache according to each page identifier in the page identifier prediction result of the next step to obtain a third local version number set;
acquiring a version number from the server according to each page identifier in the page identifier prediction result of the next step respectively to obtain a third server version number set;
comparing version numbers of the same page identifier according to the third local version number set and the third server version number set to obtain a plurality of second comparison results;
when the second comparison results are different, the page identifier corresponding to the second comparison results is used as a preset click progression page identifier to be updated;
obtaining a preset click progression page identification set to be updated according to all the preset click progression page identifications to be updated;
acquiring an HTML5 resource from the server according to the preset click progression page identification set to be updated to obtain the preset click progression page HTML5 resource to be updated;
And updating the local cache according to the HTML5 resource of the page with the preset click level to be updated.
Further, after the step of obtaining the mobile terminal opening request, the method further includes:
acquiring a large-batch page update request sent by the server;
responding to the page mass updating request to acquire network type data;
when the network type data is WIFI or 5G, acquiring an HTML5 resource compression packet sent by the server to obtain a large amount of HTML5 resources to be updated;
decompressing the large amount of HTML5 resources to be updated to obtain decompressed HTML5 resources;
and updating the local cache according to the decompressed HTML5 resource.
The application also provides a loading device of the HTML5 page resource, which comprises:
the first request acquisition module is used for acquiring a mobile terminal opening request;
the click behavior prediction module is used for responding to the mobile terminal opening request, acquiring historical access behavior data, and performing click behavior prediction on the historical access behavior data by adopting a click behavior prediction model to obtain a click behavior prediction result;
the local initialization updating module is used for acquiring HTML5 resources to be initialized sent by the server according to the click behavior prediction result, and updating a local cache according to the HTML5 resources to be initialized;
The second request acquisition module is used for acquiring a page loading request, wherein the page loading request carries a page identifier to be loaded;
the page loading module is used for responding to the page loading request, judging whether the HTML5 resource corresponding to the page identifier to be loaded in the local cache is the same as that in the server side, obtaining a judging result, and taking the HTML5 resource corresponding to the page identifier to be loaded in the local cache as the HTML5 resource to be loaded when the judging result is the same as that in the server side, otherwise, acquiring the HTML5 resource from the server side as the HTML5 resource to be loaded according to the page identifier to be loaded;
responding to the page loading request, judging to respond to the page loading request, and carrying out preset click level page expansion prediction according to the page identifier to be loaded and the click behavior prediction result to obtain a page identifier prediction result of the next step, and updating the local cache according to the page identifier prediction result of the next step;
and the target HTML5 page determining module is used for loading and rendering the page according to the HTML5 resource to be loaded to obtain a target HTML5 page.
The present application also proposes a computer device comprising a memory storing a computer program and a processor implementing the steps of any of the methods described above when the processor executes the computer program.
The present application also proposes a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the method of any of the above.
According to the loading method, device and equipment for the HTML5 page resources and the storage medium, historical access behavior data are acquired by responding to a mobile terminal starting request, clicking behavior prediction is carried out on the historical access behavior data by adopting a clicking behavior prediction model, clicking behavior prediction results are obtained, the HTML5 resources to be initialized, which are sent by a server terminal, are acquired according to the clicking behavior prediction results, a local cache is updated according to the HTML5 resources to be initialized, whether the HTML5 resources corresponding to page identifiers to be loaded in the local cache are identical to those of the server terminal is judged according to the page loading request, a judging result is obtained, when the judging result is identical to that of the server terminal, the HTML5 resources corresponding to the page identifiers to be loaded in the local cache are used as the HTML5 resources to be loaded, otherwise, the HTML5 resources are acquired from the server terminal according to the page identifiers to be loaded and are loaded and rendered according to the HTML5 resources to be loaded, and therefore the HTML5 resources in the local cache are more suitable for operation habits of users, and timeliness of loading 5 resources is improved under the condition that comprehensive updating is not needed, and user experience is improved; according to the method, a page loading request is responded, a preset click level page expansion prediction is conducted according to a page identifier to be loaded and a click behavior prediction result, a page identifier prediction result of the next step is obtained, a local cache is updated according to the page identifier prediction result of the next step, HTML5 resources of the preset click level page are stored in the local cache in advance according to user operation, and timeliness of loading the HTML5 resources is further improved; therefore, the method and the device solve the technical problems of traffic resource waste and slow loading at the same time, and improve user experience.
Drawings
FIG. 1 is a flowchart of a method for loading HTML5 page resources according to an embodiment of the present application;
FIG. 2 is a block diagram schematically illustrating a structure of an HTML5 page resource loading device according to an embodiment of the present application;
fig. 3 is a block diagram schematically illustrating a structure of a computer device according to an embodiment of the present application.
The implementation, functional features and advantages of the present application will be further described with reference to the accompanying drawings in conjunction with the embodiments.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
In order to solve the technical problems that in the prior art, the HTML5 resources are placed in a local cache and/or a server by adopting a mobile terminal of hybrid development, and the traffic resource waste and slow loading cannot be simultaneously solved, the application provides a loading method of the HTML5 page resources, and the method is applied to the technical field of artificial intelligence. According to the loading method of the HTML5 page resources, click behavior prediction is performed when a mobile terminal is started, the HTML5 resources in a local cache are initialized according to click behavior prediction results, then page loading requests are responded, when the HTML5 resources corresponding to page identifiers to be loaded in the local cache are the same as those in the server terminal, the HTML5 resources in the local cache are directly loaded, otherwise, the HTML5 resources are obtained from the server terminal to be loaded, preset click level page expansion prediction is performed according to the page identifiers to be loaded and the click behavior prediction results, and the local cache is updated according to the preset click level page expansion prediction results, so that the HTML5 resources in the local cache are more in accordance with operation habits of users, timeliness of loading the HTML5 resources is improved, and user experience is improved under the condition that comprehensive updating is not needed; therefore, the method and the device solve the technical problems of traffic resource waste and slow loading at the same time, and improve user experience.
Referring to fig. 1, in an embodiment of the present application, a method for loading HTML5 page resources is provided, where the method includes:
s1: acquiring a mobile terminal starting request;
s2: responding to the mobile terminal starting request, acquiring historical access behavior data, and carrying out click behavior prediction on the historical access behavior data by adopting a click behavior prediction model to obtain a click behavior prediction result;
s3: acquiring an HTML5 resource to be initialized sent by a server according to the click behavior prediction result, and updating a local cache according to the HTML5 resource to be initialized;
s4: acquiring a page loading request, wherein the page loading request carries a page identifier to be loaded;
s5: responding to the page loading request, judging whether the HTML5 resource corresponding to the page identifier to be loaded in the local cache is the same as that in the server side, obtaining a judging result, taking the HTML5 resource corresponding to the page identifier to be loaded in the local cache as the HTML5 resource to be loaded when the judging result is the same as that in the server side, otherwise, acquiring the HTML5 resource from the server side as the HTML5 resource to be loaded according to the page identifier to be loaded;
S6: responding to the page loading request, carrying out preset click level page expansion prediction according to the page identifier to be loaded and the click behavior prediction result to obtain a page identifier prediction result of the next step, and updating the local cache according to the page identifier prediction result of the next step;
s7: and loading and rendering the page according to the HTML5 resource to be loaded to obtain a target HTML5 page.
According to the method, historical access behavior data are obtained by responding to a mobile terminal opening request, clicking behavior prediction is conducted on the historical access behavior data through a clicking behavior prediction model, clicking behavior prediction results are obtained, HTML5 resources to be initialized, which are sent by a server terminal, are obtained according to the clicking behavior prediction results, a local cache is updated according to the HTML5 resources to be initialized, whether the HTML5 resources corresponding to page identifiers to be loaded in the local cache are the same as those of the server terminal or not is judged according to page loading requests, judging results are obtained, when judging results are the same as those of the server terminal, the HTML5 resources corresponding to the page identifiers to be loaded in the local cache are used as the HTML5 resources to be loaded, otherwise, the HTML5 resources are obtained from the server terminal according to the page identifiers to be loaded and are used as the HTML5 resources to be loaded, loading and rendering of pages are conducted according to the HTML5 resources to be loaded, and therefore the HTML5 resources in the local cache are enabled to be more consistent with operation habits of users, timeliness of loading the HTML5 resources is improved, and user experience is improved under the condition that comprehensive updating is not needed; according to the method, a page loading request is responded, a preset click level page expansion prediction is conducted according to a page identifier to be loaded and a click behavior prediction result, a page identifier prediction result of the next step is obtained, a local cache is updated according to the page identifier prediction result of the next step, HTML5 resources of the preset click level page are stored in the local cache in advance according to user operation, and timeliness of loading the HTML5 resources is further improved; therefore, the method and the device solve the technical problems of traffic resource waste and slow loading at the same time, and improve user experience.
For S1, a mobile terminal opening request sent by a user may be obtained, or may be a mobile terminal opening request sent by a third party application system.
The mobile terminal opening request refers to a request for opening the mobile terminal.
The mobile terminal refers to a software program which can run on the mobile electronic device. Mobile electronic devices include, but are not limited to: cell-phone, tablet computer, wearing equipment.
And S2, responding to the mobile terminal opening request to open the mobile terminal, and acquiring historical access behavior data from a local cache of the mobile terminal.
Optionally, the step of predicting the click behavior of the historical access behavior data by using a click behavior prediction model to obtain a click behavior prediction result includes: and generating a historical access behavior sequence according to the historical access behavior data, inputting the historical access behavior sequence into a click behavior prediction model to perform click behavior prediction, and obtaining a click behavior prediction result.
Optionally, the step of predicting the click behavior by using a click behavior prediction model to obtain a click behavior prediction result further includes: judging whether the historical access behavior data is empty or not; when the historical access behavior data is empty, acquiring preset click behavior data, and taking the preset click behavior data as a click behavior prediction result; when the historical access behavior data is not empty, generating a historical access behavior sequence according to the historical access behavior data, inputting the historical access behavior sequence into a click behavior prediction model to perform click behavior prediction, and obtaining a click behavior prediction result.
Optionally, the step of generating a historical access behavior sequence according to the historical access behavior data includes: and generating a historical access behavior sequence according to the historical access behavior data by adopting a preset time interval, inputting the historical access behavior sequence into a click behavior prediction model for click behavior prediction, and obtaining a click behavior prediction result.
The preset time interval may be 5 seconds, 10 seconds, 20 seconds, 30 seconds, 1 minute, 2 minutes, and is not specifically limited herein.
Historical access behavior data, namely historical access behavior data of the mobile terminal corresponding to the mobile terminal opening request. Access behavior data includes, but is not limited to: access time, module identification, function identification, page identification.
The module identification may be an identification of a software module uniquely identified by a module name, module ID, etc. Each software module includes at least one software function, each software function including at least one HTML5 page.
The function identifier may be an identifier that uniquely identifies a software function, such as a function name, a function ID, etc.
The page identity may be an identity uniquely identifying an HTML5 page, such as a page name, page ID, etc. HTML5 page, i.e. HTML5 page.
Optionally, the module identifier, the function identifier, the page name or the page ID are adopted to splice in turn, so as to obtain the page identifier.
The click behavior prediction model is a model obtained based on convolutional neural network training.
And S3, determining a page identifier to be updated according to the click behavior prediction result, acquiring an HTML5 resource from a server by the page identifier to be updated, taking the acquired HTML5 resource as the HTML5 resource to be initialized, namely H5 resource, and replacing the HTML5 resource to be initialized with the HTML5 resource in a local cache according to the page identifier.
HTML5 resources, i.e., resources for which HTML5 pages are displayed. HTML5 resources include, but are not limited to: CSS (cascading style sheet), text data, picture resources, audio resources, video resources.
The local cache refers to a local cache corresponding to the mobile terminal.
Optionally, an HTML5 resource of a page identifier is obtained from the server, and then the HTML5 resource of the page identifier is replaced with the HTML5 resource corresponding to the page identifier in the local cache, so that the local cache is updated while obtaining.
For S4, a page load request sent by the user may be obtained, or may be a page load request sent by a third party application system.
Page load requests, i.e. requests to open HTML5 pages at the mobile end.
The page identifier to be loaded is the page identifier of the HTML5 page which needs to be opened at the mobile terminal by the page loading request.
For S5, responding to the page loading request, and judging whether the HTML5 resource corresponding to the page identifier to be loaded in the local cache is the same as the HTML5 resource in the server through the version number of the page identifier to be loaded in the local cache and the version number of the server; when the version number of the page identifier to be loaded in the local cache is the same as that of the page identifier at the server, determining that the judging result is the same as that at the server, otherwise, determining that the judging result is different from that at the server; when the judging result is the same as that of the server, the HTML5 resource corresponding to the page identifier to be loaded in the local cache can be directly used as the HTML5 resource to be loaded, so that timeliness of loading the HTML5 resource is improved, and user experience is improved; and when the judging result is different from that of the server, acquiring the HTML5 resource from the server by the page identifier to be loaded, and taking the acquired HTML5 resource as the HTML5 resource to be loaded.
Optionally, the page identifier to be loaded is obtained from the server to obtain the HTML5 resource, and the local cache is updated according to the obtained HTML5 resource.
For S6, responding to the page loading request, searching the page identifier to be loaded in the click behavior prediction result, and taking all page identifiers of preset click progression corresponding to the page identifiers searched in the click behavior prediction result as page identifier prediction results of the next step; and determining a page identifier needing to be updated in advance according to a page identifier prediction result of the next step, acquiring an HTML5 resource from a server according to the page identifier needing to be updated in advance, and updating the acquired HTML5 resource to the local cache.
It will be appreciated that step S5 and step S6 may be performed synchronously or asynchronously, and are not specifically limited herein.
And S7, loading and rendering the HTML5 resource to be loaded in the page of the mobile terminal, and taking the HTML5 page obtained after loading and rendering as a target HTML5 page.
In one embodiment, before the step of predicting the click behavior of the historical access behavior data by using the click behavior prediction model to obtain a click behavior prediction result, the method includes:
S021: obtaining a plurality of training samples, the training samples comprising: accessing behavior sequence sample data;
s022: dividing the training samples according to a preset dividing rule to obtain a training set and a verification set;
s023: training the model to be trained by adopting the training set to obtain a model to be verified, wherein the model to be trained comprises: the device comprises a convolution layer, a p-Max pooling layer, an activation layer and a full connection layer;
s024: verifying the model to be verified by adopting the verification set to obtain a verification result;
s025: when the verification result is failure, carrying out parameter updating on the model to be verified according to the verification result to obtain the model to be trained, and repeatedly executing the step of training the model to be trained by adopting the training set to obtain the model to be verified until the verification result is successful;
s026: and determining the model to be verified, of which the verification result is successful, as the click behavior prediction model.
The embodiment realizes that the click behavior prediction model is obtained based on convolutional neural network training, and provides a basis for click behavior prediction according to the operation habit of the user, so that the HTML5 resource in the local cache is more in line with the operation habit of the user when the mobile terminal is started, and the timeliness of loading the HTML5 resource is improved and the user experience is improved under the condition that the comprehensive update is not needed.
For S021, a plurality of training samples may be obtained from the database, or may be a plurality of training samples input by the user, or may be a plurality of training samples sent by the third party application system.
The access behavior sequence sample data is sequence data obtained according to the access behavior data.
For S022, each training sample of the plurality of training samples is divided into a training set and a verification set according to a preset division rule. It will be appreciated that the same training sample can only be divided into one of the training set and the validation set.
Preset partitioning rules include, but are not limited to: dividing according to a preset proportion.
For S023, training a model to be trained by adopting the training set based on the gradient lifting decision tree GBDT. The training principle and process of the gradient boosting decision tree are not described in detail herein.
The model to be trained is a model obtained based on convolutional neural network training. The model to be trained comprises: a convolution layer, a p-Max pooling layer, an activation layer and a full connection layer. And the convolution layer is used for extracting the characteristics. The p-Max pooling layer, i.e., the flexible pooling layer, is used to select the p most critical features, preserve the relative order of the p most critical features, and play a critical role in sequential click prediction. And an activation layer which adopts a nonlinear function. The convolution layer, the p-Max pooling layer and the activation layer output first-order feature maps, and repeated times of the convolution layer, the p-Max pooling layer and the activation layer generate a plurality of first-order feature maps.
For S024, the method for verifying the model to be verified by using the verification set may be selected from the prior art, which is not described herein in detail.
For S025, when the verification result is failure, it means that the model to be verified is not trained to be optimal, and at this time, parameter updating is performed on the model to be verified according to the verification result to obtain the model to be trained, and steps S023 to S025 are repeated until the verification result is successful.
The method for updating the parameters of the model to be verified according to the verification result may be selected from the prior art, which is not described herein.
For S026, when the verification result is successful, it means that the model to be verified has been trained to be optimal, at which time the model to be verified whose verification result is successful may be taken as the click behavior prediction model.
In one embodiment, the step of obtaining the HTML5 resource to be initialized sent by the server according to the click behavior prediction result includes:
s31: acquiring page identifiers from the click behavior prediction result by adopting preset duration to obtain a predicted click page identifier set;
S32: acquiring a version number from the local cache according to the page identification set clicked by prediction to obtain a first local version number set;
s33: acquiring a version number from the server according to the page identification set clicked by prediction to obtain a first server version number set;
s34: comparing version numbers of the same page identifier according to the first local version number set and the first server version number set to obtain a plurality of first comparison results;
s35: when the first comparison results are different, the page identifier corresponding to the first comparison results is used as a page identifier to be initialized;
s36: obtaining a page identification set to be initialized according to all the page identifications to be initialized;
s37: and acquiring the HTML5 resource from the server according to the page identification set to be initialized, and obtaining the HTML5 resource to be initialized.
According to the method and the device for loading the HTML5 resources, the HTML5 resources to be initialized, which are sent by the server side, are obtained according to the click behavior prediction result, so that the HTML5 resources to be initialized accord with the operation habit of a user, and the timeliness of loading the HTML5 resources is improved and the user experience is improved under the condition that comprehensive updating is not needed.
And S31, starting to acquire from the beginning part of the click behavior prediction result, acquiring page identifiers within a preset duration, and taking all acquired page identifiers as a page identifier set for predicting clicking.
And S32, respectively acquiring a version number from the local cache by each page identifier in the page identifier set clicked by prediction, taking each acquired version number as a first local version number, and taking all first local version numbers as a first local version number set.
And S33, respectively acquiring a version number from the server by each page identifier in the predicted click page identifier set, taking each acquired version number as a first server version number, and taking all the first server version numbers as a first server version number set.
For S34, acquiring a page identifier from a page identifier set of the predicted click as a target page identifier; comparing the first local version number corresponding to the target page identifier with the first server version number corresponding to the target page identifier, and determining that the first comparison result corresponding to the target page identifier is the same when the first local version number corresponding to the target page identifier is the same as the first server version number corresponding to the target page identifier, otherwise, determining that the first comparison result corresponding to the target page identifier is different; and repeatedly executing the step of acquiring one page identifier from the page identifier set of the predicted click as a target page identifier until determining a first comparison result corresponding to each page identifier in the page identifier set of the predicted click. That is, the number of first comparison results is the same as the number of page identifications in the set of page identifications of the predicted clicks.
For S35, when the first comparison result is different, it means that the version number of the page identifier corresponding to the first comparison result in the local cache is different from the version number of the server, and at this time, the HTML5 resource of the page identifier corresponding to the first comparison result in the local cache is not the same as that of the server, so that the page identifier corresponding to the first comparison result is used as the page identifier to be initialized.
And for S36, taking all the page identifications to be initialized as a page identification set to be initialized.
And for S37, acquiring HTML5 resources from the server according to each page identifier to be initialized in the page identifier set to be initialized, and taking all the acquired HTML5 resources as the HTML5 resources to be initialized.
In one embodiment, the step of obtaining the page identifier set of the predicted click from the predicted click behavior result by using the preset duration includes:
s311: acquiring page classification data, preset initialization progression and preset duration;
s312: and acquiring the page identifier from the click behavior prediction result by adopting the page classification data, the preset initialization level and the preset duration to obtain a page identifier set for predicting clicking.
According to the method and the device for achieving the webpage identification, the page identification is obtained from the click behavior prediction result according to the webpage classification data, the preset initialization level number and the preset duration, so that the number of HTML5 resources required to be updated when the mobile terminal is started is reduced under the condition that the user webpage loading requirement is met, the starting speed of the mobile terminal is improved, and the user experience is improved.
For S311, the page classification data may be obtained from a database, or may be page classification data input by a user, or may be page classification data sent by a third party application system. It will be appreciated that page ranking data may be written in a program file embodying the present application.
The preset initialization level number can be obtained from a database, can be input by a user, and can be sent by a third party application system. It can be appreciated that the preset initialization progression may be written into a program file implementing the present application.
The preset duration can be obtained from a database, can be input by a user, and can be sent by a third party application system. It can be appreciated that the preset duration may be written into a program file implementing the present application.
The page ranking data includes: module identification, function identification, first-level page identification, second-level page identification, third-level page identification and fourth-level page identification. The page identifications of the first level, the page identifications of the second level, the page identifications of the third level and the page identifications of the fourth level are all page identifications.
The preset initialization level is a specific value.
For S312, starting to acquire from the beginning part of the click behavior prediction result, acquiring page identifiers within a preset duration, and taking all acquired page identifiers as a page identifier set to be extracted; and acquiring page identifiers of a preset initialization level number from a page identifier set to be extracted by adopting the page classification data, and taking all the acquired page identifiers as the page identifier set clicked by prediction.
In one embodiment, the step of determining whether the HTML5 resource corresponding to the page identifier to be loaded in the local cache is the same as that in the server side, to obtain a determination result includes:
s51: acquiring a version number from the local cache according to the page identifier to be loaded to obtain a second local version number;
S52: acquiring a version number from the server according to the page identifier to be loaded to obtain a second server version number;
s53: and when the second local version number is the same as the second server version number, determining that the judging result is the same as the server, otherwise, determining that the judging result is different from the server.
The method and the device for loading the HTML5 data in the local cache realize judging whether the HTML5 data in the local cache is the same as the HTML5 data in the server, so that a basis is provided for preferentially loading the HTML5 data in the local cache, timeliness of loading the HTML5 resources is improved, and user experience is improved.
And for S51, searching the version number in the local cache by the page identifier to be loaded, and taking the searched version number as a second local version number.
And for S52, searching the version number in the server by the page identifier to be loaded, and taking the searched version number as a second server version number.
For S53, when the second local version number is the same as the second server version number, which means that the HTML5 resource of the page identifier to be loaded in the local cache is the same as that in the server, it may be determined that the determination result is the same as that in the server; when the second local version number is different from the second server version number, which means that the HTML5 resource of the page identifier to be loaded in the local cache is not the same as that in the server, the determination result may be determined to be different from that in the server.
In one embodiment, the step of performing a preset click progression page expansion prediction according to the page identifier to be loaded and the click behavior prediction result to obtain a page identifier prediction result of a next step, and updating the local cache according to the page identifier prediction result of the next step includes:
s61: searching the page identifier to be loaded in the click behavior prediction result, and taking all page identifiers of preset click progression corresponding to the page identifiers searched in the click behavior prediction result as page identifier prediction results of the next step;
s62: acquiring a version number from the local cache according to each page identifier in the page identifier prediction result of the next step to obtain a third local version number set;
s63: acquiring a version number from the server according to each page identifier in the page identifier prediction result of the next step respectively to obtain a third server version number set;
s64: comparing version numbers of the same page identifier according to the third local version number set and the third server version number set to obtain a plurality of second comparison results;
S65: when the second comparison results are different, the page identifier corresponding to the second comparison results is used as a preset click progression page identifier to be updated;
s66: obtaining a preset click progression page identification set to be updated according to all the preset click progression page identifications to be updated;
s67: acquiring an HTML5 resource from the server according to the preset click progression page identification set to be updated to obtain the preset click progression page HTML5 resource to be updated;
s68: and updating the local cache according to the HTML5 resource of the page with the preset click level to be updated.
According to the method and the device, the HTML5 resources of the preset click level pages are stored in the local cache in advance according to the operation of the user, and the timeliness of loading the HTML5 resources is further improved.
For S61, the preset click progression is a specific value. The preset number of click stages includes, but is not limited to: 1. 2, 3 and 4.
And S62, respectively acquiring a version number of each page identifier in the page identifier prediction result of the next step in the local cache, taking each acquired version number as a third local version number, and taking all third local version numbers as a third local version number set.
And S63, respectively acquiring a version number of each page identifier in the page identifier prediction result of the next step in the server, taking each acquired version number as a third server version number, and taking all third server version numbers as a third server version number set.
For S64, a page identifier is obtained from the page identifier prediction result of the next step and is used as the page identifier to be updated; comparing the third local version number corresponding to the page identifier to be updated with the third server version number corresponding to the page identifier to be updated, and determining that the second comparison result corresponding to the page identifier to be updated is the same when the third local version number corresponding to the page identifier to be updated is the same as the third server version number corresponding to the page identifier to be updated, otherwise, determining that the second comparison result corresponding to the page identifier to be updated is different; and repeatedly executing the step of acquiring a page identifier from the page identifier prediction result of the next step as the page identifier to be updated until determining second comparison results corresponding to the page identifiers in the page identifier prediction result of the next step. That is, the number of second comparison results is the same as the number of page identifications in the page identification prediction result of the next step.
For S65, when the second comparison result is different, it means that the version number of the page identifier corresponding to the second comparison result in the local cache is different from the version number of the server, and at this time, the HTML5 resource of the page identifier corresponding to the second comparison result in the local cache is not the same as that of the server, so that the page identifier corresponding to the second comparison result is used as the page identifier of the preset click number to be updated.
And S66, taking all the preset click level page identifiers to be updated as a preset click level page identifier set to be updated.
And S67, acquiring HTML5 resources from the server according to each preset click progression page identifier to be updated in the preset click progression page identifier set to be updated, and taking all the acquired HTML5 resources as the HTML5 resources of the preset click progression page to be updated.
In an embodiment, after the step of obtaining the mobile terminal opening request, the method further includes:
s81: acquiring a large-batch page update request sent by the server;
s82: responding to the page mass updating request to acquire network type data;
S83: when the network type data is WIFI or 5G, acquiring an HTML5 resource compression packet sent by the server to obtain a large amount of HTML5 resources to be updated;
s84: decompressing the large amount of HTML5 resources to be updated to obtain decompressed HTML5 resources;
s85: and updating the local cache according to the decompressed HTML5 resource.
The embodiment realizes the mass update of the page HTML5 resources in the WIFI or 5G process, and improves the update speed; when the version is updated, the HTML5 resource in the local cache can be directly updated, and the release speed of the version is improved.
And S81, acquiring a large-batch page update request sent by the server through communication connection between the mobile terminal and the server.
The page mass update request refers to a request for mass updating of HTML5 resources.
And for S82, responding to the page mass update request, and acquiring network type data of the mobile electronic equipment of the loading mobile terminal.
Network type data includes, but is not limited to: WIFI, 5G (fifth generation mobile communication technology), 4G (fourth generation mobile communication technology), 3G (third generation mobile communication technology).
For S83, when the network type data is WIFI or 5G, this means that the network speed of the mobile electronic device where the mobile terminal is located is relatively high, and the downloading speed of the HTML5 resources in large batches is relatively high, and the internet surfing experience of the user is not affected; and sending a mass download signal to the server, acquiring an HTML5 resource compression packet sent by the server according to the mass download signal, and taking the acquired HTML5 resource compression packet as a mass of HTML5 resources to be updated.
And for S84, decompressing the large amount of HTML5 resources to be updated, and taking the decompressed HTML5 resources as decompressed HTML5 resources.
Referring to fig. 2, the application further provides a loading device of HTML5 page resources, where the device includes:
a first request obtaining module 100, configured to obtain a mobile terminal opening request;
the click behavior prediction module 200 is configured to respond to the mobile terminal opening request, obtain historical access behavior data, and perform click behavior prediction on the historical access behavior data by using a click behavior prediction model to obtain a click behavior prediction result;
the local initialization updating module 300 is configured to obtain, according to the click behavior prediction result, an HTML5 resource to be initialized sent by a server, and update a local cache according to the HTML5 resource to be initialized;
a second request obtaining module 400, configured to obtain a page loading request, where the page loading request carries a page identifier to be loaded;
the page loading module 500 is configured to determine whether an HTML5 resource corresponding to the page identifier to be loaded in the local cache is the same as that in the server, and obtain a determination result, when the determination result is the same as that in the server, take the HTML5 resource corresponding to the page identifier to be loaded in the local cache as the HTML5 resource to be loaded, otherwise, obtain the HTML5 resource from the server as the HTML5 resource to be loaded according to the page identifier to be loaded;
Responding to the page loading request 600, judging to respond to the page loading request, and carrying out preset click level page expansion prediction according to the page identifier to be loaded and the click behavior prediction result to obtain a page identifier prediction result of the next step, and updating the local cache according to the page identifier prediction result of the next step;
and the target HTML5 page determining module 700 is configured to load and render a page according to the HTML5 resource to be loaded, so as to obtain a target HTML5 page.
According to the method, historical access behavior data are obtained by responding to a mobile terminal opening request, clicking behavior prediction is conducted on the historical access behavior data through a clicking behavior prediction model, clicking behavior prediction results are obtained, HTML5 resources to be initialized, which are sent by a server terminal, are obtained according to the clicking behavior prediction results, a local cache is updated according to the HTML5 resources to be initialized, whether the HTML5 resources corresponding to page identifiers to be loaded in the local cache are the same as those of the server terminal or not is judged according to page loading requests, judging results are obtained, when judging results are the same as those of the server terminal, the HTML5 resources corresponding to the page identifiers to be loaded in the local cache are used as the HTML5 resources to be loaded, otherwise, the HTML5 resources are obtained from the server terminal according to the page identifiers to be loaded and are used as the HTML5 resources to be loaded, loading and rendering of pages are conducted according to the HTML5 resources to be loaded, and therefore the HTML5 resources in the local cache are enabled to be more consistent with operation habits of users, timeliness of loading the HTML5 resources is improved, and user experience is improved under the condition that comprehensive updating is not needed; according to the method, a page loading request is responded, a preset click level page expansion prediction is conducted according to a page identifier to be loaded and a click behavior prediction result, a page identifier prediction result of the next step is obtained, a local cache is updated according to the page identifier prediction result of the next step, HTML5 resources of the preset click level page are stored in the local cache in advance according to user operation, and timeliness of loading the HTML5 resources is further improved; therefore, the method and the device solve the technical problems of traffic resource waste and slow loading at the same time, and improve user experience.
Referring to fig. 3, a computer device is further provided in the embodiment of the present application, where the computer device may be a server, and the internal structure of the computer device may be as shown in fig. 3. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the computer is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer equipment is used for storing data such as loading methods of HTML5 page resources. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a method of loading HTML5 page resources. The loading method of the HTML5 page resource comprises the following steps: acquiring a mobile terminal starting request; responding to the mobile terminal starting request, acquiring historical access behavior data, and carrying out click behavior prediction on the historical access behavior data by adopting a click behavior prediction model to obtain a click behavior prediction result; acquiring an HTML5 resource to be initialized sent by a server according to the click behavior prediction result, and updating a local cache according to the HTML5 resource to be initialized; acquiring a page loading request, wherein the page loading request carries a page identifier to be loaded; responding to the page loading request, judging whether the HTML5 resource corresponding to the page identifier to be loaded in the local cache is the same as that in the server side, obtaining a judging result, taking the HTML5 resource corresponding to the page identifier to be loaded in the local cache as the HTML5 resource to be loaded when the judging result is the same as that in the server side, otherwise, acquiring the HTML5 resource from the server side as the HTML5 resource to be loaded according to the page identifier to be loaded; responding to the page loading request, carrying out preset click level page expansion prediction according to the page identifier to be loaded and the click behavior prediction result to obtain a page identifier prediction result of the next step, and updating the local cache according to the page identifier prediction result of the next step; and loading and rendering the page according to the HTML5 resource to be loaded to obtain a target HTML5 page.
According to the method, historical access behavior data are obtained by responding to a mobile terminal opening request, clicking behavior prediction is conducted on the historical access behavior data through a clicking behavior prediction model, clicking behavior prediction results are obtained, HTML5 resources to be initialized, which are sent by a server terminal, are obtained according to the clicking behavior prediction results, a local cache is updated according to the HTML5 resources to be initialized, whether the HTML5 resources corresponding to page identifiers to be loaded in the local cache are the same as those of the server terminal is judged according to page loading requests, judging results are obtained, when judging results are the same as those of the server terminal, the HTML5 resources corresponding to the page identifiers to be loaded in the local cache are used as the HTML5 resources to be loaded, otherwise, the HTML5 resources to be loaded are obtained from the server terminal according to the page identifiers to be loaded, loading and rendering of the page are conducted according to the HTML5 resources to be loaded, and therefore the HTML5 resources in the local cache are more consistent with operation habits of users, timeliness of loading the HTML5 resources is improved under the condition that comprehensive updating is not needed, and user experience is improved; according to the method, a page loading request is responded, a preset click level page expansion prediction is conducted according to a page identifier to be loaded and a click behavior prediction result, a page identifier prediction result of the next step is obtained, a local cache is updated according to the page identifier prediction result of the next step, HTML5 resources of the preset click level page are stored in the local cache in advance according to user operation, and timeliness of loading the HTML5 resources is further improved; therefore, the method and the device solve the technical problems of traffic resource waste and slow loading at the same time, and improve user experience.
An embodiment of the present application further provides a computer readable storage medium having a computer program stored thereon, which when executed by a processor implements a method for loading HTML5 page resources, including the steps of: acquiring a mobile terminal starting request; responding to the mobile terminal starting request, acquiring historical access behavior data, and carrying out click behavior prediction on the historical access behavior data by adopting a click behavior prediction model to obtain a click behavior prediction result; acquiring an HTML5 resource to be initialized sent by a server according to the click behavior prediction result, and updating a local cache according to the HTML5 resource to be initialized; acquiring a page loading request, wherein the page loading request carries a page identifier to be loaded; responding to the page loading request, judging whether the HTML5 resource corresponding to the page identifier to be loaded in the local cache is the same as that in the server side, obtaining a judging result, taking the HTML5 resource corresponding to the page identifier to be loaded in the local cache as the HTML5 resource to be loaded when the judging result is the same as that in the server side, otherwise, acquiring the HTML5 resource from the server side as the HTML5 resource to be loaded according to the page identifier to be loaded; responding to the page loading request, carrying out preset click level page expansion prediction according to the page identifier to be loaded and the click behavior prediction result to obtain a page identifier prediction result of the next step, and updating the local cache according to the page identifier prediction result of the next step; and loading and rendering the page according to the HTML5 resource to be loaded to obtain a target HTML5 page.
According to the loading method of the HTML5 page resource, the historical access behavior data is obtained by responding to the starting request of the mobile terminal, the clicking behavior prediction is carried out on the historical access behavior data by adopting the clicking behavior prediction model, the clicking behavior prediction result is obtained, the HTML5 resource to be initialized sent by the server terminal is obtained according to the clicking behavior prediction result, the local cache is updated according to the HTML5 resource to be initialized, whether the HTML5 resource corresponding to the page identifier to be loaded in the local cache is the same as the HTML5 resource to be loaded in the server terminal is judged according to the page loading request, when the judging result is the same as the HTML5 resource to be loaded in the server terminal, otherwise, the HTML5 resource is obtained from the server terminal according to the page identifier to be loaded as the HTML5 resource to be loaded, and the loading and rendering of the page are carried out according to the HTML5 resource to be loaded, so that the HTML5 resource in the local cache is more in line with the operation habit of a user, the timeliness of loading the HTML5 resource is improved under the condition that the overall updating is not needed, and the user experience is improved; according to the method, a page loading request is responded, a preset click level page expansion prediction is conducted according to a page identifier to be loaded and a click behavior prediction result, a page identifier prediction result of the next step is obtained, a local cache is updated according to the page identifier prediction result of the next step, HTML5 resources of the preset click level page are stored in the local cache in advance according to user operation, and timeliness of loading the HTML5 resources is further improved; therefore, the method and the device solve the technical problems of traffic resource waste and slow loading at the same time, and improve user experience.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium provided herein and used in embodiments may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, apparatus, article or method that comprises the element.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the claims, and all equivalent structures or equivalent processes using the descriptions and drawings of the present application, or direct or indirect application in other related technical fields are included in the scope of the claims of the present application.

Claims (9)

1. A method for loading HTML5 page resources, the method comprising:
acquiring a mobile terminal starting request;
responding to the mobile terminal starting request, acquiring historical access behavior data, and carrying out click behavior prediction on the historical access behavior data by adopting a click behavior prediction model to obtain a click behavior prediction result;
Acquiring an HTML5 resource to be initialized sent by a server according to the click behavior prediction result, and updating a local cache according to the HTML5 resource to be initialized;
acquiring a page loading request, wherein the page loading request carries a page identifier to be loaded;
responding to the page loading request, judging whether the HTML5 resource corresponding to the page identifier to be loaded in the local cache is the same as that in the server side, obtaining a judging result, taking the HTML5 resource corresponding to the page identifier to be loaded in the local cache as the HTML5 resource to be loaded when the judging result is the same as that in the server side, otherwise, acquiring the HTML5 resource from the server side as the HTML5 resource to be loaded according to the page identifier to be loaded;
responding to the page loading request, carrying out preset click level page expansion prediction according to the page identifier to be loaded and the click behavior prediction result to obtain a page identifier prediction result of the next step, and updating the local cache according to the page identifier prediction result of the next step;
loading and rendering the page according to the HTML5 resource to be loaded to obtain a target HTML5 page;
The step of obtaining the HTML5 resource to be initialized sent by the server according to the click behavior prediction result includes:
acquiring page identifiers from the click behavior prediction result by adopting preset duration to obtain a predicted click page identifier set;
acquiring a version number from the local cache according to the page identification set clicked by prediction to obtain a first local version number set;
acquiring a version number from the server according to the page identification set clicked by prediction to obtain a first server version number set;
comparing version numbers of the same page identifier according to the first local version number set and the first server version number set to obtain a plurality of first comparison results;
when the first comparison results are different, the page identifier corresponding to the first comparison results is used as a page identifier to be initialized;
obtaining a page identification set to be initialized according to all the page identifications to be initialized;
and acquiring the HTML5 resource from the server according to the page identification set to be initialized, and obtaining the HTML5 resource to be initialized.
2. The method for loading HTML5 page resources according to claim 1, wherein before the step of predicting the click behavior of the historical access behavior data by using a click behavior prediction model to obtain a click behavior prediction result, the method comprises:
Obtaining a plurality of training samples, the training samples comprising: accessing behavior sequence sample data;
dividing the training samples according to a preset dividing rule to obtain a training set and a verification set;
training the model to be trained by adopting the training set to obtain a model to be verified, wherein the model to be trained comprises: the device comprises a convolution layer, a p-Max pooling layer, an activation layer and a full connection layer;
verifying the model to be verified by adopting the verification set to obtain a verification result;
when the verification result is failure, carrying out parameter updating on the model to be verified according to the verification result to obtain the model to be trained, and repeatedly executing the step of training the model to be trained by adopting the training set to obtain the model to be verified until the verification result is successful;
and determining the model to be verified, of which the verification result is successful, as the click behavior prediction model.
3. The method for loading HTML5 page resources according to claim 1, wherein the step of obtaining a set of page identifiers for predicted clicks by obtaining page identifiers from the click behavior prediction result using a preset duration includes:
Acquiring page classification data, preset initialization progression and preset duration;
and acquiring the page identifier from the click behavior prediction result by adopting the page classification data, the preset initialization level and the preset duration to obtain a page identifier set for predicting clicking.
4. The method for loading HTML5 page resources according to claim 1, wherein the step of determining whether the HTML5 resource corresponding to the page identifier to be loaded in the local cache is the same as that in the server, to obtain a determination result includes:
acquiring a version number from the local cache according to the page identifier to be loaded to obtain a second local version number;
acquiring a version number from the server according to the page identifier to be loaded to obtain a second server version number;
and when the second local version number is the same as the second server version number, determining that the judging result is the same as the server, otherwise, determining that the judging result is different from the server.
5. The method for loading HTML5 page resources according to claim 1, wherein the step of performing a preset click progression page expansion prediction according to the page identifier to be loaded and the click behavior prediction result to obtain a next page identifier prediction result, and updating the local cache according to the next page identifier prediction result includes:
Searching the page identifier to be loaded in the click behavior prediction result, and taking all page identifiers of preset click progression corresponding to the page identifiers searched in the click behavior prediction result as page identifier prediction results of the next step;
acquiring a version number from the local cache according to each page identifier in the page identifier prediction result of the next step to obtain a third local version number set;
acquiring a version number from the server according to each page identifier in the page identifier prediction result of the next step respectively to obtain a third server version number set;
comparing version numbers of the same page identifier according to the third local version number set and the third server version number set to obtain a plurality of second comparison results;
when the second comparison results are different, the page identifier corresponding to the second comparison results is used as a preset click progression page identifier to be updated;
obtaining a preset click progression page identification set to be updated according to all the preset click progression page identifications to be updated;
acquiring an HTML5 resource from the server according to the preset click progression page identification set to be updated to obtain the preset click progression page HTML5 resource to be updated;
And updating the local cache according to the HTML5 resource of the page with the preset click level to be updated.
6. The method for loading HTML5 page resources according to claim 1, further comprising, after the step of obtaining the mobile side start request:
acquiring a large-batch page update request sent by the server;
responding to the page mass updating request to acquire network type data;
when the network type data is WIFI or 5G, acquiring an HTML5 resource compression packet sent by the server to obtain a large amount of HTML5 resources to be updated;
decompressing the large amount of HTML5 resources to be updated to obtain decompressed HTML5 resources;
and updating the local cache according to the decompressed HTML5 resource.
7. An HTML5 page resource loading device, the device comprising:
the first request acquisition module is used for acquiring a mobile terminal opening request;
the click behavior prediction module is used for responding to the mobile terminal opening request, acquiring historical access behavior data, and performing click behavior prediction on the historical access behavior data by adopting a click behavior prediction model to obtain a click behavior prediction result;
The local initialization updating module is used for acquiring HTML5 resources to be initialized sent by the server according to the click behavior prediction result, and updating a local cache according to the HTML5 resources to be initialized;
the second request acquisition module is used for acquiring a page loading request, wherein the page loading request carries a page identifier to be loaded;
the page loading module is used for responding to the page loading request, judging whether the HTML5 resource corresponding to the page identifier to be loaded in the local cache is the same as that in the server side, obtaining a judging result, and taking the HTML5 resource corresponding to the page identifier to be loaded in the local cache as the HTML5 resource to be loaded when the judging result is the same as that in the server side, otherwise, acquiring the HTML5 resource from the server side as the HTML5 resource to be loaded according to the page identifier to be loaded;
responding to the page loading request, judging to respond to the page loading request, and carrying out preset click level page expansion prediction according to the page identifier to be loaded and the click behavior prediction result to obtain a page identifier prediction result of the next step, and updating the local cache according to the page identifier prediction result of the next step;
The target HTML5 page determining module is used for loading and rendering the page according to the HTML5 resource to be loaded to obtain a target HTML5 page;
the step of obtaining the HTML5 resource to be initialized sent by the server according to the click behavior prediction result includes:
acquiring page identifiers from the click behavior prediction result by adopting preset duration to obtain a predicted click page identifier set;
acquiring a version number from the local cache according to the page identification set clicked by prediction to obtain a first local version number set;
acquiring a version number from the server according to the page identification set clicked by prediction to obtain a first server version number set;
comparing version numbers of the same page identifier according to the first local version number set and the first server version number set to obtain a plurality of first comparison results;
when the first comparison results are different, the page identifier corresponding to the first comparison results is used as a page identifier to be initialized;
obtaining a page identification set to be initialized according to all the page identifications to be initialized;
and acquiring the HTML5 resource from the server according to the page identification set to be initialized, and obtaining the HTML5 resource to be initialized.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202110213331.3A 2021-02-25 2021-02-25 HTML5 page resource loading method, device, equipment and storage medium Active CN112905939B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110213331.3A CN112905939B (en) 2021-02-25 2021-02-25 HTML5 page resource loading method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110213331.3A CN112905939B (en) 2021-02-25 2021-02-25 HTML5 page resource loading method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112905939A CN112905939A (en) 2021-06-04
CN112905939B true CN112905939B (en) 2024-01-23

Family

ID=76107203

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110213331.3A Active CN112905939B (en) 2021-02-25 2021-02-25 HTML5 page resource loading method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112905939B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113419784A (en) * 2021-06-28 2021-09-21 未鲲(上海)科技服务有限公司 Page resource caching method, device, equipment and medium
CN113282354B (en) * 2021-06-28 2023-04-07 中国平安人寿保险股份有限公司 H5 page loading method, device and equipment of application program and storage medium
CN113326080B (en) * 2021-06-30 2023-08-15 中国平安人寿保险股份有限公司 H5 page loading method, device, equipment and storage medium
CN113694523A (en) * 2021-08-30 2021-11-26 上海哔哩哔哩科技有限公司 H5 game display method and device based on mobile terminal APP and computer equipment
CN113703815B (en) * 2021-10-29 2022-02-11 腾讯科技(深圳)有限公司 Offline resource updating method, device, terminal and storage medium
CN115113962A (en) * 2022-06-17 2022-09-27 北京城市网邻信息技术有限公司 Interface skipping method and device, electronic equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108549700A (en) * 2018-04-17 2018-09-18 携程旅游网络技术(上海)有限公司 Pre-searching method and its system, storage medium, the electronic equipment of the page
CN110168539A (en) * 2017-01-13 2019-08-23 微软技术许可有限责任公司 Fast Page load in mixing application
CN110442810A (en) * 2019-08-08 2019-11-12 广州华建工智慧科技有限公司 A kind of mobile terminal BIM model intelligent buffer method based on DeepFM proposed algorithm
CN110491213A (en) * 2019-09-04 2019-11-22 江苏弘学信息科技有限公司 A kind of logistics culture multimedia show tutoring system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110168539A (en) * 2017-01-13 2019-08-23 微软技术许可有限责任公司 Fast Page load in mixing application
CN108549700A (en) * 2018-04-17 2018-09-18 携程旅游网络技术(上海)有限公司 Pre-searching method and its system, storage medium, the electronic equipment of the page
CN110442810A (en) * 2019-08-08 2019-11-12 广州华建工智慧科技有限公司 A kind of mobile terminal BIM model intelligent buffer method based on DeepFM proposed algorithm
CN110491213A (en) * 2019-09-04 2019-11-22 江苏弘学信息科技有限公司 A kind of logistics culture multimedia show tutoring system

Also Published As

Publication number Publication date
CN112905939A (en) 2021-06-04

Similar Documents

Publication Publication Date Title
CN112905939B (en) HTML5 page resource loading method, device, equipment and storage medium
CN108304498B (en) Webpage data acquisition method and device, computer equipment and storage medium
CN110427368B (en) Data processing method and device, electronic equipment and storage medium
US20170289311A1 (en) Updating Web Resources
CN108809718B (en) Network access method, system, computer device and medium based on virtual resources
CN108804159B (en) Javascript module loading method and preprocessing method and device thereof, and computer equipment
CN107276842B (en) Interface test method and device and electronic equipment
CN107257390B (en) URL address resolution method and system
CN109597618B (en) Program development method, program development device, computer device, and storage medium
CN110069264A (en) Construct method, apparatus, computer equipment and the storage medium of resource packet
CN111431767B (en) Multi-browser resource synchronization method and device, computer equipment and storage medium
CN110020280B (en) Application page display method and device, storage medium and computer equipment
CN111381913A (en) Front-end multi-language loading adaptation method and device, computer equipment and storage medium
CN111881391A (en) Static network resource preloading method, data model training method and device
CN113282354B (en) H5 page loading method, device and equipment of application program and storage medium
CN111026988A (en) Page loading method, device and system and computer equipment
CN113360300B (en) Interface call link generation method, device, equipment and readable storage medium
CN113489650B (en) Routing method, device and equipment of client and storage medium
CN113419784A (en) Page resource caching method, device, equipment and medium
CN105912357B (en) Starting method and device of hybrid application
WO2015183235A1 (en) Response based on browser engine
CN107679168B (en) Target website content acquisition method based on java platform
CN114610973A (en) Information search matching method and device, computer equipment and storage medium
CN112420034B (en) Speech recognition method, system, electronic device and storage medium
CN114580533A (en) Method, apparatus, device, medium, and program product for training feature extraction model

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20231226

Address after: Room 1102, Building 4, Zhonghao International Commercial Center, No. 672 Xintang Road, Shangcheng District, Hangzhou City, Zhejiang Province, 310000

Applicant after: Hangzhou Siyiou Technology Group Co.,Ltd.

Address before: 518000 Room 202, block B, aerospace micromotor building, No.7, Langshan No.2 Road, Xili street, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: Shenzhen LIAN intellectual property service center

Effective date of registration: 20231226

Address after: 518000 Room 202, block B, aerospace micromotor building, No.7, Langshan No.2 Road, Xili street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: Shenzhen LIAN intellectual property service center

Address before: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant before: PING AN PUHUI ENTERPRISE MANAGEMENT Co.,Ltd.

GR01 Patent grant
GR01 Patent grant