App hot update method
By using module code packages for updates, the problem of hot updates not supporting Flutter in existing technologies is solved, enabling fast, accurate, and secure app updates and ensuring that users get the latest version in a timely manner.
Patent Information
- Application Number
- CN202410915084.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-10-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing hot update method does not support Flutter, cannot quickly resolve online bugs, and cannot notify users to update in a timely manner, which poses a risk of new problems.
Updates are performed using module code packages. By identifying the main workflow module and the hot-updateable module, the interface position and layout are parsed, HTML5 resource packages are downloaded and merged into the local machine, enabling rapid updates.
It enables rapid resolution of online bugs, improves the accuracy and security of updates, and allows for timely notification of users to update, reducing the occurrence of new problems.
Smart Images

Figure CN118778989A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer application technology, and in particular to a method for hot updating of Apps. Background Art
[0002] During the use of the App, in order to improve the user experience and meet business needs, its version will be continuously updated. Corresponding prompts need to be sent to users during updates. If the version is updated frequently, there will be too many prompts, which will affect the user experience.
[0003] Faced with rapidly changing market and business demands, Apps use low-code technology to meet the needs of rapid response. Low-code App development has many advantages, especially in rapid iteration, cost control, flexibility and popularity; for example: using a front-end low-code platform can accelerate development speed, lower development thresholds, and reduce repetitive work.
[0004] Low-code App development can better adopt hot update technology to achieve App version iteration. Hot update means dynamically sending packages. When the user opens the App, the upgrade package is downloaded directly through the Internet. There is no need to release the new version to the application market. The upgrade package is relatively small and the download speed is fast. It is more suitable for urgent bug fixes and real-time function releases (such as operational activities).
[0005] The existing hot update method has the following shortcomings:
[0006] Existing hot updates all support native code but not Flutter. In addition, current hot updates are uploaded to the server by injecting code, and then the client obtains the latest code for update. Therefore, only after it is released online can it be verified whether the latest version still has bugs. This makes it impossible to quickly resolve online bugs and new problems are prone to occur. It is impossible to notify users to update in time, and it is difficult to verify whether the discovered bugs have been successfully resolved. It is impossible to verify the overall process in context.
[0007] The information disclosed in this background technology section is only intended to deepen the understanding of the overall background technology of the present invention, and should not be regarded as acknowledging or suggesting in any form that the information constitutes the prior art already known to those skilled in the art. Summary of the invention
[0008] In view of the defects existing in the prior art, the purpose of the present invention is to provide a method for hot updating of App, which adopts the method of updating the entire module code package, can quickly solve online bugs, has better accuracy and security, is less likely to have new problems, and can notify users to update in time.
[0009] In order to achieve the above purpose, the technical solution adopted by the present invention is:
[0010] A method for hot updating of an App, characterized by comprising the following steps:
[0011] In the App project, the main process module and the hot-update module are distinguished by identification;
[0012] After the App is started, the hot-update module is determined based on the identifier, and the interface position and layout are further analyzed;
[0013] Call the hot-update module to perform update self-check to determine whether there is update content on the server side;
[0014] When there is updated content, read the configuration information on the server side;
[0015] Parse the HTML5 resource package stored on the server based on the configuration information;
[0016] The App downloads the HTML5 resource package and caches it locally;
[0017] Merge the HTML5 resource package into the App installation directory to overwrite the old resources and complete the hot update.
[0018] Based on the above technical solution, the HTML5 resource package includes at least one pre-written HTML5 project, and the HTML5 project is used to implement the required functions and interface.
[0019] Based on the above technical solution, a pre-written HTML5 project corresponds to a hot-update module.
[0020] Based on the above technical solution, the App uses WebView to load the corresponding HTML5 page in the HTML5 project to present the required functions and interface.
[0021] Based on the above technical solution, the HTML5 project is built based on webview flutter.
[0022] Based on the above technical solution, data and / or event transmission is performed between the App and the HTML5 page through the API provided by Flutter and HTML5.
[0023] Based on the above technical solution, the specific steps of the update self-check include:
[0024] Get any or all of the following data:
[0025] App version number, module version number, user id, device serial number;
[0026] Determine the binding relationship between the user and the client used by the device serial number and user ID;
[0027] After the binding relationship is verified, the App version number and module version number are used to further determine whether there is any updated content on the server.
[0028] Based on the above technical solution, the configuration information specifically includes:
[0029] HTML5 resource package name, used to distinguish different versions of resource packages;
[0030] HTML5 resource package acquisition path, used to download the corresponding HTML5 resource package;
[0031] HTML5 resource package version number, used to distinguish different versions of resource packages;
[0032] Access permissions, used to determine the user ID that can download the corresponding HTML5 resource package;
[0033] Module information is used to determine which hot-update modules are included in the HTML5 resource package.
[0034] Based on the above technical solution, the following statistical data are used to identify:
[0035] Functional modules that are stable and need to be used for a long time are marked as hot-update modules;
[0036] Functional modules corresponding to frequently updated business requirements are marked as hot-update modules.
[0037] The method for hot updating of Apps described in the present invention has the following beneficial effects:
[0038] By updating the entire module code package, online bugs can be quickly resolved, with better accuracy and security, less prone to new problems, and users can be notified to update in a timely manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The present invention has the following accompanying drawings:
[0040] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0041] Figure 1 A flowchart of a first embodiment of a method for hot updating an App according to the present invention. DETAILED DESCRIPTION
[0042] The present invention is further described in detail below in conjunction with the accompanying drawings. The detailed description is an explanation made in conjunction with the exemplary embodiments of the present invention, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0043] like Figure 1 As shown, the present invention provides a method for hot updating of App, comprising the following steps:
[0044] In the App project, the main process module and the hot-update module are distinguished by identification;
[0045] After the App is started, the hot-update module is determined based on the identifier, and the interface position and layout are further analyzed;
[0046] Call the hot-update module to perform update self-check to determine whether there is update content on the server side;
[0047] When there is updated content, read the configuration information on the server side;
[0048] Parse the HTML5 resource package stored on the server based on the configuration information;
[0049] The App downloads the HTML5 resource package and caches it locally;
[0050] Merge the HTML5 resource package into the App installation directory to overwrite the old resources and complete the hot update.
[0051] The HTML5 resource package stored on the server side is a complete module code package. Updating the entire module code package can quickly resolve online bugs, improve accuracy and security, and is less likely to cause new problems. Users can be notified to update in a timely manner.
[0052] Based on the above technical solution, the HTML5 resource package includes at least one pre-written HTML5 project, and the HTML5 project is used to implement the required functions and interface.
[0053] Exemplarily, a pre-written HTML5 project corresponds to a hot-updatable module.
[0054] Based on the above technical solution, the App uses WebView to load the corresponding HTML5 page in the HTML5 project to present the required functions and interface.
[0055] Based on the above technical solution, the HTML5 project is built based on webview flutter.
[0056] Exemplarily, data and / or event transmission is performed between the App and the HTML5 page through the API provided by Flutter and HTML5.
[0057] Based on the above technical solution, the specific steps of the update self-check include:
[0058] Get any or all of the following data:
[0059] App version number, module version number, user id, device serial number;
[0060] Determine the binding relationship between the user and the client used by the device serial number and user ID;
[0061] After the binding relationship is verified, the App version number and module version number are used to further determine whether there is any updated content on the server.
[0062] Based on the above technical solution, the configuration information specifically includes:
[0063] HTML5 resource package name, used to distinguish different versions of resource packages;
[0064] HTML5 resource package acquisition path, used to download the corresponding HTML5 resource package;
[0065] HTML5 resource package version number, used to distinguish different versions of resource packages;
[0066] Access permissions, used to determine the user ID that can download the corresponding HTML5 resource package;
[0067] Module information is used to determine which hot-update modules are included in the HTML5 resource package.
[0068] Based on the above technical solution, the following statistical data are used to identify:
[0069] Functional modules that are stable and need to be used for a long time are marked as hot-update modules;
[0070] Functional modules corresponding to frequently updated business requirements are marked as hot-update modules.
[0071] The contents not described in detail in this specification belong to the prior art known to professional and technical personnel in this field.
[0072] The above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiment. Any equivalent modifications or changes made by those skilled in the art based on the contents disclosed by the present invention should be included in the protection scope recorded in the claims.
Claims
1. A method for hot updating of an App, characterized in that: The steps include: In the App project, the main process module and the hot-update module are distinguished by identification; After the App is started, the hot-update module is determined based on the identifier, and the interface position and layout are further analyzed; Call the hot-update module to perform update self-check to determine whether there is update content on the server side; When there is updated content, read the configuration information on the server side; Parse the HTML5 resource package stored on the server based on the configuration information; The App downloads the HTML5 resource package and caches it locally; Merge the HTML5 resource package into the App installation directory to overwrite the old resources and complete the hot update.
2. The method for hot updating of App according to claim 1, characterized in that: The HTML5 resource package includes at least one pre-written HTML5 project, and the HTML5 project is used to implement the required functions and interface.
3. A method for hot updating of App as claimed in claim 2, characterized in that: A pre-written HTML5 project corresponds to a hot-updatable module.
4. The method for hot updating of App according to claim 1, characterized in that: App uses WebView to load the corresponding HTML5 page in the HTML5 project to present the required functions and interface.
5. The method for hot updating of App according to claim 1, characterized in that: The HTML5 project is built based on webview flutter.
6. The method for hot updating of App according to claim 5, characterized in that: Data and / or events are transmitted between the App and the HTML5 page through the API provided by Flutter and HTML5.
7. The method for hot updating of App according to claim 1, characterized in that: The specific steps of the update self-check include: Get any or all of the following data: App version number, module version number, user id, device serial number; Determine the binding relationship between the user and the client used by the device serial number and user ID; After the binding relationship is verified, the App version number and module version number are used to further determine whether there is any updated content on the server.
8. The method for hot updating of App according to claim 1, characterized in that: The configuration information specifically includes: HTML5 resource package name, used to distinguish different versions of resource packages; HTML5 resource package acquisition path, used to download the corresponding HTML5 resource package; HTML5 resource package version number, used to distinguish different versions of resource packages; Access permissions, used to determine the user ID that can download the corresponding HTML5 resource package; Module information is used to determine which hot-update modules are included in the HTML5 resource package.
9. The method for hot updating of App according to claim 1, characterized in that: Based on the following statistical data identification: Functional modules that are stable and need to be used for a long time are marked as hot-update modules; Functional modules corresponding to frequently updated business requirements are marked as hot-update modules.
Citation Information
Cited By
Multi-terminal cross-platform developed mobile office management system hot update method and system
CN119473366A
