CN115858978A - Page loading method and device based on updated resources - Google Patents

Page loading method and device based on updated resources Download PDF

Info

Publication number
CN115858978A
CN115858978A CN202211507258.1A CN202211507258A CN115858978A CN 115858978 A CN115858978 A CN 115858978A CN 202211507258 A CN202211507258 A CN 202211507258A CN 115858978 A CN115858978 A CN 115858978A
Authority
CN
China
Prior art keywords
resource
updated
original
file
resource file
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
CN202211507258.1A
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.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech 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 China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202211507258.1A priority Critical patent/CN115858978A/en
Publication of CN115858978A publication Critical patent/CN115858978A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the invention provides a page loading method and a device based on updated resources, wherein the method comprises the following steps: acquiring an updated resource file; according to the updated resource file, performing dynamic resource update on the original resource file of the original page to obtain an updated resource to be loaded; and responding to a page access request input by a user, performing page rendering according to the updated resource to be loaded to obtain an updated user visual interface, and dynamically updating the updated resource file without restarting a client, so that the updated resource file takes effect in real time, and the starting efficiency and the user experience are greatly improved.

Description

Page loading method and device based on updated resources
Technical Field
The invention relates to the technical field of computers, in particular to a page loading method and device based on updated resources.
Background
At present, various mobile clients usually adopt a hybrid development mode, and the hybrid development brings a problem that an application program (App) needs to be loaded with online H5 (HTML 5) resources when being started, and the App can be normally used after the resources are loaded, so that the starting time is long, the starting is slow, and the flow of a user needs to be consumed during each starting. In the related technology, the H5 resources are packaged into a compression package, the H5 compression package is downloaded when the APP is started, and the new H5 resources are decompressed and applied after the APP is started next time, so that a user can quickly enter a page and the starting speed of a client is increased. However, in the related scheme, a user sees a page rendered by the previous version of the H5 resource after starting the APP, if the server releases the new version, the user cannot see the page rendered by the new version of the H5 resource in time, and if the user wants to run the new version of the H5 resource, the user needs to download a complete new version of the H5 resource package and restart the client, which is complex in operation, low in starting efficiency, and poor in user experience.
Disclosure of Invention
One object of the present invention is to provide a page loading method based on updated resources, which dynamically updates an updated resource file without restarting a client, so that the updated resource file becomes effective in real time, and the start efficiency and the user experience are greatly improved. The invention also aims to provide a page loading device based on the updated resource. It is yet another object of the present invention to provide a computer readable medium. It is a further object of the present invention to provide a computer apparatus.
In order to achieve the above object, the present invention discloses a page loading method based on updated resources, which includes:
acquiring an updated resource file;
according to the updated resource file, performing dynamic resource update on the original resource file of the original page to obtain an updated resource to be loaded;
and responding to a page access request input by a user, and rendering a page according to the updated resource to be loaded to obtain an updated user visual interface.
Preferably, the original page comprises a plurality of original resource files;
according to the updated resource file, dynamically updating the resource of the original resource file of the original page to obtain the updated resource to be loaded, including:
matching each original resource file with an updated resource file;
if the matching is successful, replacing the corresponding original resource file with the updated resource file to obtain the updated resource to be loaded;
and if the matching fails, combining the updated resource file with the original resource file to obtain the updated resource to be loaded.
Preferably, before replacing the updated resource file with the corresponding original resource file to obtain the updated resource to be loaded, the method further includes:
judging whether the occupied space of the updated resource file is larger than a preset space threshold value or not;
if so, comparing the resource content of the original resource file with the resource content of the updated resource file, and replacing the resource content of the inconsistent updated resource file with the resource content of the corresponding original resource file to obtain an updated target resource file;
obtaining updated resources to be loaded according to the target resource file and original resource files except the original resource file in the plurality of original resource files;
if not, continuing to execute the step of replacing the updated resource file with the corresponding original resource file to obtain the updated resource to be loaded.
Preferably, the resource files comprise hypertext markup language files, cascading style sheet files and script language files;
the resource content comprises a framework of a hypertext markup language, a style of a cascading style sheet and a script function method.
Preferably, the obtaining of the updated resource file includes:
responding to an application starting instruction, sending a resource updating query request to a server, and receiving an online updating resource list sent by the server;
and determining an updated resource file according to the online updated resource list and the stored original resource list, and downloading the updated resource file.
Preferably, the online update resource list includes a plurality of online update resources and a hash code of each online update resource, and the original resource list includes a plurality of original resources and a hash code of each original resource;
determining an updated resource file according to the online updated resource list and the stored original resource list, including:
matching each online updated resource with the original resource, and comparing hash codes of the successfully matched resources;
and if the hash code of the online updated resource is different from the hash code of the corresponding original resource, determining the online updated resource as an updated resource file.
Preferably, after downloading the updated resource file, the method further includes:
and updating the original resource list according to the downloaded updated resource file to obtain an updated original resource list.
The invention also discloses a page loading device based on the updated resource, which comprises:
an acquisition unit configured to acquire an updated resource file;
the first resource updating unit is used for carrying out dynamic resource updating on the original resource file of the original page according to the updated resource file to obtain an updated resource to be loaded;
and the page rendering unit is used for responding to a page access request input by a user and performing page rendering according to the updated resource to be loaded to obtain an updated user visual interface.
Preferably, the original page comprises a plurality of original resource files;
the first resource updating unit is specifically used for matching each original resource file with an updated resource file; if the matching is successful, replacing the corresponding original resource file with the updated resource file to obtain the updated resource to be loaded; and if the matching fails, combining the updated resource file with the original resource file to obtain the updated resource to be loaded.
Preferably, the apparatus further comprises:
the space judgment unit is used for judging whether the occupied space of the updated resource file is larger than a preset space threshold value or not; if not, triggering the first resource updating unit to continuously execute the step of replacing the updated resource file with the corresponding original resource file to obtain the updated resource to be loaded;
the content updating unit is used for comparing the resource content of the original resource file with the resource content of the updated resource file if the resource content of the original resource file is the same as the resource content of the updated resource file, and replacing the resource content of the inconsistent updated resource file with the resource content of the corresponding original resource file to obtain an updated target resource file;
and the second resource updating unit is used for obtaining the updated resource to be loaded according to the target resource file and the original resource files except the original resource file in the plurality of original resource files.
Preferably, the obtaining unit is specifically configured to send a resource update query request to the server in response to the application start instruction, and receive an online update resource list sent by the server; and determining an updated resource file according to the online updated resource list and the stored original resource list, and downloading the updated resource file.
Preferably, the online updated resource list includes a plurality of online updated resources and a hash code of each online updated resource, and the original resource list includes a plurality of original resources and a hash code of each original resource;
the acquisition unit is specifically used for matching each online updated resource with the original resource and comparing the hash codes of the successfully matched resources; and if the hash code of the online updated resource is different from the hash code of the corresponding original resource, determining the online updated resource as an updated resource file.
Preferably, the apparatus further comprises:
and the list updating unit is used for updating the original resource list according to the downloaded updated resource file to obtain an updated original resource list.
The invention also discloses a computer-readable medium, on which a computer program is stored which, when executed by a processor, implements a method as described above.
The invention also discloses a computer device comprising a memory for storing information comprising program instructions and a processor for controlling the execution of the program instructions, the processor implementing the method as described above when executing the program.
The invention also discloses a computer program product comprising computer programs/instructions which, when executed by a processor, implement the method as described above.
The invention obtains an updated resource file; according to the updated resource file, performing dynamic resource update on the original resource file of the original page to obtain an updated resource to be loaded; and responding to a page access request input by a user, performing page rendering according to the updated resource to be loaded to obtain an updated user visual interface, and dynamically updating the updated resource file without restarting a client, so that the updated resource file takes effect in real time, and the starting efficiency and the user experience are greatly improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a page loading method based on updated resources according to an embodiment of the present invention;
fig. 2 is a flowchart of another updated resource-based page loading method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a device for loading a page based on an updated resource according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the page loading method and apparatus based on the updated resource disclosed in the present application can be used in the technical field of artificial intelligence, and can also be used in any field except the technical field of artificial intelligence.
In order to facilitate understanding of the technical solutions provided in the present application, the following first describes relevant contents of the technical solutions in the present application. At present, in order to realize rapid development iteration and save development cost and to make user experience of each operating system consistent, various mobile clients adopt a hybrid development mode, that is: the logic of the bottom layer and the native interaction uses native development, and the business logic part of graphical interface display, interaction with the user and frequent change adopts H5 development, so that one-time development is realized, and two ends are shared simultaneously. Among them, H5 is HTML5 application development and App development using a network (Web) technology. The Web technology needs to be supported by a browser to display and interact with a user, so that the mainly used technologies are HTML5, JS (JavaScript), cascading Style Sheets (CSS) and the like, a webpage view (WebView) is used as a carrier in a mobile client, and the WebView is a browser container of a mobile terminal. Hybrid development (Hybrid App development) is a Hybrid application that utilizes the development technologies of native and H5. The native code part provides a browser container for the H5 by using WebView, and the main service realization and interface display of the program are realized by using Web technology related to the H5. Native App development (Native App development) is to develop App software on a mobile platform using a development language, a development class library, and a development tool that are provided.
The architecture of the hybrid mobile client includes a H5 portion and a native portion, the H5 portion including, but not limited to, HTML files, JS files, CSS files, static resource files (e.g., pictures, video), font files. When the mobile client is started, the H5 resource file in the local disk is loaded and read into the memory, and a user interaction interface and an execution service logic are loaded and rendered in WebView.
The invention can automatically identify the newly released H5 resource on line, and the difference is downloaded and validated by comparing the local off-line H5 resource with the H5 resource file of the on-line version, thereby saving the flow, updating the difference in real time, ensuring the user experience, being immediately validated without restarting the client and improving the starting efficiency.
The following describes an implementation process of the updated resource-based page loading method according to the embodiment of the present invention, taking the updated resource-based page loading apparatus as an execution subject. It can be understood that the execution subject of the update resource-based page loading method provided by the embodiment of the present invention includes, but is not limited to, an update resource-based page loading apparatus.
Fig. 1 is a flowchart of a page loading method based on updated resources according to an embodiment of the present invention, and as shown in fig. 1, the method includes:
step 101, obtaining an updated resource file.
And 102, according to the updated resource file, dynamically updating the resource of the original resource file of the original page to obtain the updated resource to be loaded.
In the embodiment of the invention, the original page comprises a plurality of original resource files.
And 103, responding to a page access request input by a user, and rendering a page according to the updated resource to be loaded to obtain an updated user visual interface.
It should be noted that the technical solutions in the present application, such as obtaining, storing, using, and processing data, all conform to relevant regulations of national laws and regulations. The user information in the embodiment of the application is obtained through legal compliance, and the user information is obtained, stored, used, processed and the like through authorization approval of a client.
In the technical scheme provided by the embodiment of the invention, the updated resource file is obtained; according to the updated resource file, performing dynamic resource update on the original resource file of the original page to obtain an updated resource to be loaded; and responding to a page access request input by a user, performing page rendering according to the updated resource to be loaded to obtain an updated user visual interface, dynamically updating the updated resource file without restarting a client, so that the updated resource file takes effect in real time, and the starting efficiency and the user experience are greatly improved.
Fig. 2 is a flowchart of another updated resource-based page loading method according to an embodiment of the present invention, and as shown in fig. 2, the method includes:
step 201, responding to the application starting instruction, sending a resource updating query request to the server, and receiving an online updating resource list sent by the server.
In the embodiment of the invention, each step is executed by the page loading device based on the updated resource.
In the embodiment of the invention, in the starting state of the mobile client, a user can input an application starting instruction by waking up application operation, wherein the waking up application operation comprises but is not limited to the operation of returning an application background to a foreground or the operation of lighting up a screen of the mobile client; responding to an application starting instruction, sending a resource updating query request to a server to request the server to query whether the online resource generates updating; and after the server side finishes the query, if the online resource is updated, returning the online updated resource list to the client side so as to return the updated online resource to the client side.
Step 202, determining an updated resource file according to the online updated resource list and the stored original resource list, and downloading the updated resource file.
In the embodiment of the invention, the online updated resource list comprises a plurality of online updated resources and hash codes (hashcodes) of the updated resources on each line, the original resource list comprises a plurality of original resources and the hash codes of each original resource, and the original resource list is locally maintained by the client. As an alternative, the resource identifier corresponding to each resource includes a resource name, a hash code, and a file type, for example: in the resource identifier home.59512c0b.js, home is a resource name, 59512c0b is a hashcode, and js is a file type. And when the server side issues the updated resource file each time, the updated resource file occurs, and the hashcode generated by compiling is changed.
Specifically, each online updated resource is matched with the original resource, hashcodes of the successfully matched resources are compared, and if the hashcodes of the online updated resources are different from the hashcodes of the corresponding original resources, the online updated resources are determined as the updated resource files.
In the embodiment of the invention, the resource name and the file type of each original resource are matched according to the resource name and the file type of the online updated resource, if the matching is successful, the hash code of the resource is compared, if the hash code of the original resource is different from the hash code of the online updated resource, the resource is updated, the corresponding online updated resource is determined as the updated resource file, and the updated resource file is downloaded into the memory.
And further, saving the updated resource file to a disk.
Further, if the online updated resource is not matched with all the original resources, the online updated resource is determined to be an updated resource file, the updated resource file is downloaded to the memory, and the updated resource file is stored to the disk.
And further, updating the original resource list according to the downloaded updated resource file to obtain an updated original resource list. Specifically, for an updated resource file successfully matched with the original resource, replacing the resource identifier of the updated resource file with the corresponding resource identifier of the original resource; and for the updated resource file which is not matched with the original resource, adding the record of the resource identifier of the updated resource file to the original resource list.
In the embodiment of the invention, when the online resource of the server side is updated, only the differential downloading needs to be carried out on the resource file which is updated, and the full resource file does not need to be downloaded, so that the flow can be saved, and the updating speed can be improved.
Step 203, matching each original resource file with the updated resource file, and if the matching is successful, executing step 204; if the match fails, go to step 208.
In the embodiment of the present invention, the updated resource file is matched with each original resource file, if the matching is successful, it indicates that the original resource file is updated, and step 204 is continuously executed; if the matching fails, it indicates that the updated resource file is the new resource file, and step 208 is continuously executed.
Step 204, judging whether the occupied space of the updated resource file is larger than a preset space threshold, if so, executing step 205; if not, go to step 207.
In the embodiment of the present invention, the spatial threshold may be set according to actual requirements, which is not limited in the embodiment of the present invention.
Specifically, the space occupied by the updated resource file is compared with the space threshold, and if the space occupied by the updated resource file is greater than the space threshold, it indicates that the file is large, and it takes a long time to replace the whole file, and step 205 is continuously executed; if the space occupied by the updated resource file is less than or equal to the space threshold, indicating that the file is small, continue to execute step 207.
Step 205, comparing the resource content of the original resource file with the resource content of the updated resource file, and replacing the resource content of the inconsistent updated resource file with the resource content of the corresponding original resource file to obtain the updated target resource file.
In the embodiment of the invention, the resource files comprise hypertext markup language (HTML) files, cascading Style Sheets (CSS) files and script language (JS) files; the resource content includes a framework of hypertext markup language (HTML), styles of Cascading Style Sheets (CSS), and script function (JS) methods. For example: the HTML file comprises a plurality of lines of HTML frame codes, the CSS file comprises a plurality of CSS styles, and the JS file comprises a plurality of JS methods.
Specifically, the resource content of the original resource file is compared with the resource content of the updated resource file, the changed resource content is recorded, and the changed resource content in the updated resource file is substituted for the corresponding resource content of the original resource file. For example: updating the resource file into a JS file, wherein the JS file comprises a plurality of JS methods, comparing the plurality of JS methods in the JS file with the corresponding JS methods in the original JS file, and recording the part of inconsistent JS methods; and replacing the JS method recorded in the updated JS file with the corresponding JS method in the original JS file to obtain an updated target JS resource file.
In the embodiment of the invention, because the updated content is only one part of the file, in order to further improve the updating efficiency of the resource file, if the resource file is larger, the changed part can be recorded, only the changed part in the file is updated, and the system consumption can be reduced.
Step 206, obtaining the updated resource to be loaded according to the target resource file and the original resource files except the original resource file in the plurality of original resource files, and continuing to execute step 209.
In the embodiment of the invention, the H5 engineering page is not a single page, and is divided into different resource files aiming at different pages, the target resource file is a resource file after the original resource file is updated, and other original resource files are not updated, so that the updated resource to be loaded is generated according to the updated resource file and other original resource files which are not updated, so that the updated resource to be loaded can be loaded by the subsequent WebView, the updated interface and logic take effect, and the step 209 is continuously executed.
Step 207, replacing the updated resource file with the corresponding original resource file to obtain the updated resource to be loaded, and continuing to execute step 209.
In the embodiment of the invention, if the updated resource file is small and does not need to consume too much system resources, the whole file can be directly replaced to obtain the updated resource to be loaded, so that the subsequent WebView can load the updated resource to be loaded, the updated interface and logic become effective, and the step 209 is continuously executed.
And step 208, merging the updated resource file and the original resource file to obtain the updated resource to be loaded.
In the embodiment of the invention, if the updated resource file is the newly-added resource file, the updated resource file and the original resource file are combined to obtain the updated resource to be loaded, so that the updated resource to be loaded can be loaded by the subsequent WebView, and the updated interface and logic become effective.
Step 209, responding to the page access request input by the user, and performing page rendering according to the updated resource to be loaded to obtain an updated user visual interface
In the embodiment of the present invention, when a user accesses a page with resource update again, page rendering is performed according to an updated resource to be loaded, that is: and loading the updated HTML file, the CSS file and the JS file, and rendering to generate a new page, so that new resources and logic take effect, and a user can obtain the page with the latest version of resource configuration without restarting a client and waiting for a long time.
It should be noted that page rendering belongs to the prior art, and the embodiment of the present invention is not described herein again.
In the technical scheme of the page loading method based on the updated resource, the updated resource file is obtained; according to the updated resource file, performing dynamic resource update on the original resource file of the original page to obtain an updated resource to be loaded; and responding to a page access request input by a user, performing page rendering according to the updated resource to be loaded to obtain an updated user visual interface, and dynamically updating the updated resource file without restarting a client, so that the updated resource file takes effect in real time, and the starting efficiency and the user experience are greatly improved.
Fig. 3 is a schematic structural diagram of a device for loading a page based on an updated resource according to an embodiment of the present invention, where the device is configured to execute the method for loading a page based on an updated resource, and as shown in fig. 3, the device includes: an acquisition unit 11, a first resource updating unit 12, and a page rendering unit 13.
The obtaining unit 11 is used for obtaining the updated resource file.
The first resource updating unit 12 is configured to perform dynamic resource updating on the original resource file of the original page according to the updated resource file, so as to obtain an updated resource to be loaded.
The page rendering unit 13 is configured to, in response to a page access request input by a user, perform page rendering according to the updated resource to be loaded, so as to obtain an updated user visual interface.
In the embodiment of the invention, an original page comprises a plurality of original resource files; the first resource updating unit 12 is specifically configured to match each original resource file with an updated resource file; if the matching is successful, replacing the corresponding original resource file with the updated resource file to obtain the updated resource to be loaded; and if the matching fails, combining the updated resource file with the original resource file to obtain the updated resource to be loaded.
In the embodiment of the present invention, the apparatus further includes: a space judging unit 14, a content updating unit 15 and a second resource updating unit 16.
The space judging unit 14 is configured to judge whether an occupied space of the updated resource file is greater than a preset space threshold; if not, the first resource updating unit 12 is triggered to continue to execute the step of replacing the updated resource file with the corresponding original resource file to obtain the updated resource to be loaded.
The content updating unit 15 is configured to compare the resource content of the original resource file with the resource content of the updated resource file if yes, and replace the resource content of the inconsistent updated resource file with the resource content of the corresponding original resource file to obtain an updated target resource file.
The second resource updating unit 16 is configured to obtain an updated resource to be loaded according to the target resource file and an original resource file, except the original resource file, in the multiple original resource files.
In the embodiment of the present invention, the obtaining unit 11 is specifically configured to send a resource update query request to the server in response to an application start instruction, and receive an online update resource list sent by the server; and determining an updated resource file according to the online updated resource list and the stored original resource list, and downloading the updated resource file.
In the embodiment of the invention, the online updating resource list comprises a plurality of online updating resources and the hash code of each online updating resource, and the original resource list comprises a plurality of original resources and the hash code of each original resource; the obtaining unit 11 is specifically configured to match each online updated resource with an original resource, and compare hash codes of successfully matched resources; and if the hash code of the online updated resource is different from the hash code of the corresponding original resource, determining the online updated resource as an updated resource file.
In an embodiment of the present invention, the apparatus further includes: a list updating unit 17.
The list updating unit 17 is configured to update the original resource list according to the downloaded updated resource file, so as to obtain an updated original resource list.
In the scheme of the embodiment of the invention, the updated resource file is obtained; according to the updated resource file, performing dynamic resource update on the original resource file of the original page to obtain an updated resource to be loaded; and responding to a page access request input by a user, performing page rendering according to the updated resource to be loaded to obtain an updated user visual interface, and dynamically updating the updated resource file without restarting a client, so that the updated resource file takes effect in real time, and the starting efficiency and the user experience are greatly improved.
The systems, apparatuses, modules or units described in the above embodiments may be specifically implemented by a computer chip or an entity, or implemented by a product with certain functions. A typical implementation device is a computer device, which may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
Embodiments of the present invention provide a computer device, including a memory and a processor, where the memory is configured to store information including program instructions, and the processor is configured to control execution of the program instructions, and the program instructions are loaded and executed by the processor to implement the steps of the above-mentioned update resource-based page loading method, and for specific description, reference may be made to the above-mentioned update resource-based page loading method.
Referring now to FIG. 4, shown is a schematic block diagram of a computer device 600 suitable for use in implementing embodiments of the present application.
As shown in fig. 4, the computer apparatus 600 includes a Central Processing Unit (CPU) 601 which can execute various appropriate jobs and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the computer apparatus 600 are also stored. The CPU601, ROM602, and RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output section 607 including a Cathode Ray Tube (CRT), a liquid crystal feedback (LCD), and the like, and a speaker and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted as necessary on the storage section 608.
In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the invention include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
For convenience of description, the above devices are described as being divided into various units by function, respectively. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
According to the technical scheme, the data acquisition, storage, use, processing and the like meet relevant regulations of national laws and regulations.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (16)

1. A page loading method based on updated resources is characterized in that the method comprises the following steps:
acquiring an updated resource file;
according to the updated resource file, performing dynamic resource update on the original resource file of the original page to obtain an updated resource to be loaded;
and responding to a page access request input by a user, and rendering a page according to the updated resource to be loaded to obtain an updated user visual interface.
2. The updated resource based page loading method of claim 1, wherein the original page comprises a plurality of original resource files;
the dynamic resource updating is performed on the original resource file of the original page according to the updated resource file to obtain the updated resource to be loaded, and the method comprises the following steps:
matching each original resource file with an updated resource file;
if the matching is successful, replacing the corresponding original resource file with the updated resource file to obtain the updated resource to be loaded;
and if the matching fails, combining the updated resource file with the original resource file to obtain the updated resource to be loaded.
3. The updated resource-based page loading method according to claim 2, wherein before replacing the updated resource file with the corresponding original resource file to obtain the updated resource to be loaded, the method further comprises:
judging whether the occupied space of the updated resource file is larger than a preset space threshold value or not;
if so, comparing the resource content of the original resource file with the resource content of the updated resource file, and replacing the resource content of the inconsistent updated resource file with the resource content of the corresponding original resource file to obtain an updated target resource file;
obtaining updated resources to be loaded according to the target resource file and original resource files except the original resource file in the plurality of original resource files;
if not, continuing to execute the step of replacing the updated resource file with the corresponding original resource file to obtain the updated resource to be loaded.
4. The page loading method based on updated resources of claim 3,
the resource files comprise hypertext markup language files, cascading style sheet files and script language files;
the resource content comprises a framework of a hypertext markup language, a style of a cascading style sheet and a script function method.
5. The updated resource-based page loading method according to claim 1, wherein the obtaining of the updated resource file comprises:
responding to an application starting instruction, sending a resource updating query request to a server, and receiving an online updating resource list sent by the server;
and determining an updated resource file according to the online updated resource list and the stored original resource list, and downloading the updated resource file.
6. The updated resource based page loading method of claim 5, wherein the online updated resource list comprises a plurality of online updated resources and a hash code of each online updated resource, and the original resource list comprises a plurality of original resources and a hash code of each original resource;
determining an updated resource file according to the online updated resource list and the stored original resource list, including:
matching each online updated resource with the original resource, and comparing hash codes of the successfully matched resources;
and if the hash code of the online updating resource is different from the hash code of the corresponding original resource, determining the online updating resource as an updating resource file.
7. The updated resource based page loading method of claim 5, further comprising, after said downloading the updated resource file:
and updating the original resource list according to the downloaded updated resource file to obtain an updated original resource list.
8. An apparatus for loading a page based on an updated resource, the apparatus comprising:
an acquisition unit configured to acquire an updated resource file;
the first resource updating unit is used for carrying out dynamic resource updating on the original resource file of the original page according to the updated resource file to obtain an updated resource to be loaded;
and the page rendering unit is used for responding to a page access request input by a user and performing page rendering according to the updated resource to be loaded to obtain an updated user visual interface.
9. The updated resource based page loading apparatus of claim 8, wherein the original page comprises a plurality of original resource files;
the first resource updating unit is specifically configured to match each original resource file with an updated resource file; if the matching is successful, replacing the corresponding original resource file with the updated resource file to obtain the updated resource to be loaded; and if the matching fails, combining the updated resource file with the original resource file to obtain the updated resource to be loaded.
10. The apparatus for page loading based on updated resources as claimed in claim 9, wherein said apparatus further comprises:
the space judgment unit is used for judging whether the occupied space of the updated resource file is larger than a preset space threshold value or not; if not, triggering the first resource updating unit to continuously execute the step of replacing the updated resource file with the corresponding original resource file to obtain the updated resource to be loaded;
the content updating unit is used for comparing the resource content of the original resource file with the resource content of the updated resource file if the resource content of the original resource file is the same as the resource content of the updated resource file, and replacing the resource content of the inconsistent updated resource file with the resource content of the corresponding original resource file to obtain an updated target resource file;
and the second resource updating unit is used for obtaining the updated resource to be loaded according to the target resource file and the original resource files except the original resource file in the plurality of original resource files.
11. The page loading apparatus according to claim 8, wherein,
the acquisition unit is specifically used for responding to an application starting instruction, sending a resource updating query request to a server and receiving an online updating resource list sent by the server; and determining an updated resource file according to the online updated resource list and the stored original resource list, and downloading the updated resource file.
12. The updated resource based page loading apparatus of claim 11, wherein the online updated resource list comprises a plurality of online updated resources and a hash code of each online updated resource, and the original resource list comprises a plurality of original resources and a hash code of each original resource;
the acquiring unit is specifically configured to match each online updated resource with an original resource, and compare hash codes of successfully matched resources; and if the hash code of the online updated resource is different from the hash code of the corresponding original resource, determining the online updated resource as an updated resource file.
13. The apparatus for page loading based on updated resources of claim 11, wherein the apparatus further comprises:
and the list updating unit is used for updating the original resource list according to the downloaded updated resource file to obtain an updated original resource list.
14. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method for updating resource-based page loading according to any one of claims 1 to 7.
15. A computer device comprising a memory for storing information including program instructions and a processor for controlling the execution of the program instructions, wherein the program instructions are loaded and executed by the processor to implement the update resource based page loading method of any of claims 1 to 7.
16. A computer program product comprising computer programs/instructions, characterized in that said computer programs/instructions, when executed by a processor, implement the method of page loading based on updated resources of any of claims 1 to 7.
CN202211507258.1A 2022-11-29 2022-11-29 Page loading method and device based on updated resources Pending CN115858978A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211507258.1A CN115858978A (en) 2022-11-29 2022-11-29 Page loading method and device based on updated resources

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211507258.1A CN115858978A (en) 2022-11-29 2022-11-29 Page loading method and device based on updated resources

Publications (1)

Publication Number Publication Date
CN115858978A true CN115858978A (en) 2023-03-28

Family

ID=85667480

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211507258.1A Pending CN115858978A (en) 2022-11-29 2022-11-29 Page loading method and device based on updated resources

Country Status (1)

Country Link
CN (1) CN115858978A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117234623A (en) * 2023-11-16 2023-12-15 盛威时代科技股份有限公司 Page theme changing method and device of application program and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117234623A (en) * 2023-11-16 2023-12-15 盛威时代科技股份有限公司 Page theme changing method and device of application program and electronic equipment
CN117234623B (en) * 2023-11-16 2024-02-20 盛威时代科技股份有限公司 Page theme changing method and device of application program and electronic equipment

Similar Documents

Publication Publication Date Title
US11144711B2 (en) Webpage rendering method, device, electronic apparatus and storage medium
CN109976667B (en) Mirror image management method, device and system
US20190220304A1 (en) Method and device for processing application program page, and storage medium
CN112114913B (en) Application program interface updating method and device, computer equipment and storage medium
CN115309470B (en) Method, device, equipment and storage medium for loading widget
CN110795649A (en) Target page display method, device and system and electronic equipment
CN112015485A (en) Page display method and device, electronic equipment and storage medium
US11729248B2 (en) Web application component migration to a cloud computing system
CN115858978A (en) Page loading method and device based on updated resources
AU2016101498A4 (en) Data Interchange System
CN111079048A (en) Page loading method and device
CN110807162A (en) Method and device for loading occupation bitmap
CN113569173A (en) Page loading method and device, storage medium and electronic equipment
CN112235132A (en) Method, device, medium and server for dynamically configuring service
CN112559172A (en) Method, system, equipment and storage medium for optimizing memory of web browser
CN111177634A (en) Multi-language supporting file content loading method, device, equipment and medium
CN116127219A (en) Method and device for displaying pages in applet and computer equipment
CN115146198A (en) Simple browser implementation method and system based on Electron
CN115202673A (en) Application construction method and device based on cloud server and computer equipment
US20210185109A1 (en) Page presentation method and system, computer system, and computer readable medium
CN110727889A (en) Static webpage resource loading method, device, medium and electronic equipment
CN106899650B (en) Data updating method and device
CN115600029A (en) Method, device, system, equipment and storage medium for displaying webpage
CN116467538A (en) Method and system for updating and iterating web page version of mobile phone client
CN117131302A (en) Service page generation method and device

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