CN108845816B - Application program updating method, system, computer device and storage medium - Google Patents

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

Info

Publication number
CN108845816B
CN108845816B CN201810649614.0A CN201810649614A CN108845816B CN 108845816 B CN108845816 B CN 108845816B CN 201810649614 A CN201810649614 A CN 201810649614A CN 108845816 B CN108845816 B CN 108845816B
Authority
CN
China
Prior art keywords
application program
version
updating
resource
mode
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
CN201810649614.0A
Other languages
Chinese (zh)
Other versions
CN108845816A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201810649614.0A priority Critical patent/CN108845816B/en
Priority to PCT/CN2018/109656 priority patent/WO2019242166A1/en
Publication of CN108845816A publication Critical patent/CN108845816A/en
Application granted granted Critical
Publication of CN108845816B publication Critical patent/CN108845816B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

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)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention provides an application program updating method, an application program updating system, computer equipment and a storage medium. The method comprises the following steps: if the application program is detected to be started, sending a request to a server; receiving version related information and an application program resource using mode returned by the server according to the request, wherein the version related information comprises an application program version number, a version updating mode and a version updating address; comparing the current version number of the application program with the version number of the application program to determine whether the application program needs to be subjected to version updating; if the application program needs to be subjected to version updating and the application program resource using mode is to use network resources, the resources of the application program are loaded through a network request, and the application program is updated according to the version updating mode and the version updating address. The embodiment of the invention improves the user experience and can update and maintain the application program conveniently and timely.

Description

Application program updating method, system, computer device and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to an application program updating method, system, computer device, and storage medium.
Background
Many existing applications use a hybrid frame, which enables developers to embed HyperText Markup Language (HTML) applications into a native container, and integrates the advantages of native applications and HTML applications. At present, HTML5 page resources, script resources, corresponding resources and the like (hereinafter, referred to as resources) corresponding to many applications of the Hybird framework are placed on a server side, and the applications are accessed through Uniform Resource Locators (URLs); or the application program is placed locally, namely the terminal where the application program is located, and the application program is directly loaded and displayed. When the resources corresponding to the application program are placed at the server, the problems of long loading time and poor user experience exist. When the system is placed locally, the problems of difficult resource updating and difficult updating and maintenance exist.
Disclosure of Invention
Embodiments of the present invention provide an application updating method, system, computer device, and storage medium, which can improve user experience and facilitate updating and maintaining in time.
In a first aspect, an embodiment of the present invention provides an application program updating method, which is applied to a terminal, and the method includes:
if the application program is detected to be started, sending a request to a server;
receiving version-related information and an application program resource using mode, wherein the version-related information and the application program resource using mode are returned by the server according to the request, the version-related information comprises an application program version number, a version updating mode and a version updating address, the application program resource using mode comprises using local resources or using network resources, and the application program resource using mode is determined by the server according to current operating environment data sent by the terminal;
comparing the current version number of the application program with the version number of the application program to determine whether the application program needs to be subjected to version updating;
and if the application program needs to be subjected to version updating and the application program resource using mode is to use network resources, loading the resources of the application program through a network request, and updating the application program according to the version updating mode and the version updating address.
In a second aspect, an embodiment of the present invention further provides an application program updating method, which is applied to a server, and the method includes:
receiving a request sent by a terminal where an application program is located, wherein the request is used for acquiring version related information of the application program and a resource using mode of the application program, and the version related information comprises an application program version number, a version updating mode and a version updating address;
receiving current operation environment data sent by the terminal;
determining the application program resource using mode according to the running environment data;
and sending the application program resource using mode, the application program version number, the version updating mode and the version updating address to the terminal so that the terminal determines whether the application program needs to be subjected to version updating according to the application program resource using mode and the application program version number, and updating the application program according to the version updating mode and the version updating address under the condition that the version updating is required.
In a third aspect, an embodiment of the present invention provides an application updating system, where the system includes a unit configured to execute the application updating method according to the first aspect, and a unit configured to execute the application updating method according to the second aspect.
In a fourth aspect, an embodiment of the present invention provides a computer device, where the computer device includes a memory, and a processor connected to the memory;
the memory is configured to store a computer program, and the processor is configured to execute the computer program stored in the memory to perform the application program updating method according to the first aspect or to perform the application program updating method according to the second aspect.
In a fifth aspect, an embodiment of the present invention provides a storage medium, where the storage medium stores a computer program, where the computer program includes program instructions, and the program instructions, when executed by a processor, implement the application program updating method according to the first aspect or execute the application program updating method according to the second aspect.
In the process of implementing the embodiment of the invention, if the application program is detected to be started, a request is sent to the server, the mode of loading the resource corresponding to the application program after the application program is started, namely the resource use mode of the application program, is determined according to the request data returned by the server, whether the application program needs to be updated after the application program is started or not is determined, and if the application program needs to be updated, the application program is updated according to the version update address and the version update mode returned by the server. The application program resource using mode is determined by the server according to the current operating environment data sent by the terminal. The method and the device can determine the resource use mode of the application program according to the operation environment data of the terminal where the application program is located, namely determine whether the application program is started to use network resources or local resources according to the operation environment of the terminal where the application program is located, and improve user experience. And under the condition that the application program resource using mode is network resource using and the application program needs to be updated, updating the application program according to the version updating address and the version updating mode returned by the server side, so that the application program is updated and maintained in time.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a timing diagram of an application update system provided by an embodiment of the present invention;
FIG. 2 is a flowchart illustrating an application update method according to an embodiment of the present invention;
FIG. 3 is a sub-flow diagram of an application update method according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating an application update method according to another embodiment of the present invention;
FIG. 5 is a schematic block diagram of an application update system provided by an embodiment of the present invention;
FIG. 6 is a schematic block diagram of a load update unit provided by an embodiment of the present invention;
fig. 7 is a schematic block diagram of a computer device provided by an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminal described in the present invention includes, but is not limited to, a mobile phone, a laptop computer, a tablet computer, a desktop computer, etc. which can install an application program.
FIG. 1 is a timing diagram of an application update system according to an embodiment of the present invention. The diagram shown in fig. 1 includes a terminal and a server. The terminal is provided with an application program, the application program uses a hybrid framework, and the terminal also comprises a network interface. The server side is a server side corresponding to the application program, and the server side also comprises a network interface. The network interface in the terminal and the network interface at the server side are used for communicating with each other. When detecting that the application program in the terminal is started, calling a network interface in the terminal to send a request to the server terminal through the network interface, wherein the request is used for acquiring version related information of the application program corresponding to the server terminal and a resource using mode of the application program, and the version related information comprises information such as an application program version number, a version updating mode, a version updating address and the like. And after receiving the request corresponding to the terminal, the server receives the current operating environment data sent by the terminal where the application program is located, determines the resource use mode of the application program in the terminal according to the operating environment data, and sends the information of the resource use mode of the application program, the version number of the application program, the version updating mode, the version updating address and the like determined by the server to the terminal through a network interface. And the terminal compares the current version number of the application program with the version number of the application program returned by the server terminal so as to determine whether the application program needs to be subjected to version updating. And the terminal determines the resource loading mode of the application program according to whether the determined application program needs to be subjected to version updating and the application program resource using mode returned by the server, and updates the application program according to the version updating address and the version updating mode returned by the server under the condition that the version updating is needed.
The method and the device can determine the resource use mode of the application program according to the running environment data of the terminal where the application program is located, improve the experience of a user, and simultaneously facilitate updating and maintaining the application program in time.
The steps of the application update method are described in detail below from the perspective of the terminal and the server, respectively.
Fig. 2 is a flowchart illustrating an application updating method according to an embodiment of the present invention. The method is applied to the terminal. The method comprises the following steps S201-S205.
S201, if the starting of the application program is detected, a request is sent to a server, and the request is used for acquiring version related information of the application program corresponding to the server and a resource using mode of the application program.
S202, receiving version related information and application program resource using modes returned by the server according to the request, wherein the version related information comprises an application program version number, a version updating mode and a version updating address, the application program resource using modes comprise using local resources or using network resources, and the application program resource using modes are determined by the server according to current operating environment data sent by the terminal.
The current operation environment data of the terminal comprises data such as the current network environment, the current hardware environment and the current electric quantity of the terminal. The application version number of the server refers to the highest version number corresponding to the application program of the server (the naming rule of the default application version number is incremented, each time there is a version update, the version number is added up), that is, the latest version number corresponding to the application program. The application resource usage pattern includes using network resources or using local resources. The term "using network resources" refers to loading resources of the application program on the server side by means of network request, and the term "using local resources" refers to loading resources of the application program from the local database, that is, loading resources of the application program in the local database of the terminal. The resources of the application refer to HTML5 page resources, script resources, and the like. The version updating address comprises a Uniform Resource Locator (URL) where the updating resource is located, and the updating resource of the application program can be obtained through the version updating address. It should be noted that the request for the application version number, the application resource usage mode, the version update address, and the like of the server side may be one request, or may be multiple requests sent continuously.
It should be noted that before sending the request to the server, the terminal and the server need to negotiate in advance the expression forms of the corresponding application version number, application resource usage mode, version update address, and the like. For example, the use mode of the application program resource is represented by a parameter a, wherein the value of a has two values, which can be represented by yes and no respectively, for example, yes represents the network resource and no represents the local resource; the network resource can also be represented by yes, and the local resource can be represented by non-yes; it can also be represented by 0, 1, such as network resource represented by 1, local resource represented by 0, etc. Other numbers, letters, words, etc. may also be used. After the two parties negotiate, when the terminal receives the corresponding parameters and values returned by the server through the network interface, the corresponding parameters and values can be analyzed so as to obtain the meanings corresponding to the parameters and values, and the communication between the two parties is facilitated.
S203, comparing the current version number of the application program with the version number of the application program to determine whether the application program needs to be subjected to version updating.
The current version number of the application refers to the current version number of the application in the terminal, and the application version number refers to the application version number returned from the server side.
Specifically, step S203 includes: judging whether the version number of the application program returned by the server side is greater than the current version number of the application program; if the version number of the application program returned by the server side is larger than the current version number of the application program, determining that the version of the application program needs to be updated; otherwise, determining that the application program does not need to be subjected to version updating. Wherein the naming convention for the default application version number is incremented.
S204, if the version of the application program needs to be updated and the use mode of the application program resource is to use network resources, loading the resources of the application program through a network request, and updating the application program according to the version updating mode and the version updating address. And if the version of the application program needs to be updated and the application program resource is used in a manner of using the local resource, the application program is not updated, and the resource of the application program is loaded from the local database. If the application program does not need to be subjected to version updating and the application program resource usage mode is to use network resources, the resources of the application program are loaded through network requests. And if the version of the application program is not required to be updated and the application program resource is used in a manner of using the local resource, loading the resource of the application program from the local database.
It can be understood that, if the application program needs to be version-updated and the usage mode of the application program resource is determined to be network resource usage according to the current operating environment of the terminal, the resource of the application program is loaded through the network request, and the application program is updated according to the version-update mode and the version-update address. If the version of the application program needs to be updated and the application program resource using mode is to use local resources, the application program is started without updating, resources of the application program are loaded from a local database, and when the application program is started next time, if the application program resource using mode is determined to be to use network resources according to terminal operating environment data, the version of the application program is updated, so that the application program in the terminal can be updated timely and conveniently under the condition that the terminal operating environment allows. If the application program does not need to be subjected to version updating, whether the application program resource using mode is to use local resources or network resources is determined according to the running environment of the terminal, so that the requirements of different users on the application program are met according to the running environment data of the terminal, namely, under the condition that the running environment of the terminal is allowed, resources corresponding to the application program at the server side are loaded through a network request, and under the condition that the running environment of the terminal is not allowed, the resources of the application program on the local side are loaded. Thus improving the user experience.
In one embodiment, the version update mode includes a full update and an incremental update. Wherein, the full update means that all resources of the application program are updated, and the incremental update means that only partial resources of the application program are updated. As shown in fig. 3, updating the application program according to the version update method and the version update address includes the following steps S301 to S307.
S301, judging whether the version updating mode is full updating or incremental updating. And analyzing the parameters and the values according to the parameters and the values corresponding to the version updating modes returned by the server side so as to obtain whether the version updating modes are full updating or incremental updating. If the values of the parameters corresponding to the version updating mode are set to 0 and 1, 1 represents the full amount updating, and 0 represents the increment updating. And if the value of the parameter corresponding to the version updating mode returned by the server side is 1, the version updating mode returned by the server side is the full updating.
S302, if the version updating mode is incremental updating, an updating packet is requested through the version updating address. The version update address includes a uniform resource locator URL at which the update resource is located.
S303, decompressing the update package to obtain an update file. In order to save network bandwidth and increase the downloading speed of the terminal, the update package at the server end is generally compressed and exists in the form of a compressed package.
S304, searching and replacing the corresponding file in the application program folder according to the file name in the updated file to complete the incremental updating of the application program. Specifically, all files in the update files are circularly traversed, and for each file in the update files, a corresponding file in the application folder is searched and replaced according to the file name. This completes the incremental update of the application.
S305, if the version updating mode is full updating, requesting an updating packet through the version updating address.
S306, decompressing the update package to obtain an update file.
S307, all resources in the application program folder are deleted, and the update file is saved in the application program folder so as to complete the full-scale update of the application program.
In an embodiment, when the version of the application needs to be updated and the usage of the application resource is network resource, the HTML5 page resource of the application is loaded when the application is started, so that when a certain HTML5 page resource is loaded, the page needs to be updated at the same time. In this case, after the decompressing the update package to obtain the update file, the method further includes:
judging whether the currently opened page resources of the application program belong to resources included in the update file; and if the currently opened page resource of the application program belongs to the resources included in the update file, locking the currently opened page of the application program, and simultaneously displaying a prompt page to prompt that the currently opened page of the application program is being updated.
Specifically, whether the page resource currently opened by the application program belongs to the resource included in the update file is judged according to the file name corresponding to the page resource currently opened by the application program. If the currently opened home page of the application program is the home page of the application program, the file name corresponding to the home page of the application program is index. The locking of the currently opened page of the application program may be understood as not responding to the operation of the user on the currently opened page of the application program, or may be understood as not displaying the currently opened page of the application program, and the like. And the prompt page is used for prompting that the currently opened page of the application program is being updated. The prompt page can exist in the form of a prompt box or in other modes. Further, information such as the update progress and the remaining update time may be displayed on the prompt page.
Fig. 4 is a flowchart illustrating an application program updating method according to another embodiment of the present invention. The method is operated on a server side. As shown in fig. 4, the method comprises the following steps S401-S404.
S401, receiving a request sent by a terminal where an application program is located, where the request is used to obtain version-related information of the corresponding application program and a resource use mode of the application program, and the version-related information includes an application program version number, a version update mode, and a version update address.
S402, receiving current operation environment data sent by the terminal, wherein the current operation environment of the terminal comprises a network environment, a hardware environment, electric quantity and the like. The current operation environment data of the terminal can be obtained by the server terminal sending an obtaining request to the terminal after the server terminal receives the request of the terminal; or the terminal actively sends the request to the server side when the terminal sends the request and detects that the request sent by the terminal accords with the preset request. The preset request refers to a request for requesting an application program version number, an application program resource using mode, a version updating mode and a version updating address of the server side.
And S403, determining the use mode of the application program resource according to the operating environment data.
Specifically, step S403 includes: judging whether the operating environment data meet preset conditions or not; if the operating environment data meets the preset conditions, determining that the application program resource using mode is to use network resources; and if the running environment data does not meet the preset condition, determining that the application program resource using mode is to use the local resource.
Wherein, judge whether operating environment data satisfies the preset condition, include: judging whether a WIFI network or network flow is currently used by a terminal where an application program is located, judging whether the current electric quantity of the terminal is larger than a preset electric quantity, and judging whether hardware resources related to the current hardware environment of the terminal are larger than the preset hardware resource quantity; if the current terminal used by the application program is network flow, or the current electric quantity of the terminal is not more than the preset electric quantity, or the hardware resources related to the current hardware environment of the terminal are not more than the preset hardware resource quantity, determining that the preset condition is not met; if the terminal where the application program is located currently uses the WIFI network, the current electric quantity of the terminal is larger than the preset electric quantity, and the hardware resources related to the current hardware environment of the terminal are larger than the preset hardware resource quantity, detecting the network speed of the WIFI network; if the network speed of the WIFI network is greater than the preset network speed, determining that the preset condition is met; and if the network speed of the WIFI network is not greater than the preset network speed, determining that the preset condition is not met.
The hardware resources related to the hardware environment include the remaining amount of the memory, the hard disk, the CPU, and the like, or the occupancy rate of the memory, the hard disk, the CPU, and the like. The preset hardware resource amount comprises the sum of the hardware resource amount which can ensure the normal operation of the terminal and the hardware resource amount related to the version updating data size. The preset electric quantity can be determined according to the electric quantity required by the current version update, the basic energy consumption of the terminal and the like. It can be understood that if the hardware resources involved in the terminal hardware environment are insufficient to update the version of the application program or the terminal is not capable of updating the version of the application program, and then normal operation of the terminal is affected, or the current power of the terminal is insufficient to update the version of the application program, or the terminal is currently using network traffic, it is determined that the current operating environment data of the terminal where the application program is located does not meet the preset condition. When whether the preset conditions are met or not is determined, the network speed of the WIFI network is considered, and the situations that the WIFI network is unstable and signals of the WIFI network are extremely weak are eliminated.
In other embodiments, whether the operating environment data meets the preset condition may be determined according to any one or more factors. In other embodiments, whether the operating environment data meets the preset condition may be determined by combining other factors, and the determination manner may be other determination manners.
S404, sending the application program resource using mode, the application program version number, the version updating mode and the version updating address to the terminal, so that the terminal determines whether the application program needs to be subjected to version updating according to the application program resource using mode and the application program version number, and if the application program needs to be subjected to version updating, updating the application program according to the version updating mode and the version updating address.
The application program resource using mode is determined by the server side instead of the terminal, because the existence of other factors and other determining modes when judging whether the preset condition is met is considered, the corresponding determining code is placed at the server side, other factors and other determining modes can be conveniently added, and the technical scheme is further expanded and perfected.
In other embodiments, the determination of the usage pattern of the application resource may also be determined at the terminal.
Fig. 5 is a schematic block diagram of an application update system provided by an embodiment of the present invention. As shown in fig. 5, the system 50 includes a terminal 510 and a server 520.
The terminal 510 includes a first transmitting unit 511, a first receiving unit 512, a version update determining unit 513, and a load updating unit 514. Wherein the content of the first and second substances,
a first sending unit 511, configured to send a request to a server if it is detected that an application is started, where the request is used to obtain version-related information of the application and a resource usage manner of the application at the server.
A second receiving unit 512, configured to receive version-related information and an application resource usage mode, where the version-related information includes an application version number, a version update mode, and a version update address, where the application resource usage mode includes a local resource and a network resource, and the application resource usage mode is determined by the server according to the current operating environment data sent by the terminal. The current operation environment data of the terminal comprises data such as the current network environment, the current hardware environment and the current electric quantity of the terminal.
The version update determining unit 513 is configured to compare the current version number of the application program with the application program version number to determine whether the application program needs to be version updated.
A loading and updating unit 514, configured to load the resource of the application program through a network request and update the application program according to the version updating method and the version updating address if the application program needs to be version updated and the usage mode of the resource of the application program is network resource usage; the load update unit 514 is further configured to, if the version of the application needs to be updated and the resource usage mode of the application is that the local resource is used, not update the application and load the resource of the application from the local database; the loading update unit 514 is further configured to load the resource of the application program through a network request if the application program does not need to perform version update and the application program resource usage manner is that a network resource is used; the load update unit 514 is further configured to load the resource of the application program from the local database if the application program does not need to be version-updated and the application program resource is used in a manner of using the local resource.
In one embodiment, the version update mode includes a full update and an incremental update. As shown in fig. 6, the load update unit 514 includes an update mode determination unit 601, an update package request unit 602, a decompression unit 603, a replacement update unit 604, and a deletion update unit 605. Wherein the content of the first and second substances,
an update manner determination unit 601, configured to determine whether the version update manner is full update or incremental update.
An update package requesting unit 602, configured to request an update package through a version update address if the version update mode is incremental update.
And the decompressing unit 603 is configured to decompress the update package to obtain the update file.
And a replacement updating unit 604, configured to search for and replace a corresponding file in the application folder according to the file name in the updated file, so as to complete incremental updating of the application.
The update package requesting unit 602 is further configured to request an update package through the version update address if the version update mode is full update.
The decompressing unit 603 is further configured to decompress the update package to obtain the update file.
And a delete update unit 605 configured to delete all resources in the application folder, and save the update file in the application folder to complete the full update of the application.
In an embodiment, when the version of the application needs to be updated and the usage of the application resource is network resource, the HTML5 page resource of the application is loaded when the application is started, so that when a certain HTML5 page resource is loaded, the page needs to be updated at the same time. In this case, the load update unit 514 further includes: a current page judgment unit 606 and a lock prompt unit 607.
A current page determining unit 606, configured to determine whether a page resource currently opened by the application belongs to a resource included in the update file.
The lock prompt unit 607 is configured to lock the currently opened page of the application program and display a prompt page at the same time to prompt that the currently opened page of the application program is being updated if the currently opened page resource of the application program belongs to the resource included in the update file.
The server 520 includes a second receiving unit 521, a usage mode determining unit 522, and a second transmitting unit 523. Wherein the content of the first and second substances,
the second receiving unit 521 is configured to receive a request sent by a terminal where the application program is located, where the request is used to obtain version-related information of the application program and a resource usage manner of the application program, and the version-related information includes an application program version number, a version update manner, and a version update address. The second receiving unit number 521 is further configured to receive current operating environment data sent by the terminal, where the current operating environment of the terminal includes a network environment, a hardware environment, an electric quantity, and the like.
And a usage determining unit 522, configured to determine a usage of the application resource according to the execution environment data. Specifically, the usage pattern determination unit 522 includes: a condition judging unit and a resource using mode determining unit. The condition judging unit is used for judging whether the operating environment data meet preset conditions. The resource using mode determining unit is used for determining the application program resource using mode as using network resources if the operating environment data meets the preset conditions; and if the running environment data does not meet the preset condition, determining that the application program resource using mode is to use the local resource.
A second sending unit 523, configured to send the application resource usage manner, the application version number, the version update manner, and the version update address to the terminal, so that the terminal determines whether the application needs to be version updated according to the application resource usage manner and the application version number, and updates the application according to the version update manner and the version update address when the version update is needed.
Fig. 7 is a schematic block diagram of a computer device according to an embodiment of the present invention. In this embodiment, the device 70 may be a mobile phone, a laptop computer, a tablet computer, a desktop computer, or other terminal device that can be installed with an application program, and the device 70 includes a processor 702, a memory and a network interface 703 connected by a system bus 701, where the memory may include a nonvolatile storage medium 704 and an internal memory 705.
The non-volatile storage medium 704 may store an operating system 7041 and computer programs 7042. The computer program 7042 stored in the nonvolatile storage medium, when executed by the processor 702, can implement the application updating method implemented by the terminal as described above, as shown in fig. 2 and 3. The processor 702 is used to provide computing and control capabilities to support the operation of the overall device 70. The internal memory 705 provides an environment for running a computer program in a non-volatile storage medium, and the computer program, when executed by the processor 702, may cause the processor 702 to perform the application update method as described above with reference to fig. 2 and 3. The network interface 703 is used for network communication, such as receiving messages. Those skilled in the art will appreciate that the configuration shown in fig. 7 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation of the device 70 to which the present application is applied, and that a particular device 70 may include more or less components than those shown, or combine certain components, or have a different arrangement of components.
Wherein the processor 702 is configured to run a computer program stored in a memory to perform the following steps:
if the application program is detected to be started, sending a request to a server; receiving version-related information and an application program resource using mode, wherein the version-related information and the application program resource using mode are returned by the server according to the request, the version-related information comprises an application program version number, a version updating mode and a version updating address, the application program resource using mode comprises using local resources or using network resources, and the application program resource using mode is determined by the server according to current operating environment data sent by the terminal; comparing the current version number of the application program with the version number of the application program to determine whether the application program needs to be subjected to version updating; if the application program needs to be subjected to version updating and the application program resource using mode is the network resource using mode, loading the resource of the application program through a network request, and updating the application program according to the version updating mode and the version updating address.
In an embodiment, the processor 702 further specifically performs:
if the version of the application program needs to be updated and the application program resource using mode is that the local resource is used, the application program is not updated, and the resource of the application program is loaded from a local database; if the version of the application program is not required to be updated and the application program resource using mode is that the local resource is used, loading the resource of the application program from a local database; and if the version of the application program is not required to be updated and the application program resource using mode is the network resource using mode, loading the resource of the application program through a network request.
In an embodiment, the version update mode includes a full update and an incremental update, and when the processor 702 executes the update of the application program according to the version update mode and the version update address, the processor further specifically executes:
judging whether the version updating mode is full updating or incremental updating; if the version updating mode is incremental updating, requesting an updating packet through the version updating address; decompressing the update package to obtain an update file; and searching and replacing the corresponding file in the application program folder according to the file name in the updated file so as to complete the incremental updating of the application program.
In an embodiment, the processor 702 further specifically performs:
if the version updating mode is full updating, requesting an updating packet through the version updating address; decompressing the update package to obtain an update file; and deleting all resources in the application program folder, and saving the update file into the application program folder to complete the full-scale update of the application program.
In an embodiment, after the processor 702 decompresses the update package to obtain the update file, it further specifically performs:
judging whether the currently opened page resource of the application program belongs to the resource included in the update file; if the currently opened page resource of the application program belongs to the resources included in the update file, locking the currently opened page of the application program, and simultaneously displaying a prompt page to prompt that the currently opened page of the application program is being updated.
Another embodiment of the invention also provides a schematic block diagram of a computer device. In this embodiment, the device may be a server. Referring specifically to fig. 7, the computer apparatus includes the same structure as the computer apparatus shown in fig. 7. The computer device is different from the computer device shown in fig. 7 in that a computer program stored in a non-volatile storage medium in the computer device can implement the application updating method implemented by the server side when executed by the processor 702, as shown in fig. 4.
Wherein the processor 702 is configured to run a computer program stored in a memory to perform the following steps:
receiving a request sent by a terminal where an application program is located, wherein the request is used for acquiring version related information of the corresponding application program and a resource using mode of the application program, and the version related information comprises an application program version number, a version updating mode and a version updating address; receiving current operation environment data sent by the terminal; determining the application program resource using mode according to the running environment data; and sending the application program resource using mode, the application program version number, the version updating mode and the version updating address to the terminal so that the terminal determines whether the application program needs to be subjected to version updating according to the application program resource using mode and the application program version number, and updating the application program according to the version updating mode and the version updating address under the condition that the version updating is required.
In an embodiment, the application resource usage includes using a network resource or using a local resource, and when the processor 702 determines the application resource usage according to the operating environment data, the processor specifically performs:
judging whether the operating environment data meet preset conditions or not; if the operating environment data meets a preset condition, determining that the application program resource using mode is the network resource; and if the running environment data does not meet the preset condition, determining that the application program resource using mode is the local resource.
It should be understood that the Processor 702 in the above embodiments may be a Central Processing Unit (CPU), and the Processor may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable gate array (FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In another embodiment of the present invention, a storage medium is provided, the storage medium storing a computer program comprising program instructions, which when executed by a processor, implement the steps of:
if the application program is detected to be started, sending a request to a server; receiving version-related information and an application program resource using mode, wherein the version-related information and the application program resource using mode are returned by the server according to the request, the version-related information comprises an application program version number, a version updating mode and a version updating address, the application program resource using mode comprises using local resources or using network resources, and the application program resource using mode is determined by the server according to current operating environment data sent by the terminal; comparing the current version number of the application program with the version number of the application program to determine whether the application program needs to be subjected to version updating; if the application program needs to be subjected to version updating and the application program resource using mode is the network resource using mode, loading the resource of the application program through a network request, and updating the application program according to the version updating mode and the version updating address.
In an embodiment, the processor further implements:
if the version of the application program needs to be updated and the application program resource using mode is that the local resource is used, the application program is not updated, and the resource of the application program is loaded from a local database; if the version of the application program is not required to be updated and the application program resource using mode is that the local resource is used, loading the resource of the application program from a local database; and if the version of the application program is not required to be updated and the application program resource using mode is the network resource using mode, loading the resource of the application program through a network request.
In an embodiment, the version update mode includes a full update and an incremental update, and when the processor executes the update of the application program according to the version update mode and the version update address, the method further specifically includes:
judging whether the version updating mode is full updating or incremental updating; if the version updating mode is incremental updating, requesting an updating packet through the version updating address; decompressing the update package to obtain an update file; and searching and replacing the corresponding file in the application program folder according to the file name in the updated file so as to complete the incremental updating of the application program.
In an embodiment, the processor further implements:
if the version updating mode is full updating, requesting an updating packet through the version updating address; decompressing the update package to obtain an update file; and deleting all resources in the application program folder, and saving the update file into the application program folder to complete the full-scale update of the application program.
In an embodiment, after the processor decompresses the update package to obtain the update file, the following is further specifically implemented:
judging whether the currently opened page resource of the application program belongs to the resource included in the update file; if the currently opened page resource of the application program belongs to the resources included in the update file, locking the currently opened page of the application program, and simultaneously displaying a prompt page to prompt that the currently opened page of the application program is being updated.
There is also provided in another embodiment of the present invention a storage medium storing a computer program comprising program instructions which, when executed by a processor, implement the steps of:
receiving a request sent by a terminal where an application program is located, wherein the request is used for acquiring version related information of the corresponding application program, and the version related information comprises an application program version number, an application program resource using mode, a version updating mode and a version updating address; receiving current operation environment data sent by the terminal; determining the application program resource using mode according to the running environment data; and sending the application program resource using mode, the application program version number, the version updating mode and the version updating address to the terminal so that the terminal determines whether the application program needs to be subjected to version updating according to the application program resource using mode and the application program version number, and if the application program needs to be subjected to version updating, updating the application program according to the version updating mode and the version updating address.
In an embodiment, the application resource usage mode includes using a network resource or using a local resource, and when the processor executes the determining of the application resource usage mode according to the operating environment data, the specific implementation is as follows:
judging whether the operating environment data meet preset conditions or not; if the operating environment data meets a preset condition, determining that the application program resource using mode is the network resource; and if the running environment data does not meet the preset condition, determining that the application program resource using mode is the local resource.
The storage medium includes a computer readable storage medium, and the storage medium may be an internal storage unit of the terminal or the server according to any of the foregoing embodiments, for example, a hard disk or a memory of the terminal or the server. The storage medium may also be an external storage device of the terminal, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, and the like, which are equipped on the terminal or the server. Further, the storage medium may also include both an internal storage unit and an external storage device of the terminal.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, device and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and the division of the unit is only one logical function division, and other division manners may be available in actual implementation. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. An application program updating method applied to a terminal is characterized by comprising the following steps:
if the starting of the application program is detected, sending a request to a server side, wherein the application program adopts a Hybird framework;
receiving version-related information and an application program resource using mode returned by the server according to the request, wherein the version-related information comprises an application program version number, a version updating mode and a version updating address, the application program resource using mode comprises using local resources or using network resources, and the application program resource using mode is determined by the server according to current operating environment data sent by the terminal;
comparing the current version number of the application program with the version number of the application program to determine whether the application program needs to be subjected to version updating;
if the application program needs to be subjected to version updating and the application program resource using mode is the network resource, loading the resource of the application program through a network request, and updating the application program according to the version updating mode and the version updating address;
if the version of the application program needs to be updated and the application program resource using mode is that the local resource is used, the application program is not updated, and the resource of the application program is loaded from a local database;
if the version of the application program is not required to be updated and the application program resource using mode is that the local resource is used, loading the resource of the application program from a local database;
if the application program does not need to be subjected to version updating and the application program resource using mode is that the network resource is used, loading the resource of the application program through a network request;
before sending the request to the server, the method further includes:
negotiating the version related information and the application program resource using mode with the server side in advance;
the updating mode of the version comprises full updating and incremental updating, and the updating of the application program according to the updating mode of the version and the updating address of the version comprises the following steps:
judging whether the version updating mode is full updating or incremental updating according to the value of the parameter corresponding to the version updating mode returned by the server side;
if the version updating mode is incremental updating, requesting an updating packet through the version updating address;
decompressing the update package to obtain an update file;
and searching and replacing the corresponding file in the application program folder according to the file name in the updated file so as to complete the incremental updating of the application program.
2. The method of claim 1, further comprising:
if the version updating mode is full updating, requesting an updating packet through the version updating address; decompressing the update package to obtain an update file;
and deleting all resources in the application program folder, and saving the update file into the application program folder to complete the full-scale update of the application program.
3. The method according to any of claims 1-2, wherein after said decompressing said update package into an update file, said method further comprises:
judging whether the currently opened page resource of the application program belongs to the resource included in the update file;
if the currently opened page resource of the application program belongs to the resources included in the update file, locking the currently opened page of the application program, and simultaneously displaying a prompt page to prompt that the currently opened page of the application program is being updated.
4. An application program updating method applied to a server side is characterized by comprising the following steps:
negotiating version related information of an application program and an application program resource using mode with a terminal in advance;
receiving a request sent by a terminal where an application program is located, wherein the request is used for acquiring version related information of the application program and a resource using mode of the application program, and the version related information comprises an application program version number, a version updating mode and a version updating address; wherein the application program adopts a Hybird framework; the application program resource using mode comprises using network resources or using local resources;
receiving current operation environment data sent by the terminal;
determining the application program resource using mode according to the running environment data;
sending the application program resource using mode, the application program version number, the version updating mode and the version updating address to the terminal so that the terminal determines whether the application program needs to be subjected to version updating according to the application program resource using mode and the application program version number, and updating the application program according to the value of the parameter corresponding to the version updating mode and the version updating address under the condition that the version updating is required; the value of the parameter corresponding to the version updating mode is used for the terminal to judge whether the version updating mode is full updating or incremental updating, and the version updating address is used for the terminal to request an updating packet to update the application program.
5. The method of claim 4, wherein determining the application resource usage based on the runtime environment data comprises:
judging whether the operating environment data meet preset conditions or not;
if the operating environment data meets a preset condition, determining that the application program resource using mode is the network resource;
and if the running environment data does not meet the preset condition, determining that the application program resource using mode is the local resource.
6. An application update system, characterized in that the application update system comprises means for performing the method according to any of claims 1-3, and means for performing the method according to any of claims 4-5.
7. A computer device, comprising a memory, and a processor coupled to the memory;
the memory is used for storing a computer program; the processor is configured to execute a computer program stored in the memory to perform the method of any of claims 1-3 or the method of any of claims 4-5.
8. A storage medium, characterized in that the storage medium stores a computer program comprising program instructions which, when executed by a processor, implement the method of any of claims 1-3 or the method of any of claims 4-5.
CN201810649614.0A 2018-06-22 2018-06-22 Application program updating method, system, computer device and storage medium Active CN108845816B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810649614.0A CN108845816B (en) 2018-06-22 2018-06-22 Application program updating method, system, computer device and storage medium
PCT/CN2018/109656 WO2019242166A1 (en) 2018-06-22 2018-10-10 Application update method and system, and computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810649614.0A CN108845816B (en) 2018-06-22 2018-06-22 Application program updating method, system, computer device and storage medium

Publications (2)

Publication Number Publication Date
CN108845816A CN108845816A (en) 2018-11-20
CN108845816B true CN108845816B (en) 2021-09-10

Family

ID=64201948

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810649614.0A Active CN108845816B (en) 2018-06-22 2018-06-22 Application program updating method, system, computer device and storage medium

Country Status (2)

Country Link
CN (1) CN108845816B (en)
WO (1) WO2019242166A1 (en)

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109683937A (en) * 2018-12-26 2019-04-26 斑马网络技术有限公司 Update method, device and storage medium
CN111381840B (en) * 2018-12-27 2024-06-18 中国移动通信集团终端有限公司 Method, device and equipment for updating application program
CN109766127B (en) * 2019-01-16 2022-06-28 上海掌门科技有限公司 Method for updating application version information
CN111679842B (en) * 2019-03-11 2023-06-23 阿里巴巴集团控股有限公司 Application program hot update processing method, device and system
CN111679850B (en) * 2019-03-11 2023-06-02 阿里巴巴集团控股有限公司 Application program hot update processing method, device and system
CN111831296A (en) * 2019-04-17 2020-10-27 天津五八到家科技有限公司 Application program updating method, terminal device and computer-readable storage medium
CN111459506B (en) * 2020-03-02 2023-10-13 平安科技(深圳)有限公司 Deep learning platform cluster deployment method and device, medium and electronic equipment
CN111767074A (en) * 2020-05-12 2020-10-13 Oppo(重庆)智能科技有限公司 Configuration updating method, device, terminal and storage medium
CN111897568B (en) * 2020-07-06 2023-12-26 北京中关村银行股份有限公司 System verification method, device, equipment and storage medium
CN111949278B (en) * 2020-07-24 2022-10-18 苏州浪潮智能科技有限公司 Method, system, terminal and storage medium for automatically installing MCS system
CN111897564A (en) * 2020-08-19 2020-11-06 腾讯科技(深圳)有限公司 Application updating method and system
CN112346761B (en) * 2020-10-27 2024-05-17 长沙市到家悠享网络科技有限公司 Front-end resource online method, device, system and storage medium
CN112596773A (en) * 2020-12-31 2021-04-02 深圳市大富网络技术有限公司 Application program updating method, device, equipment and storage medium
CN112631633A (en) * 2021-01-07 2021-04-09 南方电网数字电网研究院有限公司 Function module upgrading method and device based on double-core intelligent electric meter
CN112882733B (en) * 2021-02-04 2023-09-08 网易(杭州)网络有限公司 Application updating method and device, electronic equipment and storage medium
CN113110864B (en) * 2021-03-19 2023-01-20 深圳市腾讯网络信息技术有限公司 Application program updating method and device and storage medium
CN113360296A (en) * 2021-06-21 2021-09-07 维沃移动通信(杭州)有限公司 Address management method and device, electronic equipment and readable storage medium
CN113703807B (en) * 2021-08-26 2023-12-15 上海德拓信息技术股份有限公司 Method and system for real-time detection and update of static resource version
CN113992754B (en) * 2021-10-25 2023-12-22 北京恒安嘉新安全技术有限公司 Policy updating method, device, equipment and medium of deep packet inspection equipment
CN114338395A (en) * 2021-12-29 2022-04-12 武汉烽火信息集成技术有限公司 C/S communication network management method, storage medium, electronic equipment and system
CN116339767B (en) * 2022-05-10 2024-03-19 广州南天电脑系统有限公司 Application resource allocation method, device, computer equipment and storage medium
CN117421016A (en) * 2023-09-28 2024-01-19 深邦智能科技集团(青岛)有限公司 Offline upgrading method and device for Android application
CN117493716A (en) * 2023-11-08 2024-02-02 中建八局第一数字科技有限公司 Display updating method and device of mobile terminal Web App, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105389182A (en) * 2015-11-02 2016-03-09 广州华多网络科技有限公司 Software upgrading method and apparatus
CN105446750A (en) * 2014-05-30 2016-03-30 阿里巴巴集团控股有限公司 Web app starting operation and mirror image file generating method and device
CN106598646A (en) * 2016-11-14 2017-04-26 深圳市金立通信设备有限公司 Program update method and terminal
CN106648787A (en) * 2016-12-28 2017-05-10 平安科技(深圳)有限公司 Resource updating method and terminal

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103023941B (en) * 2011-09-26 2018-01-05 腾讯科技(深圳)有限公司 The update method of end application based on Web page and more new system
CN105808282A (en) * 2014-12-31 2016-07-27 北京神州泰岳软件股份有限公司 Method and device for updating webpage contents of application program
US9904537B2 (en) * 2016-04-19 2018-02-27 Dropbox, Inc. Providing a hybrid application
US10560356B2 (en) * 2016-07-14 2020-02-11 International Business Machines Corporation Assuring data correctness in non-stable network environment
US20180052809A1 (en) * 2016-08-16 2018-02-22 Microsoft Technology Licensing, Llc Inferring user interaction with an iframe
US11341100B2 (en) * 2016-12-12 2022-05-24 Egnyte, Inc. System and method for eliminating full rescan synchronizations on service restarts
CN106888250B (en) * 2016-12-30 2019-10-01 网易(杭州)网络有限公司 Method for realizing push, the method and apparatus for showing push content
CN107087018B (en) * 2017-03-14 2021-03-23 深圳市金立通信设备有限公司 Method and terminal for running Web application program
CN107491320B (en) * 2017-06-26 2021-11-09 北京五八信息技术有限公司 Loading method and device based on mixed-mode mobile application
CN107784086B (en) * 2017-10-09 2020-08-04 中国平安人寿保险股份有限公司 Webpage loading method, terminal equipment and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446750A (en) * 2014-05-30 2016-03-30 阿里巴巴集团控股有限公司 Web app starting operation and mirror image file generating method and device
CN105389182A (en) * 2015-11-02 2016-03-09 广州华多网络科技有限公司 Software upgrading method and apparatus
CN106598646A (en) * 2016-11-14 2017-04-26 深圳市金立通信设备有限公司 Program update method and terminal
CN106648787A (en) * 2016-12-28 2017-05-10 平安科技(深圳)有限公司 Resource updating method and terminal

Also Published As

Publication number Publication date
WO2019242166A1 (en) 2019-12-26
CN108845816A (en) 2018-11-20

Similar Documents

Publication Publication Date Title
CN108845816B (en) Application program updating method, system, computer device and storage medium
US10712915B2 (en) Information presentation using a client on a terminal
CN111581563B (en) Page response method and device, storage medium and electronic equipment
US20190238478A1 (en) Using a template to update a stack of resources
CN107122379B (en) Collecting transaction data associated with a locally stored data file
CN109391673B (en) Method, system and terminal equipment for managing update file
CN109510754B (en) Online document generation method, device and system and electronic equipment
CN101997853A (en) Data downloading method and terminal
CN105468707A (en) Cache-based data processing method and device
CN104077310A (en) Method, equipment and system for loading resource file
CN113761412A (en) Application page display method and device, electronic equipment, medium and application system
CN113645287B (en) Automobile message storage method and device and automobile message storage system
CN111107133A (en) Generation method of difference packet, data updating method, device and storage medium
CN112689170B (en) Content playing method of display terminal, display terminal and readable storage medium
CN110505289B (en) File downloading method and device, computer readable medium and wireless communication equipment
CN109614383B (en) Data copying method and device, electronic equipment and storage medium
CN108965295B (en) File compression and combination method and related device
CN115858978A (en) Page loading method and device based on updated resources
CN113360348B (en) Abnormal request processing method and device, electronic equipment and storage medium
CN111078257B (en) H5 application package loading method and related device
CN113779122A (en) Method and apparatus for exporting data
CN112615918B (en) Network management system and information synchronization method thereof
CN110929500B (en) File comparison method and related device
CN109388536B (en) Data collection method and device
CN109086066B (en) Application program updating method and device, computer equipment and storage medium

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