Nothing Special   »   [go: up one dir, main page]

CN113535211B - Application program updating method and device, computer equipment and storage medium - Google Patents

Application program updating method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113535211B
CN113535211B CN202111077977.XA CN202111077977A CN113535211B CN 113535211 B CN113535211 B CN 113535211B CN 202111077977 A CN202111077977 A CN 202111077977A CN 113535211 B CN113535211 B CN 113535211B
Authority
CN
China
Prior art keywords
weex
page
target
file
version
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111077977.XA
Other languages
Chinese (zh)
Other versions
CN113535211A (en
Inventor
李睿
唐红武
薄满辉
韩海燕
刘森林
闫晶
李建龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Travelsky Mobile Technology Co Ltd
Original Assignee
China Travelsky Mobile 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 China Travelsky Mobile Technology Co Ltd filed Critical China Travelsky Mobile Technology Co Ltd
Priority to CN202111077977.XA priority Critical patent/CN113535211B/en
Publication of CN113535211A publication Critical patent/CN113535211A/en
Application granted granted Critical
Publication of CN113535211B publication Critical patent/CN113535211B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application provides an application program updating method and device, computer equipment and a storage medium, relates to the technical field of interactive program processing, and is used for improving the updating efficiency of an application program. The method mainly comprises the following steps: when a current client triggers to enter a target weex page, detecting whether a weex file corresponding to the target weex page of the latest version is stored locally; if the weex file corresponding to the target weex page of the latest version is determined not to be stored locally, a weex compression packet corresponding to the target weex page of the latest version is obtained from the server, wherein the weex compression packet comprises a page common compression packet and a page special compression packet; loading a weex compression packet corresponding to a target weex page of the latest version; splicing codes in the page sharing compression package, the page special compression package and the basic file to obtain a target code, wherein the basic file is a code shared by all pages in the locally stored application program; and updating the target weex page according to the target code.

Description

Application program updating method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of application program update technologies, and in particular, to an application program update method and apparatus, a computer device, and a storage medium.
Background
Weex is an open-source lightweight mobile end cross-platform dynamic technical solution, and as a general cross-platform Web development language, the Weex can perfectly give consideration to performance and dynamics, so that a mobile developer writes Native-level performance experience through simple front-end syntax. When the Native App is developed, some disadvantages exist, for example, the client needs to frequently issue versions for updating, and Weex can effectively solve the pain point that the mobile terminal frequently issues versions.
In the prior art, when a Weex page updated mobile application accesses for the first time, a server needs to download a latest update package, decompress the update package to the local, and render the page after loading, so that the time consumption of the process is long, and the access speed and the user experience of the page are reduced.
Disclosure of Invention
The embodiment of the application provides an application program updating method and device, computer equipment and a storage medium, and is used for improving the updating efficiency of the application program.
The embodiment of the invention provides an application program updating method, which comprises the following steps:
when a current client triggers to enter a target weex page, detecting whether a weex file corresponding to the target weex page with the latest version is stored locally;
if it is determined that the latest version of weex file corresponding to the target weex page is not stored locally, obtaining a weex compression packet corresponding to the latest version of the target weex page from a server, wherein the weex compression packet comprises a page common compression packet and a page special compression packet, and a code shared by a plurality of pages in an application program is stored in the page common compression packet;
loading a weex compression packet corresponding to a target weex page of the latest version;
splicing the codes in the page sharing compression package, the page special compression package and the basic file to obtain a target code, wherein the basic file is a code shared by all pages in the locally stored application program;
and updating the target weex page according to the target code.
The embodiment of the invention provides an application program updating device, which comprises:
the detection module is used for detecting whether a weex file corresponding to the target weex page of the latest version is stored locally when the current client is triggered to enter the target weex page;
the obtaining module is configured to obtain a weex compression packet corresponding to the latest version of the target weex page from a server if it is determined that the weex file corresponding to the latest version of the target weex page is not locally stored, where the weex compression packet includes a page common compression packet and a page dedicated compression packet, and a code common to multiple pages in an application program is stored in the page common compression packet;
the loading module is used for loading the weex compression packet corresponding to the target weex page of the latest version;
the splicing module is used for splicing the codes in the page sharing compression package, the page special compression package and the basic file to obtain a target code, wherein the basic file is a code shared by all pages in the locally stored application program;
and the updating module is used for updating the target weex page according to the target code.
A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the application update method when executing the computer program.
A computer-readable storage medium, which stores a computer program that, when executed by a processor, implements the above-described application update method.
The invention provides an application program updating method, an application program updating device, computer equipment and a storage medium, wherein when a current client is triggered to enter a target weex page, whether a weex file corresponding to the target weex page with the latest version is stored locally is detected; if it is determined that the latest version of the weex file corresponding to the target weex page is not stored locally, a weex compression packet corresponding to the latest version of the target weex page is obtained from the server, the weex compression packet comprises a page common compression packet and a page special compression packet, and the weex compression packet corresponding to the latest version of the target weex page is loaded; and splicing the code in the page common compression packet, the page special compression packet and the basic file to obtain a target code, and updating the target weex page according to the target code. Because the code shared by a plurality of pages in the application program is stored in the page shared compression packet, and the basic file is the code shared by all the pages in the locally stored application program, when the weex compression packet corresponding to the target weex page is obtained, only the page dedicated compression packet can be obtained, so that the time for obtaining the compression packet from the server is shortened, then the page shared compression packet, the page dedicated compression packet and the code in the basic file are spliced to obtain the target code, the target weex page is updated based on the target code, and the updating efficiency of the application program is improved.
Drawings
FIG. 1 is a flowchart of an application update method provided herein;
fig. 2 is a schematic structural diagram of an application update apparatus provided in the present application.
Fig. 3 is a schematic diagram of a computer device provided in the present application.
Detailed Description
In order to better understand the technical solutions described above, the technical solutions of the embodiments of the present application are described in detail below with reference to the drawings and the specific embodiments, and it should be understood that the specific features of the embodiments and the embodiments of the present application are detailed descriptions of the technical solutions of the embodiments of the present application, and are not limitations of the technical solutions of the present application, and the technical features of the embodiments and the embodiments of the present application may be combined with each other without conflict.
Referring to fig. 1, the application program updating method of the present invention is applied to a client, and the method specifically includes steps S101 to S105:
step S101, when the current client triggers to enter the target weex page, whether a weex file corresponding to the target weex page with the latest version is stored locally is detected.
It should be noted that the application program includes multiple weex pages, each weex page is an independent single-page application, and each weex page corresponds to a weex file. When a client of a user triggers to enter a certain target weex page in an application program, the client automatically triggers and judges whether a weex file corresponding to the target weex page of the latest version is stored locally.
Step S102, if it is determined that the latest version of the weex file corresponding to the target weex page is not stored locally, obtaining the weex compressed packet corresponding to the latest version of the target weex page from the server.
The internal structure of the weex compression packet comprises: images and packages. The images store local picture resources loaded by the weex, the packages store various js files of the weex, each folder has an entry.js file corresponding to an Activity page, and each entry.js file contains a plurality of repetitive codes, so that the problems that a weex compression packet is large, downloading is slow and the like are caused. To solve this problem, the embodiment of the present invention divides each weex compressed packet into a page common compressed packet and a page dedicated compressed packet. The weex compression packet comprises a page sharing compression packet and a page special compression packet, codes shared by a plurality of pages in the application program are stored in the page sharing compression packet, and exclusive program updating codes of the corresponding pages are stored in the page special compression packet.
It should be noted that a module for an application program is usually composed of multiple weex pages, and each weex page is a separate single-page application. Since many same codes exist among weex pages, if public code extraction is not performed, the same resources can be repeatedly loaded, the packet volume is invalid and increased, and the repeated requests waste user flow and server cost. Meanwhile, the bag body is too large, so that the first screen is slowly loaded, the user experience is influenced, and therefore public code extraction operation is required.
And for the extraction of the public codes of the multiple pages, unpacking, adding split Chunks, setting an extraction range and specifying the repetition times of the public codes to be extracted through a fixed template pattern. And during packaging, according to the style set by the template, extracting the common codes used by a plurality of packages from common. Js in pages is the common part of all pages extracted, and the code of each page independent part is small.
In an optional embodiment, after obtaining the weex compressed packet corresponding to the latest version of the target weex page from the server, the method further includes: determining whether the weex compression packet corresponding to the target weex page of the latest version is downloaded successfully; if the downloading is successful, checking a weex compression packet corresponding to the target weex page of the latest version; and if the check on the weex compressed packet corresponding to the target weex page of the latest version passes, loading the weex compressed packet corresponding to the target weex page of the latest version.
Further, if the downloading fails or the weex compression packet corresponding to the target weex page of the latest version is not checked to pass, determining whether a weex file with version information higher than a preset version exists locally; if the locally-stored version information is higher than the weex file of the preset version, loading the weex file corresponding to the local target weex page; and if the version information does not exist locally, whether the version information is higher than the preset version of the weex file or not is judged, the target weex page is converted into a hypertext markup language H5 page.
The preset version is the minimum version required for operating the target weex page. If the preset version is 1.1, the local version information is at least higher than the 1.1 version, and the weex file corresponding to the local target weex page can be loaded, namely the corresponding target weex page is displayed through the weex file; and if the local version information is less than or equal to the 1.1 version, converting the target weex page into a hypertext markup language H5 page.
Step S103, loading the weex compressed packet corresponding to the target weex page of the latest version.
Specifically, the weex compressed packet corresponding to the latest version of the target weex page is decompressed.
And step S104, splicing the codes in the page sharing compression package, the page special compression package and the basic file to obtain a target code.
The basic file is a code shared by all pages in the application program stored locally. In an embodiment of the invention, a separate file, such as baseutility, js is extracted for the underlying functions used for all pages. Because of the most basic function, the file is large, the basic library usually does not change much, the version is stable, and multiple updates are not needed. The basic file is used as a single module library for downloading or is embedded in the client side independently, the basic file does not need to be repeatedly downloaded for many times, and great help is brought to the improvement of the page loading speed.
In the embodiment of the invention, a weex decompressed file is obtained after the weex compressed packet is decompressed, and a common JsEntry field is contained in a page loading parameter in the weex decompressed file and records a storage path of a page common code. When the client judges that the commonJsEntry field exists, the client loads the js file (page shared compression packet) under the relevant path and reads the content commonString in the js file. And simultaneously reading the basic file to acquire the content BaseString. Then traverse through all entry.js files (entry files) under the weex decompressed file, read the content, splice BaseStrng and commoString to the rearmost of the file, and finally write back to the entry.js file. Therefore, global pollution can not be caused when each page is loaded, independence among pages is guaranteed, meanwhile, packet volume is reduced by combining repeated codes, downloading speed is improved, and downloading success rate is also improved.
And step S105, updating the target weex page according to the target code.
The embodiment of the invention provides an application program updating method, wherein when a current client triggers to enter a target weex page, whether a weex file corresponding to the target weex page of the latest version is stored locally is detected; if it is determined that the latest version of the weex file corresponding to the target weex page is not stored locally, a weex compression packet corresponding to the latest version of the target weex page is obtained from the server, the weex compression packet comprises a page common compression packet and a page special compression packet, and the weex compression packet corresponding to the latest version of the target weex page is loaded; and splicing the code in the page common compression packet, the page special compression packet and the basic file to obtain a target code, and updating the target weex page according to the target code. Because the code shared by a plurality of pages in the application program is stored in the page shared compression packet, and the basic file is the code shared by all the pages in the locally stored application program, when the weex compression packet corresponding to the target weex page is obtained, only the page dedicated compression packet can be obtained, so that the time for obtaining the compression packet from the server is shortened, then the page shared compression packet, the page dedicated compression packet and the code in the basic file are spliced to obtain the target code, the target weex page is updated based on the target code, and the updating efficiency of the application program is improved.
In an embodiment provided by the present invention, detecting whether a weex file corresponding to a target weex page of a latest version is locally stored includes steps S201 to S204:
step S201, determining whether a weex file corresponding to the target weex page is stored locally.
Wherein the weex file is a file required for operating the target weex file. Each target weex page corresponds to a weex file.
In step S201, if the weex file corresponding to the target weex page is locally stored, it is determined whether the version information in the weex file is higher than the preset version and lower than the latest running version.
The preset version is the lowest version required for operating the target weex page, and the latest operating version is the latest version of the target weex page issued by the server.
In step S203, if the version information in the weex file is higher than the preset version and lower than the latest running version, the weex file corresponding to the local target weex page is loaded, and it is determined that the weex file of the latest version is not stored locally.
In the embodiment of the invention, if the version information in the weex file is higher than the preset version and lower than the latest running version, the weex file in the client can be loaded and run, that is, the weex file can be directly loaded to realize the display of the target weex page. And then determining that the latest version of the weex file is not stored locally, and downloading the latest version of the weex file corresponding to the target weex page from the server when the client is idle, or the client exits the current application, or exits the target weex page corresponding to the current application, so that when the client triggers the target weex page again, the target weex page can be loaded based on the downloaded latest version of the weex file.
In step S204, if the version information in the weex file is the same as the latest running version, it is determined that the weex file of the latest version is locally stored.
In contrast to step S203, if the version information in the weex file is the same as the latest running version, it is determined that the latest version of the weex file is locally stored, and then the target weex page is directly loaded according to the latest version of the weex file.
In an embodiment provided by the present invention, after step S201, the method may further include:
step S301, if the version information in the weex file is not higher than the preset version, or the weex file corresponding to the target weex page is not stored locally, acquiring a locally stored basic file.
The basic file is a file which is pre-embedded in the client and is related to the running application program, and the file is a code shared by all pages in the locally stored application program.
Step S302, it is determined whether the version of the base file is higher than the preset version and lower than the latest running version.
Step S303, if the version of the basic file is higher than the preset version and lower than the latest running version, loading the weex file corresponding to the target weex page in the local basic file, and determining that the weex file corresponding to the target weex page of the latest version is not stored locally.
And if the version of the basic file is higher than the preset version and lower than the latest running version, loading the weex file corresponding to the target weex page in the local basic file, and displaying the target weex page according to the weex file corresponding to the target weex page in the basic file. And downloading the latest version of the weex file corresponding to the target weex page from the server, so that when the user accesses the target weex page again, the target weex page is loaded and displayed according to the latest version of the weex file.
In step S304, if the version of the base file is the same as the latest running version, it is determined that the weex file corresponding to the target weex page of the latest version is locally stored.
And loading and displaying the target weex page based on the latest version of the weex file corresponding to the target weex page.
The embodiment of the invention provides an application program updating method which is applied to a server and specifically comprises the following steps S401-S402:
step S401, receiving a request sent by the client to obtain a weex compression packet corresponding to the latest version of the target weex page.
And step S402, sending the weex compressed packet corresponding to the target weex page with the latest version to the client.
The weex compressed packet comprises a page common compressed packet and a page special compressed packet, and a code common to multiple pages in an application program is stored in the page common compressed packet.
Further, before the server sends the weex compressed packet corresponding to the latest version of the target weex page to the client, the server needs to upload the weex packet in different environments such as test, grayscale, production and the like to the specified path of the corresponding packet sending server through a Jenkins automatic trigger script. And the same package on the package sending server is analyzed to realize the consistency of the iOS, the Android and the Web three ends.
In addition, the server creates a weex compressed packet to be registered first, and fills information such as a Chinese name, an English name, an accessed URL, a webURL when degrading, an updating strategy and the like in the weex compressed packet, wherein the specific structure of the compressed packet registry is as follows:
Figure 948125DEST_PATH_IMAGE002
it should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In an embodiment, an application updating apparatus is provided, and the application updating apparatus corresponds to the application updating method in the above embodiments one to one. As shown in fig. 2, the functional modules of the application updating apparatus are described in detail as follows:
the detection module 10 is configured to detect whether a weex file corresponding to a target weex page of a latest version is stored locally when a current client triggers entry into the target weex page;
an obtaining module 20, configured to obtain, if it is determined that the latest version of the weex file corresponding to the target weex page is not locally stored, a weex compression packet corresponding to the latest version of the target weex page from the server, where the weex compression packet includes a page common compression packet and a page dedicated compression packet, and a code shared by multiple pages in the application program is stored in the page common compression packet;
the loading module 30 is configured to load a weex compressed packet corresponding to the target weex page of the latest version;
a splicing module 40, configured to splice the codes in the page common compressed packet, the page dedicated compressed packet, and the basic file to obtain a target code, where the basic file is a code common to all pages in the locally stored application program;
and the updating module 50 is configured to update the target weex page according to the target code.
In an optional embodiment, the detection module 10 is specifically configured to:
determining whether a weex file corresponding to the target weex page is stored locally;
if the weex file corresponding to the target weex page is locally stored, determining whether the version information in the weex file is higher than a preset version and lower than a latest running version;
if the version information in the weex file is higher than a preset version and lower than a latest running version, loading the weex file corresponding to the local target weex page, and determining that the weex file corresponding to the target weex page of the latest version is not stored locally;
and if the version information in the weex file is the same as the latest running version, determining that the weex file corresponding to the target weex page with the latest version is locally stored.
In an optional embodiment, the apparatus further comprises: a determination module 60;
the obtaining module 20 is further configured to obtain a locally stored basic file if the version information in the weex file is not higher than a preset version, or the weex file corresponding to the target weex page is not locally stored;
a determining module 60, configured to determine whether the version of the base file is higher than a preset version and lower than a latest running version;
the determining module 60 is further configured to, if the version of the basic file is higher than a preset version and lower than a latest running version, load a weex file corresponding to the target weex page in a local basic file, and determine that the weex file corresponding to the target weex page of the latest version is not locally stored;
the determining module 60 is further configured to determine that the weex file corresponding to the target weex page, in which the latest version is stored locally, is the same as the latest running version.
In an optional embodiment, the apparatus further comprises: a verification module 70;
the determining module 60 is further configured to determine whether the weex compressed packet corresponding to the target weex page of the latest version is downloaded successfully;
the checking module 70 is configured to check the weex compressed packet corresponding to the target weex page of the latest version if the downloading is successful;
the loading module 30 is specifically configured to load the weex compressed packet corresponding to the latest version of the target weex page if the weex compressed packet corresponding to the latest version of the target weex page passes the check.
In an optional embodiment, the determining module 60 is further configured to determine whether a local weex file exists, where the version information is higher than a preset version of the weex file, if the downloading fails or the weex compressed packet corresponding to the target weex page of the latest version is not checked to pass;
the loading module 30 is specifically configured to load a weex file corresponding to the local target weex page if the locally-existing version information is higher than the weex file of the preset version; and if the version information does not exist locally, converting the target weex page into a hypertext markup language H5 page if the version information is higher than the preset version of the weex file.
For the specific definition of the application updating apparatus, reference may be made to the above definition of the application updating method, which is not described herein again. The various modules in the above-described apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 3. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an application update method.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
when a current client triggers to enter a target weex page, detecting whether a weex file corresponding to the target weex page with the latest version is stored locally;
if it is determined that the latest version of weex file corresponding to the target weex page is not stored locally, obtaining a weex compression packet corresponding to the latest version of the target weex page from a server, wherein the weex compression packet comprises a page common compression packet and a page special compression packet, and a code shared by a plurality of pages in an application program is stored in the page common compression packet;
loading a weex compression packet corresponding to a target weex page of the latest version;
splicing the codes in the page sharing compression package, the page special compression package and the basic file to obtain a target code, wherein the basic file is a code shared by all pages in the locally stored application program;
and updating the target weex page according to the target code.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
when a current client triggers to enter a target weex page, detecting whether a weex file corresponding to the target weex page with the latest version is stored locally;
if it is determined that the latest version of weex file corresponding to the target weex page is not stored locally, obtaining a weex compression packet corresponding to the latest version of the target weex page from a server, wherein the weex compression packet comprises a page common compression packet and a page special compression packet, and a code shared by a plurality of pages in an application program is stored in the page common compression packet;
loading a weex compression packet corresponding to a target weex page of the latest version;
splicing the codes in the page sharing compression package, the page special compression package and the basic file to obtain a target code, wherein the basic file is a code shared by all pages in the locally stored application program;
and updating the target weex page according to the target code.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. An application program updating method applied to a client, the method comprising:
when a current client triggers to enter a target weex page, detecting whether a weex file corresponding to the target weex page with the latest version is stored locally;
if it is determined that the latest version of weex file corresponding to the target weex page is not stored locally, obtaining a weex compression packet corresponding to the latest version of the target weex page from a server, wherein the weex compression packet comprises a page common compression packet and a page special compression packet, and a code shared by a plurality of pages in an application program is stored in the page common compression packet; the special page compression packet stores a special program updating code corresponding to the page;
loading a weex compression packet corresponding to a target weex page of the latest version;
splicing the codes in the page sharing compression package, the page special compression package and the basic file to obtain a target code, wherein the basic file is a code shared by all pages in the locally stored application program; the basic file is independently pre-embedded at the client as a single module library;
decompressing the weex compressed packet to obtain a weex decompressed file, wherein a page loading parameter in the weex decompressed file comprises a common JsEntry field which records a storage path of the page common compressed packet, and a js file under the storage path of the page common compressed packet is loaded to read the content common String therein; reading a basic file to obtain content BaseString, traversing all entry.js files under the weex decompressed file, reading the content, and splicing and writing the BaseStrng and common String into the entry.js files;
and updating the target weex page according to the target code.
2. The method of claim 1, wherein the detecting whether the weex file corresponding to the latest version of the target weex page is stored locally comprises:
determining whether a weex file corresponding to the target weex page is stored locally;
if the weex file corresponding to the target weex page is locally stored, determining whether the version information in the weex file is higher than a preset version and lower than a latest running version;
if the version information in the weex file is higher than a preset version and lower than a latest running version, loading the weex file corresponding to the local target weex page, and determining that the weex file of the latest version is not stored locally;
and if the version information in the weex file is the same as the latest running version, determining that the weex file with the latest version is locally stored.
3. The method of claim 2, further comprising:
if the version information in the weex file is not higher than a preset version or the weex file corresponding to the target weex page is not stored locally, acquiring a locally stored basic file;
determining whether the version of the base file is higher than a preset version and lower than a latest running version;
if the version of the basic file is higher than a preset version and lower than the latest running version, loading a weex file corresponding to the target weex page in a local basic file, and determining that the weex file corresponding to the target weex page of the latest version is not stored locally;
and if the version of the basic file is the same as the latest running version, determining that the weex file corresponding to the target weex page with the latest version is locally stored.
4. The method of any of claims 1-3, wherein after obtaining the weex compressed packet corresponding to the latest version of the target weex page from the server, the method further comprises:
determining whether the weex compression packet corresponding to the target weex page of the latest version is downloaded successfully;
if the downloading is successful, checking a weex compression packet corresponding to the target weex page of the latest version;
and if the check on the weex compressed packet corresponding to the target weex page of the latest version passes, loading the weex compressed packet corresponding to the target weex page of the latest version.
5. The method of claim 4, further comprising:
if the downloading fails or the weex compression packet corresponding to the target weex page with the latest version is checked does not pass, determining whether a weex file with version information higher than a preset version exists locally;
if the locally-existing version information is higher than the weex file of the preset version, loading the weex file corresponding to the local target weex page;
and if the version information does not exist locally, converting the target weex page into a hypertext markup language H5 page if the version information is higher than the preset version of the weex file.
6. An application update apparatus, comprising:
the detection module is used for detecting whether a weex file corresponding to the target weex page of the latest version is stored locally when the current client is triggered to enter the target weex page;
the obtaining module is configured to obtain a weex compression packet corresponding to the latest version of the target weex page from a server if it is determined that the weex file corresponding to the latest version of the target weex page is not locally stored, where the weex compression packet includes a page common compression packet and a page dedicated compression packet, and a code common to multiple pages in an application program is stored in the page common compression packet; the special page compression packet stores a special program updating code corresponding to the page;
the loading module is used for loading the weex compression packet corresponding to the target weex page of the latest version;
the splicing module is used for splicing the codes in the page sharing compression package, the page special compression package and the basic file to obtain a target code, wherein the basic file is a code shared by all pages in the locally stored application program; the basic file is independently pre-embedded at the client as a single module library; decompressing the weex compressed packet to obtain a weex decompressed file, wherein a page loading parameter in the weex decompressed file comprises a common JsEntry field which records a storage path of the page common compressed packet, and a js file under the storage path of the page common compressed packet is loaded to read the content common String therein; reading a basic file to obtain content BaseString, traversing all entry.js files under the weex decompressed file, reading the content, and splicing and writing the BaseStrng and common String into the entry.js files;
and the updating module is used for updating the target weex page according to the target code.
7. The application updating apparatus of claim 6, wherein the detection module is specifically configured to:
determining whether a weex file corresponding to the target weex page is stored locally;
if the weex file corresponding to the target weex page is locally stored, determining whether the version information in the weex file is higher than a preset version and lower than a latest running version;
if the version information in the weex file is higher than a preset version and lower than a latest running version, loading the weex file corresponding to the local target weex page, and determining that the weex file corresponding to the target weex page of the latest version is not stored locally;
and if the version information in the weex file is the same as the latest running version, determining that the weex file corresponding to the target weex page with the latest version is locally stored.
8. The application updating apparatus according to claim 7, wherein the apparatus further comprises: a determination module;
the obtaining module is further configured to obtain a locally stored basic file if the version information in the weex file is not higher than a preset version or the weex file corresponding to the target weex page is not locally stored;
the determining module is used for determining whether the version of the basic file is higher than a preset version and lower than a latest running version;
the determining module is further configured to load a weex file corresponding to the target weex page in a local base file if the version of the base file is higher than a preset version and lower than a latest running version, and determine that the weex file corresponding to the target weex page of the latest version is not stored locally;
and the determining module is further configured to determine that the weex file corresponding to the target weex page, in which the latest version is stored locally, is stored if the version of the base file is the same as the latest running version.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the application update method according to any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, implements the application update method according to any one of claims 1 to 5.
CN202111077977.XA 2021-09-15 2021-09-15 Application program updating method and device, computer equipment and storage medium Active CN113535211B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111077977.XA CN113535211B (en) 2021-09-15 2021-09-15 Application program updating method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111077977.XA CN113535211B (en) 2021-09-15 2021-09-15 Application program updating method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113535211A CN113535211A (en) 2021-10-22
CN113535211B true CN113535211B (en) 2021-12-28

Family

ID=78092601

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111077977.XA Active CN113535211B (en) 2021-09-15 2021-09-15 Application program updating method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113535211B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114237736A (en) * 2021-11-19 2022-03-25 中国建设银行股份有限公司 Page resource loading method, system, device, computer equipment and storage medium
CN114995861B (en) * 2022-08-02 2022-09-30 中航信移动科技有限公司 Weex-based application program updating method, storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106682176A (en) * 2016-12-29 2017-05-17 北京五八信息技术有限公司 Page loading method, equipment and device
CN107423367A (en) * 2017-06-29 2017-12-01 北京五八信息技术有限公司 Web page loading method and device
CN107577491A (en) * 2017-08-09 2018-01-12 时趣互动(北京)科技有限公司 The method of version updating, system in a kind of Mobile solution based on Weex
CN109117174A (en) * 2018-07-04 2019-01-01 北京德惠众合信息技术有限公司 The system and method for the front end page of compatible different engines
WO2019024229A1 (en) * 2017-07-31 2019-02-07 上海壹账通金融科技有限公司 Hot update method and apparatus for mobile application, electronic device, and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106682176A (en) * 2016-12-29 2017-05-17 北京五八信息技术有限公司 Page loading method, equipment and device
CN107423367A (en) * 2017-06-29 2017-12-01 北京五八信息技术有限公司 Web page loading method and device
WO2019024229A1 (en) * 2017-07-31 2019-02-07 上海壹账通金融科技有限公司 Hot update method and apparatus for mobile application, electronic device, and medium
CN107577491A (en) * 2017-08-09 2018-01-12 时趣互动(北京)科技有限公司 The method of version updating, system in a kind of Mobile solution based on Weex
CN109117174A (en) * 2018-07-04 2019-01-01 北京德惠众合信息技术有限公司 The system and method for the front end page of compatible different engines

Also Published As

Publication number Publication date
CN113535211A (en) 2021-10-22

Similar Documents

Publication Publication Date Title
CN110990731B (en) Rendering method, device and equipment of static webpage and computer storage medium
CN108847950B (en) Electronic device, cloud system software automatic deployment method and storage medium
CN110647320A (en) Project framework construction method and device, computer equipment and storage medium
CN113535211B (en) Application program updating method and device, computer equipment and storage medium
CN108804159B (en) Javascript module loading method and preprocessing method and device thereof, and computer equipment
CN112256296B (en) Weex-based express service APP updating method, weex-based express service APP updating device, weex-based express service APP updating equipment and storage medium
CN105975311B (en) Application starting method and device
CN111324421B (en) Container mirror image providing method, loading method, related equipment and system
US20190149571A1 (en) Method and device for repairing page vulnerability
CN112114808A (en) Page rendering method and device and electronic equipment
CN111263354A (en) OTA differential upgrading method and device
CN116909613A (en) Front-end increment updating method and device and application thereof
CN107918587B (en) Debugging method and system for application program
CN107092472B (en) Dynamic publishing method and device
US10552135B1 (en) Reducing a size of an application package
CN113094077A (en) System differential upgrading method and device, intelligent terminal and storage medium
CN111078631A (en) File processing method, terminal device and storage medium
CN111240790A (en) Multi-language adaptation method and device for application, client and storage medium
CN113641389B (en) Software upgrading method, device and equipment based on OpenCPU
CN116821533A (en) Page rendering method, computer device and computer-readable storage medium
CN115048082A (en) Micro front-end system construction method and device, server and readable storage medium
CN113282300A (en) Volume optimization method, device, equipment and storage medium for application installation package
CN115145593A (en) Method and computer system for installing application program
CN113934954A (en) Webpage first screen rendering method and device in application program
CN106959870B (en) Nginx dynamic module loading 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
GR01 Patent grant
GR01 Patent grant