Application updating method, system, terminal device and storage medium
By querying the differential update configuration and differential configuration files, the application page is directly updated, which solves the problem of low application update accuracy caused by differential package matching errors and improves the efficiency and accuracy of application updates.
Patent Information
- Application Number
- CN202010312163.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-20
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2040-04-20
AI Technical Summary
In the existing application update process, differential packages are prone to matching errors, resulting in low accuracy of application updates.
By obtaining the application configuration summary, sending it to the configuration center to query the differential update configuration, and downloading the differential configuration file from the resource center, the current page is directly updated to avoid downloading the complete update package.
It improves the efficiency and accuracy of application updates, reduces the download of invalid data, and enhances the accuracy of application updates.
Smart Images

Figure CN112783539B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of application updating, and in particular relates to an application updating method, system, terminal equipment and storage medium. Background Art
[0002] Competition in mobile applications (Application, APP) is fierce today. Good interaction and performance are only the basis. Whether an application can be quickly updated to provide content and services to customers has become the key. In order to improve the user experience, major applications have started to use offline caching technology in recent years to read resource files from the local storage space of the mobile phone to speed up page loading. To match this, an offline resource package update service has been added to update the offline pages of online clients. The most critical point in using offline update packages to update pages in applications is the size of the update package. When the update package is too large, it will lead to high network bandwidth costs, slow update speeds, and the mobile network download process is prone to failure, resulting in a low update reach rate.
[0003] In the existing application update process, the size of the update package is reduced by using a differential update package. The difference between two update packages is calculated and the complete package is replaced by a differential package, thereby further reducing the package size. However, as the number of updates increases, more and more differential packages need to be prepared, which leads to an explosive growth in differential packages, making it easy for differential package matching errors to occur, thereby reducing the accuracy of application updates. Summary of the invention
[0004] The embodiments of the present application provide an application update method, system, terminal device and storage medium, which are intended to solve the problem of low application update accuracy caused by easy matching errors of differential packages in the existing application update process.
[0005] In a first aspect, an embodiment of the present application provides an application update method, the method comprising:
[0006] When any application is started, an application configuration summary of the current application is obtained, and the application configuration summary is sent to the configuration center to query the differential update configuration, where the differential update configuration carries a page identifier;
[0007] If the current page opened by the current application matches the page identifier, the differential update configuration is sent to the resource center to query the differential configuration file;
[0008] The queried differential configuration file is downloaded from the resource center, and the current page is updated according to the differential configuration file.
[0009] Compared with the prior art, the embodiments of the present application have the following beneficial effects: by adopting the method of querying differential update configuration and downloading differential configuration files to update the application, there is no need to download update packages, which effectively improves the update efficiency and accuracy of the application; by directly downloading the required differential configuration files, the download of invalid data is effectively reduced, thereby improving the efficiency of application updates.
[0010] Furthermore, after the step of starting any application, the method further includes:
[0011] Obtaining user information of the current application, and sending the user information to the configuration center to query recommended version information;
[0012] Obtaining the current version number of the configuration element of each function page in the current application, and matching the configuration element with the recommended version information to obtain the recommended version number;
[0013] Determine whether the current version number is the same as the recommended version number;
[0014] If the current version number is different from the recommended version number, the configuration element and the recommended version number are stored in correspondence to obtain the differential update configuration;
[0015] If the current page opened by the current application matches the page identifier, sending the differential update configuration to the resource center to query the differential configuration file;
[0016] The queried differential configuration file is downloaded from the resource center, and the current page is updated according to the differential configuration file.
[0017] Furthermore, after the step of sending the application configuration summary to the configuration center to query the differential update configuration, the method further includes:
[0018] Obtaining the page URL of the current page, and determining whether the page URL matches the page identifier in the differential update configuration;
[0019] If the page URL matches the page identifier, the differential update configuration corresponding to the matched page identifier is sent to the resource center to query the differential configuration file;
[0020] The queried differential configuration file is downloaded from the resource center, and the current page is updated according to the differential configuration file.
[0021] Furthermore, after the step of sending the application configuration summary to the configuration center to query the differential update configuration, the method further includes:
[0022] Obtaining the page identifier in the differential update configuration, and determining, according to the page identifier, whether the current application stores configuration information carrying the same page identifier;
[0023] If the current application stores the configuration information carrying the same page identifier, the configuration information is overwritten by the queried differential update configuration.
[0024] Furthermore, the method further comprises:
[0025] Obtaining a locally pre-stored update whitelist, and downloading a configuration file from the resource center according to a preset configuration name in the update whitelist;
[0026] The current application is updated according to the downloaded configuration file.
[0027] Further, the obtaining of the application configuration summary of the current application includes:
[0028] Calculate hash values of files corresponding to configuration elements on all function pages of the current application;
[0029] The name of the function page, the name of the configuration element and the calculated hash value are stored correspondingly to obtain the application configuration summary.
[0030] In a second aspect, an embodiment of the present application provides an application update system, including:
[0031] The differential configuration query module is used to obtain the application configuration summary of the current application when any application is started, and send the application configuration summary to the configuration center to query the differential update configuration, where the differential update configuration carries a page identifier;
[0032] A differential configuration file query module is used to send the differential update configuration to a resource center to query the differential configuration file if the current page opened by the current application matches the page identifier;
[0033] The page update module is used to download the queried differential configuration file from the resource center and update the current page according to the differential configuration file.
[0034] Furthermore, the application update system also includes:
[0035] Application version recommendation module: used to obtain user information in the current application and send the user information to the configuration center to query recommended version information;
[0036] Obtaining the current version number of the configuration element of each function page in the current application, and matching the configuration element with the recommended version information to obtain the recommended version number;
[0037] Determine whether the current version number is the same as the recommended version number;
[0038] If the current version number is different from the recommended version number, the configuration element and the recommended version number are stored in correspondence to obtain the differential update configuration;
[0039] If the current page opened by the current application matches the page identifier, sending the differential update configuration to the resource center to query the differential configuration file;
[0040] The queried differential configuration file is downloaded from the resource center, and the current page is updated according to the differential configuration file.
[0041] In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the computer program.
[0042] In a fourth aspect, an embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, and the computer program implements the above method when executed by a processor.
[0043] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute the application update method described in any one of the above-mentioned first aspects.
[0044] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0046] Figure 1 is a flowchart of an application updating method provided by the first embodiment of the present application;
[0047] Figure 2 is a flowchart of an application updating method provided by the second embodiment of the present application;
[0048] Figure 3 is a flowchart of an application updating method provided in the third embodiment of the present application;
[0049] Figure 4 is a flowchart of an application updating method provided in a fourth embodiment of the present application;
[0050] Figure 5 is a flowchart of an application updating method provided in a fifth embodiment of the present application;
[0051] Figure 6 is a flowchart of an application updating method provided in a sixth embodiment of the present application;
[0052] Figure 7 is a structural diagram of an application update system provided in the seventh embodiment of the present application;
[0053] Figure 8 It is a structural diagram of the terminal device provided in the eighth embodiment of the present application. DETAILED DESCRIPTION
[0054] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0055] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0056] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0057] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0058] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0059] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0060] Embodiment 1
[0061] See also Figure 1 , is a flowchart of an application updating method provided in the first embodiment of the present application, comprising the steps of:
[0062] Step S10, when any application is started, obtain the application configuration summary of the current application, and send the application configuration summary to the configuration center to query the differential update configuration;
[0063] Among them, the differential update configuration carries a page identifier, and the application update method is applied to any terminal device, which can be a mobile phone, tablet, computer or wearable smart device, etc. In this step, the process information of all applications on the terminal device is monitored to determine whether the corresponding application is started.
[0064] In this step, obtaining the application configuration summary of the current application includes:
[0065] Calculate hash values of files corresponding to configuration elements on all function pages of the current application;
[0066] The name of the function page, the name of the configuration element and the calculated hash value are stored correspondingly to obtain the application configuration summary.
[0067] In this step, the process information stores the CPU information, memory information, disk information, network information, GPU information, etc. occupied by each application in the terminal device. By monitoring the fluctuations of the CPU information, memory information, disk information, network information, and GPU information, it is determined whether the corresponding application is in the startup state on the terminal device.
[0068] Preferably, in this step, the application configuration summary may store user information in the current application and page configuration data of functional pages in the current application, and the page configuration data may store version numbers of configuration elements in each functional page, and the configuration elements may include a combination of one or more of a page frame, a page title, a page content, a page column, and a page navigation bar.
[0069] Specifically, in this step, the application configuration summary is sent to the configuration center to query the content that needs to be updated for the application configuration summary to obtain the differential update configuration. For example, when the application configuration summary stores the configuration information of the function page A, the configuration information includes the version information of the page frame a, page title a, page content a and page column a. The application configuration summary is sent to the configuration center to query whether the version of the page frame a, page title a, page content a and page column a needs to be updated. When it is found that an update is needed, the differential update configuration is obtained according to the query result. Therefore, in this embodiment, by sending the application configuration summary, the configuration elements that need to be updated for the current application can be directly queried, so that targeted updates can be performed without the need to download update packages for comprehensive updates, thereby improving the efficiency of application updates.
[0070] Step S20, determining whether the current page opened by the current application matches the page identifier;
[0071] The differential update configuration stores a plurality of update information, each of which stores a page identifier, and each page identifier points to a uniquely corresponding configuration element, that is, the update information is used to trigger the update of the corresponding configuration element.
[0072] Specifically, when it is determined that a page element in the current page matches a page identifier stored in any update information in the differential update configuration, it is determined that the current page matches the page identifier.
[0073] If the current page opened by the current application does not match the page identifier stored in the update information in the differential update configuration, it is determined that there is no need to update the current page.
[0074] If the current page opened by the current application matches the page identifier, executing step S30;
[0075] Step S30, sending the difference update configuration to a resource center to query a difference configuration file;
[0076] The resource center stores the correspondence between different differential update configurations and corresponding differential configuration files, and the differential configuration files are used for updating the information of the configuration elements in the function page.
[0077] Specifically, in this step, the differential update configuration and the differential configuration file can be stored in correspondence in the form of a configuration identifier, so that when the differential update configuration is sent to the resource center for file query, the target differential configuration file can be obtained. Preferably, the configuration identifier can be stored in the form of a text identifier, a coded identifier or a digital identifier, so that the differential update configuration can correspond one-to-one with the differential configuration file, effectively improving the accuracy of the target differential configuration file query.
[0078] Step S40, downloading the queried differential configuration file from the resource center, and updating the current page according to the differential configuration file;
[0079] Among them, the resource center stores the download ports of all differential configuration files, which effectively facilitates the terminal device to download the queried differential configuration files based on the download port, and updates the design of the current page through the downloaded differential configuration files, so that only the current page needs to be updated without downloading the update information of other pages, thereby improving the efficiency of application updates.
[0080] In addition, in this step, the method further comprises:
[0081] Obtaining a locally pre-stored update whitelist, and downloading a configuration file from the resource center according to a preset configuration name in the update whitelist;
[0082] Updating the current application according to the downloaded configuration file;
[0083] The preset configuration name in the update whitelist can be set according to the demand, that is, when the current application is updated, the application can be forced to be updated in a targeted manner based on the preset configuration name.
[0084] In this embodiment, the application is updated by querying the differential update configuration and downloading the differential configuration file, so there is no need to download the update package, which effectively improves the update efficiency and accuracy of the application. By directly downloading the required differential configuration file, the download of invalid data is effectively reduced, thereby improving the efficiency of application update.
[0085] Embodiment 2
[0086] See also Figure 2 , is a flow chart of an application updating method provided in the second embodiment of the present application, comprising the steps of:
[0087] Step S11, when any application is started, the number of function pages in the current application is obtained, and a page configuration item is generated according to the number of pages;
[0088] Among them, a page information table is stored in each application, and the page information table stores the number of pages of the functional pages in the corresponding application and the number of configuration elements in each functional page. Therefore, this step queries the page information table to obtain the corresponding number of pages, and generates a corresponding number of page configuration items based on the number of pages. For example, when the number of pages of the functional pages in the current application is 3, 3 page configuration items are generated accordingly.
[0089] Step S21, associating the page configuration item with the function page, and obtaining the configuration element in the function page;
[0090] Among them, by designing the association between the page configuration item and the function page, so that there is a one-to-one correspondence between the function page and the page configuration item, the subsequent information storage and query of the page configuration item are effectively facilitated.
[0091] Step S31, generating element configuration items according to the configuration elements, and obtaining the current version number of each of the configuration elements;
[0092] The number of configuration elements under each function page in the page information table is queried, and a corresponding number of element configuration items are generated according to the number of configuration elements.
[0093] For example, function page A includes configuration element a1, configuration element a2, and configuration element a3, and page configuration item B associated with function page A, and corresponding element configuration items generated include element configuration item b1, element configuration item b2, and element configuration item b3.
[0094] Step S41, setting parameters for the element configuration item according to the current version number, and storing the set element configuration item in the page configuration item associated with the corresponding function page;
[0095] That is, in this step, the element configuration item b1, the element configuration item b2 and the element configuration item b3 after parameter setting are stored in the page configuration item B.
[0096] Step S51, generating the application configuration summary according to the page configuration item, and sending the application configuration summary to the configuration center to query the differential update configuration;
[0097] Among them, the page configuration items associated with all functional pages in the current application are packaged to generate the application configuration summary. Preferably, the differential update configuration stores multiple update information, each update information stores a page identifier, and each page identifier points to a uniquely corresponding configuration element, that is, the update information is used to trigger the update of the corresponding configuration element.
[0098] In this step, the configuration center stores the latest version numbers corresponding to all configuration elements in function pages of different applications. The configuration center determines whether the configuration element corresponding to the element configuration item needs to be updated by judging whether the current version number carried on the element configuration item is equal to the corresponding latest version number. Furthermore, when it is judged that the configuration element needs to be updated, the latest version number is stored with the configuration element to obtain the differential update configuration, and the differential update configuration is set as the query result.
[0099] Step S61, determining whether the current page opened by the current application matches the page identifier;
[0100] If the current page opened by the current application does not match the page identifier stored in the update information in the differential update configuration, it is determined that there is no need to update the current page.
[0101] If the current page opened by the current application matches the page identifier, executing step S71;
[0102] Step S71, sending the difference update configuration to a resource center to query a difference configuration file;
[0103] Step S81, downloading the queried differential configuration file from the resource center, and updating the current page according to the differential configuration file.
[0104] In this embodiment, the application is updated by querying the differential update configuration and downloading the differential configuration file, so there is no need to download the update package, which effectively improves the update efficiency and accuracy of the application. By directly downloading the required differential configuration file, the download of invalid data is effectively reduced, thereby improving the efficiency of application update.
[0105] Embodiment 3
[0106] See also Figure 3 , is a flow chart of an application updating method provided in the third embodiment of the present application, comprising the steps of:
[0107] Step S12, when any application is started, obtaining user information in the current application, and sending the user information to the configuration center to query recommended version information;
[0108] Among them, the user information stores a user identifier, which can be a user account, user name, user contact information or user biometrics. Preferably, the user contact information can be a mobile phone number or an email address, and the user biometrics can be a fingerprint feature, facial feature, voiceprint feature or pupil feature, etc.
[0109] Specifically, the configuration center stores the correspondence between different user information and the corresponding recommended version information. Therefore, by sending the user information to the configuration center to query the corresponding recommended version information, different versions of the same application can be recommended for different users. For example, the recommended version information queried in the configuration center for the user information of ordinary users and member users is different.
[0110] Step S22, obtaining the current version number of the configuration element of each function page in the current application, and matching the configuration element with the recommended version information to obtain the recommended version number;
[0111] The recommended version information stores the recommended version numbers corresponding to the configuration elements of all function pages in the current application. Therefore, the configuration element is matched with the recommended version information to obtain the corresponding recommended version number.
[0112] Step S32, determining whether the current version number is the same as the recommended version number;
[0113] If the current version number is the same as the recommended version number, it is determined that the version of the configuration element corresponding to the current version number is the latest version, and there is no need to update the configuration element.
[0114] If the current version number is different from the recommended version number, executing step S42;
[0115] Step S42, storing the configuration element and the recommended version number in correspondence to obtain the differential update configuration;
[0116] Wherein, the differential update configuration carries a page identifier;
[0117] Step S52, determining whether the current page opened by the current application matches the page identifier;
[0118] If the current page opened by the current application matches the page identifier, executing step S62;
[0119] Step S62, sending the difference update configuration to the resource center to query the difference configuration file;
[0120] Step S72, downloading the queried differential configuration file from the resource center, and updating the current page according to the differential configuration file;
[0121] In this embodiment, the application is updated by querying the differential update configuration and downloading the differential configuration file, so there is no need to download the update package, which effectively improves the update efficiency and accuracy of the application. By directly downloading the required differential configuration file, the download of invalid data is effectively reduced, thereby improving the efficiency of application update.
[0122] Embodiment 4
[0123] See also Figure 4 , is a flowchart of an application updating method provided in a fourth embodiment of the present application, comprising the steps of:
[0124] Step S13, when any application is started, obtain the application configuration summary of the current application, and send the application configuration summary to the configuration center to query the differential update configuration;
[0125] Wherein, the differential update configuration carries a page identifier;
[0126] Step S23, determining whether the continuous display time of the current page in the current application is greater than a time threshold;
[0127] When a page is switched on the current application, the current page after the switch is timed to obtain a continuous display time, and by judging whether the continuous display time is greater than a time threshold, it is determined whether the current page needs to be updated.
[0128] If the continuous display time of the current page is less than or equal to the time threshold, it is determined that the current page is not updated;
[0129] Specifically, when it is determined that the continuous display time of the current page is greater than the time threshold, it is determined that the user has been using the current page for a long time. Therefore, the current page needs to be updated in a timely manner to ensure the user's usage experience of the current page. Preferably, the time threshold can be set according to demand, for example, the time threshold can be set to 2 minutes, 3 minutes or 10 minutes, etc.
[0130] If the continuous display time of the current page is greater than the time threshold, execute step S33;
[0131] Step S33, obtaining the URL of the current page;
[0132] Among them, the page URLs corresponding to different function pages in the current application are different.
[0133] Step S43, determining whether the page URL matches the page identifier in the differential update configuration;
[0134] Among them, the differential update configuration stores multiple update information, each update information stores a page identifier, and each page identifier points to a unique corresponding page URL. That is, when it is determined that the page URL matches the page identifier in the differential update configuration, it is determined that there is an updated version of the function page corresponding to the page URL.
[0135] If the page URL does not match any of the page identifiers in the differential update configuration, it is determined that there is no updated version of the function page corresponding to the page URL;
[0136] If the page URL matches the page identifier, executing step S53;
[0137] Step S53, sending the differential update configuration corresponding to the matched page identifier to the resource center to query the differential configuration file;
[0138] Step S63, downloading the queried differential configuration file from the resource center, and updating the current page according to the differential configuration file;
[0139] In this embodiment, the application is updated by querying the differential update configuration and downloading the differential configuration file, so there is no need to download the update package, which effectively improves the update efficiency and accuracy of the application. By directly downloading the required differential configuration file, the download of invalid data is effectively reduced, thereby improving the efficiency of application update.
[0140] Embodiment 5
[0141] See also Figure 5 , is a flowchart of an application updating method provided in a fifth embodiment of the present application, comprising the steps of:
[0142] Step S14, when any application is started, obtain the application configuration summary of the current application, and send the application configuration summary to the configuration center to query the differential update configuration;
[0143] Wherein, the differential update configuration carries a page identifier;
[0144] Step S24, obtaining the running time of each function page of the current application within a preset time, and sorting the function pages according to the length of the running time;
[0145] Among them, the preset time can be set according to needs, for example, it can be set to one day, two days or one week, etc., by obtaining the design of the running time of each function page of the current application within the preset time, to determine the user's usage of all function pages in the current application.
[0146] Step S34, determining the function pages ranked within the first preset number of digits;
[0147] The preset number of digits can be set according to the requirements, such as 3 digits, 4 digits or 5 digits, and the function pages sorted within the first preset number of digits are marked as pages to be updated.
[0148] Specifically, in this step, the design of the function pages ranked in the first preset number of places is determined so that the function pages that are used by users for the longest time are updated first.
[0149] Step S44, determining whether the function page matches the page identifier in the differential update configuration;
[0150] The page address of each to-be-updated page may be obtained, the page address may be matched with the page identifier in the differential update configuration, and whether the corresponding to-be-updated page matches the page identifier may be determined based on the matching result.
[0151] If the determined function page matches the page identifier in the differential update configuration, executing step S54;
[0152] Step S54, sending the differential update configuration corresponding to the matched page identifier to the resource center to query the differential configuration file;
[0153] Step S64, downloading the queried differential configuration file from the resource center, and updating the current page according to the differential configuration file;
[0154] In this embodiment, the application is updated by querying the differential update configuration and downloading the differential configuration file, so there is no need to download the update package, which effectively improves the update efficiency and accuracy of the application. By directly downloading the required differential configuration file, the download of invalid data is effectively reduced, thereby improving the efficiency of application update.
[0155] Embodiment 6
[0156] See also Figure 6 , is a flowchart of an application updating method provided in a sixth embodiment of the present application, comprising the steps of:
[0157] Step S15, when any application is started, obtain the application configuration summary of the current application, and send the application configuration summary to the configuration center to query the differential update configuration;
[0158] Among them, the differential update configuration carries a page identifier, and the application update method is applied to any terminal device, which can be a mobile phone, tablet, computer or wearable smart device, etc. In this step, the process information of all applications on the terminal device is monitored to determine whether the corresponding application is started.
[0159] Step S25, obtaining the page identifier in the differential update configuration;
[0160] The differential update configuration stores a plurality of update information, each of which stores a page identifier, and each page identifier points to a uniquely corresponding configuration element, that is, the update information is used to trigger the update of the corresponding configuration element.
[0161] Step S35, judging whether the current application stores configuration information carrying the same page identifier according to the page identifier;
[0162] Among them, since each page identifier points to a uniquely corresponding configuration element, when it is determined that the page identifier stored in the differential update configuration is the same as the page identifier stored in the configuration information in the current application, it is determined that there are two versions of the configuration element pointed to by the page identifier to be updated.
[0163] If the current application stores the configuration information carrying the same page identifier, executing step S45;
[0164] Step S45, overwriting the configuration information with the queried difference update configuration;
[0165] Among them, by overwriting the configuration information with the queried differential update configuration, the queried latest version updates and overwrites the version stored in the configuration information in the current application, effectively preventing update errors in the corresponding configuration elements and improving the accuracy of application updates.
[0166] Step S55, determining whether the current page opened by the current application matches the page identifier;
[0167] If the current page opened by the current application matches the page identifier, executing step S65;
[0168] Step S65, sending the difference update configuration to the resource center to query the difference configuration file;
[0169] Step S75, downloading the queried differential configuration file from the resource center, and updating the current page according to the differential configuration file.
[0170] In this embodiment, the application is updated by querying the differential update configuration and downloading the differential configuration file, so there is no need to download the update package, which effectively improves the update efficiency and accuracy of the application. By directly downloading the required differential configuration file, the download of invalid data is effectively reduced, thereby improving the efficiency of application update.
[0171] Embodiment 7
[0172] Corresponding to the application update method described in the above embodiment, Figure 7 A schematic diagram of the structure of an application updating system 100 provided in the seventh embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0173] Reference Figure 7 The system comprises: a differential configuration query module 10, a differential configuration file query module 11 and a page update module 12, wherein:
[0174] The differential configuration query module 10 is used to obtain the application configuration summary of the current application when any application is started, and send the application configuration summary to the configuration center to query the differential update configuration, where the differential update configuration carries a page identifier.
[0175] The difference configuration query module 10 is further used to: obtain the page quantity of the function page in the current application, and generate a page configuration item according to the page quantity;
[0176] Associating the page configuration item with the function page, and obtaining the configuration element in the function page;
[0177] Generate element configuration items according to the configuration elements, and obtain the current version number of each of the configuration elements;
[0178] Setting parameters of the element configuration item according to the current version number, and storing the set element configuration item in the page configuration item associated with the corresponding function page;
[0179] The application configuration summary is generated according to the page configuration items.
[0180] Preferably, the differential configuration query module 10 is further used to: calculate hash values of files corresponding to configuration elements on all function pages of the current application;
[0181] The name of the function page, the name of the configuration element and the calculated hash value are stored correspondingly to obtain the application configuration summary.
[0182] The differential configuration file query module 11 is used to send the differential update configuration to the resource center to query the differential configuration file if the current page opened by the current application matches the page identifier.
[0183] The difference configuration file query module 11 is further used to: if the continuous display time of the current page is greater than the time threshold, obtain the page URL of the current page;
[0184] Determining whether the page URL matches the page identifier in the differential update configuration;
[0185] If the page URL matches the page identifier, the differential update configuration corresponding to the matched page identifier is sent to the resource center to query the differential configuration file;
[0186] The queried differential configuration file is downloaded from the resource center, and the current page is updated according to the differential configuration file.
[0187] Preferably, the difference configuration file query module 11 is further used to: obtain the running time of each function page of the current application within a preset time, and sort the function pages according to the length of the running time;
[0188] Determine the function page that is ranked within the first preset number of digits;
[0189] If the determined function page matches the page identifier in the differential update configuration, the differential update configuration corresponding to the matched page identifier is sent to the resource center to query the differential configuration file;
[0190] The queried differential configuration file is downloaded from the resource center, and the current page is updated according to the differential configuration file.
[0191] The page updating module 12 is used to download the queried differential configuration file from the resource center, and update the current page according to the differential configuration file.
[0192] The page update module 12 is further used to: obtain a locally pre-stored update whitelist, and download a configuration file from the resource center according to a preset configuration name in the update whitelist;
[0193] The current application is updated according to the downloaded configuration file.
[0194] In addition, in this embodiment, the application update system 100 further includes:
[0195] An application version recommendation module 13 is used to obtain user information in the current application and send the user information to the configuration center to query recommended version information;
[0196] Obtaining the current version number of the configuration element of each function page in the current application, and matching the configuration element with the recommended version information to obtain the recommended version number;
[0197] Determine whether the current version number is the same as the recommended version number;
[0198] If the current version number is different from the recommended version number, the configuration element and the recommended version number are stored in correspondence to obtain the differential update configuration;
[0199] If the current page opened by the current application matches the page identifier, sending the differential update configuration to the resource center to query the differential configuration file;
[0200] The queried differential configuration file is downloaded from the resource center, and the current page is updated according to the differential configuration file.
[0201] A configuration overlay module 14, configured to obtain the page identifier in the differential update configuration, and determine, based on the page identifier, whether the current application stores configuration information carrying the same page identifier;
[0202] If the current application stores the configuration information carrying the same page identifier, the configuration information is overwritten by the queried differential update configuration.
[0203] In this embodiment, the application is updated by querying the differential update configuration and downloading the differential configuration file, so there is no need to download the update package, which effectively improves the update efficiency and accuracy of the application. By directly downloading the required differential configuration file, the download of invalid data is effectively reduced, thereby improving the efficiency of application update.
[0204] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / modules are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0205] Figure 8 This is a schematic diagram of the structure of the terminal device 2 provided in the eighth embodiment of the present application. Figure 8 As shown, the terminal device 2 of this embodiment includes: at least one processor 20 ( Figure 8Only one processor is shown in the figure), a memory 21, and a computer program 22 stored in the memory 21 and executable on the at least one processor 20, wherein the processor 20 implements the steps in any of the above-mentioned method embodiments when executing the computer program 22.
[0206] The terminal device 2 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor 20 and a memory 21. Those skilled in the art will appreciate that Figure 8 It is only an example of the terminal device 2 and does not constitute a limitation on the terminal device 2. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0207] The processor 20 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0208] In some embodiments, the memory 21 may be an internal storage unit of the terminal device 2, such as a hard disk or memory of the terminal device 2. In other embodiments, the memory 21 may also be an external storage device of the terminal device 2, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 2. Further, the memory 21 may also include both an internal storage unit and an external storage device of the terminal device 2. The memory 21 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 21 may also be used to temporarily store data that has been output or is to be output.
[0209] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0210] An embodiment of the present application also provides a network device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor implements the steps in any of the above-mentioned method embodiments when executing the computer program.
[0211] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0212] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0213] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0214] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0215] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0216] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0217] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0218] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. An application update method, characterized in that: The method comprises: When any application is started, an application configuration summary of the current application is obtained, and the application configuration summary is sent to the configuration center to query the differential update configuration, where the differential update configuration carries a page identifier; If the current page opened by the current application matches the page identifier, the differential update configuration is sent to the resource center to query the differential configuration file; Downloading the queried differential configuration file from the resource center, and updating the current page according to the differential configuration file; The obtaining of the application configuration summary of the current application includes: Calculate hash values of files corresponding to configuration elements on all function pages of the current application; The name of the function page, the name of the configuration element and the calculated hash value are stored in correspondence to obtain the application configuration summary, wherein the application configuration summary also includes user information, and the configuration center stores the correspondence between different user information and corresponding recommended version information; After the step of sending the application configuration summary to the configuration center to query the differential update configuration, the method further includes: Obtaining the page identifier in the differential update configuration, and determining, according to the page identifier, whether the current application stores configuration information carrying the same page identifier; If the current application stores the configuration information carrying the same page identifier, the configuration information is overwritten by the queried differential update configuration.
2. The application updating method according to claim 1, characterized in that: After the step of starting any application, the method further includes: Obtaining user information of the current application, and sending the user information to the configuration center to query recommended version information; Obtaining the current version number of the configuration element of each function page in the current application, and matching the configuration element with the recommended version information to obtain the recommended version number; Determine whether the current version number is the same as the recommended version number; If the current version number is different from the recommended version number, the configuration element and the recommended version number are stored in correspondence to obtain the differential update configuration; If the current page opened by the current application matches the page identifier, sending the differential update configuration to the resource center to query the differential configuration file; The queried differential configuration file is downloaded from the resource center, and the current page is updated according to the differential configuration file.
3. The application updating method according to claim 1, characterized in that: After the step of sending the application configuration summary to the configuration center to query the differential update configuration, the method further includes: Obtaining the page URL of the current page, and determining whether the page URL matches the page identifier in the differential update configuration; If the page URL matches the page identifier, the differential update configuration corresponding to the matched page identifier is sent to the resource center to query the differential configuration file; The queried differential configuration file is downloaded from the resource center, and the current page is updated according to the differential configuration file.
4. The application updating method according to claim 1, characterized in that: The method further comprises: Obtaining a locally pre-stored update whitelist, and downloading a configuration file from the resource center according to a preset configuration name in the update whitelist; The current application is updated according to the downloaded configuration file.
5. An application update system, characterized in that: include: The differential configuration query module is used to obtain the application configuration summary of the current application when any application is started, and send the application configuration summary to the configuration center to query the differential update configuration, where the differential update configuration carries a page identifier; A differential configuration file query module is used to send the differential update configuration to a resource center to query the differential configuration file if the current page opened by the current application matches the page identifier; A page update module, used to download the queried differential configuration file from the resource center, and update the current page according to the differential configuration file; The differential configuration query module is further used to calculate the hash values of the files corresponding to the configuration elements on all function pages of the current application; the names of the function pages, the names of the configuration elements and the calculated hash values are stored in correspondence to obtain the application configuration summary, the application configuration summary also includes user information, and the configuration center stores the correspondence between different user information and the corresponding recommended version information; A configuration overlay module, used to obtain the page identifier in the differential update configuration, and determine whether the current application stores configuration information carrying the same page identifier according to the page identifier; If the current application stores the configuration information carrying the same page identifier, the configuration information is overwritten by the queried differential update configuration.
6. The application updating system according to claim 5, characterized in that: The application update system further includes: Application version recommendation module: used to obtain user information in the current application and send the user information to the configuration center to query recommended version information; Obtaining the current version number of the configuration element of each function page in the current application, and matching the configuration element with the recommended version information to obtain the recommended version number; Determine whether the current version number is the same as the recommended version number; If the current version number is different from the recommended version number, the configuration element and the recommended version number are stored in correspondence to obtain the differential update configuration; If the current page opened by the current application matches the page identifier, sending the differential update configuration to the resource center to query the differential configuration file; The queried differential configuration file is downloaded from the resource center, and the current page is updated according to the differential configuration file.
7. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 4 is implemented.
8. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
