WO2019242166A1 - 应用程序更新方法、系统、计算机设备及存储介质 - Google Patents

应用程序更新方法、系统、计算机设备及存储介质 Download PDF

Info

Publication number
WO2019242166A1
WO2019242166A1 PCT/CN2018/109656 CN2018109656W WO2019242166A1 WO 2019242166 A1 WO2019242166 A1 WO 2019242166A1 CN 2018109656 W CN2018109656 W CN 2018109656W WO 2019242166 A1 WO2019242166 A1 WO 2019242166A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
update
version
resource usage
resources
Prior art date
Application number
PCT/CN2018/109656
Other languages
English (en)
French (fr)
Inventor
何兵
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019242166A1 publication Critical patent/WO2019242166A1/zh

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

Definitions

  • the present application relates to the field of data processing technologies, and in particular, to an application program update method, system, computer device, and storage medium.
  • Hybird framework which is a hybrid framework.
  • Hybrid framework applications allow developers to embed HyperText Markup Language (HTML) applications into a native container, integrating native applications and The advantages of HTML applications are in one.
  • HTML5 page resources, script resources, and corresponding resources (hereinafter collectively referred to as resources) corresponding to many applications of the Hybird framework are placed on the server side, and the application uses the Uniform Resource Locator (URL) method.
  • URL Uniform Resource Locator
  • the embodiments of the present application provide a method, a system, a computer device, and a storage medium for updating an application program, which can improve the user experience and facilitate timely updating and maintenance.
  • an embodiment of the present application provides a method for updating an application program, which is applied to a terminal.
  • the method includes:
  • the version-related information includes an application version number, a version update method, and a version update address, wherein the application resource usage method includes Using local resources or using network resources, the application resource usage mode is determined by the server according to the current operating environment data sent by the terminal;
  • the application program needs to be updated and the application resource usage mode is to use network resources, load the resources of the application program through a network request, and update the application program according to the version update method and the version update address. Update the application.
  • an embodiment of the present application further provides an application program updating method, which is applied to a server side.
  • the method includes:
  • the request is used to obtain version-related information of the application and an application resource usage method, and the version-related information includes an application version number, a version update method, and a version update address;
  • an embodiment of the present application provides an application program updating system, which includes a unit corresponding to executing the application program updating method according to the first aspect and an application program updating method according to the second aspect. Corresponding unit.
  • an embodiment of the present application 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
  • the processor is configured to run the computer program stored in the memory to execute the application program updating method according to the first aspect or to execute the application program according to the second aspect. Update method.
  • an embodiment of the present application provides a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program, where the computer program includes program instructions, and the program instructions are implemented by a processor to implement the foregoing.
  • the application if the application is detected to be started, a request is sent to the server, and the method of loading the resource corresponding to the application after the application is started is determined according to the request data returned by the server, that is, the application The method of using program resources and whether the application needs to be updated after the application is started. If an update is required, the application is updated according to the version update address and version update method returned by the server.
  • the application resource usage mode is determined by the server according to the current running environment data sent by the terminal.
  • This application can determine the application resource usage mode based on the operating environment data of the terminal where the application is located, that is, determine whether the application uses network resources or local resources after the application is started based on the operating environment of the terminal where the application is located, which improves the user's Experience.
  • the application resource usage mode is to use network resources and the application needs to be updated, the application is updated according to the version update address and version update method returned by the server, so that the application can be updated and maintained in a timely manner.
  • FIG. 1 is a sequence diagram of an application update system according to an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of an application program updating method according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a sub-process of an application update method according to an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of an application program updating method according to another embodiment of the present application.
  • FIG. 5 is a schematic block diagram of an application update system according to an embodiment of the present application.
  • FIG. 6 is a schematic block diagram of a loading and updating unit according to an embodiment of the present application.
  • FIG. 7 is a schematic block diagram of a computer device according to an embodiment of the present application.
  • the terminals described in this application include, but are not limited to, mobile phones, laptop computers, tablet computers, desktop computers, and other devices that can install application programs.
  • FIG. 1 is a sequence diagram of an application update system according to an embodiment of the present application.
  • the diagram shown in FIG. 1 includes a terminal and a server.
  • An application is installed in the terminal.
  • the application uses a hybrid framework, and the terminal also includes a network interface.
  • the server is the server corresponding to the application, and the server also includes a network interface.
  • the network interface in the terminal and the server-side network interface are used to communicate with each other.
  • a network interface in the terminal is invoked to send a request to the server through the network interface, where the request is used to obtain server version-related information and application resource usage corresponding to the server Method
  • the version-related information includes information such as an application version number, a version update method, and a version update address.
  • the server After receiving the request corresponding to the terminal, the server receives the current operating environment data sent by the terminal where the application is located, determines the application resource usage method in the terminal according to the operating environment data, and determines the application resource usage method determined by the server, Information such as the application version number, version update method, and version update address are sent to the terminal through the network interface.
  • the terminal compares the current version number of the application program with the application version number returned by the server to determine whether the application program needs to be updated.
  • the terminal determines the method for loading resources by the application based on whether the application requires a version update and the use of the application resource returned by the server, and updates the address and version according to the version returned by the server if a version update is required Update method to update the application.
  • This application can determine the application resource usage mode based on the operating environment data of the terminal where the application is located, which improves the user experience and facilitates timely updating and maintenance of the application.
  • FIG. 2 is a schematic flowchart of an application program updating method according to an embodiment of the present application. The method is applied in a terminal. The method includes the following steps S201-S204.
  • the version-related information includes an application version number, a version update method, and a version update address.
  • the application resource usage method includes using local resources. Or use network resources, the application resource usage mode is determined by the server side according to the current operating environment data sent by the terminal.
  • the current operating environment data of the terminal includes data such as the current network environment, hardware environment, and power of the terminal.
  • the server application version number refers to the highest version number corresponding to the server application (the naming rule of the default application version number is incremented, and each time there is a version update, the version number is added upwards), that is, the The latest version number corresponding to the application.
  • Application resource usage includes using network resources or using local resources.
  • the use of network resources refers to loading the application's resources on the server through a network request
  • the use of local resources refers to loading the resources of the application from the local database, that is, the resources of loading the application in the terminal's local database.
  • Application resources refer to HTML5 page resources, script resources, etc.
  • the version update address includes the uniform resource locator URL where the update resource is located, and the update resource of the application can be obtained through the version update address. It should be noted that the request for the server-side application version number, application resource usage method, version update method, version update address, etc. may be one request, or multiple requests sent continuously.
  • the terminal and the server need to pre-negotiate the corresponding application program version number, application resource usage mode, version update mode, version update address, and other expressions.
  • application resources is represented by the A parameter, of which there are two values of A, which can be represented by yes and no, such as yes for network resources and no for local resources; and yes for network resources , Non-yes indicates local resources; it can also be 0, 1, such as 1 for network resources, 0 for local resources. You can also use other numbers, letters, text, and so on.
  • S203 Compare the current version number of the application program with the application version number to determine whether the application program needs to be updated.
  • the current version of the application refers to the current version of the application in the terminal, and the application version refers to the version of the application returned from the server.
  • step S203 includes: determining whether the version number of the application program returned by the server 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 greater than the current version number of the application program, determining that the application program needs to be updated. ; Otherwise, determine that the application does not require a version update.
  • the naming rule of the default application version number is increasing.
  • the application requires a version update and the application resource usage mode is a network resource, load the application resource through a network request, and update the application according to the version update method and the version update address. If the application requires a version update, and the application resource usage mode is to use local resources, the application is not updated and the application resources are loaded from the local database. If the application program does not need to be updated and the application resource usage mode is using network resources, the application resources are loaded through a network request. If the application does not need to be updated, and the application resource usage mode is to use local resources, load the application's resources from the local database.
  • the application resource usage mode is determined to be a network resource according to the current operating environment of the terminal
  • the application resource is loaded through a network request and the address is updated according to the version update method and version To update the application.
  • the application needs to be updated, and the application resource usage mode is to use local resources, then the application is started without updating, and the application resources are loaded from the local database.
  • the environment data determines that the application resource usage mode is the use of network resources, and then the application version is updated. In this way, if the terminal operating environment allows, the application in the terminal can still be updated in a timely and convenient manner.
  • the application does not need to be updated, determine whether the application resource usage mode is to use local resources or network resources according to the operating environment of the terminal. In this way, according to the operating environment data of the terminal, the needs of different users for the application are met, that is, in the terminal. If the operating environment permits, load the resources corresponding to the application on the server through a network request, and load the resources of the local application if the terminal operating environment does not allow it. This improves the user experience.
  • the version update method includes full update and incremental update.
  • full update means that all resources of the application are updated
  • incremental update means that only some resources of the application are updated.
  • updating the application program according to the version update mode and the version update address includes the following steps S301-S307.
  • S301 Determine whether the version update method is a full update or an incremental update.
  • the parameters and values corresponding to the version update mode returned by the server the parameters and values are parsed to obtain whether the version update mode is a full update or an incremental update.
  • the value of the parameter corresponding to the version update mode is set to 0 and 1, 1 means full update, 0 means incremental update. If the value of the corresponding parameter of the version update method returned by the server is 1, it means that the version update method returned by the server is a full update.
  • version update method is an incremental update, request an update package through the version update address.
  • the update address of this version includes the Uniform Resource Locator URL where the update resource is located.
  • server-side update packages are generally compressed and exist in the form of compressed packages.
  • the method further includes:
  • the page resource currently opened by the application belongs to the resource included in the update file according to the file name corresponding to the page resource currently opened by the application. If the application's home page is currently opened, the file name corresponding to the application's home page is index.jsp. If index.jsp is detected in the resources included in the update file, the currently opened page of the application will be locked and displayed at the same time.
  • Prompt page wherein, locking the currently opened page of the application can be understood as not responding to the user's operation on the currently opened page of the application, and can also be understood as not displaying the currently opened page of the application.
  • Prompt page to remind the application that the currently open page is updating.
  • the prompt page can exist in the form of a prompt box, or it can exist in other ways. Further, information such as update progress and remaining update time may be displayed on the prompt page.
  • FIG. 4 is a schematic flowchart of an application program updating method according to another embodiment of the present application. This method runs on the server. As shown in FIG. 4, the method includes the following steps S401-S404.
  • S401 Receive a request sent by a terminal where an application is located, where the request is used to obtain corresponding version information of an application and an application resource usage method, and the version related information includes an application version number, a version update method, and a version update address. .
  • the terminal's current operating environment data may be obtained by the server after the server receives the terminal request, and the server sends an acquisition request to the terminal; or when the terminal sends a request, if it detects that the request sent by the terminal meets the preset request, the terminal actively Sent to the server.
  • the preset request refers to a request for requesting the server-side application program version number, application resource usage method, version update method, and version update address.
  • step S403 includes: judging whether the operating environment data meets the preset conditions; if the operating environment data meets the preset conditions, determining that the application resource usage mode is using network resources; if the operating environment data does not satisfy the preset conditions, determining the application Program resources are used by using local resources.
  • the determining whether the running environment data meets the preset conditions includes: determining whether the terminal where the application is currently using is a WIFI network or network traffic, determining whether the current power of the terminal is greater than the preset power, and determining the hardware involved in the current hardware environment of the terminal.
  • the resource is greater than the preset amount of hardware resources; if the terminal where the application is currently using is network traffic, or the current power of the terminal is not greater than the preset power, or the hardware resources involved in the terminal's current hardware environment are not greater than the preset hardware resource amount, determine The preset conditions are not met; if the terminal where the application is currently using the WIFI network and the terminal's current power is greater than the preset power and the hardware resources involved in the terminal's current hardware environment are greater than the preset hardware resources, detect the network speed of the WIFI network; if If the network speed of the WIFI network is greater than the preset network speed, it is determined that the preset conditions are met; if the network speed of the WIFI network is not greater than the preset network speed, it is determined that the preset conditions are not met.
  • the hardware resources involved in the hardware environment include the remaining amount of memory, hard disk, CPU, etc. or the occupation rate of memory, hard disk, CPU, etc.
  • the preset amount of hardware resources includes the sum of the amount of hardware resources that can ensure the normal operation of the terminal and the amount of hardware resources involved in the version update data size.
  • the preset power can be determined based on the power required for the current version update and the terminal's basic energy consumption. Understandably, if the hardware resources involved in the hardware environment of the terminal are not sufficient to update the version of the application or to update the version of the application, it will affect the normal operation of the terminal, or the current power of the terminal is insufficient to update the application.
  • the terminal determines that the current operating environment data of the terminal where the application is located does not meet the preset conditions.
  • the network speed of the WIFI network is taken into consideration, which excludes the situation where the WIFI network is unstable and the WIFI network signal is extremely weak.
  • whether the operating environment data meets a preset condition may be determined according to any one or more of the factors. In other embodiments, whether the operating environment data meets a preset condition may also be determined in combination with other factors, and the determination manner may also be other determination manners.
  • the application resource usage mode is determined by the server rather than the terminal, because it takes into account other factors and other determination methods when determining whether the preset conditions are met, and it is convenient to place the corresponding determination code on the server. Adding other factors and other methods of determination will help further expand and improve the technical solution.
  • the determination of the application resource usage mode may also be determined on the terminal.
  • FIG. 5 is a schematic block diagram of an application update system according to an embodiment of the present application. As shown in FIG. 5, the system includes a terminal 510 and a server 520.
  • the terminal 510 includes a first sending unit 511, a first receiving unit 512, a version update determining unit 513, and a loading update unit 514. among them,
  • the first sending unit 511 is configured to send a request to the server if it detects that the application is started, and the request is used to obtain the version-related information of the application on the server and the application resource usage mode.
  • the second receiving unit 512 is configured to receive version-related information and an application resource usage method returned by the server.
  • the version-related information includes an application version number, a version update method, and a version update address.
  • the application resource usage method Including local resources and network resources, the application resource usage mode is determined by the server based on the current operating environment data sent by the terminal.
  • the current operating environment data of the terminal includes data such as the current network environment, hardware environment, and power of the terminal.
  • the version update determining unit 513 is configured to compare the current version number of the application program with the application version number to determine whether the application program needs to be updated.
  • a loading and updating unit 514 is configured to load an application's resources through a network request if the application requires a version update and the application resource usage mode is a network resource, and update the application according to the version update method and the version update address. ; Loading and updating unit 514 is also used to update the application if the application needs to be updated and the application resource usage mode is to use local resources, and to load the resources of the application from the local database; loading and updating unit 514 is also used to If the application does not need to be updated, and the application resource usage mode is to use network resources, the application's resources are loaded through a network request; the loading and updating unit 514 is also used if the application does not require a version update and the application resources are used The way is to use local resources, then load the application's resources from the local database.
  • the version update method includes full update and incremental update.
  • 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 delete update unit 605. among them,
  • the update mode determining unit 601 is configured to determine whether the version update mode is a full update or an incremental update.
  • An update package request unit 602 is configured to request an update package through a version update address if the version update method is an incremental update.
  • a decompression unit 603 is configured to decompress the update package to obtain an update file.
  • the replacing and updating unit 604 is configured to find and replace the corresponding file in the application folder according to the file name in the update file to complete the incremental update of the application.
  • the update package request unit 602 is further configured to request an update package through a version update address if the version update method is full update.
  • the decompression unit 603 is further configured to decompress the update package to obtain an update file.
  • the deleting and updating unit 605 is configured to delete all resources in the application folder and save the update file to the application folder to complete the full update of the application.
  • the loading and updating unit 514 further includes a current page judgment unit 606 and a lock prompt unit 607.
  • the current page determination unit 606 is configured to determine whether a page resource currently opened by the application program belongs to a resource included in the update file.
  • a lock prompting unit 607 is used to lock the page currently opened by the application and display a prompt page if the page resource currently opened by the application belongs to the resource included in the update file, to prompt the page currently opened by the application to be updated.
  • the server 520 includes a second receiving unit 521, a usage mode determining unit 522, and a second sending unit 523. among them,
  • the second receiving unit 521 is configured to receive a request sent by a terminal where an application is located, where the request is used to obtain application version-related information and an application resource usage method, and the version-related information includes an application version number, a version update method, 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, and a power amount.
  • the usage mode determining unit 522 is configured to determine an application resource usage mode according to the running environment data.
  • the usage mode determination unit 522 includes a condition determination unit and a resource usage mode determination unit.
  • the condition determining unit is configured to determine whether the running environment data meets a preset condition.
  • a resource use mode determination unit is used to determine that the application resource use mode is to use network resources if the operating environment data meets a preset condition; if the run environment data does not meet the preset conditions, to determine that the application resource use mode is to use local resources .
  • the second sending unit 523 is configured to send an application resource usage method, an application version number, a version update method, and a version update address to the terminal, so that the terminal determines an application according to the application resource use method and the application version number. Whether the program needs to be updated, and if the version needs to be updated, update the application according to the version update method and version update address.
  • FIG. 7 is a schematic block diagram of a computer device according to an embodiment of the present application.
  • the device 70 may be a mobile device, a laptop computer, a tablet computer, a desktop computer, and other terminal devices that can install applications, and the device 70 includes a processor 702, a memory, and a network connected through a system bus 701.
  • the interface 703, where the memory may include a non-volatile storage medium 704 and an internal memory 705.
  • the non-volatile storage medium 704 can store an operating system 7041 and a computer program 7042.
  • the application program updating method implemented by the terminal can be implemented, as shown in FIG. 2 and FIG. 3.
  • the processor 702 is configured to provide computing and control capabilities to support the operation of the entire device 70.
  • the internal memory 705 provides an environment for running a computer program in a non-volatile storage medium.
  • the processor 702 can execute the application program updating method shown in FIG. 2 and FIG. 3 described above.
  • the network interface 703 is used for network communication, such as receiving a message.
  • FIG. 7 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the device 70 to which the solution of the present application is applied.
  • the specific device 70 may Include more or fewer parts than shown in the figure, or combine certain parts, or have a different arrangement of parts.
  • the processor 702 is configured to run a computer program stored in a memory to implement any embodiment of the application program updating method implemented by the foregoing terminal.
  • FIG. 7 Another embodiment of the present application also provides a schematic block diagram of a computer device.
  • the device may be a server. Please refer to FIG. 7 for details.
  • the computer device includes the same structure as the computer device shown in FIG. 7. This computer device is different from the computer device shown in FIG. 7 in that when the computer program stored in the non-volatile storage medium in the computer device is executed by the processor 702, the above-mentioned application program update method implemented on the server side can be implemented, such as Shown in Figure 4.
  • the processor 702 is configured to run a computer program stored in a memory to implement any one of the foregoing application program updating methods implemented on the server side.
  • the processor 702 referred to in the above embodiment may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSPs), and special-purpose integrations.
  • Circuit Application Specific Integrated Circuit, ASIC
  • ready-made programmable gate array Field-Programmable Gate Array, FPGA
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • a computer-readable storage medium stores a computer program.
  • the computer program includes program instructions. When the program instructions are executed by a processor, To implement any embodiment of the method for updating an application program implemented by the foregoing terminal.
  • a computer-readable storage medium stores a computer program, where the computer program includes program instructions, and the program instructions are executed by a processor.
  • the storage medium includes a computer-readable storage medium, and the computer-readable storage medium includes a non-volatile computer-readable storage medium, and the computer-readable storage medium may be internal storage of a terminal or a server according to any one of the foregoing embodiments. Unit, such as the hard disk or memory of a terminal or server.
  • the computer-readable storage medium may also be an external storage device of the terminal or server, such as a plug-in hard disk, a Smart Media Card (SMC), and a secure digital (Secure Digital) , SD) card, etc. Further, the computer-readable storage medium may further include both an internal storage unit of the terminal or the server and an external storage device.

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

一种应用程序更新方法、系统、计算机设备及存储介质,其中所述方法包括:若检测到应用程序启动,则向服务器端发送请求(S201);接收服务器端根据所述请求返回的版本相关信息和应用程序资源使用方式,其中,版本相关信息包括应用程序版本号、版本更新方式以及版本更新地址(S202);将应用程序的当前版本号与所述应用程序版本号进行比对,以确定应用程序是否需进行版本更新(S203);若应用程序需进行版本更新,且应用程序资源使用方式为使用网络资源,则通过网络请求来加载应用程序的资源,并根据版本更新方式和版本更新地址来更新应用程序(S204)。

Description

应用程序更新方法、系统、计算机设备及存储介质
本申请要求于2018年6月22日提交中国专利局、申请号为201810649614.0、发明名称为“应用程序更新方法、系统、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据处理技术领域,尤其涉及一种应用程序更新方法、系统、计算机设备及存储介质。
背景技术
现有很多应用程序使用的是Hybird框架,即混合框架,混合框架的应用程序让开发人员可以把超文本标记语言(HyperText Markup Language,HTML)应用程序嵌入到一个原生容器里面,集原生应用程序和HTML应用程序的优点于一体。目前很多Hybird框架的应用程序所对应的HTML5页面资源、脚本资源和相应的资源等(以下统称为资源),要么放在服务器端,应用程序通过统一资源定位符(Uniform Resource Locator,URL)的方式访问;要么放在本地,即应用程序所在的终端,应用程序直接加载展示。当应用程序所对应的资源放在服务器端时,存在加载时间长、用户体验差的问题。当放在本地时,存在资源更新困难、更新与维护困难的问题。
发明内容
本申请实施例提供一种应用程序更新方法、系统、计算机设备及存储介质,可提高用户体验,同时便于及时地更新和维护。
第一方面,本申请实施例提供了一种应用程序更新方法,应用于终端,该方法包括:
若检测到应用程序启动,则向服务器端发送请求;
接收所述服务器端根据所述请求返回的版本相关信息和应用程序资源使用方式,所述版本相关信息包括应用程序版本号、版本更新方式以及版本更新地址,其中,所述应用程序资源使用方式包括使用本地资源或使用网络资源,所述应用程序资源使用方式是由服务器端根据终端发送的当前运行环境数据确定的;
将所述应用程序的当前版本号与所述应用程序版本号进行比对,以确定所述应用程序是否需进行版本更新;
若所述应用程序需进行版本更新,且所述应用程序资源使用方式为使用网络资源,则通过网络请求来加载所述应用程序的资源,并根据所述版本更新方式和所述版本更新地址来更新所述应用程序。
第二方面,本申请实施例还提供了一种应用程序更新方法,应用于服务器端,该方法包括:
接收应用程序所在终端发送的请求,所述请求用于获取所述应用程序的版本相关信息和应用程序资源使用方式,所述版本相关信息包括应用程序版本号、版本更新方式、版本更新地址;
接收所述终端发送的当前运行环境数据;
根据所述运行环境数据确定所述应用程序资源使用方式;
将所述应用程序资源使用方式、应用程序版本号、版本更新方式、版本更新地址发送到所述终端,以使所述终端根据所述应用程序资源使用方式、应用程序版本号来确定所述应用程序是否需进行版本更新,且在需进行版本更新的情况下,根据所述版本更新方式、版本更新地址来更新所述应用程序。
第三方面,本申请实施例提供了一种应用程序更新系统,该系统包括用于执行上述第一方面所述应用程序更新方法对应的单元和用于执行上述第二方面所述应用程序更新方法对应的单元。
第四方面,本申请实施例提供了一种计算机设备,所述计算机设备包括存储器,以及与所述存储器相连的处理器;
所述存储器用于存储计算机程序,所述处理器用于运行所述存储器中存储的计算机程序,以执行上述第一方面所述的应用程序更新方法或者用于执行上述第二方面所述的应用程序更新方法。
第五方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时,实现上述第一方面所述的应用程序更新方法或者用于执行上述第二方面所述的应用程序更新方法。
在实施本申请实施例的过程中,若检测到应用程序启动,向服务器端发送请求,并根据服务器端返回的请求数据来确定本次应用程序启动后加载应用程序所对应资源的方式,即应用程序资源使用方式,以及本次应用程序启动后是否需要更新,若需要更新,根据服务器端返回的版本更新地址和版本更新方式来更新应用程序。其中,应用程序资源使用方式是由服务器端根据终端发送的当前运行环境数据确定的。本申请可以根据应用程序所在终端的运行环境数据来确定应用程序资源使用方式,即根据应用程序所在终端的运行环境来确定应用程序本次启动后使用的是网络资源还是本地资源,提高了用户的体验。在应用程序资源使用方式为使用网络资源且应用程序需要更新的情况下,根据服务器端返回的版本更新地址和版本更新方式来更新应用程序,便于及时地更新、维护应用程序。
附图说明
图1是本申请实施例提供的应用程序更新系统的时序图;
图2是本申请实施例提供的应用程序更新方法的流程示意图;
图3是本申请实施例提供的应用程序更新方法的子流程示意图;
图4是本申请另一实施例提供的应用程序更新方法的流程示意图;
图5是本申请实施例提供的应用程序更新系统的示意性框图;
图6是本申请实施例提供的加载更新单元的示意性框图;
图7是本申请实施例提供的一种计算机设备的示意性框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳 动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请中描述的终端包括但不限于移动电话、膝上型计算机、平板计算机、台式计算机等可以安装应用程序的设备。
图1是本申请实施例的应用程序更新系统的时序图。在图1所示的图中,包括终端和服务器端。其中,终端中安装有应用程序,该应用程序使用的是混合框架,终端中还包括有网络接口。服务器端是应用程序所对应的服务器端,服务器端也包括有网络接口。终端中的网络接口和服务器端的网络接口用于相互通信。当检测到终端中的应用程序启动,调用终端中的网络接口,以通过网络接口向服务器端发送请求,所述请求用于获取服务器端所对应的该应用程序的版本相关信息和应用程序资源使用方式,该版本相关信息包括应用程序版本号、版本更新方式、版本更新地址等信息。服务器端接收到终端所对应的请求后,接收应用程序所在终端发送的当前运行环境数据,根据该运行环境数据确定终端中的应用程序资源使用方式,并将服务器端确定的应用程序资源使用方式、应用程序版本号、版本更新方式、版本更新地址等信息,通过网络接口发送给终端。终端将应用程序的当前版本号与服务器端返回的应用程序版本号进行比对,以确定应用程序是否需要进行版本更新。终端根据确定的应用程序是否需要进行版本更新以及服务器端返回的应用程序资源使用方式,确定应用程序加载资源的方式,且在需进行版本更新的情况下,根据服务器端返回的版本更新地址和版本更新方式来更新应用程序。
本申请可以根据应用程序所在终端的运行环境数据来确定应用程序资源使用方式,提高了用户的体验,同时便于及时地更新、维护应用程序。
以下分别以终端和服务器的角度详细地介绍该应用程序更新方法的各个步骤。
图2是本申请实施例提供的应用程序更新方法的流程示意图。该方法应用于终端中。该方法包括以下步骤S201-S204。
S201,若检测到应用程序启动,则向服务器端发送请求,所述请求用于获取所述服务器端所对应的应用程序的版本相关信息和应用程序资源使用方式。
S202,接收服务器端根据请求返回的版本相关信息和应用程序资源使用方式,该版本相关信息包括应用程序版本号、版本更新方式以及版本更新地址, 其中,所述应用程序资源使用方式包括使用本地资源或使用网络资源,所述应用程序资源使用方式是由服务器端根据终端发送的当前运行环境数据确定的。
其中,终端当前运行环境数据包括终端当前的网络环境、硬件环境以及电量等数据。其中,服务器端的应用程序版本号,指的是服务器端应用程序所对应的最高版本号(默认应用程序版本号的命名规则是递增的,每次有版本更新,版本号往上加),即该应用程序所对应的最新版本号。应用程序资源使用方式包括使用网络资源或使用本地资源。其中,使用网络资源指的是通过网络请求的方式来加载服务器端该应用程序的资源,使用本地资源指的是从本地数据库中加载应用程序的资源,即加载终端本地数据库中的应用程序的资源。应用程序的资源指的是HTML5页面资源、脚本资源等。版本更新地址包括更新资源所在的统一资源定位符URL,通过版本更新地址可以获取应用程序的更新资源。需要注意的是,请求所述服务器端的应用程序版本号、应用程序资源使用方式、版本更新方式、版本更新地址等的请求可以是一个请求,也可以是连续发送的多个请求。
需要注意的是,在向服务器端发送请求前,需要终端和服务器端预先协商对应的应用程序版本号、应用程序资源使用方式、版本更新方式、版本更新地址等的表达形式。如应用程序资源的使用方式用A参数表示,其中,A的值对应有两个,分别可以用yes、no表示,如用yes表示网络资源,用no表示本地资源;也可以用yes表示网络资源,非yes表示本地资源;还可以为0、1表示,如用1表示网络资源,用0表示本地资源等。还可以用其他的数字、字母、文字等表示。通过双方协商后,终端通过网络接口接收到服务器端返回的对应的参数和值时,可以对对应的参数和值进行解析以便获取该参数和值对应的含义,方便双方的通信。
S203,将应用程序的当前版本号与应用程序版本号进行比对,以确定应用程序是否需进行版本更新。
应用程序的当前版本号指的是终端中该应用程序的当前版本号,应用程序版本号指的是从服务器端返回的应用程序版本号。
具体地,步骤S203包括:判断服务器端返回的应用程序版本号是否大于应用程序的当前版本号;若服务器端返回的应用程序版本号大于应用程序的当前 版本号,则确定应用程序需进行版本更新;否则,确定应用程序无需进行版本更新。其中,默认应用程序版本号的命名规则是递增的。
S204,若应用程序需进行版本更新,且应用程序资源使用方式为使用网络资源,则通过网络请求来加载应用程序的资源,并根据版本更新方式和版本更新地址来更新应用程序。若应用程序需进行版本更新,且应用程序资源使用方式为使用本地资源,则不更新应用程序,并从本地数据库加载应用程序的资源。若应用程序无需进行版本更新,且应用程序资源使用方式为使用网络资源,则通过网络请求来加载应用程序的资源。若应用程序无需进行版本更新,且应用程序资源使用方式为使用本地资源,则从本地数据库加载应用程序的资源。
可以理解地,若应用程序需进行版本更新,且根据终端当前的运行环境确定应用程序资源使用方式为使用网络资源,则通过网络请求来加载应用程序的资源,并根据版本更新方式和版本更新地址来更新应用程序。若应用程序需进行版本更新,且应用程序资源使用方式为使用本地资源,那么本次应用程序启动不进行更新,从本地数据库加载应用程序的资源,当应用程序下一次启动时,若根据终端运行环境数据确定应用程序资源使用方式为使用网络资源,则进行应用程序版本更新,如此,在终端运行环境允许的情况下,仍可以及时方便的对终端中的应用程序进行更新。若应用程序无需进行版本更新,根据终端的运行环境确定应用程序资源使用方式为使用本地资源还是为使用网络资源,如此根据终端的运行环境数据满足了不同用户对该应用程序的需求,即在终端运行环境许可的情况下,通过网络请求加载服务器端该应用程序对应的资源,在终端运行环境不允许的情况下,加载本地上应用程序的资源。如此提高了用户的体验。
在一实施例中,版本更新方式包括全量更新和增量更新。其中,全量更新指的是应用程序所有资源都更新,增量更新指的是只更新应用程序部分资源。如图3所示,根据版本更新方式和版本更新地址来更新应用程序,包括以下步骤S301-S307。
S301,判断版本更新方式是全量更新还是增量更新。根据服务器端返回的版本更新方式所对应的参数和值,通过对该参数和值进行解析以便获取版本更新方式是全量更新还是增量更新。如版本更新方式所对应参数的值设定为0和 1,1表示全量更新,0表示增量更新。若服务器端返回的版本更新方式对应参数的值为1,那么表示服务器端返回的版本更新方式为全量更新。
S302,若版本更新方式是增量更新,通过版本更新地址请求更新包。该版本更新地址包括更新资源所在的统一资源定位符URL。
S303,将更新包解压得到更新文件。为了节约网络带宽和提高终端下载的速度,服务器端的更新包一般都会进行压缩,以压缩包的形式存在。
S304,根据更新文件中的文件名查找应用程序文件夹中对应的文件并进行替换,以完成应用程序的增量更新。具体地,循环遍历更新文件中的所有文件,对于更新文件中的每个文件,根据文件名查找应用程序文件夹中对应的文件并进行替换。如此完成了应用程序的增量更新。
S305,若版本更新方式是全量更新,通过版本更新地址请求更新包。
S306,将更新包解压得到更新文件。
S307,删除应用程序文件夹中所有资源,将更新文件保存至应用程序文件夹中,以完成应用程序的全量更新。
在一实施例中,在应用程序需进行版本更新,且应用程序资源使用方式为使用网络资源的情况下,由于在应用程序启动时就会加载应用程序的HTML5页面资源,因此存在当加载某一个HTML5页面资源时,而该页面同时也需要更新。如此情况下,在所述将更新包解压得到更新文件之后,所述方法还包括:
判断应用程序当前打开的页面资源是否属于更新文件中所包括的资源;若应用程序当前打开的页面资源属于更新文件中所包括的资源,则锁定应用程序当前打开的页面,同时显示提示页面,以提示应用程序当前打开的页面正在更新。
具体地,根据应用程序当前打开的页面资源所对应的文件名来判断应用程序当前打开的页面资源是否属于更新文件中所包括的资源。如当前打开的是应用程序的首页,应用程序的首页所对应的文件名为index.jsp,若检测到index.jsp在更新文件所包括的资源中,那么锁定应用程序当前打开的页面,同时显示提示页面。其中,锁定应用程序当前打开的页面,可以理解为,在应用程序当前打开的页面上不响应用户的操作,也可以理解为不显示应用程序当前打开的页面等。提示页面,用来提示应用程序当前打开的页面正在更新。提示页面可以 是以提示框的形式存在,也可以以其他方式存在。进一步地,可在提示页面上显示更新进度和剩余更新时间等信息。
图4是本申请另一实施例提供的应用程序更新方法的流程示意图。该方法运行于服务器端。如图4所示,该方法包括以下步骤S401-S404。
S401,接收应用程序所在终端发送的请求,所述请求用于获取所对应的应用程序的版本相关信息和应用程序资源使用方式,该版本相关信息包括应用程序版本号、版本更新方式、版本更新地址。
S402,接收终端发送的当前运行环境数据,其中,终端当前运行环境包括网络环境、硬件环境、以及电量等。终端当前运行环境数据可以是服务器端接收到终端的请求后,服务器端向终端发送获取请求来获取的;也可以是终端发送请求时,若检测到终端发送的请求符合预设请求时,终端主动向服务器端发送的。其中,预设请求指的是用于请求所述服务器端的应用程序版本号、应用程序资源使用方式、版本更新方式、版本更新地址的请求。
S403,根据运行环境数据确定应用程序资源使用方式。
具体地,步骤S403,包括:判断运行环境数据是否满足预设条件;若运行环境数据满足预设条件,确定应用程序资源使用方式为使用网络资源;若运行环境数据不满足预设条件,确定应用程序资源使用方式为使用本地资源。
其中,所述判断运行环境数据是否满足预设条件,包括:判断应用程序所在终端当前使用的是WIFI网络还是网络流量、判断终端当前电量是否大于预设电量、判断终端当前硬件环境中涉及的硬件资源是否大于预设硬件资源量;若应用程序所在终端当前使用的是网络流量,或者终端当前电量不大于预设电量,或者终端当前硬件环境中涉及的硬件资源不大于预设硬件资源量,确定不满足预设条件;若应用程序所在终端当前使用的是WIFI网络且终端当前电量大于预设电量且终端当前硬件环境中涉及的硬件资源大于预设硬件资源量,检测WIFI网络的网速;若WIFI网络的网速大于预设网速,确定满足预设条件;若WIFI网络的网速不大于预设网速,确定不满足预设条件。
其中,硬件环境中涉及的硬件资源包括内存、硬盘、CPU等的剩余量或者内存、硬盘、CPU等的占用率。预设硬件资源量包括能保证终端正常运行的硬件资源量与版本更新数据大小所涉及的硬件资源量之和。预设电量,可以根据 当前版本更新需要的电量以及终端的基础能量消耗等来确定。可以理解地,若终端硬件环境中的涉及的硬件资源不足以用来更新应用程序的版本或者用来更新应用程序的版本后会影响终端的正常运行,或者终端当前电量不足以用来更新应用程序的版本,或者终端当前使用的是网络流量,那么确定该应用程序所在终端当前运行环境数据不满足预设条件。确定是否满足预设条件时,考虑到了WIFI网络的网速,是排除WIFI网络不稳定以及WIFI网络信号极弱的情况。
在其他实施例中,可以根据其中任意一个或者多个因素来判断运行环境数据是否满足预设条件。在其他实施例中,运行环境数据是否满足预设条件还可以结合其他的因素来确定,确定的方式还可以是其他的确定方式等。
S404,将应用程序资源使用方式、应用程序版本号、版本更新方式、版本更新地址发送到终端,以使终端根据所述应用程序资源使用方式、应用程序版本号来确定应用程序是否需进行版本更新,以及若需进行版本更新,根据版本更新方式、版本更新地址来更新应用程序。
其中,应用程序资源使用方式由服务器端来确定而不是终端来确定,是因为考虑到了判断是否满足预设条件时其他因素和其他确定方式的存在,将相应的确定代码放在服务器端,可方便增加其他因素和其他确定方式,有利于技术方案进一步扩展和完善。
在其他实施例中,应用程序资源使用方式的确定也可以在终端上来确定。
图5是本申请实施例提供的应用程序更新系统的示意性框图。如图5所示,该系统包括终端510和服务器520。
终端510包括第一发送单元511、第一接收单元512、版本更新确定单元513、加载更新单元514。其中,
第一发送单元511,用于若检测到应用程序启动,则向服务器端发送请求,所述请求用于获取所述服务器端的该应用程序的版本相关信息和应用程序资源使用方式。
第二接收单元512,用于接收服务器端返回的版本相关信息和应用程序资源使用方式,该版本相关信息包括应用程序版本号、版本更新方式以及版本更新地址,其中,所述应用程序资源使用方式包括本地资源、网络资源,所述应用程序资源使用方式是由服务器端根据终端发送的当前运行环境数据确定的。 其中,终端当前运行环境数据包括终端当前的网络环境、硬件环境以及电量等数据。
版本更新确定单元513,用于将应用程序的当前版本号与应用程序版本号进行比对,以确定应用程序是否需进行版本更新。
加载更新单元514,用于若应用程序需进行版本更新,且应用程序资源使用方式为使用网络资源,则通过网络请求来加载应用程序的资源,并根据版本更新方式和版本更新地址来更新应用程序;加载更新单元514还用于若应用程序需进行版本更新,且应用程序资源使用方式为使用本地资源,则不更新应用程序,并从本地数据库加载应用程序的资源;加载更新单元514还用于若应用程序无需进行版本更新,且应用程序资源使用方式为使用网络资源,则通过网络请求来加载应用程序的资源;加载更新单元514还用于若应用程序无需进行版本更新,且应用程序资源使用方式为使用本地资源,则从本地数据库加载应用程序的资源。
在一实施例中,版本更新方式包括全量更新和增量更新。如图6所示,加载更新单元514包括更新方式判断单元601、更新包请求单元602、解压单元603、替换更新单元604、删除更新单元605。其中,
更新方式判断单元601,用于判断版本更新方式是全量更新还是增量更新。
更新包请求单元602,用于若版本更新方式是增量更新,通过版本更新地址请求更新包。
解压单元603,用于将更新包解压得到更新文件。
替换更新单元604,用于根据更新文件中的文件名查找应用程序文件夹中对应的文件并进行替换,以完成应用程序的增量更新。
更新包请求单元602,还用于若版本更新方式是全量更新,通过版本更新地址请求更新包。
解压单元603,还用于将更新包解压得到更新文件。
删除更新单元605,用于删除应用程序文件夹中所有资源,将更新文件保存至应用程序文件夹中,以完成应用程序的全量更新。
在一实施例中,在应用程序需进行版本更新,且应用程序资源使用方式为使用网络资源的情况下,由于在应用程序启动时就会加载应用程序的HTML5 页面资源,因此存在当加载某一个HTML5页面资源时,而该页面同时也需要更新。如此情况下,所述加载更新单元514还包括:当前页面判断单元606、锁定提示单元607。
当前页面判断单元606,用于判断应用程序当前打开的页面资源是否属于更新文件中所包括的资源。
锁定提示单元607,用于若应用程序当前打开的页面资源属于更新文件中所包括的资源,锁定应用程序当前打开的页面,同时显示提示页面,以提示应用程序当前打开的页面正在更新。
服务器520包括第二接收单元521、使用方式确定单元522、第二发送单元523。其中,
第二接收单元521,用于接收应用程序所在终端发送的请求,所述请求用于获取应用程序的版本相关信息和应用程序资源使用方式,该版本相关信息包括应用程序版本号、版本更新方式、版本更新地址。第二接收单元号521,还用于接收终端发送的当前运行环境数据,其中,终端当前运行环境包括网络环境、硬件环境、以及电量等。
使用方式确定单元522,用于根据运行环境数据确定应用程序资源使用方式。具体地,使用方式确定单元522,包括:条件判断单元、资源使用方式确定单元。其中,条件判断单元,用于判断运行环境数据是否满足预设条件。资源使用方式确定单元,用于若运行环境数据满足预设条件,则确定应用程序资源使用方式为使用网络资源;若运行环境数据不满足预设条件,则确定应用程序资源使用方式为使用本地资源。
第二发送单元523,用于将应用程序资源使用方式、应用程序版本号、版本更新方式、版本更新地址发送到终端,以使终端根据所述应用程序资源使用方式、应用程序版本号来确定应用程序是否需进行版本更新,且在需进行版本更新的情况下,根据版本更新方式、版本更新地址来更新应用程序。
图7为本申请实施例提供的一种计算机设备的示意性框图。在本实施例中,该设备70可以为移动电话、膝上型计算机、平板计算机、台式计算机等可以安装应用程序的终端设备,该设备70包括通过系统总线701连接的处理器702、存储器和网络接口703,其中,存储器可以包括非易失性存储介质704和内存 储器705。
该非易失性存储介质704可存储操作系统7041和计算机程序7042。该非易失性存储介质中所存储的计算机程序7042被处理器702执行时,可实现上述终端所实现的应用程序更新方法,如图2和图3所示。该处理器702用于提供计算和控制能力,支撑整个设备70的运行。该内存储器705为非易失性存储介质中的计算机程序的运行提供环境,该计算机程序被处理器702执行时,可使得处理器702执行如上述图2和图3所示的应用程序更新方法。该网络接口703用于进行网络通信,如接收消息等。本领域技术人员可以理解,图7中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的设备70的限定,具体的设备70可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
其中,所述处理器702用于运行存储在存储器中的计算机程序,以实现前述终端所实现的应用程序更新方法的任一实施例。
本申请另一实施例还提供了一种计算机设备的示意性框图。在本实施例中,所述设备可以为服务器。具体请参看图7,该计算机设备包括与图7所示计算机设备相同的结构。该计算机设备与图7所示计算机设备的不同在于,该计算机设备中非易失性存储介质所存储的计算机程序被处理器702执行时,可实现上述服务器端所实现的应用程序更新方法,如图4所示。
其中,所述处理器702用于运行存储在存储器中的计算机程序,以实现前述服务器端所实现的应用程序更新方法的任一实施例。
应当理解,以上实施例中所称处理器702可以是中央处理单元(Central Processing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
在本申请的另一实施例中提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时,以实现前述终端所实现的应用程序更新方法的任一实施例。
在本申请的另一实施例中还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时,以实现前述服务器端所实现的应用程序更新方法的任一实施例。
存储介质包括计算机可读存储介质,所述计算机可读存储介质包括非易失性计算机可读存储介质,所述计算机可读存储介质可以是前述任一实施例所述的终端或者服务器的内部存储单元,例如终端或者服务器的硬盘或内存。所述计算机可读存储介质也可以是所述终端或者服务器的外部存储设备,例如所述终端或者服务器上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡等。进一步地,所述计算机可读存储介质还可以既包括所述终端或者服务器的内部存储单元也包括外部存储设备。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置、设备和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的装置、设备和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (20)

  1. 一种应用程序更新方法,应用于终端,其中,所述方法包括:
    若检测到应用程序启动,则向服务器端发送请求;
    接收所述服务器端根据所述请求返回的版本相关信息和应用程序资源使用方式,所述版本相关信息包括应用程序版本号、版本更新方式以及版本更新地址,所述应用程序资源使用方式包括使用本地资源或使用网络资源,所述应用程序资源使用方式是由服务器端根据终端发送的当前运行环境数据确定的;
    将所述应用程序的当前版本号与所述应用程序版本号进行比对,以确定所述应用程序是否需进行版本更新;
    若所述应用程序需进行版本更新,且所述应用程序资源使用方式为所述使用网络资源,则通过网络请求来加载所述应用程序的资源,并根据所述版本更新方式和所述版本更新地址来更新所述应用程序。
  2. 根据权利要求1所述的方法,其中,所述方法还包括:
    若所述应用程序需进行版本更新,且所述应用程序资源使用方式为所述使用本地资源,则不更新所述应用程序,并从本地数据库加载所述应用程序的资源;
    若所述应用程序无需进行版本更新,且所述应用程序资源使用方式为所述使用本地资源,则从本地数据库加载所述应用程序的资源;
    若所述应用程序无需进行版本更新,且所述应用程序资源使用方式为所述使用网络资源,则通过网络请求来加载所述应用程序的资源。
  3. 根据权利要求1所述的方法,其中,所述版本更新方式包括全量更新和增量更新,所述根据所述版本更新方式和所述版本更新地址来更新所述应用程序,包括:
    判断所述版本更新方式是全量更新还是增量更新;
    若所述版本更新方式是增量更新,通过所述版本更新地址请求更新包;
    将所述更新包解压得到更新文件;
    根据所述更新文件中的文件名查找应用程序文件夹中对应的文件并进行替换,以完成所述应用程序的增量更新。
  4. 根据权利要求3所述的方法,其中,所述方法还包括:
    若所述版本更新方式是全量更新,通过所述版本更新地址请求更新包;
    将所述更新包解压得到更新文件;
    删除所述应用程序文件夹中所有资源,将所述更新文件保存至所述应用程序文件夹中,以完成所述应用程序的全量更新。
  5. 根据权利要求4所述的方法,其中,在所述将所述更新包解压得到更新文件之后,所述方法还包括:
    判断所述应用程序当前打开的页面资源是否属于所述更新文件中所包括的资源;
    若所述应用程序当前打开的页面资源属于所述更新文件中所包括的资源,则锁定所述应用程序当前打开的页面,同时显示提示页面,以提示所述应用程序当前打开的页面正在更新。
  6. 一种应用程序更新方法,应用于服务器端,其中,所述方法包括:
    接收应用程序所在终端发送的请求,所述请求用于获取所述应用程序的版本相关信息和应用程序资源使用方式,所述版本相关信息包括应用程序版本号、版本更新方式、版本更新地址;
    接收所述终端发送的当前运行环境数据;
    根据所述运行环境数据确定所述应用程序资源使用方式;
    将所述应用程序资源使用方式、应用程序版本号、版本更新方式、版本更新地址发送到所述终端,以使所述终端根据所述应用程序资源使用方式、应用程序版本号来确定所述应用程序是否需进行版本更新,且在需进行版本更新的情况下,根据所述版本更新方式、版本更新地址来更新所述应用程序。
  7. 根据权利要求6所述的方法,其中,所述应用程序资源使用方式包括使用网络资源或使用本地资源,所述根据所述运行环境数据确定所述应用程序资源使用方式,包括:
    判断所述运行环境数据是否满足预设条件;
    若所述运行环境数据满足预设条件,确定所述应用程序资源使用方式为所述使用网络资源;
    若所述运行环境数据不满足预设条件,确定所述应用程序资源使用方式为 所述使用本地资源。
  8. 一种应用程序更新系统,包括终端和服务器,其中,所述终端包括:
    第一发送单元,用于若检测到应用程序启动,则向服务器端发送请求;
    第一接收单元,用于接收所述服务器端根据所述请求返回的版本相关信息和应用程序资源使用方式,所述版本相关信息包括应用程序版本号、版本更新方式以及版本更新地址,所述应用程序资源使用方式包括使用本地资源或使用网络资源,所述应用程序资源使用方式是由服务器端根据终端发送的当前运行环境数据确定的;
    版本更新确定单元,用于将所述应用程序的当前版本号与所述应用程序版本号进行比对,以确定所述应用程序是否需进行版本更新;
    加载更新单元,用于若所述应用程序需进行版本更新,且所述应用程序资源使用方式为所述使用网络资源,则通过网络请求来加载所述应用程序的资源,并根据所述版本更新方式和所述版本更新地址来更新所述应用程序;
    所述服务器包括:
    第二接收单元,用于接收应用程序所在终端发送的请求,所述请求用于获取所述应用程序的版本相关信息和应用程序资源使用方式,所述版本相关信息包括应用程序版本号、版本更新方式、版本更新地址;
    第二接收单元,还用于接收所述终端发送的当前运行环境数据;
    使用方式确定单元,用于根据所述运行环境数据确定所述应用程序资源使用方式;
    第二发送单元,用于将所述应用程序资源使用方式、应用程序版本号、版本更新方式、版本更新地址发送到所述终端,以使所述终端根据所述应用程序资源使用方式、应用程序版本号来确定所述应用程序是否需进行版本更新,且在需进行版本更新的情况下,根据所述版本更新方式、版本更新地址来更新所述应用程序。
  9. 根据权利要求8所述的应用程序更新系统,其中:
    所述加载更新单元,还用于若所述应用程序需进行版本更新,且所述应用程序资源使用方式为所述使用本地资源,则不更新所述应用程序,并从本地数据库加载所述应用程序的资源;
    所述加载更新单元,还用于若所述应用程序无需进行版本更新,且所述应用程序资源使用方式为所述使用本地资源,则从本地数据库加载所述应用程序的资源;
    所述加载更新单元,还用于若所述应用程序无需进行版本更新,且所述应用程序资源使用方式为所述使用网络资源,则通过网络请求来加载所述应用程序的资源。
  10. 根据权利要求8所述的应用程序更新系统,其中,所述版本更新方式包括全量更新和增量更新,所述加载更新单元包括:
    更新方式判断单元,用于判断所述版本更新方式是全量更新还是增量更新;
    更新包请求单元,用于若所述版本更新方式是增量更新,通过所述版本更新地址请求更新包;
    解压单元,用于将所述更新包解压得到更新文件;
    替换更新单元,用于根据所述更新文件中的文件名查找应用程序文件夹中对应的文件并进行替换,以完成所述应用程序的增量更新。
  11. 一种计算机设备,包括存储器,以及与所述存储器相连的处理器;其中,
    所述存储器用于存储计算机程序;所述处理器用于运行所述存储器中存储的计算机程序,以执行如下步骤:
    若检测到应用程序启动,则向服务器端发送请求;
    接收所述服务器端根据所述请求返回的版本相关信息和应用程序资源使用方式,所述版本相关信息包括应用程序版本号、版本更新方式以及版本更新地址,所述应用程序资源使用方式包括使用本地资源或使用网络资源,所述应用程序资源使用方式是由服务器端根据终端发送的当前运行环境数据确定的;
    将所述应用程序的当前版本号与所述应用程序版本号进行比对,以确定所述应用程序是否需进行版本更新;
    若所述应用程序需进行版本更新,且所述应用程序资源使用方式为所述使用网络资源,则通过网络请求来加载所述应用程序的资源,并根据所述版本更新方式和所述版本更新地址来更新所述应用程序。
  12. 根据权利要求11所述的计算机设备,其中,所述处理器还执行如下步骤:
    若所述应用程序需进行版本更新,且所述应用程序资源使用方式为所述使用本地资源,则不更新所述应用程序,并从本地数据库加载所述应用程序的资源;
    若所述应用程序无需进行版本更新,且所述应用程序资源使用方式为所述使用本地资源,则从本地数据库加载所述应用程序的资源;
    若所述应用程序无需进行版本更新,且所述应用程序资源使用方式为所述使用网络资源,则通过网络请求来加载所述应用程序的资源。
  13. 根据权利要求11所述的计算机设备,其中,所述版本更新方式包括全量更新和增量更新,所述处理器在执行所述根据所述版本更新方式和所述版本更新地址来更新所述应用程序的步骤时,具体执行如下步骤:
    判断所述版本更新方式是全量更新还是增量更新;
    若所述版本更新方式是增量更新,通过所述版本更新地址请求更新包;
    将所述更新包解压得到更新文件;
    根据所述更新文件中的文件名查找应用程序文件夹中对应的文件并进行替换,以完成所述应用程序的增量更新。
  14. 根据权利要求13所述的计算机设备,其中,所述处理器还执行如下步骤:
    若所述版本更新方式是全量更新,通过所述版本更新地址请求更新包;
    将所述更新包解压得到更新文件;
    删除所述应用程序文件夹中所有资源,将所述更新文件保存至所述应用程序文件夹中,以完成所述应用程序的全量更新。
  15. 根据权利要求14所述的计算机设备,其中,所述处理器在执行所述将所述更新包解压得到更新文件的步骤之后,还执行如下步骤:
    判断所述应用程序当前打开的页面资源是否属于所述更新文件中所包括的资源;
    若所述应用程序当前打开的页面资源属于所述更新文件中所包括的资源,则锁定所述应用程序当前打开的页面,同时显示提示页面,以提示所述应用程序当前打开的页面正在更新。
  16. 一种计算机设备,包括存储器,以及与所述存储器相连的处理器;其中,
    所述存储器用于存储计算机程序;所述处理器用于运行所述存储器中存储的计算机程序,以执行如下步骤:
    接收应用程序所在终端发送的请求,所述请求用于获取所述应用程序的版本相关信息和应用程序资源使用方式,所述版本相关信息包括应用程序版本号、版本更新方式、版本更新地址;
    接收所述终端发送的当前运行环境数据;
    根据所述运行环境数据确定所述应用程序资源使用方式;
    将所述应用程序资源使用方式、应用程序版本号、版本更新方式、版本更新地址发送到所述终端,以使所述终端根据所述应用程序资源使用方式、应用程序版本号来确定所述应用程序是否需进行版本更新,且在需进行版本更新的情况下,根据所述版本更新方式、版本更新地址来更新所述应用程序。
  17. 根据权利要求16所述的计算机设备,其中,所述应用程序资源使用方式包括使用网络资源或使用本地资源,所述处理器在执行所述根据所述运行环境数据确定所述应用程序资源使用方式的步骤时,具体执行如下步骤:
    判断所述运行环境数据是否满足预设条件;
    若所述运行环境数据满足预设条件,确定所述应用程序资源使用方式为所述使用网络资源;
    若所述运行环境数据不满足预设条件,确定所述应用程序资源使用方式为所述使用本地资源。
  18. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时,实现如下步骤:
    若检测到应用程序启动,则向服务器端发送请求;
    接收所述服务器端根据所述请求返回的版本相关信息和应用程序资源使用方式,所述版本相关信息包括应用程序版本号、版本更新方式以及版本更新地址,所述应用程序资源使用方式包括使用本地资源或使用网络资源,所述应用程序资源使用方式是由服务器端根据终端发送的当前运行环境数据确定的;
    将所述应用程序的当前版本号与所述应用程序版本号进行比对,以确定所述应用程序是否需进行版本更新;
    若所述应用程序需进行版本更新,且所述应用程序资源使用方式为所述使用网络资源,则通过网络请求来加载所述应用程序的资源,并根据所述版本更新方式和所述版本更新地址来更新所述应用程序。
  19. 根据权利要求18所述的计算机可读存储介质,其中,所述处理器还实现如下步骤:
    若所述应用程序需进行版本更新,且所述应用程序资源使用方式为所述使用本地资源,则不更新所述应用程序,并从本地数据库加载所述应用程序的资源;
    若所述应用程序无需进行版本更新,且所述应用程序资源使用方式为所述使用本地资源,则从本地数据库加载所述应用程序的资源;
    若所述应用程序无需进行版本更新,且所述应用程序资源使用方式为所述使用网络资源,则通过网络请求来加载所述应用程序的资源。
  20. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时,实现如下步骤:
    接收应用程序所在终端发送的请求,所述请求用于获取所述应用程序的版本相关信息和应用程序资源使用方式,所述版本相关信息包括应用程序版本号、版本更新方式、版本更新地址;
    接收所述终端发送的当前运行环境数据;
    根据所述运行环境数据确定所述应用程序资源使用方式;
    将所述应用程序资源使用方式、应用程序版本号、版本更新方式、版本更新地址发送到所述终端,以使所述终端根据所述应用程序资源使用方式、应用程序版本号来确定所述应用程序是否需进行版本更新,且在需进行版本更新的情况下,根据所述版本更新方式、版本更新地址来更新所述应用程序。
PCT/CN2018/109656 2018-06-22 2018-10-10 应用程序更新方法、系统、计算机设备及存储介质 WO2019242166A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810649614.0 2018-06-22
CN201810649614.0A CN108845816B (zh) 2018-06-22 2018-06-22 应用程序更新方法、系统、计算机设备及存储介质

Publications (1)

Publication Number Publication Date
WO2019242166A1 true WO2019242166A1 (zh) 2019-12-26

Family

ID=64201948

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/109656 WO2019242166A1 (zh) 2018-06-22 2018-10-10 应用程序更新方法、系统、计算机设备及存储介质

Country Status (2)

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

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111679842A (zh) * 2019-03-11 2020-09-18 阿里巴巴集团控股有限公司 应用程序热更新处理方法、装置及系统
CN111897568A (zh) * 2020-07-06 2020-11-06 北京中关村银行股份有限公司 一种系统校验的方法、装置、设备及存储介质
CN111949278A (zh) * 2020-07-24 2020-11-17 苏州浪潮智能科技有限公司 一种自动安装mcs系统的方法、系统、终端及存储介质
CN112346761A (zh) * 2020-10-27 2021-02-09 长沙市到家悠享网络科技有限公司 前端资源上线方法、设备、系统及存储介质
CN112631633A (zh) * 2021-01-07 2021-04-09 南方电网数字电网研究院有限公司 基于双芯智能电表的功能模块升级方法和装置
CN113110864A (zh) * 2021-03-19 2021-07-13 深圳市腾讯网络信息技术有限公司 应用程序更新方法、装置及存储介质
CN113703807A (zh) * 2021-08-26 2021-11-26 上海德拓信息技术股份有限公司 一种静态资源版本实时检测与更新的方法及系统
CN114338395A (zh) * 2021-12-29 2022-04-12 武汉烽火信息集成技术有限公司 一种c/s通信网管方法、存储介质、电子设备及系统
CN116339767A (zh) * 2022-05-10 2023-06-27 广州南天电脑系统有限公司 应用资源配置方法、装置、计算机设备和存储介质
CN117493716A (zh) * 2023-11-08 2024-02-02 中建八局第一数字科技有限公司 移动端Web App的展示更新方法、装置、电子设备及存储介质

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109683937A (zh) * 2018-12-26 2019-04-26 斑马网络技术有限公司 更新方法、装置和存储介质
CN111381840B (zh) * 2018-12-27 2024-06-18 中国移动通信集团终端有限公司 应用程序更新的方法、装置和设备
CN109766127B (zh) * 2019-01-16 2022-06-28 上海掌门科技有限公司 用于更新应用程序版本信息的方法
CN111679850B (zh) * 2019-03-11 2023-06-02 阿里巴巴集团控股有限公司 应用程序热更新处理方法、装置及系统
CN111831296A (zh) * 2019-04-17 2020-10-27 天津五八到家科技有限公司 应用程序更新方法、终端设备和计算机可读存储介质
CN111459506B (zh) * 2020-03-02 2023-10-13 平安科技(深圳)有限公司 深度学习平台集群的部署方法、装置、介质及电子设备
CN111767074A (zh) * 2020-05-12 2020-10-13 Oppo(重庆)智能科技有限公司 配置更新方法、装置、终端及存储介质
CN111897564A (zh) * 2020-08-19 2020-11-06 腾讯科技(深圳)有限公司 一种应用更新方法及系统
CN112596773A (zh) * 2020-12-31 2021-04-02 深圳市大富网络技术有限公司 一种应用程序的更新方法、装置、设备及存储介质
CN112882733B (zh) * 2021-02-04 2023-09-08 网易(杭州)网络有限公司 应用更新方法及装置、电子设备、存储介质
CN113360296A (zh) * 2021-06-21 2021-09-07 维沃移动通信(杭州)有限公司 地址管理方法、装置、电子设备及可读存储介质
CN113992754B (zh) * 2021-10-25 2023-12-22 北京恒安嘉新安全技术有限公司 深度报文检测设备的策略更新方法、装置、设备和介质
CN117421016A (zh) * 2023-09-28 2024-01-19 深邦智能科技集团(青岛)有限公司 一种Android应用的离线升级方法及装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106888250A (zh) * 2016-12-30 2017-06-23 网易(杭州)网络有限公司 用于实现推送的方法、用于展现推送内容的方法及设备
CN107087018A (zh) * 2017-03-14 2017-08-22 深圳市金立通信设备有限公司 一种运行Web应用程序的方法及终端
CN107491320A (zh) * 2017-06-26 2017-12-19 北京五八信息技术有限公司 基于混合模式移动应用的载入方法和装置
US20180052811A1 (en) * 2016-08-16 2018-02-22 Microsoft Technology Licensing, Llc Manifest-driven loader for web pages
CN107784086A (zh) * 2017-10-09 2018-03-09 中国平安人寿保险股份有限公司 一种网页的加载方法、终端设备及计算机可读存储介质
US20180165298A1 (en) * 2016-12-12 2018-06-14 Egnyte, Inc. System and Method for Eliminating Full Rescan Synchronizations on Service Restarts

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103023941B (zh) * 2011-09-26 2018-01-05 腾讯科技(深圳)有限公司 基于Web页面的终端应用程序的更新方法及更新系统
CN105446750B (zh) * 2014-05-30 2019-12-03 阿里巴巴集团控股有限公司 WebApp启动运行、生成镜像文件的方法和装置
CN105808282A (zh) * 2014-12-31 2016-07-27 北京神州泰岳软件股份有限公司 一种更新应用程序网页内容的方法和装置
CN105389182A (zh) * 2015-11-02 2016-03-09 广州华多网络科技有限公司 一种软件升级方法及装置
US9804834B1 (en) * 2016-04-19 2017-10-31 Dropbox, Inc. Automatically updating a hybrid application
US10560356B2 (en) * 2016-07-14 2020-02-11 International Business Machines Corporation Assuring data correctness in non-stable network environment
CN106598646A (zh) * 2016-11-14 2017-04-26 深圳市金立通信设备有限公司 程序更新方法和终端
CN106648787A (zh) * 2016-12-28 2017-05-10 平安科技(深圳)有限公司 一种资源更新的方法及终端

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180052811A1 (en) * 2016-08-16 2018-02-22 Microsoft Technology Licensing, Llc Manifest-driven loader for web pages
US20180165298A1 (en) * 2016-12-12 2018-06-14 Egnyte, Inc. System and Method for Eliminating Full Rescan Synchronizations on Service Restarts
CN106888250A (zh) * 2016-12-30 2017-06-23 网易(杭州)网络有限公司 用于实现推送的方法、用于展现推送内容的方法及设备
CN107087018A (zh) * 2017-03-14 2017-08-22 深圳市金立通信设备有限公司 一种运行Web应用程序的方法及终端
CN107491320A (zh) * 2017-06-26 2017-12-19 北京五八信息技术有限公司 基于混合模式移动应用的载入方法和装置
CN107784086A (zh) * 2017-10-09 2018-03-09 中国平安人寿保险股份有限公司 一种网页的加载方法、终端设备及计算机可读存储介质

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111679842A (zh) * 2019-03-11 2020-09-18 阿里巴巴集团控股有限公司 应用程序热更新处理方法、装置及系统
CN111897568B (zh) * 2020-07-06 2023-12-26 北京中关村银行股份有限公司 一种系统校验的方法、装置、设备及存储介质
CN111897568A (zh) * 2020-07-06 2020-11-06 北京中关村银行股份有限公司 一种系统校验的方法、装置、设备及存储介质
CN111949278A (zh) * 2020-07-24 2020-11-17 苏州浪潮智能科技有限公司 一种自动安装mcs系统的方法、系统、终端及存储介质
CN111949278B (zh) * 2020-07-24 2022-10-18 苏州浪潮智能科技有限公司 一种自动安装mcs系统的方法、系统、终端及存储介质
CN112346761A (zh) * 2020-10-27 2021-02-09 长沙市到家悠享网络科技有限公司 前端资源上线方法、设备、系统及存储介质
CN112346761B (zh) * 2020-10-27 2024-05-17 长沙市到家悠享网络科技有限公司 前端资源上线方法、设备、系统及存储介质
CN112631633A (zh) * 2021-01-07 2021-04-09 南方电网数字电网研究院有限公司 基于双芯智能电表的功能模块升级方法和装置
CN113110864A (zh) * 2021-03-19 2021-07-13 深圳市腾讯网络信息技术有限公司 应用程序更新方法、装置及存储介质
CN113703807A (zh) * 2021-08-26 2021-11-26 上海德拓信息技术股份有限公司 一种静态资源版本实时检测与更新的方法及系统
CN113703807B (zh) * 2021-08-26 2023-12-15 上海德拓信息技术股份有限公司 一种静态资源版本实时检测与更新的方法及系统
CN114338395A (zh) * 2021-12-29 2022-04-12 武汉烽火信息集成技术有限公司 一种c/s通信网管方法、存储介质、电子设备及系统
CN116339767A (zh) * 2022-05-10 2023-06-27 广州南天电脑系统有限公司 应用资源配置方法、装置、计算机设备和存储介质
CN116339767B (zh) * 2022-05-10 2024-03-19 广州南天电脑系统有限公司 应用资源配置方法、装置、计算机设备和存储介质
CN117493716A (zh) * 2023-11-08 2024-02-02 中建八局第一数字科技有限公司 移动端Web App的展示更新方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN108845816B (zh) 2021-09-10
CN108845816A (zh) 2018-11-20

Similar Documents

Publication Publication Date Title
WO2019242166A1 (zh) 应用程序更新方法、系统、计算机设备及存储介质
US10205778B2 (en) Method and apparatus for sharing application data
US8516037B2 (en) Methods for dynamic partitioning of applications in client-server environments
US8949258B2 (en) Techniques to manage file conversions
JP4565032B2 (ja) コンフィギュレーションマネージャのセキュリティ機能を使用してモバイルコンピューティングデバイスにソフトウェアをインストールする方法、システム、コンピュータプログラム
CN110825479A (zh) 页面处理方法、装置、终端设备、服务器和存储介质
US20150195338A1 (en) File fetch from a remote client device
US20120297034A1 (en) Method, Device and System for Running Application
WO2019201040A1 (zh) 一种管理更新文件的方法、系统及终端设备
US20140006598A1 (en) Methods, apparatuses and computer program products for facilitating dynamic origin-based domain allocation
US20140258891A1 (en) Electronic device, storage medium and method for processing information
CN107861742A (zh) 一种程序的运行方法和终端设备
US9135265B2 (en) Asynchronous verification for extended file attributes
CN103425501A (zh) 一种安装应用程序的方法、客户端、服务器端及系统
CN109948332A (zh) 一种物理机登录密码重置方法及装置
CN113010238A (zh) 一种微应用调用接口的权限确定方法、装置和系统
US20230283655A1 (en) Data download method and apparatus, electronic device, and readable storage medium
CN111090442A (zh) 一种应用更新方法、装置和存储介质
US20240031166A1 (en) Web-side data signature method and apparatus and computer device
CN113779122B (zh) 导出数据的方法和装置
CN113760487B (zh) 一种业务处理方法和装置
CN114417318A (zh) 第三方页面的跳转方法、装置和电子设备
CN111880831A (zh) 服务器同步更新的方法、装置、计算机设备及存储介质
US20230004379A1 (en) Service method for head unit software, head unit software and related devices
CN115794165A (zh) 一种应用升级方法、装置、eps及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18923596

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18923596

Country of ref document: EP

Kind code of ref document: A1