A hot update method for mobile applications based on multiple servers
By registering user server information on the intermediary server and generating an update key, the problem of inconsistency between mobile applications and multi-server versions is solved, automatic updates and version synchronization are achieved, the release cycle is reduced and the risk of version differences is avoided.
Patent Information
- Application Number
- CN201811546765.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-12-18
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2038-12-18
AI Technical Summary
In the ERP software industry, the problem of inconsistency between mobile applications and multiple server versions leads to mismatch between front-end and back-end versions, causing serious problems.
By registering the name, address and version information of the user server with the intermediary server, generating an update key and binding it to the update package, and uploading it on the hot update server, the mobile client downloads and installs the update package to synchronize the server version, solving the problem The problem of inconsistent versions of multiple servers.
Automatic updates of mobile applications are achieved, reducing release cycles and avoiding the risks of version differences without the need to rebuild binaries or redistribute them.
Smart Images

Figure CN109491692B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic information technology, and in particular to a mobile application hot update method based on multiple servers. Background Art
[0002] Currently, mobile applications are divided into two major platforms, iOS and Android, which need to be written in different languages. The open source community has launched the ReactNative framework after long-term development and contribution, which allows developers to write applications for both platforms using only JavaScript. The native code will parse the logic of the JavaScript code and dynamically render native components. JavaScript can be compiled and compressed into a file stored in the mobile application, and it can be replaced at any time through a variety of channels to achieve the purpose of updating.
[0003] In the actual application of the ERP software industry, an ERP software may be installed on different servers. The software can be accessed by entering the server address in the browser on the PC, while the corresponding mobile application usually requires entering the server address before normal use. However, this method has disadvantages. If the software installed on one of the servers is not updated, but the mobile application is updated, there will be a serious problem of inconsistency between the front-end and back-end versions. Summary of the invention
[0004] The purpose of the present invention is to provide a multi-server-based mobile application hot update method to solve the technical problem of the asynchronism between the mobile application and the multi-server versions proposed in the above background technology.
[0005] To achieve the above object, the present invention provides the following technical solution: a mobile application hot update method based on multiple servers, characterized in that the steps are as follows:
[0006] The mobile application uses a single intermediary server to connect to multiple user servers. The intermediary server registers the names, addresses, and version information of all user servers.
[0007] Generate an update key for the server program version number, bind the update package to the key, and upload it to the hot update server. The mobile client can obtain the latest update package that matches it based on the update key.
[0008] The mobile application downloads and installs the update package on the hot update server and synchronizes it with the server version.
[0009] Preferably, in step 1, the server used by users in different regions is located at different physical addresses, and the mobile application is deployed as a client on the user's mobile device.
[0010] Preferably, step 2 uses the MD5 encryption algorithm to encrypt the server version number to obtain an update key, and uses the key to upload the update package to the hot update server. If the update package has been uploaded using the key before, the new update package will replace the old update package.
[0011] Preferably, the step 3 deploys the mobile application update directly to the mobile devices of its users. The hot update server is a central repository that supports developers to publish hot updates on it, so there is no need to rebuild the binary files of the mobile application or redistribute the binary files in the application store.
[0012] Compared with the prior art, the beneficial effects of the present invention are: the mobile application hot update method based on multiple servers: since users are distributed on different servers, after the mobile application is started, it sends a login request to the intermediary server, obtains the user server version information and update key that matches it, compares it in depth with all available update packages, and uses the update key to download and automatically install the corresponding update package. The present invention solves the problem of a single client corresponding to multiple servers, reduces the cycle of mobile application releases, and avoids the risks brought by version differences. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 A schematic diagram of a process flow of an embodiment of a method for hot updating a mobile application program of the present invention;
[0014] Figure 2 This is a flow chart of the mobile application hot update of the present invention. DETAILED DESCRIPTION
[0015] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0016] See also Figure 1-2 The present invention provides a technical solution: a mobile application hot update method based on multiple servers:
[0017] Reference Figure 1 , Figure 1 A schematic diagram of a process flow of an embodiment of a method for hot updating a mobile application program of the present invention;
[0018] In this embodiment, the method includes:
[0019] Step S1, the software server needs to first synchronize the user's mobile phone number, software version and network address to the intermediary server to achieve the purpose of registering the user server with the intermediary server;
[0020] Step S2: After the developer has routinely maintained the front-end program, the developer compiles and compresses the program to obtain a JavaScript update package, wherein each JavaScript update package has a string of feature codes, which can be obtained by calculating the update package using the MD5 algorithm;
[0021] Step S3, using the MD5 encryption algorithm to obtain a 64-bit update key according to the latest version number of the current server;
[0022] Step S4, bundling the update key and the JavaScript update package and uploading them to the hot update server;
[0023] Specifically, if the update key has been previously bound to another update package, it is replaced;
[0024] Step S5, taking a user of a certain server as an example, the user uses his mobile phone number and verification code to log in to the mobile application, the mobile application requests the intermediary server, and the intermediary server returns the update key corresponding to the server where the user is located;
[0025] Step S6, the mobile application sends the update key obtained in step S5 and the feature code of the JavaScript package currently in use to the hot update server as parameters of a dynamic update request;
[0026] Step S7, the hot update server receives the request and returns the update package download path;
[0027] Specifically, the hot update server will first retrieve the latest JavaScript update package through the update key, and compare the feature code of the update package with the feature code in the received parameter. If they are inconsistent, the download path of the latest update package is returned, otherwise it returns nothing;
[0028] Step S8, receiving the download path, downloading the update package, replacing the JavaScript package currently in use locally, and re-rendering the local program;
[0029] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A mobile application hot update method based on multiple servers, characterized in that: Here are the steps: (1) The mobile application uses a single intermediary server to connect to multiple user servers. The software server needs to synchronize the user's mobile phone number, software version and network address to the intermediary server in order to register the user server with the intermediary server. The mobile application and the server program correspond to each other. (2) Generate an update key for the server program version number, bind the update package to the key, and upload it to the hot update server. The mobile client can obtain the latest update package that matches it based on the update key; Use the MD5 encryption algorithm to encrypt the server program version number to obtain the update key, and use the key to upload the update package to the hot update server. If the update package has been uploaded with this key before, the new update package will replace the old one. (3) The mobile application downloads and installs the update package on the hot update server and synchronizes it with the server version; The user logs into the mobile app using his mobile phone number and verification code. The mobile app requests the intermediary server, which returns the update key corresponding to the server where the user is located. The mobile application sends the acquired update key and the feature code of the JavaScript package currently in use to the hot update server as parameters of a dynamic update request; The hot update server receives the request and returns the download path of the update package. The hot update server first retrieves the latest JavaScript update package through the update key in the received parameter, and compares the feature code of the update package with the feature code in the received parameter. If they are inconsistent, the download path of the latest update package is returned, otherwise it returns nothing. Receive the download path, download the update package, and after the download is complete, replace the JavaScript package currently in use locally and re-render the local program.
2. The method for hot updating a mobile application based on multiple servers according to claim 1, characterized in that: In step 1, the servers used by users in different regions are located at different physical addresses, and the mobile application is deployed as a client on the user's mobile device.
3. The method for hot updating a mobile application based on multiple servers according to claim 1, characterized in that: The step 3 deploys the mobile application update directly to its users' mobile devices.
4. The method for hot updating a mobile application based on multiple servers according to claim 1, characterized in that: The hot update server is a central repository that supports developers in publishing hot updates, so there is no need to rebuild the binaries of the mobile application or redistribute them in the app store.
Citation Information
Patent Citations
Method and system upgrading application program automatically
CN103067484A
Hot update method, client and server
CN106789249A
