CN110096295A - The hot update method and system of multimode mobile application based on ReactNative - Google Patents
The hot update method and system of multimode mobile application based on ReactNative Download PDFInfo
- Publication number
- CN110096295A CN110096295A CN201910379464.0A CN201910379464A CN110096295A CN 110096295 A CN110096295 A CN 110096295A CN 201910379464 A CN201910379464 A CN 201910379464A CN 110096295 A CN110096295 A CN 110096295A
- Authority
- CN
- China
- Prior art keywords
- jsbundle
- reactnative
- module
- server
- mobile application
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The present invention discloses the hot update method and system of a kind of multimode mobile application based on ReactNative.In the method, client can be directed to different ReactNative modules, hot update is carried out using local cache file or built-in file, even if the reasons such as network cause module resource to obtain failure, also resource file nearest in available caching carries out interface data rendering, server end can be according to the request of client, accurately more new resources are issued for module, the version updating of App can be more rapidly performed by, solved the problems, such as on line in time, allow user that can experience the function of new version App without re-downloading new version.
Description
Technical field
The present invention relates to network technique field more particularly to a kind of multimode mobile applications based on ReactNative
Hot update method and system.
Background technique
Mobile Internet, which exactly combines both mobile communication and internet, to be integrally formed, and refers to the skill of internet
Art, platform, business model and application are in conjunction with mobile communication technology and the movable general name practiced.In current mobile Internet
Epoch, mobile application are almost faced with the problem as applying with Web, i.e., the convergence of not cross-platform, version is slow, can not repair in time
On line problem, Requirement Iteration slowly etc..But mobile application can't change into completely Web application, so the mobilism of App just at
A kind of trend.There are many kinds of the schemes of the mobilism of App, and ReactNative is then very representative one kind.In order to more
It is rapidly performed by the version updating of App, solves the problems, such as on line in time, allow user that can experience new edition without re-downloading new version
The function of this App needs the hot update method and system that propose a kind of multimode mobile application based on ReactNative.
Summary of the invention
The present invention provides the hot update method and system of a kind of multimode mobile application based on ReactNative, can
It is more rapidly performed by the version updating of App, solves the problems, such as on line in time, user can experience without re-downloading new version
The function of new version App.
In a first aspect, the present invention provides a kind of hot update method of multimode mobile application based on ReactNative, answer
For client, described method includes following steps:
Into the ReactNative module of mobile application;
Load the jsbundle file and resource file of the mobile application;
According to the jsbundle file and resource file, the heat of the ReactNative module is requested more to server
New configuration information, it includes following parameter that the heat, which updates configuration information: module unique identification, application version number, jsbundle edition
This number and jsbundle Md5 value;
It receives the heat that server returns and updates configuration information;
The downloading that configuration information carries out hot more new resources is updated according to the heat;
Decompress the hot more new resources;
The heat after decompression is updated into caching resource into the sandbox path of the mobile application.
With reference to first aspect, the first in first aspect can load the mobile application in realization mode
Jsbundle file and resource file include:
Detect whether be cached in the sandbox of the mobile application ReactNative module jsbundle file and
Resource file;
If being cached with the jsbundle file and resource of the ReactNative module in the sandbox of the mobile application
File loads the jsbundle file and resource file of caching;
If not caching the jsbundle file and money of the ReactNative module in the sandbox of the mobile application
Source file loads jsbundle file and resource file built-in in the mobile application.
With reference to first aspect, in second of achievable mode of first aspect, load caching jsbundle file and
Resource file includes:
By the file copy of the ReactNative module into currentReadedModule file;
File path after returning to copy;
Jsbundle file and resource file in file path after reading the copy include carrying out interface rendering.
With reference to first aspect, the third in first aspect can be in realization mode, by the hot more new resources after decompression
After being cached in the sandbox path of the mobile application, the method also includes:
Identify whether the ReactNative module needs to force to update;
If the ReactNative module needs to force to update, refresh the ReactNative module.
With reference to first aspect the third can realize mode, in the 4th kind of achievable mode of first aspect, refresh institute
Stating ReactNative module includes:
The request of refresh page is uploaded to server, carries required parameter in the request of the refresh page, so that
Server, which inquires the data generated during not refreshing according to the required parameter and mends, passes data, during not refreshing described in judgement
Whether the data volume that the data of generation and mending pass data exceeds preset maximum amount of data, it is described do not refresh during the number that generates
When according to mending the data volume for passing data beyond preset maximum amount of data, taken to client returned data and in the data of return
There are also more multidata marks for band;
Receive the data that server returns;
The mark in data returned according to server, judges whether there is more data and does not pass back;
If there is more data are not passed back, according to the earliest generation time for the data that server returns, local cache is removed
In all data more early than the earliest generation time;
By remaining data buffer storage in local data base;
Refresh display interface.
The 4th kind of achievable mode with reference to first aspect, in the 5th kind of achievable mode of first aspect, the side
Method further include:
It is uploaded to server and loads more multidata request, carried client in the more multidata request of load and work as
Front interface shows the earliest time of origin in data, so that server finds out the number than the earliest time of origin earlier
According to client will be back to than the data of the earliest time of origin earlier;
Receive the earliest data of time of origin earlier described in the ratio that server returns;
It will be than in earliest time of origin data buffer storage local data base earlier;
Refresh display interface.
Second aspect, the present invention provide a kind of hot update method of multimode mobile application based on ReactNative, answer
For server, described method includes following steps:
The request that hot update is carried out to the configuration information of mobile application ReactNative module that client uploads is received,
Following parameter: module unique identification, application version number, jsbundle version number is carried in the request that the heat updates, and
The Md5 value of jsbundle;
According to the module unique identification, the newest resource that is enabled in the database of query service device;
Recognize whether the newest resource;
If there is no the newest resource, request failure information is returned to client;
If there is the newest resource, judge whether the application version number carried in the request is greater than or equal to service
The application version number being currently configured in the database of device;
If the application version number carried in the request is answered more than or equal to what is be currently configured in the database of server
With version number, the configuration for the mobile application ReactNative module being currently configured in the database for returning to server to client
Information, so that client carries out hot update to the configuration information of mobile application ReactNative module.
In conjunction with second aspect, the first in second aspect can be in realization mode, if the application carried in the request
Version number judges to carry in the request not greater than or equal to the application version number that is currently configured in the database of server
Whether jsbundle version number is greater than or equal to the jsbundle version number being currently configured in the database of server;
It is currently configured if the jsbundle version number carried in the request is greater than or equal in the database of server
Jsbundle version number, return to the mobile application ReactNative mould that is currently configured in the database of server to client
The configuration information of block, so that client carries out hot update to the configuration information of mobile application ReactNative module.
The first in conjunction with second aspect can realize mode, in second of achievable mode of second aspect, if institute
The jsbundle version number carried in request is stated not greater than or equal to the jsbundle version being currently configured in the database of server
This number, judges whether the Md5 value of the jsbundle carried in the request is greater than or equal in the database of server and currently match
The Md5 of the jsbundle set;
It is currently configured if the Md5 value of the jsbundle carried in the request is greater than or equal in database
The Md5 value of jsbundle, the mobile application ReactNative module being currently configured into the database of client return server
Configuration information so that client carries out hot update to the configuration information of mobile application ReactNative module;
If the Md5 value of the jsbundle carried in the request is not greater than or equal in the database of server and currently matches
The Md5 value of the jsbundle set, the mobile application ReactNative being currently configured into the database of client return server
The configuration information of module, so that client does not carry out hot update to the configuration information of mobile application ReactNative module.
The third aspect, the present invention provide a kind of hot more new system of multimode mobile application based on ReactNative, institute
The system of stating includes client and server;
The client loads the mobile application for entering the ReactNative module of mobile application
Jsbundle file and resource file, according to the jsbundle file and resource file, to described in server request
The heat of ReactNative module updates configuration information, and it includes following parameter that the heat, which updates configuration information: module unique identification,
The Md5 value of application version number, jsbundle version number and jsbundle receives the heat that server returns and updates configuration information,
The downloading that configuration information carries out hot more new resources is updated according to the heat, the hot more new resources are decompressed, described in after decompression
Heat updates caching resource into the sandbox path of the mobile application;
The server, for receive client upload the configuration information to mobile application ReactNative module into
The request that row heat updates carries following parameter in the request that the heat updates: module unique identification, application version number,
The Md5 value of jsbundle version number and jsbundle, according to the module unique identification, in the database of query service device
The newest resource enabled, recognizes whether the newest resource, if there is no the newest resource, asks to client return
Failure information is sought, if there is the newest resource, judges whether the application version number carried in the request is greater than or equal to
The application version number being currently configured in the database of server, if the application version number carried in the request is greater than or equal to
The application version number being currently configured in the database of server, the shifting being currently configured into the database of client return server
The dynamic configuration information using ReactNative module, so that configuration information of the client to mobile application ReactNative module
Carry out hot update.
From the above technical scheme, a kind of multimode mobile application based on ReactNative provided by the invention
Hot update method and system, client can be directed to different ReactNative modules, utilize local cache file or built-in text
Part carries out hot update, even if the reasons such as network cause module resource to obtain failure, also resource nearest in available caching is literary
Part carries out interface data rendering, and server end accurately can issue more new resources according to the request of client for module, can
It is more rapidly performed by the version updating of App, solves the problems, such as on line in time, user can experience without re-downloading new version
The function of new version App.
Detailed description of the invention
In order to illustrate more clearly of technical solution of the present invention, letter will be made to attached drawing needed in the embodiment below
Singly introduce, it should be apparent that, for those of ordinary skills, without any creative labor,
It is also possible to obtain other drawings based on these drawings.
Fig. 1 is one embodiment of hot update method of the multimode mobile application provided by the invention based on ReactNative
Flow chart.
Fig. 2 is the flow chart of step S102.
Fig. 3 is the flow chart of step S202.
Fig. 4 is that hot update method one kind of the multimode mobile application provided by the invention based on ReactNative can be real
The flow chart of existing mode.
Fig. 5 is the hot update method refresh page of the multimode mobile application provided by the invention based on ReactNative
Flow chart.
Fig. 6 is that the hot update method load of the multimode mobile application provided by the invention based on ReactNative is more
The flow chart of data.
Fig. 7 is another implementation of hot update method of the multimode mobile application provided by the invention based on ReactNative
The flow chart of example.
Fig. 8 is the schematic diagram of the hot more new system of the multimode mobile application provided by the invention based on ReactNative.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with the specific embodiment of the invention and
Technical solution of the present invention is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the present invention one
Section Example, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not doing
Every other embodiment obtained under the premise of creative work out, shall fall within the protection scope of the present invention.Below in conjunction with attached drawing,
The technical solution that each embodiment that the present invention will be described in detail provides.
Referring to Fig. 1, for a kind of hot update side of the multimode mobile application based on ReactNative provided by the invention
The flow chart of the first embodiment of method, this method can be applied to the base in the client to operation iOS, Android operation system
Hot update is carried out in the App of ReactNative multimode.
In the present embodiment, the heat is updated aiming at demand or bug, updates the resources such as application code and picture
File allows user under the premise of not having to update new version, uses latest edition function.ReactNative module can incite somebody to action
All JS codes and picture are compressed into a jsbundle file and a resource file according to platform.And under multimode
ReactNative application, then can generate the respective file of disparate modules.Server is responsible for managing these files, and according to visitor
Passed parameter is requested at family end, and the heat for issuing respective modules updates configuration.Configuration information of the client according to return, downloading update mould
The newest resource data of block, client specifically can be smart phone.When client needs heat to update some module of App, then need
Consider that module release, data buffer storage, heat update configuration acquisition and last Refresh Data etc..
A kind of hot update method of multimode mobile application based on ReactNative provided by the invention, specifically can be with
Include the following steps:
Step S101, into the ReactNative module of mobile application.
Step S102 loads the jsbundle file and resource file of the mobile application.
As shown in Fig. 2, loading the jsbundle file of the mobile application and resource file can specifically include:
Step S201 is detected and whether is cached with the ReactNative module in the sandbox of the mobile application
Jsbundle file and resource file.
Step S202, if being cached with the jsbundle of the ReactNative module in the sandbox of the mobile application
File and resource file load the jsbundle file and resource file of caching.
Step S203, if not caching the ReactNative module in the sandbox of the mobile application
Jsbundle file and resource file load jsbundle file and resource file built-in in the mobile application, such as ipa
Or jsbundle file and resource file built in the mobile application of apk format, so that even if the reasons such as network cause mould
Block resource acquisition failure, also resource file nearest in available caching carries out interface data rendering.
As shown in figure 3, further, the jsbundle file and resource file for loading caching can specifically include:
Step S301, by the file copy of the ReactNative module into currentReadedModule file.
Step S302, the file path after returning to copy.
Step S303, jsbundle file and resource file in the file path after reading the copy include carrying out boundary
Face rendering.The purpose for the arrangement is that avoiding reading while write situations such as operating certain module file, causing file entanglement, deadlock.
Step S103 requests the ReactNative mould to server according to the jsbundle file and resource file
The heat of block updates configuration information, and it includes following parameter that the heat, which updates configuration information: module unique identification (English: Module
Id), application version number (English: App Version), jsbundle version number (English: Package Version), and
Whether the Md5 value (English: Package Md5) of jsbundle, service business device return to the configuration of the module according to parameter, include
Need the information such as update.
Step S104 receives the heat that server returns and updates configuration information.
Step S105 updates the downloading that configuration information carries out hot more new resources according to the heat.
Step S106 decompresses the hot more new resources.
Specifically, if decompression is failed, remaining file can be removed.
The heat after decompression is updated caching resource into the sandbox path of the mobile application by step S107.
Specifically, in the present embodiment, the document directory structure of caching can be such that firstly, being under iOS operating system
Library catalogue is files catalogue under Android operation system.It include app under Library catalogue or files catalogue
Name, i.e. application name catalogue.It include the catalogues such as 001,002, the catalogue of module I D under app name catalogue.001, the catalogues such as 002
Under separately include assets, the i.e. resources such as picture.Jsbundle, that is, the code file compressed.And config, i.e. resource are matched
Confidence breath.And under Library catalogue or files catalogue also include currentReadedModule catalogue, for storing
The resource of reading.
Referring to Fig. 4, the heat after decompression is updated caching resource described in an optional embodiment of the invention
After in the sandbox path of mobile application, the method can also include:
Step S401, identifies whether the ReactNative module needs to force to update.
Step S402 refreshes the ReactNative module if the ReactNative module needs to force to update.
As shown in figure 5, refreshing the ReactNative module can specifically include:
Step S501 uploads the request of refresh page to server, and request ginseng is carried in the request of the refresh page
Number, so that server, which inquires the data generated during not refreshing according to the required parameter and mends, passes data, described in judgement
Whether the data volume that the data and benefit generated during not refreshing pass data exceeds preset maximum amount of data, does not refresh the phase described
Between the data that generate and when mending the data volume for passing data beyond preset maximum amount of data, to client returned data and returning
Data in carry there are also more multidata mark.
Specifically, client, which generally pulls down, refreshes or refreshes when entering the page for the first time.The parameter that client uploads can
To include maximum unique orderly incremental field value in time of origin and local cache data earliest in local cache data.
It does not upload time of origin earliest in local cache data if not caching, does not upload this if the event not cached
The data cached middle maximum unique orderly incremental field value in ground.
Server is after the parameter for receiving client upload, and can inquiring data time of origin, to be later than client incoming
Earliest time of origin, and maximum is uniquely orderly passed in the local cache data that uniquely orderly incremental field value is passed to greater than client
Increase the analog value of field value, if the data of these analog values inquired, more than the maximum data item number of agreement, server returns
It returns in parameter and gives also more multidata mark.
Step S502 receives the data that server returns.
Step S503, the mark in data returned according to server, judges whether there is more data and does not pass back.
Step S504, according to the earliest generation time for the data that server returns, is removed if there is more data are not passed back
All data more early than the earliest generation time in local cache.Other data are normally shown.If not without more data
It passes back, is then shown on interface according to the generation time of data from evening to early.
Step S505, by remaining data buffer storage in local data base.
Step S506 refreshes display interface.
Further, referring to Fig. 6, when the method can also include the steps that loading more data:
Step S601 is uploaded to server and is loaded more multidata request, is carried in the more multidata request of load
There is client current interface to show the earliest time of origin in data, so that server is found out than the earliest time of origin
Data earlier will be back to client than the data of the earliest time of origin earlier.
Specifically, client generally pulls up and loads more data.
Step S602 receives the earliest data of time of origin earlier described in the ratio that server returns.
Step S603, will be than in earliest time of origin data buffer storage local data base earlier.
Step S604 refreshes display interface.
In addition, a set of visual front-end operations interface (the H5 page) can be achieved in the present invention, resource, parameter can be added
It can arrangement.Interface is uploaded according to resource, realizes that the resource of different application disparate modules uploads management.Wherein, configurable ginseng
Number it is as follows: resource type (respective modules id), title (application version number), description (jsbundle version number), version, it is minimum fit
The application version matched, platform (iOS/Android), whether force to update, whether resource packet (zip file) and resource enable.
Visual operation interface simplifies the upload process of hot more new resources.Test, operation all can be according to can fill according to demand
Configuration parameter carries out the upload of file.Meanwhile can also be configured user right, it is convenient that file progress operational administrative is updated to heat.
Referring to Fig. 7, being a kind of hot update method of multimode mobile application based on ReactNative, it is applied to clothes
Business device, the method may include following steps:
Step S701 receives the configuration information to mobile application ReactNative module that client uploads and carries out heat more
New request, it is described heat update request in carry following parameter: module unique identification, application version number, jsbundle version
Number and jsbundle Md5 value.
Step S702, according to the module unique identification, the newest resource that is enabled in the database of query service device.
Step S703 recognizes whether the newest resource.If there is no the newest resource, returned to client
Request failure information.
If there is the newest resource, S704 is thened follow the steps, judges that the application version number carried in the request is
The application version number being currently configured in the no database more than or equal to server.
Step S704, if the application version number carried in the request is greater than or equal in the database of server currently
The application version number of configuration executes step S707, the mobile application being currently configured in the database for returning to server to client
The configuration information of ReactNative module, so that client carries out heat to the configuration information of mobile application ReactNative module
It updates.
If the application version number that carries in the request in the database of server not greater than or equal to being currently configured
Application version number then executes and executes step S705, judges whether the jsbundle version number carried in the request is greater than or waits
The jsbundle version number being currently configured in the database of server.
It is currently configured if the jsbundle version number carried in the request is greater than or equal in the database of server
Jsbundle version number, execute step S707, return to the mobile application that is currently configured in the database of server to client
The configuration information of ReactNative module, so that client carries out heat to the configuration information of mobile application ReactNative module
It updates.
If the jsbundle version number carried in the request is not greater than or equal in the database of server and currently matches
The jsbundle version number set, then execute execute step S706, judge the jsbundle carried in the request Md5 value whether
More than or equal to the Md5 value for the jsbundle being currently configured in the database of server.
It is currently configured if the Md5 value of the jsbundle carried in the request is greater than or equal in database
The Md5 value of jsbundle executes step S707, the mobile application being currently configured in the database for returning to server to client
The configuration information of ReactNative module, so that client carries out heat to the configuration information of mobile application ReactNative module
It updates.
If the Md5 value of the jsbundle carried in the request is not greater than or equal in the database of server and currently matches
The Md5 value of the jsbundle set, thens follow the steps S708, the movement being currently configured in the database for returning to server to client
Using the configuration information of ReactNative module, so that client is not to the configuration information of mobile application ReactNative module
Carry out hot update.
Referring to Fig. 8, the present invention also provides a kind of, the hot of the multimode mobile application based on ReactNative updates system
System, the system comprises clients 81 and server 82.
Client 81 is used for the ReactNative module into mobile application, loads the jsbundle file of mobile application
And resource file updates configuration to the heat of server request ReactNative module according to jsbundle file and resource file
Information, it includes following parameter that heat, which updates configuration information: module unique identification, application version number, jsbundle version number, and
The Md5 value of jsbundle receives the heat update configuration information that server returns, updates configuration information according to heat and carry out heat update money
The downloading in source decompresses hot more new resources, and the heat after decompression is updated caching resource into the sandbox path of mobile application.
The configuration information to mobile application ReactNative module that server 82 is used to receive client upload carries out heat
The request of update, heat update request in carry following parameter: module unique identification, application version number, jsbundle version number,
And the Md5 value of jsbundle, according to module unique identification, the newest resource enabled in the database of query service device, identification
With the presence or absence of newest resource, if there is no newest resource, request failure information is returned to client, if there is newest money
Whether source judges the application version number carried in request more than or equal to the application version being currently configured in the database of server
Number, if the application version number carried in request is greater than or equal to the application version number being currently configured in the database of server,
The configuration information for the mobile application ReactNative module being currently configured in the database for returning to server to client, so that
Client carries out hot update to the configuration information of mobile application ReactNative module.
In conclusion hot update method under a kind of multimode based on ReactNative provided in an embodiment of the present invention and
System, client can be directed to different ReactNative modules, carry out heat more using local cache file or built-in file
Newly, even if the reasons such as network cause module resource to obtain failure, also resource file nearest in available caching carries out interface
Data render, server end accurately can issue more new resources according to the request of client for module, can more quickly
It carries out the version updating of App, solve the problems, such as on line in time, allow user that can experience new version App without re-downloading new version
Function.Also, the heat of module updates rule and is safeguarded by server, can change rule in real time according to demand.It also achieves visual
The upload interface of change facilitates the process of resource upload, operates heat convenient for manager and updates file.
The embodiment of the present invention also provides a kind of storage medium, and the embodiment of the present invention also provides a kind of storage medium, described to deposit
Computer program is stored in storage media, the computer program realizes provided by the invention be based on when being executed by processor
Step some or all of in each embodiment of hot update method under ReactNative multimode.The storage medium can
For magnetic disk, CD, read-only memory (English: Read-OnlyMemory, abbreviation: ROM) or random access memory (English
Text: RandomAccessMemory, referred to as: RAM) etc..
It is required that those skilled in the art can be understood that the technology in the embodiment of the present invention can add by software
The mode of general hardware platform realize.Based on this understanding, the technical solution in the embodiment of the present invention substantially or
Say that the part that contributes to existing technology can be embodied in the form of software products, which can deposit
Storage is in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are used so that computer equipment (can be with
It is personal computer, server or the network equipment etc.) execute certain part institutes of each embodiment of the present invention or embodiment
The method stated.
Same and similar part may refer to each other between each embodiment in this specification.Especially for being based on
For heat under ReactNative multimode updates system embodiment, since it is substantially similar to the method embodiment, so description
It is fairly simple, related place is referring to the explanation in embodiment of the method.
Invention described above embodiment is not intended to limit the scope of the present invention..
Claims (10)
1. a kind of hot update method of the multimode mobile application based on ReactNative, is applied to client, feature exists
In described method includes following steps:
Into the ReactNative module of mobile application;
Load the jsbundle file and resource file of the mobile application;
According to the jsbundle file and resource file, requests the heat of the ReactNative module to update to server and match
Confidence breath, it includes following parameter that the heat, which updates configuration information: module unique identification, application version number, jsbundle version number,
And the Md5 value of jsbundle;
It receives the heat that server returns and updates configuration information;
The downloading that configuration information carries out hot more new resources is updated according to the heat;
Decompress the hot more new resources;
The heat after decompression is updated into caching resource into the sandbox path of the mobile application.
2. the method as described in claim 1, which is characterized in that load the jsbundle file and resource text of the mobile application
Part includes:
The jsbundle file and resource that the ReactNative module whether is cached in the sandbox of the mobile application detected
File;
If being cached with the jsbundle file and resource text of the ReactNative module in the sandbox of the mobile application
Part loads the jsbundle file and resource file of caching;
If not caching the jsbundle file and resource text of the ReactNative module in the sandbox of the mobile application
Part loads jsbundle file and resource file built-in in the mobile application.
3. the method as described in claim 1, which is characterized in that the jsbundle file and resource file for loading caching include:
By the file copy of the ReactNative module into currentReadedModule file;
File path after returning to copy;
Jsbundle file and resource file in file path after reading the copy include carrying out interface rendering.
4. the method as described in claim 1, which is characterized in that the heat after decompression is updated caching resource to the movement
After in the sandbox path of application, the method also includes:
Identify whether the ReactNative module needs to force to update;
If the ReactNative module needs to force to update, refresh the ReactNative module.
5. method as claimed in claim 4, which is characterized in that refreshing the ReactNative module includes:
The request of refresh page is uploaded to server, carries required parameter in the request of the refresh page, so that service
Device, which inquires the data generated during not refreshing according to the required parameter and mends, passes data, generates during not refreshing described in judgement
Data and mending pass the data volumes of data and whether exceed preset maximum amount of data, it is described do not refresh during the data that generate and
When mending the data volume for passing data beyond preset maximum amount of data, carried also to client returned data and in the data of return
There is more multidata mark;
Receive the data that server returns;
The mark in data returned according to server, judges whether there is more data and does not pass back;
If there is more data are not passed back, according to the earliest generation time for the data that server returns, institute in local cache is removed
There are the data more early than the earliest generation time;
By remaining data buffer storage in local data base;
Refresh display interface.
6. method as claimed in claim 5, which is characterized in that the method also includes:
It is uploaded to server and loads more multidata request, carried client in the more multidata request of load and work as prezone
Face shows the earliest time of origin in data, so that server finds out the data than the earliest time of origin earlier, it will
Client is back to than the data of the earliest time of origin earlier;
Receive the earliest data of time of origin earlier described in the ratio that server returns;
It will be than in earliest time of origin data buffer storage local data base earlier;
Refresh display interface.
7. a kind of hot update method of the multimode mobile application based on ReactNative, is applied to server, feature exists
In described method includes following steps:
The request that hot update is carried out to the configuration information of mobile application ReactNative module that client uploads is received, it is described
Following parameter: module unique identification, application version number, jsbundle version number is carried in the request that heat updates, and
The Md5 value of jsbundle;
According to the module unique identification, the newest resource that is enabled in the database of query service device;
Recognize whether the newest resource;
If there is no the newest resource, request failure information is returned to client;
If there is the newest resource, judge whether the application version number carried in the request is greater than or equal to server
The application version number being currently configured in database;
If the application version number carried in the request is greater than or equal to the application version being currently configured in the database of server
This number, the configuration information for the mobile application ReactNative module being currently configured into the database of client return server,
So that client carries out hot update to the configuration information of mobile application ReactNative module.
8. the method for claim 7, which is characterized in that if the application version number carried in the request be not more than or
Equal to the application version number being currently configured in the database of server, judge that the jsbundle version number carried in the request is
The jsbundle version number being currently configured in the no database more than or equal to server;
It is currently configured if the jsbundle version number that carries in the request is greater than or equal in the database of server
Jsbundle version number, the mobile application ReactNative module being currently configured into the database of client return server
Configuration information so that client carries out hot update to the configuration information of mobile application ReactNative module.
9. method according to claim 8, which is characterized in that if the jsbundle version number carried in the request is little
In or equal to the jsbundle version number that is currently configured in the database of server, the jsbundle carried in the request is judged
Md5 value whether be greater than or equal to the Md5 value of the jsbundle being currently configured in the database of server;
If the Md5 value of the jsbundle carried in the request is greater than or equal to the jsbundle's being currently configured in database
Md5 value, the mobile application ReactNative module being currently configured into the database of client return server match confidence
Breath, so that client carries out hot update to the configuration information of mobile application ReactNative module;
If the Md5 value of the jsbundle carried in the request in the database of server not greater than or equal to being currently configured
The Md5 value of jsbundle, the mobile application ReactNative module being currently configured into the database of client return server
Configuration information so that client does not carry out hot update to the configuration information of mobile application ReactNative module.
10. a kind of hot more new system of multimode mobile application based on ReactNative, which is characterized in that the system packet
Include client and server;
The client loads the jsbundle text of the mobile application for entering the ReactNative module of mobile application
Part and resource file request the ReactNative module to server according to the jsbundle file and resource file
Heat update configuration information, it is described heat update configuration information include following parameter: module unique identification, application version number,
The Md5 value of jsbundle version number and jsbundle receive the heat that server returns and update configuration information, according to the heat
The downloading that configuration information carries out hot more new resources is updated, the hot more new resources are decompressed, by the hot more new resources after decompression
It is cached in the sandbox path of the mobile application;
The server, the configuration information to mobile application ReactNative module for receiving client upload carry out heat
The request of update, it is described heat update request in carry following parameter: module unique identification, application version number, jsbundle edition
This number and jsbundle Md5 value enables newest according to the module unique identification in the database of query service device
Resource recognizes whether the newest resource, if there is no the newest resource, returns to request to client and unsuccessfully believes
Breath judges whether the application version number carried in the request is greater than or equal to server if there is the newest resource
The application version number being currently configured in database, if the application version number carried in the request is greater than or equal to server
The application version number being currently configured in database, the mobile application being currently configured into the database of client return server
The configuration information of ReactNative module, so that client carries out heat to the configuration information of mobile application ReactNative module
It updates.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910379464.0A CN110096295B (en) | 2019-05-08 | 2019-05-08 | Multi-module mobile application thermal updating method and system based on reactivating |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910379464.0A CN110096295B (en) | 2019-05-08 | 2019-05-08 | Multi-module mobile application thermal updating method and system based on reactivating |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110096295A true CN110096295A (en) | 2019-08-06 |
CN110096295B CN110096295B (en) | 2023-08-08 |
Family
ID=67447284
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910379464.0A Active CN110096295B (en) | 2019-05-08 | 2019-05-08 | Multi-module mobile application thermal updating method and system based on reactivating |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110096295B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111355629A (en) * | 2020-02-17 | 2020-06-30 | 苏州亿歌网络科技有限公司 | Client test method and device, computer equipment and storage medium |
CN111562924A (en) * | 2019-12-04 | 2020-08-21 | 江苏艾佳家居用品有限公司 | Distributed mobile application running system and application method based on Reactnative |
Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080162674A1 (en) * | 2006-12-27 | 2008-07-03 | Hewlett-Packard Development Company, L.P. | System and method for hot deployment/redeployment in grid computing environment |
CN102681825A (en) * | 2011-03-09 | 2012-09-19 | 北京航空航天大学 | System and method for managing service run container |
CN102946442A (en) * | 2012-12-06 | 2013-02-27 | 网宿科技股份有限公司 | Method and system for updating and releasing file based on smart refreshing |
CN103944958A (en) * | 2014-03-14 | 2014-07-23 | 中国科学院计算技术研究所 | Wide area file system and implementation method |
CN104133695A (en) * | 2014-07-15 | 2014-11-05 | 珠海金山网络游戏科技有限公司 | Manufacture and application method of software client side |
CN104735152A (en) * | 2015-03-30 | 2015-06-24 | 四川神琥科技有限公司 | Mail reading method based on network |
CN106209926A (en) * | 2015-04-30 | 2016-12-07 | 阿里巴巴集团控股有限公司 | A kind of data-updating method and equipment |
CN106657367A (en) * | 2016-12-30 | 2017-05-10 | 北京三快在线科技有限公司 | Service data acquisition method, device and system |
CN107509086A (en) * | 2017-09-06 | 2017-12-22 | 成都虫洞奇迹科技有限公司 | Video reorientation method and device under a kind of cloud desktop |
CN107729041A (en) * | 2017-07-26 | 2018-02-23 | 上海壹账通金融科技有限公司 | The hot update method of application program, device, terminal and storage medium |
CN107861739A (en) * | 2017-11-06 | 2018-03-30 | 山东浪潮通软信息科技有限公司 | ReactNative applications method of adjustment, client and system |
CN108304207A (en) * | 2018-03-01 | 2018-07-20 | 上海找钢网信息科技股份有限公司 | Mix the resource regeneration method and system of APP application programs |
CN108733400A (en) * | 2018-04-27 | 2018-11-02 | 新光互联投资管理有限公司 | A kind of hot update method of App increments and service system |
CN109032638A (en) * | 2018-07-18 | 2018-12-18 | 广州宸瑞软件科技有限公司 | Hot update method, server and the mobile terminal of mobile application software |
CN109445833A (en) * | 2018-11-09 | 2019-03-08 | 苏宁消费金融有限公司 | A kind of method that React-native heat updates |
CN109656611A (en) * | 2018-12-24 | 2019-04-19 | 成都四方伟业软件股份有限公司 | Three-dimensional visualization applies hot update method, device and terminal |
-
2019
- 2019-05-08 CN CN201910379464.0A patent/CN110096295B/en active Active
Patent Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080162674A1 (en) * | 2006-12-27 | 2008-07-03 | Hewlett-Packard Development Company, L.P. | System and method for hot deployment/redeployment in grid computing environment |
CN102681825A (en) * | 2011-03-09 | 2012-09-19 | 北京航空航天大学 | System and method for managing service run container |
CN102946442A (en) * | 2012-12-06 | 2013-02-27 | 网宿科技股份有限公司 | Method and system for updating and releasing file based on smart refreshing |
CN103944958A (en) * | 2014-03-14 | 2014-07-23 | 中国科学院计算技术研究所 | Wide area file system and implementation method |
CN104133695A (en) * | 2014-07-15 | 2014-11-05 | 珠海金山网络游戏科技有限公司 | Manufacture and application method of software client side |
CN104735152A (en) * | 2015-03-30 | 2015-06-24 | 四川神琥科技有限公司 | Mail reading method based on network |
CN106209926A (en) * | 2015-04-30 | 2016-12-07 | 阿里巴巴集团控股有限公司 | A kind of data-updating method and equipment |
CN106657367A (en) * | 2016-12-30 | 2017-05-10 | 北京三快在线科技有限公司 | Service data acquisition method, device and system |
CN107729041A (en) * | 2017-07-26 | 2018-02-23 | 上海壹账通金融科技有限公司 | The hot update method of application program, device, terminal and storage medium |
CN107509086A (en) * | 2017-09-06 | 2017-12-22 | 成都虫洞奇迹科技有限公司 | Video reorientation method and device under a kind of cloud desktop |
CN107861739A (en) * | 2017-11-06 | 2018-03-30 | 山东浪潮通软信息科技有限公司 | ReactNative applications method of adjustment, client and system |
CN108304207A (en) * | 2018-03-01 | 2018-07-20 | 上海找钢网信息科技股份有限公司 | Mix the resource regeneration method and system of APP application programs |
CN108733400A (en) * | 2018-04-27 | 2018-11-02 | 新光互联投资管理有限公司 | A kind of hot update method of App increments and service system |
CN109032638A (en) * | 2018-07-18 | 2018-12-18 | 广州宸瑞软件科技有限公司 | Hot update method, server and the mobile terminal of mobile application software |
CN109445833A (en) * | 2018-11-09 | 2019-03-08 | 苏宁消费金融有限公司 | A kind of method that React-native heat updates |
CN109656611A (en) * | 2018-12-24 | 2019-04-19 | 成都四方伟业软件股份有限公司 | Three-dimensional visualization applies hot update method, device and terminal |
Non-Patent Citations (2)
Title |
---|
KHALED A. HARRAS: "DBS-IC: An adaptive Data Bundling System for Intermittent Connectivity", 《COMPUTER COMMUNICATIONS》, vol. 32, no. 16, pages 1687 - 1698, XP026495016, DOI: 10.1016/j.comcom.2009.02.014 * |
张鑫: "Android热更新管理系统的研究与设计", 《中国优秀硕士学位论文全文数据库信息科技辑》, no. 2, pages 138 - 671 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111562924A (en) * | 2019-12-04 | 2020-08-21 | 江苏艾佳家居用品有限公司 | Distributed mobile application running system and application method based on Reactnative |
CN111355629A (en) * | 2020-02-17 | 2020-06-30 | 苏州亿歌网络科技有限公司 | Client test method and device, computer equipment and storage medium |
CN111355629B (en) * | 2020-02-17 | 2021-01-15 | 苏州亿歌网络科技有限公司 | Client test method and device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110096295B (en) | 2023-08-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6463393B2 (en) | Tenant data recovery across tenant migration | |
US8630978B2 (en) | Method of bi-directional synchronization of user data | |
US11741046B2 (en) | Method and apparatus for creating system disk snapshot of virtual machine | |
US8495621B2 (en) | Catalog-based software component management | |
US7200668B2 (en) | Document conversion with merging | |
US8762980B1 (en) | Rolling incremental updates | |
US20110010708A1 (en) | System and method for transporting configuration parameters | |
CN106789249B (en) | Hot updating method, client and server | |
CN105474206A (en) | Virtual synchronization with on-demand data delivery | |
CN108874409A (en) | A kind of information updating method, device, server and system | |
US9401957B2 (en) | System and method for synchronization between servers | |
CN105516230A (en) | Data processing method and device | |
WO2012166690A2 (en) | Redirecting requests to secondary location during temporary outage | |
CN108205482B (en) | File mount restoration methods | |
CN110096295A (en) | The hot update method and system of multimode mobile application based on ReactNative | |
US11977559B2 (en) | Providing instant and distributed access to a source blob via copy-on-read blobs and link blobs | |
KR101638689B1 (en) | System and method for providing client terminal to user customized synchronization service | |
CN110119388B (en) | File reading and writing method, device, system, equipment and computer readable storage medium | |
CN102916993B (en) | A kind of network hard disc data-updating method and device | |
CN107103001B (en) | Method, device and system for acquiring target front-end resource file based on browser | |
US10936550B2 (en) | Synchronizing different representations of content | |
CN112256669A (en) | Data processing method and device, electronic equipment and readable storage medium | |
CN117370270A (en) | Data management method and device | |
JP2023532138A (en) | Image distribution method, electronic device and storage medium | |
CN116166911A (en) | Page loading method and device, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |