Application program updating method and device, storage medium and program product

After the application main process exits, the update process is run to obtain and store the target resource data, and perform update operations when the main process restarts, the problem of application updates interfering with user usage in the existing technology is solved, and silent updates are achieved. Reduces update time.

CN119396434APending Publication Date: 2025-02-07TAOBAO CHINA SOFTWARE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411510293.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The existing application update methods can easily interfere with the normal use of users during the update process, and due to network problems, installation package analysis problems, or large data volume, the update takes a long time and affects the user experience.

Method used

By responding to the application's main process exit operation, run the update process, obtain the target resource data for the target update version from the remote configuration file, and store it under the target path. When the main process is restarted, the main process is used to perform update operations based on the target resource data to achieve silent updates and reduce interference to users.

Benefits of technology

The user's unawareness of the application update process is realized, which reduces the interference of update operations on users, improves update efficiency and reduces update time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396434A_ABST
    Figure CN119396434A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an application program updating method and device, a storage medium and a program product. The application program updating method comprises the following steps: responding to an exit operation of a host process of an application program, and running an updating process of the application program; obtaining target resource data of a target update version corresponding to the application program by utilizing the update process, and storing the target resource data in the target path; and when the application program is started, if it is determined that the target resource data is successfully updated, obtaining the target resource data from the target path by using the front-end routing capability, and running the application program according to the target resource data. Based on the implementation mode, after the host process of the application program exits, the updating process silently pulls the target resource data of the new version based on the remote configuration file in the background and executes the updating operation of the application program, so that the updating operation of the application program is unperceived by a user, and the user experience is improved. Therefore, the interference of the updating operation of the application program on the user is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an application updating method, device, storage medium and program product. Background Art

[0002] Windows is an operating system based on a graphical user interface, which is mainly used in computers, smart phones and other devices. Various applications can be run on the Windows operating system. As usage requirements change and functions are updated, the versions of applications are constantly updated, and users need to download new versions of applications to use the updated functions. In some application update methods, after the application is started, a pop-up message of the version update may pop up to prompt the user to update the application. If the user performs the update operation according to the prompt of the pop-up message, the user's use of the application will often be interrupted. During the update process, if there are network problems, installation package parsing problems, or a large amount of installation package data, it will increase the time required to update the application, thereby further affecting the user's normal use of the application. Therefore, a new solution needs to be proposed. Summary of the invention

[0003] Multiple aspects of the present application provide an application updating method, device, storage medium and program product to reduce the interference caused to users by the updating operation of the application.

[0004] An embodiment of the present application provides an application updating method, comprising: responding to an exit operation of a main process of an application, running an update process of the application to obtain a target updated version corresponding to the application from a remote configuration file; using the update process to obtain target resource data corresponding to the target updated version from a resource server, and storing the target resource data under a target path, wherein the target resource data is used to perform a target operation; and when the main process is restarted, using the main process to perform the target operation according to the target resource data under the target path.

[0005] Optionally, storing the target resource data under a target path includes: determining whether a front-end component of the application supports front-end routing capabilities; if the front-end component supports front-end routing capabilities, determining a first path where old version resource data corresponding to the target resource data is located, and using a second path isolated from the first path as the target path; and storing the target resource data under the second path.

[0006] Optionally, it also includes: if the front-end component does not support front-end routing capabilities, using the first path where the old version resource data is located as the target path; storing the target resource data in the first path so that the target resource data overwrites the old version resource data.

[0007] Optionally, after storing the target resource data under the second path, it also includes: utilizing the update process, when determining that there is no abnormality in the target resource data, recording the update result as a successful update in the local configuration file of the application, and adding the description information of the second path to the local configuration file; performing the target operation according to the target resource data under the target path, including: reading the update result in the local configuration file to determine whether the resource data is updated successfully; if it is determined that the target resource data is updated successfully, obtaining the description information of the second path from the local configuration file; utilizing the front-end routing capability of the front-end component to access the target resource data under the second path according to the description information of the second path, and performing the target operation according to the target resource data.

[0008] Optionally, it also includes: if it is determined that the target resource data update fails, when the main process is restarted, outputting a prompt message for manual update; and / or, when the main process exits again, running the update process to repeatedly execute the operation of obtaining the target resource data from the resource server.

[0009] Optionally, obtaining target resource data corresponding to the target updated version from a resource server includes: downloading at least one resource update package of the application from the resource server, wherein the at least one resource update package is obtained by classifying and packaging updated resource files corresponding to the application according to functional attributes corresponding to the resource files; and obtaining the target resource data according to the at least one resource update package.

[0010] Optionally, obtaining target resource data corresponding to the target updated version from a resource server includes: downloading a resource update file of the application from the resource server; and using the resource update file as the target resource data.

[0011] Optionally, after storing the target resource data in the target path, the method further includes: when the front-end component supports front-end routing capability, copying the old version resource package corresponding to the resource update file to the target path to generate an updated resource package corresponding to the resource update file.

[0012] Optionally, obtaining a target update version corresponding to the application from a remote configuration file includes: obtaining a grayscale update policy for the application from the remote configuration file, the grayscale update policy being used to describe the correspondence between multiple grayscale update versions and different grayscale attributes; and determining a target update version corresponding to the user from the multiple grayscale update versions based on the grayscale update policy and the grayscale attributes of the user accessing the application.

[0013] An embodiment of the present application also provides an electronic device, comprising: a memory and a processor; the memory is used to store one or more computer instructions; the processor is used to execute the one or more computer instructions to: execute the steps in the method provided in the embodiment of the present application.

[0014] The embodiment of the present application also provides a computer-readable storage medium storing a computer program, which can implement the steps in the method provided in the embodiment of the present application when the computer program is executed by a processor.

[0015] The embodiment of the present application also provides a computer program product, including: a computer program / instructions, which, when executed by a processor, can implement the steps in the method provided in the embodiment of the present application.

[0016] In the application update method, device, product and medium provided by the embodiments of the present application, in the application update method, the update process of the application can be run in response to the exit operation of the main process of the application; the target resource data of the target update version corresponding to the application is obtained by using the update process, and the target resource data is stored under the target path; when the application is started, if it is determined that the target resource data is updated successfully, the target resource data is obtained from the target path by using the front-end routing capability, and the application is run according to the target resource data. Based on this implementation, after the main process of the application exits, the update process can silently pull the target resource data of the new version based on the remote configuration file in the background, and execute the update operation of the application, so that the update operation of the application is not perceived by the user, thereby reducing the interference caused by the update operation of the application to the user. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0018] Figure 1 A flowchart of a mandatory application update method is provided;

[0019] Figure 2A flowchart of an application updating method provided by an exemplary embodiment of the present application;

[0020] Figure 3 A flowchart of an application updating method provided for another exemplary embodiment of the present application;

[0021] Figure 4 A schematic diagram of a process of loading a client resource package provided by an exemplary embodiment of the present application;

[0022] Figure 5 A flowchart of a resource file packaging method provided for an exemplary embodiment of the present application;

[0023] Figure 6 A schematic diagram of the structure of an electronic device provided as an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0025] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two, but does not exclude the inclusion of at least one.

[0026] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0027] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a product or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such a product or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the product or system including the element.

[0028] Figure 1 This diagram shows a typical application update method in Windows, which uses a mandatory update mechanism to ensure that all users can use the new version of the application. Figure 1 As shown in the figure, when the application is started, the application can check whether there is a new version. If there is a new version, the user is forced to perform the update operation, and the application functions cannot be used before the update is completed. If the update is completed, the application functions can continue to be used. This method can ensure that users can use the updated version of the application, thereby maintaining the synchronization of application functions and the timeliness of security patches. However, this method also has certain disadvantages.

[0029] Taking the live broadcast field as an example, users can run a live broadcast workbench on the Windows operating system. The live broadcast workbench is a tool provided to anchors for displaying products and interacting. The live broadcast workbench can provide functions such as audience communication, product display, order management, and real-time data analysis. When the anchor starts the live broadcast software and is ready to start broadcasting, the forced update of the live broadcast workbench will interrupt the anchor's live broadcast workflow, thereby disrupting the live broadcast plan. In the process of being forced to update the live broadcast workbench, the anchor may have network problems or the problem of large data volume of the update installation package, which may cause the application to take a long time to update, and thus fail to start the live broadcast in time. In practice, the anchor may want to maintain the existing version of the application without performing an update, or, after the anchor completes the update of the application, there may be a need to roll back to the old version before the update due to poor stability of the updated application, and this demand cannot be met by the existing application update method.

[0030] In view of the above technical problems, in some embodiments of the present application, a solution is provided, which will silently execute the update operation of the application after the application is launched, thereby reducing the impact of the update operation of the application on the user. The technical solutions provided by the embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0031] Figure 2 is a flow chart of an application updating method provided by an exemplary embodiment of the present application, the method may include: Figure 2 Steps shown:

[0032] Step 201: In response to an exit operation of a main process of an application, an update process of the application is run to obtain a target update version corresponding to the application from a remote configuration file.

[0033] Step 202: Utilize the update process to obtain target resource data corresponding to the target update version from a resource server, and store the target resource data in a target path, wherein the target resource data is used to perform a target operation.

[0034] Step 203: When the main process is restarted, the main process is used to perform the target operation according to the target resource data under the target path.

[0035] This embodiment can be executed by a terminal device, which can be a desktop computer, a laptop computer, a smart phone, etc. running a target operating system. The target operating system may include a Windows system, a Linux system, etc., and the application program can run in the target operating system. In different application scenarios, the application program is implemented as an application program that can provide different services. For example, in the multimedia field, the application program can be implemented as an audio and video playback application; in the live broadcast field, the application program can be implemented as a live broadcast workbench application; in the financial field, the application program can be implemented as a financial tool for analyzing stock trends, and no longer listed one by one.

[0036] In step 201, the main process of the application is the core process in the application, which is responsible for managing the life cycle and windows of the application, and the task of interacting with the operating system. Optionally, the exit operation of the main process of the application can be triggered when the visible window of the application is closed, or it can be triggered by a specific event monitored after the visible window is closed.

[0037] In response to the exit operation of the main process, the update process of the application can be run. In this embodiment, the update process is a process that runs silently in the background and the user is not aware of it, thereby reducing the interference caused by the update operation of the application to the user.

[0038] In some optional embodiments, the main process is the parent process, and the update process can be a child process of the main process. The parent process and the child process are independent of each other, and each has its own process identifier (PID) and independent memory space. Optionally, before the parent process exits, a child process can be created. The child process can run after the parent process exits. For example, after the parent process exits, a flag bit can be set, and the value of the flag bit can be updated to true after a specified time after the parent process exits. When the value of the flag bit is updated to true, the child process can enter the running state.

[0039] In some other optional embodiments, the application may include a process management module, which is used to manage the state and life cycle of the process. When the process management module detects the exit operation of the main process, it can start the update process to execute the update task of the application.

[0040] In some further optional embodiments, a script tool may also be run in the target operating system, and the script tool is used to periodically check whether the main process of the application has exited, and after the main process exits, start an update process to execute the update task of the application.

[0041] In step 201, after running the update process, the update process can be used to obtain the target update version corresponding to the application from the remote configuration file. Among them, the remote configuration file can be stored on the resource server, or stored on the back-end server corresponding to the application, and this embodiment is not limited. The remote configuration file is used to record the version information of the application, and the version information can be provided by the service provider or developer of the application. The update process can parse the remote configuration file to obtain the updated version of the published application. The update process can select the latest version in the updated version of the published application as the target update version. In some embodiments, the remote configuration file includes a grayscale policy, and the update process can determine the target update version of the application based on the parsed grayscale policy.

[0042] In this implementation, the active acquisition of the application version update information can be realized through the update process without interfering with the user's use of the application. Compared with the solution of passively receiving the version update information, the user can achieve a silent application update effect without being perceived by the user. It should be noted that the operation of the update process accessing the remote configuration file can be performed when the update process is started.

[0043] After determining the target update version, in step 202, the update process can be used to obtain the target resource data corresponding to the target update version, and store the target resource data under the target path. In some embodiments, the target resource data of the application can be stored on a resource server, which can be a content delivery network (CDN) server, and the update process can request the CDN server to obtain the target resource data for the application. Among them, the target resource data is used to perform the target operation of the application, for example, the front-end resource data is used to render the front-end page of the application, and the configuration resource data is used to deploy the operating environment of the application, set the server address, set the cache policy, etc. For another example, the resource data related to the client component is used to perform communication operations between the client and the server, data synchronization operations between the client and the server, multimedia processing operations, etc., which are not listed one by one.

[0044] In some optional embodiments, the target resource data of the application is packaged as a whole and uploaded to the resource server in the form of an installation package. In this embodiment, the update process can download the installation package corresponding to the target update version from the resource server, and the installation package consists of the full amount of resource update files of the application. After downloading the installation package, the update process can decompress the installation package to obtain the target resource data of the application.

[0045] In some other optional embodiments, the target resource data of the application is classified and packaged into a resource update package and then uploaded to the resource server. The update process can download at least one resource update package of the application from the resource server, and obtain the target resource data according to the at least one resource update package. If the at least one resource update package is in a compressed format, the update process can decompress the at least one update resource package to obtain the target resource data. If the at least one resource update package is not in a compressed format, the update process can directly use the at least one update resource package as the target resource data.

[0046] Optionally, the at least one resource update package is obtained by classifying and packaging the resource files of the updated application according to the functional attributes corresponding to the resource files. The functional attributes of the resource files are used to describe the role of the resource files in the functional implementation of the application. For example, some resource files are used to allow developers to change the behavior of the application without modifying the code. The functional attributes of such resource files can be called configuration attributes; some resource files are used to configure the appearance and interface layout of the application. The functional attributes of such resource files can be called front-end attributes; some resource files are used to implement the core functions of the client. The functional attributes of such resource files can be called client attributes; when some resource files are used to implement the multimedia functions of the application, the functional attributes of such resource files can be called multimedia attributes. For example, when the application includes front-end components and client components, the resource files of the application can be divided into front-end resource packages, client resource packages, and configuration resource packages.

[0047] The front-end resource package consists of HTML (HyperText Markup Language), CSS (Cascading Style Sheets), and JavaScript (a widely used programming language) files related to the application interface, which are used to update the functions / styles of the front-end components. The client resource package consists of the core client function files required for the application to run. The configuration resource package contains the application configuration files and other resources that may be frequently updated.

[0048] Accordingly, when the update process obtains at least one resource update package of the application, it can obtain at least one of the front-end resource package, client resource package and configuration resource package of the application. Based on this packaging method, the resource update package with a large amount of data can be split, so that the resource update package after splitting is more lightweight and convenient for flexible download and update.

[0049] In some other optional embodiments, the target resource data of the application is uploaded to the resource server in the form of a resource update file to implement a file-level update of the application. When the update process obtains the target resource data of the application, it can download the resource update file of the application from the resource server and use the resource update file as the target resource data. Among them, the resource update file can be at least one of an update file of the front-end component of the application, an update file of the client component, and a configuration update file. This implementation method is suitable for scenarios with fewer resource files to be updated. When there are fewer resource files to be updated, there is no need to package the entire target resource data of the application, nor is there any need to classify and package target resource data of different categories according to categories, which further reduces the download amount of the update process and reduces the time consumption of updating the application.

[0050] It is worth noting that after downloading the target resource data, the update process may verify the target resource data, for example, by performing MD5 (Message-Digest Algorithm 5) verification on the downloaded target resource data to ensure the reliability of the resource update file.

[0051] In step 202, after acquiring the target resource data of the application, the update process stores the target resource data in the target path. The target path is a specified path in the target operating system where the application is located. In different implementations, the target path can be implemented as different specified paths, which will be described below in conjunction with different embodiments.

[0052] In an embodiment of the present application, the update process downloads the target resource data depending on the front-end routing capability of the front-end component in the application. In some embodiments, the front-end component in the application has the front-end routing capability by default. In other optional embodiments, the update process can determine whether the front-end component of the application supports the front-end routing capability; and then determine the target path required for downloading the target resource data based on whether the front-end routing capability is supported. Among them, front-end routing is the ability of the front-end component of the application to direct to the storage path of resource packages of different versions.

[0053] Optionally, the update process can check whether there is any configuration or logic related to dynamic routing in the static code of the front-end component to determine whether the front-end component supports the front-end routing capability. If the static code of the front-end component has any configuration or logic related to the front-end routing capability, the update process can determine that the front-end component supports the front-end routing capability. Optionally, the update process can identify the ES (ECMAScript, a standard for a scripting language) version used by the front-end component. If the ES version used by the front-end component is ES5 or higher than ES5, the update process can determine that the front-end component supports the front-end routing capability.

[0054] Optionally, if the front-end component supports the front-end routing capability, the update process determines a first path where the old version resource data corresponding to the target resource data is located, and uses a second path isolated from the first path as the target path. After determining the target path, the update process can store the target resource data under the target path so that the target resource data is isolated from the old version resource data.

[0055] Optionally, if the front-end component does not support the front-end routing capability, the update process may use the first path of the old version resource data as the target path, and store the target resource data under the target path, so that the target resource data overwrites the old version resource data. In this embodiment, the updated target resource data is stored in the first path, and when the main process reads the resource data from the first path by default, the main process can read the updated resource data.

[0056] The following will provide examples of resource update scenarios at different levels.

[0057] When the application is updated at the resource package level, the target resource data includes: at least one resource update package. In this embodiment, the storage path of a single resource update package can be determined based on whether the front-end component supports routing capabilities. The following will take any resource update package as an example for exemplary description.

[0058] Optionally, if the front-end component does not support front-end routing capabilities, the update process may determine a first path for storing the old version resource package corresponding to the resource update package, and store the resource update package under the first path so that the resource update package overwrites the old version resource package. Furthermore, during the running process, the main process of the application may continue to access the first path and obtain the resource update package from the first path so that the user can use the functions of the new version of the application.

[0059] Optionally, if the front-end component supports the front-end routing capability, the update process stores the resource update package in a second path, which is isolated from the first path. Based on this implementation, the resource update package and the old version resource package can be stored separately. On the one hand, it is convenient to use the old version resource package to run the old version of the application when the stability of the resource update package is poor or the user actively chooses to roll back the version; on the other hand, there is no need to overwrite the old version resource package. Even if the resource files in the old version resource package are still occupied by the main process or other processes of the application, each resource update package can be successfully stored, which improves the update efficiency of the application and makes the update operation of the application not affected by the occupied resource files.

[0060] When the application is updated at the resource file level, the target resource data includes: resource update files. In this implementation, the storage path of a single resource update file can be determined based on whether the front-end component supports routing capabilities. The following will be exemplified by taking any resource update file as an example.

[0061] Optionally, after the update process obtains any resource update file, it can determine the first path where the old version resource file corresponding to the resource update file is located. If the front-end component does not support the front-end routing capability, the update process can store the resource update file in the first path so that the resource update file overwrites the old version resource file corresponding to the resource update file. In this implementation, the replacement of the old version resource file is achieved in the first path, and the update of the old version resource package to which the old version file belongs is achieved.

[0062] Optionally, if the front-end component supports the front-end routing capability, the update process can determine the first path where the old version resource update file corresponding to the resource update file is located, and use the second path isolated from the first path as the target path. After determining the target path, the update process can store the target resource data under the target path. In addition, considering that the front-end routing supports routing at the resource package level, the update process can further copy the old version resource package corresponding to the resource update file to the target path to generate an updated resource package corresponding to the resource update file. For example, the target resource data includes a new version of the resource file A1, and the resource file A1 corresponds to the old version resource file A0, and the old version resource file A0 is located in the old version resource package A. After the update process stores the new version of the resource file A1 under the second path, the old version resource package A can be copied to the second path so that the new version of the resource file A1 replaces the old version of the resource file A0. The resource package under the second path is the resource package after the copy of the old version resource package is updated according to the resource update file. Based on this implementation method, the integrity of the resource package under the second path is guaranteed, and it is convenient to access the updated resource package in the way of front-end routing. In addition, in the file-level update scenario, resource files are updated in an incremental manner, without overwriting the resource data of the old version, which facilitates the rollback of subsequent versions.

[0063] In step 203, when the main process of the application is restarted, the main process can be used to perform the target operation according to the target resource data under the target path. The target operation may include: front-end page rendering operation, client group component loading operation, data synchronization operation with the server, etc.

[0064] When the main process of the application is restarted, it involves navigation and presentation of the user interface, so the main process can give priority to starting the rendering process (Renderer Process) corresponding to the front-end component. If the target resource data includes a front-end resource package, after the rendering process is started, the front-end resource package can be read at the target path where the front-end resource package is located, and the user interface can be rendered according to the resource package of the front-end resources. If the target resource data includes a client resource package, the rendering process can read the client resource package at the target path where the client resource package is located, and call up the client component according to the client resource package. If the target resource data includes a configuration resource package, the rendering process and the main process corresponding to the client component can read the configuration resource package from the target path where the configuration resource package is located during operation, and provide corresponding functions according to the configuration resource package.

[0065] Optionally, before reading the target resource data from the target path, the target resource data may be verified, for example, an MD5 verification may be performed on the target resource data under the target path to ensure the reliability of the resource update file.

[0066] In some optional embodiments, when the front-end component supports the front-end routing capability, after the target resource data is stored in the second path by using the update process, the update process can be used to determine whether the target resource data is abnormal. Optionally, the update process can determine whether there is an abnormal event in the download process and / or decompression process of the target resource data; if there is an abnormal event, it is determined that the target resource data is abnormal; otherwise, it is determined that the resource data is not abnormal. If the update process determines that the target resource data is not abnormal, the update result can be recorded as a successful update in the local configuration file of the application, and the description information of the second path can be added to the local configuration file.

[0067] For example, if there are no abnormalities in the download and decompression process of the target resource data, the update process can record the update result as a successful update in the local configuration file. The description information of the second path is used to describe the address of the second path on the terminal device. Correspondingly, if there are abnormalities in the download or decompression process of the target resource data, the update process can record the update result as a failed update in the local configuration file.

[0068] Optionally, after the main process of the application is restarted, the update result in the local configuration file can be read to determine whether the resource data is updated successfully; if it is determined that the target resource data is updated successfully, the description information of the second path can be obtained from the local configuration file. The main process can use the front-end routing capability of the front-end component to access the target resource data under the second path according to the description information of the second path, and perform the target operation according to the target resource data.

[0069] In this implementation, when the front-end component supports front-end routing capabilities, the resource update results and the description information of the second path are stored by updating the local configuration file, so that the front-end routing can be started according to the update results and the target path after the application is started.

[0070] Optionally, if it is determined that the target resource data update fails, the above-mentioned application update method can be repeatedly executed until the resource data of the application is successfully updated. Specifically, when the target resource data update fails, if the exit operation of the main process of the application is detected, the update process can be run to repeatedly execute the operation of obtaining the target resource data and storing the target resource data in the target path. For details, please refer to the records of the above-mentioned embodiments, which will not be described again here.

[0071] Optionally, if it is determined that the target resource data update fails, when the main process is restarted, a manual update prompt message may be output to prompt the user to manually download the target resource data and perform the update operation. Of course, in some embodiments, after the manual update prompt message is output, if the user does not perform the manual update, the terminal device may continue to start the update process after the main process exits to repeat the silent update operation, which will not be described in detail.

[0072] In some optional embodiments, if the target resource data fails to be updated, in the case where the first path and the second path are isolated from each other, the main process can continue to read the resource data of the old version of the application from the first storage path after restarting, and perform the target operation according to the resource data of the old version to roll back the application to the old version. Based on this implementation, even if the resource data update of the application fails, the user can continue to use the old version of the application, reducing the risk of the application being unavailable due to the update failure, reducing the interference of the application update operation on the user's use, and ensuring the continuity of the service provided by the application.

[0073] It is worth noting that in some optional embodiments, a parallel grayscale strategy can be used to perform application update operations. The parallel grayscale strategy refers to saving multiple grayscale versions of the application on the resource server and configuring the grayscale update strategy. Each grayscale version can be gradually pushed to a part of users, and the performance of the new version under different devices and usage scenarios can be tested to ensure the stability of the update process and reduce the risk of large-scale update problems.

[0074] Optionally, in this embodiment, when using the update process to obtain the target resource data of the application, the update process can be used to obtain the grayscale update strategy of the application, which is used to describe the correspondence between multiple grayscale update versions and different grayscale attributes. According to the grayscale update strategy and the grayscale attributes corresponding to the user accessing the application, the target update version corresponding to the user can be determined from the multiple grayscale update versions, and the target resource data corresponding to the target update version can be obtained. Among them, the grayscale attributes of the user may include at least one of the user's identity (such as an account), the user's geographic location, the user's behavior (such as user activity), the type of terminal device where the application is located, and the anchor level corresponding to the user. Based on this embodiment, the applications used by different users can be updated to different grayscale update versions according to the different grayscale attributes of different users, so as to test the stability and usability of applications with different grayscale update versions in parallel within different user ranges, thereby improving the efficiency of grayscale release.

[0075] The following will take the live broadcast workbench application in the e-commerce field as an example to further illustrate the application update method provided in the embodiment of the present application. The live broadcast workbench application developed based on the Electron framework can run in a Windows system, and the live broadcast workbench application can mainly include a front-end component and a client component. The live broadcast workbench application can mainly include: a main process, a rendering process, and an update process. Among them, the rendering process is responsible for rendering the user interface and handling the interaction between the user and the interface. Each open window can have its own rendering process. The rendering process can use Web technology (such as HTML, CSS, JavaScript) to build a user interface. The main process is the core process of the client component, which is responsible for managing the life cycle and windows of the application and the tasks of interacting with the operating system, and can communicate and interact with other processes to transfer data and instructions. Among them, the update process is mainly used to silently perform update operations of the application in the background.

[0076] Specifically, Figure 3 As shown, after the main process of the live broadcast workbench application exits, the update process can be started. The update process can pull the online version configuration information (i.e., remote configuration file) and parse the grayscale release strategy in the version configuration information. According to the user's grayscale attributes and grayscale release strategy, the version hit by the user can be determined. The update process can determine whether the user hits the banned list, which is used to record the identification of users who do not perform version updates. If the user hits the banned list, the update process of the application can be exited. If the user does not hit the banned list, the update process can determine whether the application supports front-end routing.

[0077] like Figure 3 As shown, if the application does not support front-end routing, the update process can use the overwrite update method to update the application. The overwrite update means that the update process downloads the target resource data corresponding to the application and stores the target resource data in the first path where the old version of the resource data is located, so as to replace the old version of the resource data with the target resource data. After performing the overwrite update operation, the update process can write the update result and the description information of the first path into the local configuration file of the application.

[0078] When the main process of the live broadcast workbench application is started again, if the target resource data is determined to be updated successfully through the update result in the local configuration file, the target resource data under the first path can be accessed according to the description information of the first path in the local configuration file, and the target operations related to the live broadcast workbench application can be executed according to the target resource data.

[0079] like Figure 3As shown, if the application supports front-end routing, the update process can download the target resource data of the application from the resource server, decompress the target resource data, and move the target resource data to the second path. The second path is isolated from the first path where the old version of the resource data is located. In addition, the old version of the resource data is still saved for version rollback. After executing the update operation of the target resource data, the update process can write the update result to the local configuration file of the application. After executing the update operation of the target resource data, the update process can write the update result and the description information of the second path to the local configuration file of the application.

[0080] When the live broadcast workbench application is started again, if it is determined through the update result in the local configuration file that the target resource data is updated successfully, the target resource data under the second path can be accessed according to the description information of the second path in the local configuration file, and the target operation for the live broadcast workbench application can be performed according to the target resource data under the second target path.

[0081] Figure 4 The following is a diagram of the process of loading client resource packages developed with the Electron framework. Figure 4 As shown, after the application starts, a module named NodeTBliveSDK can be imported from the target path. The module is a .node file. The target path can be obtained from the local configuration file. After importing the NodeTBliveSDK module, you can specify the target environment as the Node.js environment in the configuration of the module packaging tool (such as the Webpack tool), and specify the loader as native-ext-loader in the configuration of the module packaging tool. After that, the loader native-ext-loader can convert the .node file into a form that can be dynamically loaded in Node.js through global.process.dlopen. At runtime, Node.js loads the .node file through global.process.dlopen and becomes part of the Node.js runtime.

[0082] Based on this implementation, the update operation of the live broadcast workbench application can be executed when the user exits the live broadcast workbench application, thereby reducing the disturbance to the user and avoiding interrupting the user's broadcast preparation.

[0083] The target resource data recorded in the above embodiment is obtained by using the packaged plug-in Figure 5 The file packaging method shown is obtained by packaging the updated resource files corresponding to the application program. File packaging is the process of organizing multiple files into a single file or archive for the convenience of storage, transmission or distribution.

[0084] In some optional embodiments, the packaging plug-in can classify and package the updated resource files corresponding to the corresponding application according to the functional attributes of the resource files to obtain at least one resource update package. For example, when the application includes a front-end component and a client component, the front-end resource package, the client resource package and the configuration resource package can be packaged.

[0085] Optionally, the packaging plug-in can determine multiple functional attribute categories, and determine the file directories corresponding to the multiple functional attribute categories in the updated installation package of the application; the packaging plug-in can obtain resource files from the file directories corresponding to the multiple functional attribute categories, and respectively package the resource files obtained from the file directories corresponding to the multiple categories to obtain multiple resource update packages.

[0086] Alternatively, if Figure 5 As shown, before packaging begins, the routing capability of the resource update package can be enabled so that after the resource update package is downloaded to the local terminal device, the front-end component can read the resource update package based on the front-end routing capability. Optionally, folders with version number suffixes can be created for different functional attribute categories. After starting the packaging plug-in, the packaging plug-in can add resource files corresponding to different functional attribute categories to corresponding folders with version number suffixes. For example, a NodeliveSDK_version folder with a version number suffix can be created for client attributes, and the packaging plug-in can add resource files with client attributes to the folder to form a client resource package, so as to dynamically load this version of NodeliveSDK based on the front-end routing capability. For example, an app_version folder with a version number suffix can be created for front-end attributes, and the packaging plug-in can add resource files with front-end attributes to the folder to form a front-end resource package, so as to dynamically load this version of the front-end component based on the front-end routing capability. Similarly, you can create an extra_version folder with a version number suffix for configuration properties. The packaging plug-in can add resource files with configuration properties to this folder to form a configuration resource package, so that the configuration resource files of this version can be dynamically loaded based on the front-end routing capabilities.

[0087] After multiple resource packages are built, they can be uploaded to the cloud server respectively. The cloud server can enable CDN capabilities for multiple resource packages and distribute multiple resource packages to different CDN servers. The CDN server can generate URLs (Uniform Resource Locator) for multiple resource packages respectively. When a new version is released, the version configuration information of the application can be updated based on the URLs of the multiple resource packages, so that the update process of the application can download the new version of the resource package according to the updated version configuration information.

[0088] Based on this implementation, the installation resources of the application can be modularized to facilitate flexible updating of components of different categories, and can reduce the time consumption of the application update operation to a certain extent and improve the update efficiency.

[0089] It is worth noting that in some optional embodiments, if the old version of the application does not support the front-end routing capability, when generating the target resource data of the application, the front-end routing capability of the application can be configured so that the updated application can use the front-end routing capability to load the updated resource data. Specifically, the processing logic of the front-end routing can be added to the resource file of the front-end component of the application. The processing logic of the front-end routing includes: when the application is started, determine whether the local configuration file is updated; if the local configuration file is updated, read the target path of the updated resource data stored in the local configuration file; during the operation of the application, load the resource files required for the operation of the application according to the updated resource data under the target path. Based on this implementation method, the application can be updated to add the front-end routing capability to facilitate the subsequent silent update based on the front-end routing capability.

[0090] It should be noted that the execution subject of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 201 to 204 can be device A; for another example, the execution subject of steps 201 and 202 can be device A, and the execution subject of step 203 can be device B; and so on.

[0091] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel, and the sequence numbers of the operations, such as 201, 202, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.

[0092] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0093] Figure 5 A schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present application is shown. Figure 5 As shown, the electronic device includes: a memory 501 , a processor 502 and a communication component 503 .

[0094] The memory 501 is used to store computer programs and can be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application program or method operating on the electronic device.

[0095] The processor 502 is coupled to the memory 501 and is used to execute the computer program in the memory 501, so as to: respond to the exit operation of the main process of the application, run the update process of the application to obtain the target update version corresponding to the application from the remote configuration file; use the update process to obtain the target resource data corresponding to the target update version from the resource server, and store the target resource data under the target path, and the target resource data is used to perform the target operation; when the main process is restarted, use the main process to perform the target operation according to the target resource data under the target path.

[0096] Optionally, when the processor 502 uses the update process to store the target resource data under the target path, it is specifically used to: determine whether the front-end component of the application supports front-end routing capabilities; if the front-end component supports front-end routing capabilities, determine the first path where the old version of the resource data corresponding to the target resource data is located, and use a second path isolated from the first path as the target path; and store the target resource data under the second path.

[0097] Optionally, the processor 502 is also used to: if the front-end component does not support front-end routing capabilities, use the update process to use the first path where the old version of the resource data is located as the target path; store the target resource data under the first path so that the target resource data overwrites the old version of the resource data.

[0098] Optionally, after using the update process to store the target resource data under the second path, the processor 502 is also used to: using the update process, when it is determined that there is no abnormality in the target resource data, record the update result as a successful update in the local configuration file of the application, and add the description information of the second path to the local configuration file; when using the main process to perform the target operation according to the target resource data under the target path, the processor 502 is specifically used to: read the update result in the local configuration file to determine whether the resource data is updated successfully; if it is determined that the target resource data is updated successfully, obtain the description information of the second path from the local configuration file; use the front-end routing capability of the front-end component to access the target resource data under the second path according to the description information of the second path, and perform the target operation according to the target resource data.

[0099] Optionally, the processor 502 is also used to: if it is determined that the target resource data update fails, output a manual update prompt message when the main process is restarted; and / or, when the main process exits again, run the update process to repeat the operation of obtaining the target resource data from the resource server.

[0100] Optionally, when the processor 502 utilizes the update process to obtain the target resource data corresponding to the target updated version from the resource server, it is specifically used to: download at least one resource update package of the application from the resource server, the at least one resource update package being obtained by classifying and packaging updated resource files corresponding to the application according to functional attributes corresponding to the resource files; and obtaining the target resource data according to the at least one resource update package.

[0101] Optionally, when the processor 502 uses the update process to obtain the target resource data corresponding to the target update version from the resource server, it is specifically used to: download the resource update file of the application from the resource server; and use the resource update file as the target resource data.

[0102] Optionally, after using the update process to store the target resource data in the target path, the processor 502 is also used to: when the front-end component supports front-end routing capabilities, copy the old version resource package corresponding to the resource update file to the target path to generate an updated resource package corresponding to the resource update file.

[0103] Optionally, when the processor 502 utilizes the update process to obtain the target update version corresponding to the application from the remote configuration file, it is specifically used to: obtain a grayscale update policy of the application from the remote configuration file, the grayscale update policy being used to describe the correspondence between multiple grayscale update versions and different grayscale attributes; and determine, from the multiple grayscale update versions, the target update version corresponding to the user based on the grayscale update policy and the grayscale attributes of the user accessing the application.

[0104] Further, if Figure 5 As shown, the electronic device also includes: a power supply component 504, a display component 505, an audio component 506 and other components. Figure 5 Only some components are shown schematically, which does not mean that the electronic device only includes Figure 5 Components shown. Figure 5 Components in the dashed box are optional components, not mandatory components, and may depend on the product form of the electronic device. The electronic device of this embodiment may be implemented as a terminal device such as a desktop computer, a laptop computer, a smart phone, or an IOT device, or may be a server device such as a conventional server, a cloud server, or a server array. If the electronic device of this embodiment is implemented as a terminal device such as a desktop computer, a laptop computer, a smart phone, etc., it may include Figure 5 If the electronic device of this embodiment is implemented as a server device such as a conventional server, a cloud server or a server array, it may not include Figure 5 Components within the dashed box.

[0105] Among them, the memory 501 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0106] The communication component 503 is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as Wi-Fi (wireless network communication technology), 2G (such as Global System for Mobile Communications (GSM)), 3G (such as Wideband Code Division Multiple Access (WCDMA), 4G (such as Long Term Evolution (LTE)), 4G+ (such as upgraded Long Term Evolution (LTE-Advanced, LTE-A)) or 5G (5th Generation Mobile Communication Technology), or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component can be implemented based on Near Field Communication (NFC) technology, Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.

[0107] The power supply component 504 is used to provide power to various components of the device where the power supply component is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing and distributing power to the device where the power supply component is located.

[0108] The display assembly includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0109] The audio component may be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal may be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting an audio signal.

[0110] In this embodiment, in the application update method, the update process of the application can be run in response to the exit operation of the main process of the application; the target resource data of the target update version corresponding to the application is obtained by using the update process, and the target resource data is stored in the target path; when the application is started, if it is determined that the target resource data is updated successfully, the target resource data is obtained from the target path by using the front-end routing capability, and the application is run according to the target resource data. Based on this implementation, after the main process of the application exits, the update process can silently pull the target resource data of the new version based on the remote configuration file in the background, and perform the update operation of the application, so that the update operation of the application is not perceived by the user, thereby reducing the interference caused by the update operation of the application to the user.

[0111] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed, can implement each step that can be performed by an electronic device in the above method embodiment.

[0112] The embodiment of the present application also provides a computer program product, including: a computer program / instructions, which, when executed by a processor, can implement the steps in the method provided in the embodiment of the present application.

[0113] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM (Compact Disc Read-Only Memory, read-only optical disc read-only memory), optical storage, etc.) containing computer-usable program codes.

[0114] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0115] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0116] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0117] In a typical configuration, a computing device includes one or more processors (Central Processing Unit, CPU), input / output interface, network interface and memory.

[0118] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0119] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, Parallel Random Access Machine (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, Digital Video Disc (DVD) or other optical storage, magnetic cassettes, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0120] It should also be noted that the terms "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, product or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, product or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, product or device including the element.

[0121] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A method for updating an application, characterized in that: include: In response to an exit operation of a main process of the application, an update process of the application is run to obtain a target update version corresponding to the application from a remote configuration file; Utilizing the update process, obtaining target resource data corresponding to the target update version from a resource server, and storing the target resource data in a target path, wherein the target resource data is used to perform a target operation; When the main process is restarted, the target operation is performed according to the target resource data under the target path by utilizing the main process.

2. The method according to claim 1, characterized in that Storing the target resource data in the target path includes: Determining whether the front-end component of the application supports front-end routing capabilities; If the front-end component supports the front-end routing capability, determining a first path where the old version resource data corresponding to the target resource data is located, and using a second path isolated from the first path as the target path; The target resource data is stored in the second path.

3. The method according to claim 2, characterized in that Also includes: If the front-end component does not support the front-end routing capability, the first path where the old version resource data is located is used as the target path; The target resource data is stored in the first path so that the target resource data overwrites the old version resource data.

4. The method according to claim 2, characterized in that: After storing the target resource data in the second path, the method further includes: utilizing the update process, when determining that the target resource data is normal, recording the update result as a successful update in the local configuration file of the application, and adding the description information of the second path to the local configuration file; Executing the target operation according to the target resource data under the target path includes: Reading the update result in the local configuration file to determine whether the resource data is updated successfully; If it is determined that the target resource data is updated successfully, obtaining description information of the second path from the local configuration file; The target resource data under the second path is accessed according to the description information of the second path by utilizing the front-end routing capability of the front-end component, and the target operation is performed according to the target resource data.

5. The method according to any one of claim 4, characterized in that: Also includes: If it is determined that the target resource data update fails, when the main process is restarted, a prompt message for manual update is output; And / or, when the main process exits again, the update process is run to repeatedly execute the operation of obtaining the target resource data from the resource server.

6. The method according to any one of claims 2 to 5, characterized in that: Obtaining target resource data corresponding to the target update version from the resource server includes: Downloading at least one resource update package of the application from the resource server, wherein the at least one resource update package is obtained by classifying and packaging updated resource files corresponding to the application according to functional attributes corresponding to the resource files; The target resource data is acquired according to the at least one resource update package.

7. The method according to any one of claims 2 to 5, characterized in that: Obtaining target resource data corresponding to the target update version from the resource server includes: Download the resource update file of the application from the resource server; The resource update file is used as the target resource data.

8. The method according to claim 6, characterized in that After storing the target resource data in the target path, the method further includes: When the front-end component supports the front-end routing capability, the old version resource package corresponding to the resource update file is copied to the target path to generate an updated resource package corresponding to the resource update file.

9. The method according to any one of claims 1 to 5, characterized in that: Obtaining a target update version corresponding to the application from a remote configuration file, including: Acquire a grayscale update strategy of the application from the remote configuration file, wherein the grayscale update strategy is used to describe a correspondence between multiple grayscale update versions and different grayscale attributes; According to the grayscale update strategy and the grayscale attribute of the user accessing the application, a target update version corresponding to the user is determined from the multiple grayscale update versions.

10. An electronic device, characterized in that: include: Memory and processor; The memory is used to store one or more computer instructions; The processor is configured to execute the one or more computer instructions to perform the steps in the method according to any one of claims 1 to 9.

11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps in the method described in any one of claims 1 to 9 can be implemented.

12. A computer program product, characterized in that include: A computer program / instruction, which, when executed by a processor, can implement the steps of the method according to any one of claims 1 to 9.