CN115391698A - Method and device for guaranteeing high availability of mobile terminal application page - Google Patents

Method and device for guaranteeing high availability of mobile terminal application page Download PDF

Info

Publication number
CN115391698A
CN115391698A CN202211041022.3A CN202211041022A CN115391698A CN 115391698 A CN115391698 A CN 115391698A CN 202211041022 A CN202211041022 A CN 202211041022A CN 115391698 A CN115391698 A CN 115391698A
Authority
CN
China
Prior art keywords
mobile terminal
application page
bundle
page
user
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
CN202211041022.3A
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.)
Industrial and Commercial Bank of China Ltd ICBC
ICBC Technology Co Ltd
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
ICBC Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC, ICBC Technology Co Ltd filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202211041022.3A priority Critical patent/CN115391698A/en
Publication of CN115391698A publication Critical patent/CN115391698A/en
Pending legal-status Critical Current

Links

Images

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/957Browsing optimisation, e.g. caching or content distillation

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 invention provides a method and a device for guaranteeing high availability of a mobile terminal application page, which relate to the technical field of mobile terminal application development, and the method comprises the following steps: receiving a mobile terminal application page access request sent by a user; loading bundle resources of the mobile terminal according to the access request; responding to the successful loading of the bundle resource of the mobile terminal, and displaying the application page of the mobile terminal to the user; responding to the loading failure of bundle resources of a mobile terminal, and acquiring a network address of an application page of the mobile terminal; and requesting static resources of the mobile terminal application page from a webpage server according to the network address, caching the static resources to the local part of a client, and displaying the mobile terminal application page to the user. According to the method and the device, through an automatic degradation mechanism, when the environment of the client is abnormal or the request of bundle resources fails, the corresponding web page is automatically degraded and accessed, the situation that the application cannot be used due to the crash of the client is avoided, and therefore the high availability of the client is achieved.

Description

Method and device for guaranteeing high availability of mobile terminal application page
Technical Field
The invention relates to the technical field of application development of a mobile terminal, can be used in the field of finance, and particularly relates to a method and a device for guaranteeing high availability of an application page of the mobile terminal.
Background
At present, the mainstream mobile Application (APP) development modes mainly include a Native APP (Native APP), a Web APP (Web APP) development and a Hybrid APP (Hybrid APP). The native development mainly refers to that on Android, IOS and other mobile end platforms, a development language and a development tool supported by the platforms are used for directly calling interface functions provided by the platforms. Web APP development utilizes a WebView control of a mobile terminal to nest a Web website in the APP, and the development can be completed by a Web front-end engineer. The hybrid development generally adopts a hybrid of native and H5 development technologies, and the technology used is selected according to business characteristics.
Taking native APP development of an Android terminal as an example, the general APP development process is as follows: the compiler converts the source code and the dependency module into an executable file on Android equipment; the packaging tool combines the executable file and the compiled resources into an apk package according to a certain rule; signing the application using the key pair; and issuing the apk packet externally.
The main aspects of the mixed development are Weex and fact Native, etc., wherein: weex is a cross-platform UI framework for constructing a mobile terminal, and real Native is called RN for short, and is also a cross-platform mobile terminal development framework. Taking RN as an example, the general procedure of APP development is: using a Metro and other construction tools to analyze, convert and generate the RN codes into a Bundle package, wherein the Bundle package is a folder which contains compiled executable codes and resources required by the codes and is combined by a specific standard hierarchical structure; packaging the Android directory into an apk packet; and packaging the IOS directory into an ipa packet.
For native APP development, the native development application generally has better user experience and higher performance. However, for some small and old device models or old device versions, it is generally difficult to achieve complete compatibility, and situations such as client crash and flash fallback may occur, thereby losing some users. In addition, for the native development application, when a serious bug appears on line, the bug can be reconstructed and packaged by a developer after being repaired and submitted to an application store for auditing, the on-line updating can be realized, the time for the process to go down is often several days, and the timeliness for repairing the problem is low.
The hybrid development scheme has the advantages that hot updating is supported, the new version can be directly packaged and released, and the client can download the bundle to the local when detecting the new version. However, performance bottlenecks often occur in the communication between the JS and the Native, so that the problems of unsmooth application, white screen and the like are caused. Meanwhile, a large number of network requests can occur in the scheme, and the requirement on the network environment of the client is high.
Disclosure of Invention
In view of the above, the present invention provides a method and an apparatus for guaranteeing high availability of a mobile-side application page, so as to solve at least one of the above-mentioned problems.
In order to achieve the purpose, the invention adopts the following scheme:
according to a first aspect of the present invention, a method for guaranteeing high availability of a mobile-side application page is provided, where the method includes: receiving a mobile terminal application page access request sent by a user; loading bundle resources of the mobile terminal according to the access request; responding to the successful loading of the bundle resource of the mobile terminal, and displaying the application page of the mobile terminal to the user; responding to the loading failure of bundle resources of a mobile terminal, and acquiring a network address of an application page of the mobile terminal; and requesting static resources of the mobile terminal application page from a webpage server according to the network address, caching the static resources to the local part of a client, and displaying the mobile terminal application page to the user.
According to a second aspect of the present invention, there is provided an application packaging construction method for ensuring high availability of a mobile-end application page, the method including: respectively constructing a cross-terminal application development project into a mobile terminal bundle package and a webpage bundle package; generating a mapping list for recording the mapping relation between the bundle of the mobile terminal and the network address of the webpage; respectively exporting the bundle package of the mobile terminal and the offline resource into an ipa package of IOS and an apk package of Android through a packaging tool; and deploying the webpage bundle package to a webpage server.
According to a third aspect of the present invention, an apparatus for guaranteeing high availability of a mobile-side application page is provided, the apparatus comprising: the request receiving unit is used for receiving a mobile terminal application page access request sent by a user; the resource loading unit is used for loading bundle resources of the mobile terminal according to the access request; the network address acquisition unit is used for responding to the loading failure of bundle resources of the mobile terminal and acquiring the network address of the application page of the mobile terminal; the static resource request unit is used for requesting the static resource of the application page of the mobile terminal from a webpage server according to the network address and transferring the static resource to the local part of the client terminal; and the page display unit is used for displaying the mobile terminal application page to the user in response to the successful loading of the bundle resource of the mobile terminal, and displaying the mobile terminal application page to the user after the static resource request unit acquires the static resource.
According to a fourth aspect of the present invention, an application packaging and building apparatus for guaranteeing high availability of a mobile-side application page is provided, the apparatus includes: the cross-end construction unit is used for respectively constructing the cross-end application development project into a mobile end bundle package and a webpage bundle package; the mapping list generating unit is used for generating a mapping list for recording the mapping relation between the bundle of the mobile terminal and the network address of the webpage; the export unit is used for exporting the bundle package and the offline resource of the mobile terminal into an ipa package of IOS and an apk package of Android respectively through a packaging tool; and the webpage deployment unit is used for deploying the webpage bundle package to a webpage server.
According to a fifth aspect of the present invention, there is provided an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the steps of the above method being implemented when the computer program is executed by the processor.
According to a sixth aspect of the present invention, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the above-mentioned method.
According to a seventh aspect of the present invention there is provided a computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the above method.
According to the technical scheme, the corresponding web page is automatically degraded and accessed when the client environment is abnormal or the request of bundle resources fails through an automatic degradation mechanism, so that the situation that the application cannot be used due to the crash of the client is avoided, and the high availability of the client is realized.
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. In the drawings:
fig. 1 is a schematic flowchart of a method for guaranteeing high availability of a mobile-side application page according to an embodiment of the present application;
fig. 2 is a timing diagram of a page request mechanism for ensuring high availability of a mobile-side application page according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a method for guaranteeing high availability of a mobile-side application page according to another embodiment of the present application;
fig. 4 is a flowchart illustrating a method for guaranteeing high availability of a mobile-side application page according to another embodiment of the present application;
fig. 5 is a timing diagram of a page request mechanism provided in an embodiment of the present application;
fig. 6 is a schematic flowchart of a method for packaging and constructing an application that ensures high availability of a mobile-end application page according to an embodiment of the present application;
fig. 7 is a construction flowchart of a read Native cross-end application development project provided in the embodiment of the present application;
fig. 8 is a schematic structural diagram of an apparatus for ensuring high availability of a mobile application page according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an application packaging construction device for guaranteeing high availability of a mobile-side application page according to an embodiment of the present application;
fig. 10 is a schematic block diagram of a system configuration of an electronic device according to an embodiment of the present application.
Detailed Description
The embodiment of the invention provides a method and a device for guaranteeing high availability of a mobile terminal application page, which can be used in the financial field and other fields.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
Some technical terms referred to in the present application will be briefly described first:
the term "Bundle": is a file folder which contains executable codes after compiling and resources needed by the codes and is combined by a specific standard hierarchical structure.
The term "Webpack": is a static module wrapper of a modern JavaScript application program. When the webpack processes the application, a dependency graph is recursively constructed containing each module required by the application, and then all modules are packed into one or more bundles.
The term "Weex": the method is used for constructing the mobile end cross-platform UI framework.
The term "read Native": the Read Native (RN) is a development framework for cross-platform mobile terminals.
The term "WebView": the Web page view is a browser engine based control for displaying and rendering Web pages.
The term "CDN": content Delivery Network, i.e. a Content distribution Network. The CDN is an intelligent virtual network constructed on the basis of the existing network, and by means of edge servers deployed in various places and functional modules of load balancing, content distribution, scheduling and the like of a central platform, a user can obtain required content nearby, network congestion is reduced, and the access response speed and hit rate of the user are improved.
Fig. 1 is a schematic flowchart of a method for guaranteeing high availability of an application page of a mobile terminal according to an embodiment of the present application, which is described in the present application from an application client side installed in the mobile terminal, where the mobile terminal includes, but is not limited to, a mobile phone, a tablet computer, an intelligent wearable device, and the like, where an IOS system or an Android system is installed, and the method includes the following steps:
step S101: and receiving a mobile terminal application page access request sent by a user.
The user can send a page access request to the application client by clicking an icon or a text link in the application at the mobile terminal, and the application client loads and displays a corresponding page for the user immediately after receiving the page access request.
Step S102: and loading the bundle resource of the mobile terminal according to the access request.
The application client firstly preferentially loads bundle resources of the mobile terminal (namely the IOS or the Android client) according to the access request.
Step S103: and judging whether the loading of the bundle resource of the mobile terminal is successful, if so, entering a step S104, otherwise, entering a step S105.
The conditions that loading fails can occur when the bundle resource is loaded, and in addition, the conditions that running is abnormal can also occur when the bundle resource is loaded instantly, and the conditions are all loading unsuccessful.
Step S104: and displaying the mobile terminal application page to the user.
After the bundle resource of the mobile terminal is successfully loaded in step 103, the mobile terminal application page requested by the user can be displayed to the user according to the bundle resource, and the displaying process belongs to the prior art and is not described herein again.
Step S105: and acquiring the network address of the mobile terminal application page.
After the loading of the bundle resource of the mobile terminal is unsuccessful through step 103, in order to ensure that the mobile terminal has a high availability of the page, the application adopts a trigger automatic degradation mechanism, and the normal display of the page is realized by requesting the static resource of the corresponding page from the web server. Therefore, first, a network address of the mobile terminal page, i.e. a Uniform Resource Locator (URL) address, needs to be acquired.
Preferably, the acquiring the network address of the mobile application page in this step may specifically include: and acquiring the network address of the application page of the mobile terminal according to a mapping list, wherein the mapping list records the mapping relation between the bundle of the mobile terminal and the network address of the webpage. Namely, the mobile terminal application generates a mapping list when packaging and constructing to record the mapping relation between the bundle of the mobile terminal and the network address of the webpage, and adds a calling logic, so that the function of acquiring the URL address of the webpage through the mapping list can be realized when the bundle resource loading of the mobile terminal is unsuccessful.
Step S106: and requesting the static resources of the application page of the mobile terminal from a webpage server according to the network address and caching the static resources to the local part of the client terminal.
Step S107: and displaying the mobile terminal application page to the user.
Preferably, after the static resource of the page is obtained, the content of the static resource can be analyzed by using a WebView built in the client to render so as to display the application page of the mobile terminal to the user.
In order to more clearly illustrate the above steps, fig. 2 shows a timing chart of a page request mechanism for guaranteeing high availability of a mobile-side application page according to an embodiment of the present application, and as can be seen from fig. 2, the present application relates to three main bodies: the system comprises a user, a client APP and a Web server, wherein the client APP is installed in a mobile terminal of the user. The page loading process of the present application involves two aspects: the method comprises client loading and Web side loading, wherein the priority of the client loading is higher than that of the Web side loading, and the Web side loading is used as a supplement of the client loading to ensure high availability of an APP page of the client. When a user accesses a client page to a client APP, if the client APP successfully loads page resources, the page content is directly displayed to the user, if the page loading fails, a Web URL of the page is obtained, then a request is made to a Web server according to the Web URL, static resources are downloaded, and then the page content is displayed to the user.
According to the method for guaranteeing the high availability of the application page of the mobile terminal, the corresponding web page is automatically degraded and accessed when the environment of the client terminal is abnormal or the request of bundle resources fails through an automatic degradation mechanism, so that the situation that the application cannot be used due to the crash of the client terminal is avoided, and the high availability of the client terminal is realized.
Fig. 3 is a flowchart of a method for guaranteeing high availability of an application page on a mobile terminal according to another embodiment of the present application, which is also described in the present application from an application client side installed on the mobile terminal, and the method includes the following steps:
step S301: and receiving a mobile terminal application page access request sent by a user.
Step S302: and loading the bundle resource of the mobile terminal according to the access request.
Step S303: judging whether the loading of the bundle resource of the mobile terminal is successful, if so, entering step S304, otherwise, entering step S305.
Step S304: and displaying the mobile terminal application page to the user.
Step S305: and obtaining the static resources of the application page of the mobile terminal from the cache of the local webpage view of the client terminal.
In this embodiment, when it is determined that the bundle resource of the mobile terminal is not successfully loaded through step S303, the static resource is preferentially obtained from the cache of the local WebView of the client, and the action does not depend on the network environment of the client, that is, the action can be normally used as long as the local cache application is used regardless of whether a network exists currently.
Step S306: and judging whether the static resource acquisition is successful, if so, entering the step S307, otherwise, entering the step S308.
Step S307: and displaying the mobile terminal application page to the user.
Step S308: and acquiring the network address of the mobile terminal application page.
When it is determined through the step S306 that the static resource is not obtained from the cache of the local WebView, the normal display of the page can be implemented by requesting the static resource of the corresponding page from the web server. In the case that the static resource acquisition in step S306 fails, the client does not locally cache the static resource, or the cached static resource is already invalid.
Step S309: and requesting the static resources of the application page of the mobile terminal from a webpage server according to the network address and caching the static resources to the local part of the client terminal.
Step S310: and displaying the mobile terminal application page to the user.
According to the method for guaranteeing the high availability of the application page of the mobile terminal, the corresponding web page is automatically degraded and accessed when the environment of the client terminal is abnormal or the request for the bundle resource fails through an automatic degradation mechanism, so that the problem that the application cannot be used due to the crash of the client terminal is avoided, and the high availability of the client terminal is realized. In addition, the method and the device can increase the resource loading speed, reduce the number of network requests and improve the user experience under the condition of ensuring high availability of the client application through a local cache mechanism.
Fig. 4 is a flowchart illustrating a method for guaranteeing high availability of an application page on a mobile terminal according to another embodiment of the present application, which is also described in the present application from an application client side installed on the mobile terminal, and the method includes the following steps:
step S401: and receiving a mobile terminal application page access request sent by a user.
Step S402: and loading the bundle resource of the mobile terminal according to the access request.
Step S403: and judging whether the loading of the bundle resource of the mobile terminal is successful, if so, entering a step S404, and otherwise, entering a step S405.
Step S404: and displaying the mobile terminal application page to the user.
Step S405: and obtaining the static resources of the application page of the mobile terminal from the cache of the local webpage view of the client terminal.
Step S406: and judging whether the static resource acquisition is successful, if so, entering the step S407, and otherwise, entering the step S408.
Step S407: and displaying the mobile terminal application page to the user.
Step S408: routing to a content delivery network requests downloading of the static resource.
Step S409: and judging whether the static resource is successfully downloaded from the content distribution network, if so, entering the step S410, and otherwise, entering the step S412.
Step S410: and downloading the static resource from the content distribution network and caching the static resource to the local part of the client.
Step S411: and displaying the mobile terminal application page to the user.
Step S412: and acquiring the network address of the mobile terminal application page.
When it is determined that the static resource download from the content distribution network fails in step S409, normal display of the page can be achieved by requesting the static resource of the corresponding page from the web server. Step S409 may determine that the content distribution network does not cache the static resource in the case of failure in acquiring the static resource, or that the cached static resource has already failed.
Step S413: and requesting the static resources of the application page of the mobile terminal from a webpage server according to the network address and caching the static resources to the local part of the client terminal.
Step S414: and displaying the mobile terminal application page to the user.
Corresponding to the embodiment of fig. 4, a timing chart of the page request mechanism shown in fig. 5 can be obtained, and as can be seen from fig. 5, the present application relates to three main bodies: the system comprises a user, a client APP, a local cache, a CDN manufacturer and a Web server, wherein the client APP is installed in a mobile terminal of the user, and the local cache is a cache of the mobile terminal of the user. According to the priority, loading bundle resources from a client APP, requesting static resources from a local cache if the bundle resources are not successful, continuously requesting the static resources from a CDN manufacturer if the static resources are not successfully requested from the local cache, and finally requesting the static resources from a Web server if the static resources are not successfully requested from the CDN manufacturer.
Therefore, the method for guaranteeing the high availability of the application page of the mobile terminal does not need to increase a large number of compatibility tests, and the problem of crash flash caused by incompatibility of client application in different equipment and different operating system versions is avoided to a great extent. Through an automatic degradation mechanism, when the environment of the client side is abnormal or the request of bundle resources fails, the corresponding web page is automatically degraded and accessed, the situation that the application cannot be used due to the crash of the client side is avoided, and therefore the high availability of the client side is achieved. In addition, the resource loading speed can be increased under the condition of ensuring high availability of the client application through a multi-level cache mechanism, the number of network requests is reduced, and the user experience is improved.
Fig. 6 is a schematic flow chart of an application packaging construction method for ensuring high availability of a mobile-end application page according to an embodiment of the present application, where the method includes the following steps:
step S601: and respectively constructing the cross-terminal application development engineering into a mobile terminal bundle package and a webpage bundle package.
Step S602: and generating a mapping list for recording the mapping relation between the bundle of the mobile terminal and the network address of the webpage.
Step S603: and respectively exporting the bundle package of the mobile terminal and the offline resource into an ipa package of the IOS and an apk package of the Android through a packaging tool.
Step S604: and deploying the webpage bundle package to a webpage server.
The application packaging construction method is further described below by taking the fact Native cross-end application development project as an example, and fig. 7 shows a construction flow chart of the fact Native cross-end application development project provided by the embodiment of the present application. Developers respectively construct RN engineering into a mobile terminal bundle package and a web bundle package by using the packing capacity of multiple bundles of webpack through a 'unified construction platform' constructed based on the webpack. Meanwhile, a map list file (namely a mapping list) is generated in the construction process and used for maintaining the mapping relation between the bundle of the mobile terminal and the web url corresponding to the page, and meanwhile, the priority of two loading modes can be appointed. Respectively exporting the bundle package and the offline resource of the mobile terminal into an ipa package of IOS and an apk package of Android through a packaging tool; and the Web-end bundle is deployed to the Web server.
As can be seen from the above description, when a page is loaded, the application developed by the application packaging construction method can ensure high availability of the page, and the specific loading process may refer to the description of the foregoing method embodiment.
Fig. 8 is a schematic structural diagram of an apparatus for ensuring high availability of a mobile-end application page according to an embodiment of the present application, where the apparatus includes: the system comprises a request receiving unit 810, a resource loading unit 820, a network address acquiring unit 830, a static resource requesting unit 840 and a page displaying unit 850, wherein the resource loading unit 820 is respectively connected with the request receiving unit 810, the network address acquiring unit 830 and the page displaying unit 850, and the static resource requesting unit 840 is respectively connected with the network address acquiring unit 830 and the page displaying unit 850.
The request receiving unit 810 is configured to receive a mobile-side application page access request sent by a user.
The resource loading unit 820 is configured to load a bundle resource of the mobile terminal according to the access request.
The network address obtaining unit 830 is configured to obtain a network address of an application page of the mobile terminal in response to a loading failure of the bundle resource of the mobile terminal.
The static resource requesting unit 840 is configured to request a web server for a static resource of the mobile application page according to the network address and transfer the static resource to the local client.
The page display unit 850 is configured to display the mobile-side application page to the user in response to a successful loading of the bundle resource of the mobile side, and display the mobile-side application page to the user after the static resource request unit acquires the static resource.
Preferably, the network address obtaining unit 830 is specifically configured to: and acquiring the network address of the application page of the mobile terminal according to a mapping list, wherein the mapping list records the mapping relation between the bundle of the mobile terminal and the network address of the webpage.
Preferably, when the resource loading unit 820 fails to load the bundle resource of the mobile terminal, the static resource requesting unit 840 of the present apparatus preferentially obtains the static resource of the mobile terminal application page from the cache of the client local web view, and displays the mobile terminal application page to the user through the page displaying unit 850.
If the client does not locally cache the static resource or the cache is invalid, the network address obtaining unit 830 obtains the network address of the mobile application page, and then the static resource requesting unit 840 requests the web server for the static resource of the mobile application page according to the network address and caches the static resource to the local client, and then displays the mobile application page to the user through the page display unit 850.
Preferably, when the resource loading unit 820 fails to load the bundle resource of the mobile terminal, the static resource requesting unit 840 of the present apparatus may preferentially obtain the static resource of the mobile terminal application page from the cache of the client local web view, and display the mobile terminal application page to the user through the page display unit 850. If the client does not locally cache the static resource or the cache is invalid, the static resource requesting unit 840 routes to the content distribution network to download the static resource and caches the static resource to the client locally, and then displays the mobile application page to the user through the page display unit 850. If the content distribution network does not cache the static resource or the cache is invalid, the network address obtaining unit 830 obtains the network address of the mobile application page, then the static resource requesting unit 840 requests the web server for the static resource of the mobile application page according to the network address, and then the page displaying unit 850 displays the mobile application page to the user.
Preferably, the page display unit 850 is specifically configured to: and analyzing the static resource content by utilizing a webpage view built in a client to render so as to display the mobile terminal application page to the user.
Therefore, the device for guaranteeing the high availability of the application page of the mobile terminal provided by the application does not need to increase a large number of compatibility tests, and the problem of crash flash caused by incompatibility of client application in different equipment and different operating system versions is avoided to a great extent. Through an automatic degradation mechanism, when the environment of the client side is abnormal or the request of bundle resources fails, the corresponding web page is automatically degraded and accessed, the situation that the application cannot be used due to the crash of the client side is avoided, and therefore the high availability of the client side is achieved. In addition, the resource loading speed can be increased under the condition of ensuring high availability of the client application through a multi-level cache mechanism, the number of network requests is reduced, and the user experience is improved.
Fig. 9 is a schematic structural diagram of an application package building apparatus for guaranteeing high availability of a mobile-end application page according to an embodiment of the present application, where the application package building apparatus includes: the system comprises a cross-end construction unit 910, a mapping list generation unit 920, a derivation unit 930 and a web page deployment unit 940, wherein the cross-end construction unit 910 is respectively connected with the mapping list generation unit 920, the derivation unit 930 and the web page deployment unit 940.
The cross-end construction unit 910 is configured to respectively construct a cross-end application development project into a mobile-end bundle package and a web bundle package.
The mapping list generating unit 920 is configured to generate a mapping list for recording a mapping relationship between the mobile terminal bundle and the web page network address.
The derivation unit 930 is configured to derive the bundle packet and the offline resource of the mobile terminal as an ipa packet of the IOS and an apk packet of the Android through a packaging tool, respectively.
The web page deployment unit 940 is configured to deploy the web page bundle package to a web page server.
As can be seen from the above description, the application developed by the application packaging and constructing device can ensure high availability of the page when the page is loaded, and for a specific loading process, reference may be made to the description of the foregoing method embodiment, which is not described herein again.
The embodiment of the invention also provides electronic equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor executes the program to realize the method.
Embodiments of the present invention further provide a computer program product, which includes a computer program/instruction, and when the computer program/instruction is executed by a processor, the steps of the method are implemented.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program for executing the foregoing method is stored in the computer-readable storage medium.
As shown in fig. 10, the electronic device 600 may further include: communication module 110, input unit 120, audio processor 130, display 160, power supply 170. It is noted that the electronic device 600 does not necessarily include all of the components shown in FIG. 10; furthermore, the electronic device 600 may also comprise components not shown in fig. 10, which may be referred to in the prior art.
As shown in fig. 10, the central processor 100, sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, the central processor 100 receiving input and controlling the operation of the various components of the electronic device 600.
The memory 140 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable devices. The information relating to the failure may be stored, and a program for executing the information may be stored. And the cpu 100 may execute the program stored in the memory 140 to realize information storage or processing, etc.
The input unit 120 provides an input to the cpu 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used to display an object to be displayed, such as an image or a character. The display may be, for example, but is not limited to, an LCD display.
The memory 140 may be a solid state memory such as Read Only Memory (ROM), random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. The memory 140 may also be some other type of device. Memory 140 includes buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application/function storage section 142, and the application/function storage section 142 is used to store application programs and function programs or a flow for executing the operation of the electronic device 600 by the central processing unit 100.
The memory 140 may also include a data store 143 for storing data, such as contacts, digital data, pictures, sounds, and/or any other data used by the electronic device. The driver storage portion 144 of the memory 140 may include various drivers of the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging application, address book application, etc.).
The communication module 110 is a transmitter/receiver 110 that transmits and receives signals via an antenna 111. The communication module (transmitter/receiver) 110 is coupled to the central processor 100 to provide an input signal and receive an output signal, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be provided in the same electronic device. The communication module (transmitter/receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide audio output via the speaker 131 and receive audio input from the microphone 132 to implement general telecommunications functions. Audio processor 130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, an audio processor 130 is also coupled to the central processor 100, so that recording on the local can be enabled through a microphone 132, and so that sound stored on the local can be played through a speaker 131.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention 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 present invention is 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (11)

1. A method for ensuring high availability of a mobile terminal application page is characterized by comprising the following steps:
receiving a mobile terminal application page access request sent by a user;
loading bundle resources of the mobile terminal according to the access request;
responding to the successful loading of the bundle resource of the mobile terminal, and displaying the application page of the mobile terminal to the user;
responding to the loading failure of bundle resources of a mobile terminal, and acquiring a network address of an application page of the mobile terminal;
and requesting the static resources of the mobile terminal application page from a webpage server according to the network address, caching the static resources to the local part of a client, and displaying the mobile terminal application page to the user.
2. The method for guaranteeing high availability of a mobile-side application page according to claim 1, wherein the acquiring the network address of the mobile-side application page includes: and acquiring the network address of the application page of the mobile terminal according to a mapping list, wherein the mapping list records the mapping relation between the bundle of the mobile terminal and the network address of the webpage.
3. The method for guaranteeing high availability of the mobile-side application page according to claim 1, wherein in response to a loading failure of the bundle resource of the mobile side, the method further comprises:
preferentially acquiring static resources of the mobile terminal application page from a cache of a local webpage view of a client, and displaying the mobile terminal application page to the user;
if the static resources are not cached locally or the cache is invalid, the network address of the application page of the mobile terminal is obtained, the static resources of the application page of the mobile terminal are requested from a webpage server according to the network address and cached locally at the client, and then the application page of the mobile terminal is displayed for the user.
4. The method for guaranteeing high availability of the mobile-side application page according to claim 1, wherein in response to a loading failure of the bundle resource of the mobile side, the method further comprises:
preferentially acquiring static resources of the mobile terminal application page from a cache of a local webpage view of a client, and displaying the mobile terminal application page to the user;
if the client does not locally cache the static resources or the cache is invalid, routing to a content distribution network to download the static resources and cache the static resources to the local client, and then displaying the mobile terminal application page to the user;
if the static resource is not cached or the cache is invalid in the content distribution network, acquiring the network address of the application page of the mobile terminal, requesting the static resource of the application page of the mobile terminal from a webpage server according to the network address, and then displaying the application page of the mobile terminal to the user.
5. The method for guaranteeing high availability of a mobile-side application page according to any of claims 1 to 4, wherein said presenting the mobile-side application page to the user comprises:
and analyzing the static resources by utilizing a webpage view built in a client, and displaying the application page of the mobile terminal by the user after rendering.
6. A packaging and constructing method for ensuring high availability of an application page at a mobile terminal is characterized by comprising the following steps:
respectively constructing a cross-terminal application development project into a mobile terminal bundle package and a webpage bundle package;
generating a mapping list for recording the mapping relation between the bundle of the mobile terminal and the network address of the webpage;
respectively exporting the bundle package of the mobile terminal and the offline resource into an ipa package of IOS and an apk package of Android through a packaging tool;
and deploying the webpage bundle package to a webpage server.
7. An apparatus for guaranteeing high availability of a mobile-side application page, the apparatus comprising:
the request receiving unit is used for receiving a mobile terminal application page access request sent by a user;
the resource loading unit is used for loading bundle resources of the mobile terminal according to the access request;
the network address acquisition unit is used for responding to the loading failure of bundle resources of the mobile terminal and acquiring the network address of the application page of the mobile terminal;
the static resource request unit is used for requesting the static resource of the application page of the mobile terminal from a webpage server according to the network address and transferring the static resource to the local part of the client terminal;
and the page display unit is used for displaying the mobile terminal application page to the user in response to the successful loading of the bundle resource of the mobile terminal, and displaying the mobile terminal application page to the user after the static resource request unit acquires the static resource.
8. An application packaging and constructing device for guaranteeing high availability of a mobile terminal application page is characterized by comprising the following components:
the system comprises a cross-end construction unit, a mobile end bundle package and a webpage bundle package, wherein the cross-end construction unit is used for respectively constructing a cross-end application development project into the mobile end bundle package and the webpage bundle package;
the mapping list generating unit is used for generating a mapping list for recording the mapping relation between the bundle of the mobile terminal and the network address of the webpage;
the export unit is used for exporting the bundle package and the offline resource of the mobile terminal into an ipa package of IOS and an apk package of Android respectively through a packaging tool;
and the webpage deployment unit is used for deploying the webpage bundle package to a webpage server.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 5 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
11. A computer program product comprising computer program/instructions, characterized in that said computer program/instructions, when executed by a processor, implement the steps of the method of any of claims 1 to 5.
CN202211041022.3A 2022-08-29 2022-08-29 Method and device for guaranteeing high availability of mobile terminal application page Pending CN115391698A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211041022.3A CN115391698A (en) 2022-08-29 2022-08-29 Method and device for guaranteeing high availability of mobile terminal application page

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211041022.3A CN115391698A (en) 2022-08-29 2022-08-29 Method and device for guaranteeing high availability of mobile terminal application page

Publications (1)

Publication Number Publication Date
CN115391698A true CN115391698A (en) 2022-11-25

Family

ID=84121612

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211041022.3A Pending CN115391698A (en) 2022-08-29 2022-08-29 Method and device for guaranteeing high availability of mobile terminal application page

Country Status (1)

Country Link
CN (1) CN115391698A (en)

Similar Documents

Publication Publication Date Title
CN105100191B (en) The method, apparatus and system of Java application installations are realized in a kind of cloud compiling
US9946526B2 (en) Development and hosting for platform independent applications
CN109165050B (en) Program running method and device, computing equipment and storage medium
CN109542427B (en) System customization method and device, electronic equipment and storage medium
CN107066631A (en) Display methods, device and the electronic equipment of the page
US11240290B2 (en) Application download method and apparatus, application sending method and apparatus, and system
US9158520B2 (en) Development of platform independent applications
CN109753622B (en) Static resource management method and device, storage medium and electronic equipment
CN111026439B (en) Application program compatibility method, device, equipment and computer storage medium
CN114077423A (en) Airport APP development container architecture based on mobile cross-platform
CN108628626B (en) Development environment building method, code updating method and device
CN110968331A (en) Method and device for running application program
US20130151595A1 (en) Deployment and hosting of platform independent applications
CN103634393A (en) IVR (interactive voice response) and realization method thereof
CN114595065A (en) Data acquisition method and device, storage medium and electronic equipment
CN110928571A (en) Business program development method and device
CN111338666A (en) Method, device, medium and electronic equipment for realizing application program upgrading
CN109343970B (en) Application program-based operation method and device, electronic equipment and computer medium
US9164817B2 (en) Mobile communication terminal to provide widget expansion function using message communication, and operation method of the mobile communication terminal
CN103139298A (en) Method for transmitting network data and device
CN116069366A (en) Client application program updating method and device, storage medium and electronic equipment
CN115391698A (en) Method and device for guaranteeing high availability of mobile terminal application page
CN113157274B (en) Software development method and device based on micro front end, electronic equipment and storage medium
CN110119388A (en) File read/write method, device, system, equipment and computer readable storage medium
CN115080109A (en) Multi-cloud-end environment joint debugging method, device, system and equipment based on hybrid development

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