Application updating method and apparatus
By managing plugin management configuration information on the server, the viewing of plugin information and plugin host information is simplified, solving the problem of high plugin management complexity and achieving more efficient plugin updates and management.
Patent Information
- Application Number
- CN202211348961.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-31
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2042-10-31
AI Technical Summary
In existing technologies, plugin management is highly complex, with the complexity increasing exponentially, leading to increased server management pressure, poor maintainability, and a high risk of management errors.
By managing plugin management configuration information on the server, including the version of the plugin host, the versions of each plugin, and their dependencies, the plugin management configuration information is simplified to a single plugin management configuration. The client and server work together to update the target application.
It reduces the complexity of server management, simplifies the process of viewing plugin information and plugin host information, and improves management efficiency and maintainability.
Smart Images

Figure CN115904429B_ABST
Abstract
Description
Technical Field
[0001] This application relates to computer processing technology. More specifically, it relates to an application update method and apparatus. Background Technology
[0002] An application consists of a plugin host and plugins. As user demands for various functions within the application increase, and as the application itself is continuously upgraded, plugins that implement these functions often need to be updated. To ensure successful plugin updates and that the updated application functions correctly, the versions of the plugin host and all plugins must be consistent.
[0003] The existing strategy involves creating and maintaining a version table and a relationship table on the server. The version table stores the version information of each plugin host and each plugin, while the relationship table stores the relationships between plugins. However, due to the large number of plugins and the complexity of the relationships, especially when plugins are updated (more plugins, more versions), the management complexity increases exponentially, leading to increased server management pressure, poor maintainability, and a high risk of management errors. Summary of the Invention
[0004] To address the aforementioned technical problems, or at least partially address them, this application provides an application update method and apparatus that enables servers to manage application plugin information and plugin host information more simply and effectively, with low management complexity and easy viewing.
[0005] In a first aspect, embodiments of this application provide an application update method applied to a server. The method includes: receiving an update request sent by a client, the update request being used to request target plugin management configuration information; based on the update request, determining target plugin management configuration information from at least one plugin management configuration information stored on the server, each plugin management configuration information being used to indicate the version of the plugin host included in a version of an application, the plugin version of each plugin, and the dependencies between each plugin; and sending the target plugin management configuration information to the client, so that the client updates the target application indicated by the target plugin management configuration information according to the target plugin management configuration information.
[0006] Secondly, embodiments of this application provide an application update method applied to a client, the method comprising:
[0007] An update request is sent to the server. The update request is used to request the target plugin management configuration information so that the server can determine the target plugin management configuration information from at least one plugin management configuration information stored on the server based on the update request. Each plugin management configuration information is used to indicate the version of the plugin host included in a version of an application, the plugin version of each plugin, and the dependencies between each plugin.
[0008] Receive target plugin management configuration information sent by the server;
[0009] Update the target application indicated by the target plugin management configuration information based on the target plugin management configuration information.
[0010] Thirdly, embodiments of this application provide an application update apparatus applied to a server. The apparatus includes: a receiving module, a determining module, and a sending module. The receiving module is configured to receive an update request sent by a client, the update request being used to request target plugin management configuration information. The determining module is configured to determine target plugin management configuration information from at least one plugin management configuration information stored on the server based on the update request, each plugin management configuration information being used to indicate the version of the plugin host included in a version of an application, the plugin version of each plugin, and the dependencies between each plugin. The sending module is configured to send the target plugin management configuration information to the client, so that the client updates the target application indicated by the target plugin management configuration information according to the target plugin management configuration information.
[0011] Fourthly, embodiments of this application provide an application update apparatus applied to a client. The apparatus includes: a sending module, a receiving module, and an updating module. The sending module is configured to send an update request to a server. The update request requests target plugin management configuration information, enabling the server to determine the target plugin management configuration information from at least one plugin management configuration information stored on the server based on the update request. Each plugin management configuration information indicates the version of the plugin host included in a version of an application, the plugin version of each plugin, and the dependencies between the plugins. The receiving module is configured to receive the target plugin management configuration information sent by the server. The updating module is configured to update the target application indicated by the target plugin management configuration information according to the target plugin management configuration information.
[0012] Fifthly, this application provides an electronic device including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the application update method as described in the first and second aspects.
[0013] In a sixth aspect, this application provides a computer-readable storage medium, comprising: storing a computer program on the computer-readable storage medium, wherein when the computer program is executed by a processor, it implements the application update method as shown in the first and second aspects.
[0014] In a seventh aspect, this application provides a computer program product, comprising: when the computer program product is run on a computer, causing the computer to implement the application update method as shown in the first and second aspects.
[0015] Compared with the prior art, the technical solution provided in this application has the following advantages: In this application embodiment, the client sends an update request to the server. The update request is used to request target plugin management configuration information. The server receives the update request sent by the client. Based on the update request, the server determines the target plugin management configuration information from at least one plugin management configuration information stored on the server. The server sends the target plugin management configuration information to the client. The client receives the target plugin management configuration information sent by the server. The client updates the target application indicated by the target plugin management configuration information according to the target plugin management configuration information. Compared with the server maintaining a version table and association table of plugin hosts and plugins, the server in this solution manages the plugin management configuration information of each version of the application. From this plugin management information, it is possible to determine the following included in a version of an application: the version of the plugin host (plugin host information), each plugin, the version of each plugin, and the plugins that each plugin depends on (plugin information). That is, for an application, the relevant information of the plugins included in the application and the plugin host is stored according to the version. For the server, the storage method is simpler and the management complexity is lower. Furthermore, when it's necessary to view information about various plugins and their hosts within the application, this plugin management configuration information allows access to all plugin and host information without frequently querying the server's version and relationship tables. Therefore, this solution, through plugin management configuration information, reduces server management complexity, makes management easier, and facilitates viewing of plugin and host information within the application. Attached Figure Description
[0016] To more clearly illustrate the implementation methods in the embodiments of this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings.
[0017] Figure 1 One of the flowcharts of an application update method according to some embodiments is shown;
[0018] Figure 2 A schematic diagram illustrating the process by which a client determines whether to update an application, according to some embodiments, is shown;
[0019] Figure 3 A schematic diagram illustrating the process by which a server determines whether to update an application, according to some embodiments, is shown.
[0020] Figure 4 One of the relationship diagrams between various plugin information and plugin host information according to some embodiments is shown;
[0021] Figure 5 This is a second diagram showing the relationship between various plugin information and plugin host information according to some embodiments;
[0022] Figure 6 A second schematic flowchart of an application update method according to some embodiments is shown;
[0023] Figure 7 A schematic diagram illustrating information carried in an update request according to some embodiments is shown;
[0024] Figure 8 A schematic diagram illustrating information carried in another update request according to some embodiments is shown;
[0025] Figure 9 A third schematic flowchart of an application update method according to some embodiments is shown;
[0026] Figure 10 One of the structural schematic diagrams of an application update apparatus according to some embodiments is shown;
[0027] Figure 11 A second schematic diagram of the structure of an application update device according to some embodiments is shown;
[0028] Figure 12 A structural block diagram of an electronic device according to some embodiments is shown. Detailed Implementation
[0029] To make the objectives and implementation methods of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the exemplary embodiments described are only some embodiments of this application, and not all embodiments.
[0030] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.
[0031] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.
[0032] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.
[0033] The electronic devices in this application embodiment can be mobile electronic devices or non-mobile electronic devices. Mobile electronic devices can be mobile phones, tablets, laptops, PDAs, in-vehicle electronic devices, wearable devices, ultra-mobile personal computers (UMPCs), netbooks, or personal digital assistants (PDAs), etc.; non-mobile electronic devices can be personal computers (PCs), televisions (TVs), ATMs, or self-service machines, etc.; this application embodiment does not impose specific limitations.
[0034] The execution subject of the application update method provided in this application embodiment can be the aforementioned electronic device (including mobile electronic devices and non-mobile electronic devices), or it can be a functional module and / or functional entity in the electronic device that can implement the application update method. The specific implementation subject can be determined according to actual usage requirements, and this application embodiment does not limit it.
[0035] The application update method provided in this application will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0036] like Figure 1 As shown in the figure, this application embodiment provides an application update method, which may include the following steps 101 to 106.
[0037] 101. The client sends an update request to the server.
[0038] The update request is used to request the target plugin management configuration information.
[0039] It is understood that the client sends an update request to the server in several ways: upon receiving an instruction to open a certain application; upon receiving an instruction to update the target application; upon receiving an instruction to open the client; or at preset intervals. Specifically, the method is determined according to actual needs, and this application embodiment does not impose any limitations.
[0040] 102. The server receives the update request sent by the client.
[0041] It is understandable that the target plugin management configuration information can be the latest plugin management configuration information stored on the server, or it can be the plugin management configuration information determined based on a certain strategy, such as the plugin management configuration information corresponding to the device identifier.
[0042] 103. Based on the update request, the server determines the target plugin management configuration information from at least one plugin management configuration information stored on the server.
[0043] Among them, each plugin management configuration information in at least one plugin management configuration information is used to indicate: the version of the plugin host included in a version of an application, the plugin version of each plugin, and the dependency relationship between each plugin.
[0044] It is understandable that the configuration information for each plugin management is generated during application compilation and stored on the server.
[0045] It is understandable that each plugin management configuration information includes: application identifier, plugin host version, and information about each plugin. Each plugin information includes: plugin identifier, plugin version, and dependencies. The application identifier is used to uniquely identify an application, the plugin host version is used to indicate the version of the plugin management configuration information, the plugin identifier is used to uniquely identify a plugin, the plugin version is used to indicate the version information of the plugin, and the dependencies are used to indicate the plugins that each plugin depends on.
[0046] It is understood that the plugin management configuration information can be a JSON file, a structural relationship diagram, or other types of files, depending on the actual needs. As long as it can store the version of the plugin host, the plugin versions of each plugin, and the dependencies between each plugin, this application embodiment does not limit the format of the stored file.
[0047] For example, consider a plugin management configuration file stored in the JSON file plugin_info_v100_1.json:
[0048]
[0049] In this configuration file, `appId` is the application identifier, `hostver` is the version of the plugin host, and `plugin` represents the plugin. This plugin management configuration includes three plugins: `middleware`, `demol`, and `demo2`. `ver` represents the plugin version, and `rely` indicates dependencies. The `middleware` plugin does not depend on any other plugins, the `demol` plugin depends on the `middleware` plugin, and the `demo2` plugin does not depend on any other plugins. Specifically, the `plugin_info_v100_1.json` file contains the plugin configuration management information for the application `com.xxx.A`, version `v100_1` (where `100` is the version of the plugin host and `1` is a sub-version, indicating that this version is the first version of the application).
[0050] It is understood that at least one plugin management configuration information can be stored in a file, or each plugin management configuration information in at least one plugin management configuration information can be stored in a separate file, or the plugin management configuration information for each version under each application can be stored in a separate file. The specific storage method is determined according to actual needs, and this application embodiment does not limit it.
[0051] It is understood that whether the client application needs to be upgraded can be determined by the client or by the server, depending on the actual situation. This application embodiment does not limit this.
[0052] For example, such as Figure 2 The diagram illustrates the process by which a client determines whether to update an application. The client sends an update request (including an identifier for application A). The server receives the update request and, based on it, obtains the latest version of the plugin management configuration information for application A. The server then sends this latest version of the plugin management configuration information to the client. The client determines whether to update application A by comparing the currently used plugin management configuration information with the latest configuration information; if there are differences, the client updates application A; otherwise, no action is taken. Alternatively, the client compares the plugin versions of each plugin currently used by application A with the plugin versions in the latest plugin management configuration information; if there are differences, the client updates application A; otherwise, no action is taken.
[0053] For example, such as Figure 3The diagram illustrates the process by which the server determines whether to update an application. The client sends an update request (which includes the identifier of application A and version 1 of the currently used plugin management configuration information). The server receives the update request and, based on it, determines that application A is currently using version 1 of the plugin management configuration information. The server then checks its stored plugin management configuration information to see if there is a version 2 higher than version 1. If so, the server sends version 2 plugin management configuration information to the client; otherwise, it sends a message indicating that no update is needed. Upon receiving the message from the server, the client determines whether the received message indicates that application A should be updated (if the received message is version 2 plugin management configuration information, then update application A; if the received message indicates that no update is needed, then no update is required). If yes, the client determines to update application A; otherwise, no action is taken.
[0054] 104. The server sends the target plugin management configuration information to the client.
[0055] It is understandable that the server determines the target plugin management configuration information from at least one plugin management configuration information stored on the server. If the target plugin management configuration information exists, the server sends the target plugin management configuration information to the client; if the target plugin management configuration information does not exist, the server sends a message to the client indicating that the target plugin management configuration information does not exist.
[0056] 105. The client receives the target plugin management configuration information sent by the server.
[0057] 106. The client updates the target application indicated by the target plugin management configuration information based on the target plugin management configuration information.
[0058] It can be understood that updating the target application indicated by the target plugin management configuration information involves updating the target application, or upgrading its version, that is, updating the target application indicated by the target plugin management configuration information to the target version indicated by the target plugin management configuration information.
[0059] It is understood that updating the target application includes at least one of the following: deleting at least one plugin in the target application, adding at least one plugin to the target application, or modifying at least one plugin in the target application.
[0060] For example, application A includes the following plugins: business plugin 1, business plugin 2, business plugin 3, business plugin 4, platform plugin 1, platform plugin 2, and driver plugin 1. The following example assumes that the server needs to manage two versions of application A, and the existing server maintains a version table and a relationship table:
[0061] When application A is in its first version, the information stored in the version table is as follows: first version business plugin 1, first version business plugin 2, first version business plugin 3, first version business plugin 4, first version platform plugin 1, first version platform plugin 2, first version driver plugin 1, and plugin host with version 100.
[0062] In the first version of application A, the relationship table stores the following information: {First version business plugin 1 strongly depends on: first version platform plugin 1, weakly depends on: first version platform plugin 2}, {First version business plugin 2 strongly depends on: first version platform plugin 2, weakly depends on: first version platform plugin 1}, {First version business plugin 3 strongly depends on: first version driver plugin 1}, {First version business plugin 4 strongly depends on: plugin host of version 100}, {First version platform plugin 1 strongly depends on: first version driver plugin 1}, {First version platform plugin 2 strongly depends on: first version driver plugin 1}, {First version driver plugin 1 strongly depends on: plugin host of version 100}.
[0063] When application A is in version 2, the information stored in the version table is as follows: first version business plugin 1, first version business plugin 2, second version business plugin 2, first version business plugin 3, second version business plugin 3, first version business plugin 4, second version business plugin 4, first version platform plugin 1, second version platform plugin 1, first version platform plugin 2, second version platform plugin 2, first version driver plugin 1, second version driver plugin 1, plugin host with version 100, and plugin host with version 101.
[0064] In the second version of application A, the information stored in the relationship table is expanded from the first version to include: {First version business plugin 1 strongly depends on: first version platform plugin 1, weakly depends on: second version platform plugin 2}, {Second version business plugin 2 strongly depends on: second version platform plugin 2, weakly depends on: first version platform plugin 1}, {Second version business plugin 3 strongly depends on: second version driver plugin 1}, {Second version business plugin 4 strongly depends on: plugin host of version 101}, {First version platform plugin 1 strongly depends on: second version driver plugin 1}, {Second version platform plugin 2 strongly depends on: second version driver plugin 1}, {Second version driver plugin 1 strongly depends on: plugin host of version 101}.
[0065] The following uses Plugin_b1 to represent business plugin 1, Plugin_b2 to represent business plugin 2, Plugin_b3 to represent business plugin 3, Plugin_b4 to represent business plugin 4, Plugin_p1 to represent platform plugin 1, Plugin_p2 to represent platform plugin 2, Plugin_l1 to represent driver plugin 1, and host to represent the plugin host (where Plugin_b* indicates a business plugin, Plugin_p* indicates a platform plugin, Plugin_l* indicates a driver plugin, business plugins depend on platform plugins, and platform plugins depend on driver plugins). An example of the plugin management configuration file for the first version of application A stored on the server in this embodiment is provided. The plugin management configuration file for the first version of application A is plugin_info_v100.json, which includes:
[0066]
[0067]
[0068] Here, rely0 indicates a strong dependency, and rely1 indicates a weak dependency.
[0069] The contents of the above plugin_info_v100.json file can be visualized as follows: Figure 4 The diagram shown illustrates the relationship between the plugin information and plugin host information included in the first version of application A (where _v_1 represents the first version and _v_2 represents the second version). The solution in this embodiment saves the plugin information and plugin host information included in application A according to their versions.
[0070] In this embodiment of the application, the plugin management configuration file for the second version of application A stored on the server is plugin_info_v101.json, which includes:
[0071]
[0072]
[0073] The contents of the above plugin_info_v101.json file can be visualized as follows: Figure 5 As shown, the second version of application A includes plugins, plugin hosts, and dependencies (where _v_1 represents the first version and _v_2 represents the second version).
[0074] Under the existing storage method, the server stores the versions of all plugins included in the first and second versions of application A, as well as the relationships between these plugins. After application A is updated, the stored relationships become quite complex. Furthermore, when it is necessary to view the information of each plugin under the first version of application A and its dependencies, frequent requests to the server are required. For example, requesting the version of business plugin 1 in the first version of application A yields the version information of business plugin 1. Requesting the dependencies of business plugin 1 yields the strong dependency of business plugin 1: platform plugin 1, and the weak dependency: platform plugin 2. Requesting the dependencies of platform plugin 1 yields the strong dependency: driver plugin 1. Requesting platform plugin 2 and the dependencies of driver plugin 1, and so on, until all plugins included in the first version of application A are found. The query process is complex. The solution proposed in this application stores the corresponding plugin management configuration information according to each version of the application. The storage is concise, and when querying, the plugin information, plugin host information and dependency relationship of all plugins included in the first version of application A can be obtained by simply requesting the plugin management configuration information of the first version of application A. The query process is simple and efficient.
[0075] In this embodiment, the client sends an update request to the server, requesting target plugin management configuration information. The server receives the update request from the client, determines the target plugin management configuration information from at least one plugin management configuration information stored on the server, sends the target plugin management configuration information to the client, and the client receives the target plugin management configuration information sent by the server. The client then updates the target application indicated by the target plugin management configuration information according to the target plugin management configuration information. Compared to the server maintaining a version table and association table for plugin hosts and plugins, this solution manages plugin management configuration information for each version of the application. From this plugin management information, it is possible to determine the following for a version of an application: the version of the plugin host (plugin host information), each plugin, the version of each plugin, and the plugins that each plugin depends on (plugin information). In other words, for an application, the relevant information of the plugins included in the application and the plugin host is stored according to the version. For the server, the storage method is simpler and the management complexity is lower. Furthermore, when it's necessary to view information about various plugins and their hosts within the application, this plugin management configuration information allows access to all plugin and host information without frequently querying the server's version and relationship tables. Therefore, this solution, through plugin management configuration information, reduces server management complexity, makes management easier, and facilitates viewing of plugin and host information within the application.
[0076] In some embodiments of this application, in step 103 above, each plugin management configuration information is also used to indicate the plugin download address of each plugin, and / or the relative address where each plugin is stored on the client after downloading.
[0077] It is understandable that the download addresses for each plugin can be preset or included in the configuration information for each plugin management.
[0078] It is understandable that the storage address of each plugin on the client after downloading can be a preset address or a relative address included in the management configuration information of each plugin.
[0079] For example, the relative address where each plugin is stored on the client after download is relative to the download address of the application. For instance, the download address of application A is C / applicationA folder, and the relative address where plugin A (a jar file) included in application A is stored on the client after download is Plugins / pluginA.jar. That is, the address where plugin A is stored on the client after download is C / applicationA / plugins / pluginA.jar.
[0080] For example, a plugin management configuration file named plugin_info_v100_1.json, stored in JSON format, includes the download address of each plugin and the relative address where each plugin is stored on the client after downloading:
[0081]
[0082]
[0083] Here, path is the relative address where the plugin is stored on the client after download, and url (Uniform Resource Locator) is used to indicate the location of the plugin resource, that is, the address information for downloading the plugin.
[0084] In this embodiment, each plugin management configuration information is also used to indicate the plugin download address of each plugin, and / or the relative address where each plugin is stored on the client after downloading. Thus, by obtaining the plugin management configuration information, the download address of each plugin and its relative address on the client can be determined without relying on other files. The stored information is more comprehensive and easier for the server to manage.
[0085] In some embodiments of this application, combined with Figure 1 ,like Figure 6 As shown, in step 101 above, the update request carries the client's first identifier and second identifier. The first identifier is used to uniquely indicate the target application, and the second identifier is used to indicate the first version of the target application currently used by the client. Step 103 above can be specifically implemented through the following steps 103a and 103b.
[0086] 103a. Based on the update request, the server determines at least one candidate plugin management configuration information from at least one plugin management configuration information.
[0087] In this context, the version of the target application indicated by the management configuration information for each candidate plugin is higher than the first version.
[0088] 103b. The server determines the target plugin management configuration information from at least one candidate plugin management configuration information.
[0089] It is understandable that the update request carries the client's first identifier and second identifier, which indicate the target application and the first version currently used by the target application. In this way, the server parses the target application and the first version included in the update request. The server searches for at least one plugin management configuration information higher than the first version in the target application from at least one stored plugin management configuration information as candidate plugin management configuration information. Then, based on certain rules, the server determines the target plugin management configuration information from at least one candidate plugin management configuration information.
[0090] For example, such as Figure 7 The image shows the information carried in the update request. Here, appId is the first identifier, and the combination of versionCode and subversionCode is the second identifier.
[0091] It is understood that the server determines the target plugin management configuration information from at least one candidate plugin management configuration information. That is, if there is only one candidate plugin management configuration information, then that candidate plugin management configuration information is the target plugin management configuration information; if there are multiple candidate plugin management configuration information, then the target plugin management configuration information is determined based on certain rules. For example, the rules may be: the latest version, the version closest to the first version, etc. The specific rules for determining the target plugin management configuration information from at least one candidate plugin management configuration information are determined according to the actual situation, and are not limited in this application embodiment.
[0092] It is understandable that if the version of the target application indicated by the plugin management configuration information stored on the server is lower than the first version or the same as the first version, the server will send a message to the client indicating that the target application does not need to be updated.
[0093] In this embodiment, the update request carries a first identifier and a second identifier of the client. The first identifier uniquely indicates the target application, and the second identifier indicates the first version of the target application currently used by the client. Based on the update request, the server determines the target plugin management configuration information from at least one plugin management configuration information stored on the server. This includes: the server determining at least one candidate plugin management configuration information from the at least one plugin management configuration information, where each candidate plugin management configuration information indicates a target application version higher than the first version; and the server determining the target plugin management configuration information from the at least one candidate plugin management configuration information. Thus, based on the client's indicated target application and first version carried in the update request, the server determines at least one candidate plugin management configuration information from the plugin management configuration information, and then determines the target plugin management configuration information based on the at least one candidate plugin management configuration information. Compared to the server not performing version checks and simply sending the latest version of the plugin management configuration information as the target plugin management configuration information to the client, which might result in the client already using the latest version, rendering the transmission invalid and wasting resources. In this embodiment, the server determines at least one candidate plugin management configuration information from at least one plugin management configuration information. In this way, the version of the target application indicated by the plugin management configuration information sent to the client side is definitely higher than the first version. That is, the target plugin management configuration information transmitted to the client can definitely be used by the client to update the target application, thus achieving more efficient transmission.
[0094] In some embodiments of this application, the update request also carries the client's device identifier; then each candidate plugin management configuration information determined in step 103a above is the plugin management configuration information corresponding to the device identifier.
[0095] It is understood that the device identifier can be the device model, the device's unique code, or other identifiers that can indicate the device. The device identifier can uniquely identify a single device or a group of devices (such as devices with the same model number), and this application embodiment does not impose any specific limitations.
[0096] For example, combined Figure 7 ,like Figure 8 The image shows the information carried in the new request. DeviceId is the device identifier.
[0097] It is understood that, from at least one candidate plugin management configuration information determined by the server from at least one plugin management configuration information, each candidate plugin management configuration information satisfies the following conditions: the version of the target application indicated by the candidate plugin management configuration information is higher than the first version, and the version of the target application indicated by the candidate plugin management configuration information corresponds to the device identifier.
[0098] It is understood that the correspondence between plug-in management configuration information and device identifier can be one-to-one, one-to-many, many-to-one, or many-to-many, and this application embodiment does not limit it.
[0099] It is understandable that the server pre-stores the correspondence between device identifiers and plugin management configuration information. For example, device A corresponds to the plugin management configuration information of version 1 of application A and the plugin management configuration information of version 2 of application A.
[0100] It's understandable that the update request also carries the client's device identifier. Therefore, the server determines each candidate plugin management configuration information as the plugin management configuration information corresponding to that device identifier. Some devices may not support the latest version. If the received target plugin management configuration information is the latest version, there may be issues with the application being unusable after the update, potentially leading to other client-side problems. Therefore, determining the plugin management configuration information corresponding to the device identifier as the candidate plugin management configuration information ensures that the application can be used normally after the update.
[0101] In some embodiments of this application, combined with Figure 1 ,like Figure 9 As shown, step 106 can be implemented through steps 106a to 106c.
[0102] 106a. Based on the plugin versions of each plugin included in the target plugin management configuration information and the plugin versions of each plugin currently used by the target application, determine at least one target plugin that needs to be updated.
[0103] 106b. Download at least one target plugin.
[0104] 106c. Update at least one target plugin in the target application.
[0105] It is understandable that after receiving the target plugin management configuration information, the client can update all plugins in the target application based on the target plugin management configuration information (i.e., download and load all plugins); or it can identify plugins with different versions from the plugins currently used by the target application based on the target plugin management configuration information and only update the different plugins.
[0106] It is understandable that the plugin versions of each plugin currently used by the target application can be obtained from the plugin management configuration information currently used by the target application. By comparing the plugin versions of each plugin included in the target plugin management configuration information with the plugin versions of each plugin currently used by the target application, if there is a difference in the version of a plugin, then that plugin is identified as the target plugin.
[0107] It is understandable that if the target plugin management configuration information includes the plugin's download address, then the target plugin's download address will be obtained from the target plugin management configuration information and downloaded; if the target plugin management configuration information does not include the plugin's download address, then the target plugin will be downloaded from the target application's preset address.
[0108] It can be understood that updating at least one target plugin in the target application means only updating the plugins in the target application that have changed.
[0109] It's understandable that plugin updates happen in the background and don't affect user experience. Also, because plugins have dependencies, they can only be used after all target plugins have been successfully downloaded. Plugin updates are atomic operations; if even one plugin fails to download, the application will not update.
[0110] It's understandable that when the application is in use, all the target plugins that need to be updated have already been downloaded in the background. However, in order not to affect the user experience, the new plugins will only replace the old plugins after the application is restarted.
[0111] In this embodiment, the client updates the target application indicated by the target plugin management configuration information according to the target plugin management configuration information. This includes: determining at least one target plugin that needs to be updated based on the plugin versions of each plugin included in the target plugin management configuration information and the plugin versions of each plugin currently used by the target application; downloading at least one target plugin; and updating at least one target plugin in the target application. Thus, updating only the plugins in the target application whose versions have changed saves bandwidth and time compared to updating all plugins, improving update efficiency.
[0112] In the embodiments of this application, such as Figure 10 As shown, an application update apparatus is provided, comprising: a receiving module, a determining module, and a sending module; the receiving module is configured to receive an update request sent by a client, the update request being for requesting target plugin management configuration information; the determining module is configured to determine target plugin management configuration information from at least one plugin management configuration information stored on a server based on the update request, each plugin management configuration information indicating the version of the plugin host included in a version of an application, the plugin version of each plugin, and the dependencies between the plugins; the sending module is configured to send the target plugin management configuration information to the client, so that the client updates the target application indicated by the target plugin management configuration information according to the target plugin management configuration information.
[0113] In some embodiments of this application, each plugin management configuration information is also used to indicate the plugin download address of each plugin, and / or the relative address where each plugin is stored on the client after download.
[0114] In some embodiments of this application, the update request carries a first identifier and a second identifier of the client. The first identifier is used to uniquely indicate the target application, and the second identifier is used to indicate the first version of the target application currently used by the client. The determining module is specifically used to determine at least one candidate plugin management configuration information from at least one plugin management configuration information, wherein each candidate plugin management configuration information indicates a version of the target application that is higher than the first version; and to determine the target plugin management configuration information from at least one candidate plugin management configuration information.
[0115] In some embodiments of this application, the update request also carries the client's device identifier; each candidate plugin management configuration information is the plugin management configuration information corresponding to the device identifier.
[0116] In the embodiments of this application, such as Figure 11 As shown, an application update apparatus is provided for a client. The apparatus includes: a sending module, a receiving module, and an updating module. The sending module is used to send an update request to a server. The update request requests target plugin management configuration information, so that the server determines the target plugin management configuration information from at least one plugin management configuration information stored on the server based on the update request. Each plugin management configuration information indicates the version of the plugin host included in a version of an application, the plugin version of each plugin, and the dependencies between the plugins. The receiving module is used to receive the target plugin management configuration information sent by the server. The updating module is used to update the target application indicated by the target plugin management configuration information according to the target plugin management configuration information.
[0117] In some embodiments of this application, the update request carries a first identifier and a second identifier, so that the server determines at least one candidate plugin management configuration information from at least one plugin management configuration information according to the update request, and determines the target plugin management configuration information from at least one candidate plugin management configuration information;
[0118] The first identifier is used to uniquely identify the target application, the second identifier is used to indicate the first version of the target application currently in use, and the version of the target application indicated by each candidate plugin management configuration information is higher than the first version.
[0119] In some embodiments of this application, the update request also carries the client's device identifier; each candidate plugin management configuration information is the plugin management configuration information corresponding to the device identifier.
[0120] In some embodiments of this application, the update module is specifically used to determine at least one target plugin that needs to be updated based on the plugin version of each plugin included in the target plugin management configuration information and the plugin version of each plugin currently used by the target application; download at least one target plugin; and update at least one target plugin in the target application.
[0121] The application update device provided in this application embodiment can be used to execute the steps of the above method embodiment. Its implementation principle and technical effect are similar, and will not be repeated here.
[0122] It should be noted that the above-mentioned application update device can be the electronic device in the above method embodiment of this application, or it can be a functional module and / or functional entity in the electronic device that can realize the function of the device embodiment. This application embodiment does not limit it.
[0123] In this embodiment, each module can implement the application update method provided in the above method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.
[0124] This application also provides an electronic device, such as... Figure 12 As shown, the electronic device may include: a processor 121, a memory 122, and a program or instructions stored in the memory 122 and executable on the processor 121. When the program or instructions are executed by the processor 121, they can implement the various processes of the application update method provided in the above method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0125] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the application update method described above and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0126] The computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0127] The present invention provides a computer program product, comprising: when the computer program product is run on a computer, causing the computer to implement the above-described application update method.
[0128] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0129] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are intended to better explain the principles and practical applications, thereby enabling those skilled in the art to better utilize the described embodiments and various different variations of embodiments suitable for specific use considerations.
Claims
1. An application update method, characterized in that, Applied to a server, the method includes: The system receives an update request sent by a client. The update request is used to request target plugin management configuration information. The update request carries a first identifier and a second identifier of the client. The first identifier is used to uniquely indicate the target application, and the second identifier is used to indicate the first version of the target application currently used by the client. Based on the update request, at least one candidate plugin management configuration information is determined from at least one plugin management configuration information stored on the server. Each plugin management configuration information is an independent configuration file for a version of the application, including an application identifier, the version of the plugin host, and a plugin information set. Each plugin information in the plugin information set includes a plugin identifier, a plugin version, and dependencies. The dependencies include strong dependencies and weak dependencies. The version of the target application indicated by each candidate plugin management configuration information is higher than the first version. The target plugin management configuration information is determined from the at least one candidate plugin management configuration information; The target plugin management configuration information is sent to the client so that the client can determine at least one target plugin that needs to be updated and update the target application based on the plugin identifier, plugin version and dependency relationship included in the target plugin management configuration information.
2. The method according to claim 1, characterized in that, The configuration information for each plugin management is also used to indicate the plugin download address of each plugin, and / or the relative address where each plugin is stored on the client after download.
3. The method according to claim 1, characterized in that, The update request also carries the client's device identifier; The management configuration information for each candidate plugin is the plugin management configuration information corresponding to the device identifier.
4. An application update method, characterized in that, Applied to a client, the method includes: An update request is sent to the server. The update request requests target plugin management configuration information. The update request carries a first identifier and a second identifier. The first identifier is used to uniquely indicate the target application, and the second identifier is used to indicate the first version of the target application currently used by the client. Based on the update request, the server determines at least one candidate plugin management configuration information from at least one plugin management configuration information stored on the server, and determines the target plugin management configuration information from the at least one candidate plugin management configuration information. Each plugin management configuration information is an independent configuration file for a version of the application, including an application identifier, a plugin host version, and a plugin information set. Each plugin information in the plugin information set includes a plugin identifier, a plugin version, and dependencies. The dependencies include strong dependencies and weak dependencies. The version of the target application indicated by each candidate plugin management configuration information is higher than the first version. Receive the target plugin management configuration information sent by the server; Based on the plugin identifier, plugin version, and dependencies included in the target plugin management configuration information, as well as the plugin identifier and plugin version currently used by the target application, at least one target plugin that needs to be updated is determined; the at least one target plugin is downloaded; and the at least one target plugin in the target application is updated according to the dependencies.
5. The method according to claim 4, characterized in that, The update request also carries the client's device identifier; The management configuration information for each candidate plugin is the plugin management configuration information corresponding to the device identifier.
6. The method according to claim 4, characterized in that, The downloading of the at least one target plugin includes: The at least one target plugin is downloaded in the background during the operation of the target application; When all at least one target plugin is successfully downloaded, the old plugin in the target application will be replaced by the at least one target plugin after the target application is restarted. If any target plugin fails to download, the target application will not be updated.
7. An application update device, characterized in that, Applied to a server, the device includes: a receiving module, a determining module, and a sending module; A receiving module is used to receive an update request sent by a client. The update request is used to request target plugin management configuration information. The update request carries a first identifier and a second identifier of the client. The first identifier is used to uniquely indicate the target application, and the second identifier is used to indicate the first version of the target application currently used by the client. The determining module is configured to, based on the update request, determine at least one candidate plugin management configuration information from at least one plugin management configuration information stored on the server. Each plugin management configuration information is an independent configuration file for a version of the application, including an application identifier, a plugin host version, and a plugin information set. Each plugin information in the plugin information set includes a plugin identifier, a plugin version, and dependencies, including strong dependencies and weak dependencies. The version of the target application indicated by each candidate plugin management configuration information is higher than the first version. The module then determines the target plugin management configuration information from the at least one candidate plugin management configuration information. The sending module is used to send the target plugin management configuration information to the client, so that the client can determine at least one target plugin that needs to be updated and update the target application based on the target plugin management configuration information, including the plugin identifier, plugin version and dependency relationship.
8. An application update device, characterized in that, Applied to a client, the device includes: a sending module, a receiving module, and an updating module; The sending module is used to send an update request to the server. The update request is used to request target plugin management configuration information. The update request carries a first identifier and a second identifier. The first identifier is used to uniquely indicate the target application, and the second identifier is used to indicate the first version of the target application currently used by the client. This allows the server to determine at least one candidate plugin management configuration information from at least one plugin management configuration information stored on the server based on the update request, and to determine the target plugin management configuration information from the at least one candidate plugin management configuration information. Each plugin management configuration information is an independent configuration file for a version of the application, including an application identifier, the version of the plugin host, and a plugin information set. Each plugin information in the plugin information set includes a plugin identifier, a plugin version, and dependencies. The dependencies include strong dependencies and weak dependencies. The version of the target application indicated by each candidate plugin management configuration information is higher than the first version. The receiving module is used to receive the target plugin management configuration information sent by the server; The update module is configured to determine at least one target plugin that needs to be updated based on the plugin identifier, plugin version, and dependencies included in the target plugin management configuration information, as well as the plugin identifier and plugin version currently used by the target application; download the at least one target plugin; and update the at least one target plugin in the target application according to the dependencies.
Citation Information
Patent Citations
Plug-in update method and device
CN104714827A
Plug-in updating method, device and system
CN112698858A
