CN106033364B - Web application program upgrading method and system - Google Patents

Web application program upgrading method and system Download PDF

Info

Publication number
CN106033364B
CN106033364B CN201510120502.2A CN201510120502A CN106033364B CN 106033364 B CN106033364 B CN 106033364B CN 201510120502 A CN201510120502 A CN 201510120502A CN 106033364 B CN106033364 B CN 106033364B
Authority
CN
China
Prior art keywords
upgrading
application program
source code
program
upgrade
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.)
Active
Application number
CN201510120502.2A
Other languages
Chinese (zh)
Other versions
CN106033364A (en
Inventor
吴成林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TCL Technology Group Co Ltd
Original Assignee
TCL Technology Group Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by TCL Technology Group Co Ltd filed Critical TCL Technology Group Co Ltd
Priority to CN201510120502.2A priority Critical patent/CN106033364B/en
Publication of CN106033364A publication Critical patent/CN106033364A/en
Application granted granted Critical
Publication of CN106033364B publication Critical patent/CN106033364B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a system for upgrading a Web application program, wherein the method comprises the following steps: A. acquiring upgrading information of a Web application program from an upgrading server in advance, judging whether upgrading is needed according to the upgrading information, and analyzing an upgrading file list returned by the upgrading server if upgrading is needed to generate upgrading preprocessing information; B. when the Web application program is started, judging whether upgrade preprocessing information corresponding to the Web application program exists, if so, sending an upgrade request to an upgrade server according to the upgrade preprocessing information, writing an updated application source code program into an application program cache, reading original application program package resources of the Web application program, writing the original application program package resources into the application program cache, and analyzing the application source code program which does not need to be upgraded. The invention realizes upgrading by using a differential technology, reduces upgrading time and data flow, shortens upgrading information processing time by preprocessing, and is transparent to users in the upgrading process.

Description

Web application program upgrading method and system
Technical Field
The present invention relates to the field of software upgrading, and in particular, to a method and a system for upgrading an application program.
Background
An app (application program) contains program data and user data. Upgrading of apps on mobile devices is primarily an update of program data. In the prior art, upgrading all apps on a mobile platform is to download an entire app package and then reinstall the app package, and the process includes: 1. the user opens the application program; 2. detecting version information of a server side; 3. if the new version exists, prompting the user to upgrade; 4. the user selects an upgrading program; 5. the application package is downloaded and reinstalled.
However, in the above process, the application upgrade only updates part of the program data. Not only would traffic be wasted by all updates, but upgrade time would also be increased.
In addition, at present, the intelligent device pops up a prompt box to remind the user of upgrading when the user opens the application, so that the user experience is reduced. And the user needs to wait for the whole application package to be downloaded and installed, and then the application package can be continuously used.
According to the traditional Web technology, a user can update the webpage and the data information every time the user opens a webpage, but the user cannot access any information after the network is disconnected, so that the experience of the traditional webpage technology cannot achieve the effect of local application. However, the local application has the problems of long upgrading time, large traffic and the like. The Web application program has the characteristics of the traditional Web page and the local application, but the upgrading mode of the Web application program in the prior art is also the traditional upgrading mode of the local application, and the characteristics of the Web application program are not fully combined.
Accordingly, the prior art is yet to be improved and developed.
Disclosure of Invention
In view of the above disadvantages of the prior art, an object of the present invention is to provide an application program upgrading method and system, which are used to solve the problems of large flow and long time of the upgrading method in the prior art.
The technical scheme of the invention is as follows:
a method for upgrading a Web application program comprises the following steps:
A. acquiring upgrading information of a Web application program from an upgrading server in advance, judging whether upgrading is needed according to the upgrading information, and analyzing an upgrading file list returned by the upgrading server if upgrading is needed to generate upgrading preprocessing information;
B. when the Web application program is started, judging whether upgrade preprocessing information corresponding to the Web application program exists, if so, sending an upgrade request to an upgrade server according to the upgrade preprocessing information, writing a returned updated application source code program into an application program cache, reading original application program package resources of the Web application program, writing the original application program package resources into the application program cache, and analyzing the application source code program which does not need to be upgraded.
The method for upgrading the Web application program includes the following specific steps:
a1, monitoring a Web application program in a desktop visual area;
and A2, carrying out upgrading preprocessing on the Web application program of the visible area at preset time intervals.
The upgrading method of the Web application program, wherein the step B specifically includes:
b1, analyzing the application source code program which does not need to be upgraded, and starting to render an interface;
b2, writing the application source code program returned by the upgrade server into a cache to replace the original corresponding application source code program, analyzing the updated application source code program, and continuing to render an interface;
and B3, repackaging the cache to replace the original application program package after the application source code program is completely downloaded.
In the method for upgrading a Web application program, in step B1, if the application source code program to be upgraded includes index.
In the step B2, the application source code program with strong association returned by the upgrade server is written into the backup, and is written into the cache after all files with strong association are downloaded.
An upgrade system for a Web application, comprising:
the upgrading preprocessing module is used for acquiring upgrading information of the Web application program from the upgrading server in advance, judging whether upgrading is needed according to the upgrading information, and analyzing an upgrading file list returned by the upgrading server if upgrading is needed to generate upgrading preprocessing information;
and the upgrade management module is used for judging whether upgrade preprocessing information corresponding to the Web application program exists or not when the Web application program is started, if so, sending an upgrade request to an upgrade server according to the upgrade preprocessing information, writing the returned updated application source code program into an application program cache, reading the original application program package resource of the Web application program, writing the original application program package resource into the application program cache, and analyzing the application source code program which does not need to be upgraded.
The upgrading system of the Web application program, wherein the upgrading preprocessing module specifically includes:
the monitoring unit is used for monitoring the Web application program in the desktop visual area;
and the upgrading preprocessing unit is used for carrying out upgrading preprocessing on the Web application program in the visual area at preset time intervals.
The upgrading system of the Web application program, wherein the upgrading module specifically includes:
the first analysis unit is used for analyzing the application source code program which does not need to be upgraded and starting to render an interface;
the second analysis unit is used for writing the application source code program returned by the upgrade server into the cache to replace the original corresponding application source code program, analyzing the updated application source code program and continuously rendering an interface;
and the packaging unit is used for repackaging the cache to replace the original application program package after the application source code program is completely downloaded.
In the system for upgrading the Web application program, if the application source code program to be upgraded contains index.html, the first parsing unit waits for the upgrade server to return the index.html, and then parses the application source code program according to the source code sequence quoted in the index.html.
In the system for upgrading the Web application program, in the second parsing unit, the application source code program with strong association returned by the upgrade server is written into the backup, and after downloading of all files with strong association is completed, the application source code program is written into the cache.
Has the advantages that: the invention realizes the upgrading of the Web application program by utilizing the differential technology, reduces the upgrading time and the data flow, shortens the processing time of the upgrading information by preprocessing, is transparent to the user in the upgrading process, and simultaneously performs the upgrading process and the application starting, improves the user experience and is convenient for the user to use.
Drawings
Fig. 1 is a flowchart of a method for upgrading a Web application according to a preferred embodiment of the present invention.
Fig. 2 is a detailed flowchart of step S101 in the method shown in fig. 1.
Fig. 3 is a detailed flowchart of step S102 in the method shown in fig. 1.
Fig. 4 is a block diagram of an upgrade system for Web applications according to a preferred embodiment of the present invention.
Fig. 5 is a block diagram illustrating a specific structure of an upgrade preprocessing module in the system shown in fig. 4.
Fig. 6 is a block diagram illustrating a specific structure of an upgrade management module in the system shown in fig. 4.
Detailed Description
The present invention provides a method and a system for upgrading a Web application, and the present invention is further described in detail below to make the purpose, technical solution, and effect of the present invention clearer and clearer. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for upgrading a Web application according to a preferred embodiment of the present invention, as shown in the figure, the method includes the following steps:
s101, obtaining upgrading information of a Web application program from an upgrading server in advance, judging whether upgrading is needed or not according to the upgrading information, and analyzing an upgrading file list returned by the upgrading server if upgrading is needed to generate upgrading preprocessing information;
s102, when the Web application program is started, judging whether upgrade preprocessing information corresponding to the Web application program exists, if so, sending an upgrade request to an upgrade server according to the upgrade preprocessing information, writing a returned updated application source code program into an application program cache, reading original application program package resources of the Web application program, writing the application program cache, and analyzing the application source code program which does not need to be upgraded.
In this embodiment, the application is upgraded by using a differential technology, and all the packages are not downloaded, but only the application source code programs (which refer to the source code files required for upgrading the Web application) required for upgrading are downloaded from the upgrade server, so that the upgrade time is reduced, the data traffic is saved, the upgrade process is transparent to the user, and the upgrade process and the application start process are performed simultaneously, so that the normal use of the user is not affected, and the upgrade granularity is reduced, so that the upgrade process is simpler, for example, when the Web application is upgraded, only a certain picture resource needs to be updated or a certain source file needs to be repaired with a major bug. The application in the invention is Web application, which has the characteristics of traditional Web pages and also has the advantages of local application, so the upgrading method is more suitable for being adopted.
The Web application program is upgraded when being started, an upgrade request is sent to an upgrade server, the upgrade server returns an application source code program and writes the application source code program into a cache, and meanwhile, the original application program package resources of the Web application program are read and written into the application program cache, and the application source code program which does not need to be upgraded is analyzed, so that the upgrade time and the data flow are reduced.
Further, as shown in fig. 2, the step S101 specifically includes:
s201, monitoring a Web application program in a desktop visual area;
s202, upgrading the Web application program in the visible area at preset time intervals;
monitoring a desktop visual area in real time, when a user switches a desktop view, acquiring Web application programs in the visual area because the Web application programs in the visual range are most likely to be started by the user, and then preferentially performing upgrade preprocessing on the Web application programs, namely acquiring upgrade information of the Web application programs from an upgrade server every preset time, judging whether the upgrade is needed, if so, analyzing an upgrade file list and generating upgrade preprocessing information. The purpose of this is to improve the upgrade speed when the application starts, because the data volume of the upgrade file list is small, only simple upgrade information communication is carried out between the mobile terminal and the server at this time, the consumed bandwidth is small, and the upgrade preprocessing is carried out at this time, so that the processing procedure when the application starts can be reduced. In addition, if it is determined that a certain Web application needs to be upgraded, an upgradable flag may be marked on the application icon of the Web application, so that a user knows in advance that the upgrading process will be performed when the Web application is started.
The upgrade file list returned by the upgrade server includes the name information of the application source code program and the version information of the Web application program required by the upgrade. And if the upgrade is needed, analyzing the upgrade file list, and verifying the version of the Web application, the application source code program and the like. In addition, if upgrading is needed, the upgrading file list can be analyzed to generate and store the list object data block, then the Web application program is started, and the list object data block is judged to exist, and if the upgrading is needed, the upgrading is indicated.
Further, as shown in fig. 3, the step S102 specifically includes:
s301, analyzing the application source code program which does not need to be upgraded, and starting to render an interface;
when a Web application program is started and needs to be upgraded, a system allocates resources for the Web application program, then reads an original application program package and writes the original application program package into a cache, analyzes an application source code program which does not need to be upgraded, and starts to render an interface. And the upgrading process is carried out in the background, so that the upgrading process is very transparent.
S302, writing the application source code program returned by the upgrade server into a cache to replace the original corresponding application source code program, analyzing the updated application source code program, and continuing to render an interface;
and after the upgrading server returns the application source code program, replacing the corresponding application source code program in the cache with the new application source code program, continuously analyzing the updated application source code program, and continuously rendering the interface.
And S303, repacking the cache to replace the original application program package after the application source code program is completely downloaded.
And when the application source code program is completely downloaded, repackaging the cache to replace the original application program package, and during packaging, respectively packaging the cache and the application configuration file (containing version, authority and other information) to replace the cache and the application configuration file originally stored in the equipment.
In step S301, if the application source code program that needs to be upgraded includes index.html (navigation page), the source code program is analyzed according to the order of the source codes referenced in index.html after the upgrade server returns index.html. Html is the earliest file to be loaded, and therefore, it is necessary to analyze other files after the file is downloaded.
Further, in step S302, the application source code program with strong association returned by the upgrade server is written into the backup, and is written into the cache after all files with strong association are downloaded. The files with strong association relation are the parts which need to be upgraded in the upgrading process, so that the files are preferably written into the backup (cache backup) after all the files are completely downloaded, and the abnormal starting of the application caused by accidental interruption in the upgrading process can be prevented, so that the program error is caused.
Based on the above method, the present invention further provides a block diagram of a preferred embodiment of an upgrade system for a Web application, as shown in fig. 4, including:
an upgrade preprocessing module 100, configured to obtain upgrade information of a Web application from an upgrade server in advance, determine whether upgrade is needed according to the upgrade information, and if upgrade is needed, parse an upgrade file list returned by the upgrade server, to generate upgrade preprocessing information;
the upgrade management module 200 is configured to, when the Web application is started, determine whether upgrade preprocessing information corresponding to the Web application exists, if so, send an upgrade request to the upgrade server according to the upgrade preprocessing information, write the returned updated application source code program into the application cache, read the original application package resource of the Web application, write the application cache, and analyze the application source code program that does not need to be upgraded.
Further, as shown in fig. 5, the upgrade preprocessing module 100 specifically includes:
the monitoring unit 110 is used for monitoring a Web application program in a desktop visual area;
and an upgrade preprocessing unit 120 for performing upgrade preprocessing on the Web application of the visible area at predetermined intervals.
Further, as shown in fig. 6, the upgrade management module 200 specifically includes:
a first parsing unit 210, configured to parse an application source code program that does not need to be upgraded, and start rendering an interface;
the second parsing unit 220 is configured to write the application source code program returned by the upgrade server into the cache to replace the original corresponding application source code program, parse the updated application source code program, and continue to render an interface;
and the packaging unit 230 is configured to repackage the cache to replace the original application package after the application source code program is completely downloaded.
Further, in the first parsing unit 210, if the application source code program that needs to be upgraded includes index.
Further, in the second parsing unit 220, the application source code program with strong association returned by the upgrade server is written into the backup, and is written into the cache after all files with strong association are downloaded.
The technical details of the above module unit have been described in the foregoing method, and thus are not described again.
In summary, the present invention utilizes the differential technology to upgrade the Web application, reduces the upgrade time and data traffic, shortens the upgrade information processing time by preprocessing, is transparent to the user in the upgrade process, and is performed simultaneously with the application start, thereby improving the user experience and facilitating the use of the user.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.

Claims (4)

1. A method for upgrading a Web application program is characterized by comprising the following steps:
A. acquiring upgrading information of a Web application program from an upgrading server in advance, judging whether upgrading is needed according to the upgrading information, and analyzing an upgrading file list returned by the upgrading server if upgrading is needed to generate upgrading preprocessing information; the upgrade file list comprises application source code program name information required by upgrade and version information of the Web application program;
the step A specifically comprises the following steps:
a1, monitoring a Web application program in a desktop visual area;
a2, upgrading the Web application program in the visible area every preset time;
B. when the Web application program is started, judging whether upgrade preprocessing information corresponding to the Web application program exists or not, if so, sending an upgrade request to an upgrade server according to the upgrade preprocessing information, writing a returned updated application source code program into an application program cache, reading original application program package resources of the Web application program, writing the original application program package resources into the application program cache, and analyzing the application source code program which does not need to be upgraded;
the step B specifically comprises the following steps:
b1, analyzing the application source code program which does not need to be upgraded, and starting to render an interface; when the Web application program is started, requesting upgrading resources from an upgrading server according to the sequence of upgrading a file list;
in step B1, if the application source code program to be upgraded includes index. html, after waiting for the upgrade server to return index. html, parsing is performed according to the source code sequence referred in index. html;
b2, writing the application source code program returned by the upgrade server into a cache to replace the original corresponding application source code program, analyzing the updated application source code program, and continuing to render an interface;
in the step B2, the application source code program with strong association returned by the upgrade server is written into the backup, and is written into the cache after all the files with strong association are downloaded; the file with the strong association relation is a part which needs to be upgraded in the upgrading process.
2. The method for upgrading a Web application according to claim 1, wherein the step B further comprises:
and B3, repackaging the cache to replace the original application program package after the application source code program is completely downloaded.
3. A system for upgrading a Web application, comprising:
the upgrading preprocessing module is used for acquiring upgrading information of the Web application program from the upgrading server in advance, judging whether upgrading is needed according to the upgrading information, and analyzing an upgrading file list returned by the upgrading server if upgrading is needed to generate upgrading preprocessing information; the upgrade file list comprises application source code program name information required by upgrade and version information of the Web application program;
the upgrade preprocessing module specifically comprises:
the monitoring unit is used for monitoring the Web application program in the desktop visual area;
the upgrading pretreatment unit is used for carrying out upgrading pretreatment on the Web application program in the visible area at preset time intervals;
the upgrading management module is used for judging whether upgrading preprocessing information corresponding to the Web application program exists or not when the Web application program is started, if so, sending an upgrading request to an upgrading server according to the upgrading preprocessing information, writing a returned updated application source code program into an application program cache, reading original application program package resources of the Web application program, writing the original application program package resources into the application program cache, and analyzing the application source code program which does not need to be upgraded;
the upgrade management module specifically includes:
the first analysis unit is used for analyzing the application source code program which does not need to be upgraded and starting to render an interface; when the Web application program is started, requesting upgrading resources from an upgrading server according to the sequence of upgrading a file list;
in the first analysis unit, if the application source code program needing to be upgraded contains index.html, after the upgrade server returns the index.html, analyzing according to the source code sequence quoted in the index.html;
the second analysis unit is used for writing the application source code program returned by the upgrade server into the cache to replace the original corresponding application source code program, analyzing the updated application source code program and continuously rendering an interface;
in the second analysis unit, the application source code programs with strong association relationship returned by the upgrade server are written into the backup, and are written into the cache after all files with strong association relationship are downloaded; the file with the strong association relation is a part which needs to be upgraded in the upgrading process.
4. The system for upgrading a Web application according to claim 3, wherein the upgrade management module further comprises:
and the packaging unit is used for repackaging the cache to replace the original application program package after the application source code program is completely downloaded.
CN201510120502.2A 2015-03-19 2015-03-19 Web application program upgrading method and system Active CN106033364B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510120502.2A CN106033364B (en) 2015-03-19 2015-03-19 Web application program upgrading method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510120502.2A CN106033364B (en) 2015-03-19 2015-03-19 Web application program upgrading method and system

Publications (2)

Publication Number Publication Date
CN106033364A CN106033364A (en) 2016-10-19
CN106033364B true CN106033364B (en) 2021-07-16

Family

ID=57148676

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510120502.2A Active CN106033364B (en) 2015-03-19 2015-03-19 Web application program upgrading method and system

Country Status (1)

Country Link
CN (1) CN106033364B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107315606A (en) 2017-06-14 2017-11-03 北京小米移动软件有限公司 Using update method and device
CN108712281B (en) * 2018-05-08 2022-02-01 阿里巴巴(中国)有限公司 Method, device, storage medium and terminal for triggering detection management application update
CN111352730B (en) * 2020-02-11 2023-07-14 浙江大华技术股份有限公司 Caching method and device for application program upgrade, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102724308A (en) * 2012-06-13 2012-10-10 腾讯科技(深圳)有限公司 Software update method and software update system
CN103186400A (en) * 2011-12-31 2013-07-03 深圳市金蝶中间件有限公司 Web application program upgrading method and system
CN103442272A (en) * 2013-09-11 2013-12-11 东莞市远峰科技有限公司 System upgrading method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008114491A1 (en) * 2007-03-20 2008-09-25 Access Co., Ltd. Terminal having application update managing function, and application update managing program and system
JP5500999B2 (en) * 2010-01-13 2014-05-21 キヤノン株式会社 Information processing apparatus, control method thereof, and program
CN103002024B (en) * 2012-11-21 2015-05-27 用友软件股份有限公司 Application program upgrade system and application program upgrade method
CN103634675A (en) * 2013-12-23 2014-03-12 乐视致新电子科技(天津)有限公司 System updating method and device in intelligent television

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103186400A (en) * 2011-12-31 2013-07-03 深圳市金蝶中间件有限公司 Web application program upgrading method and system
CN102724308A (en) * 2012-06-13 2012-10-10 腾讯科技(深圳)有限公司 Software update method and software update system
CN103442272A (en) * 2013-09-11 2013-12-11 东莞市远峰科技有限公司 System upgrading method

Also Published As

Publication number Publication date
CN106033364A (en) 2016-10-19

Similar Documents

Publication Publication Date Title
US11119812B2 (en) Method and device for processing application program page according to a common interface container
CN106445583B (en) Page display method, equipment and system
EP3441876B1 (en) Patch upgrade-based file processing method and device, terminal, and storage medium
CN110058873B (en) Application page updating method, device, equipment and storage medium
EP3333704A1 (en) Method and apparatus for repairing kernel vulnerability
CN107741844B (en) Method and device for generating application installation package
US9525587B2 (en) Updating web resources
EP2806357A1 (en) Method and communication device for updating a web application
US20140095667A1 (en) Mobile device application streaming
US20150378714A1 (en) Providing Context-Specific Software Updates to Client Applications
CN106686200B (en) Mobile application program updating method, mobile terminal and updating system
CN107291481B (en) Component updating method, device and system
CN108647032B (en) Application loading method and device, computer device and computer readable storage medium
CN107798064B (en) Page processing method, electronic device and computer readable storage medium
CN112256296A (en) Express delivery service APP updating method, device, equipment and storage medium based on Weex
CN106033364B (en) Web application program upgrading method and system
CN109885332A (en) Image quality chip software upgrade method, device, display equipment and storage medium
CN103634393A (en) IVR (interactive voice response) and realization method thereof
CN111212183A (en) Method and equipment for running hosted application
CN104052769A (en) Method, apparatus and system for updating resources contained by mobile terminal application
CN109800020B (en) Automatic code adjusting method, device, equipment and medium for program development
CN111107133A (en) Generation method of difference packet, data updating method, device and storage medium
CN108733370B (en) Stylized display method, device, terminal and storage medium of native APP
CN107918587B (en) Debugging method and system for application program
CN107092472B (en) Dynamic publishing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 516006 TCL science and technology building, No. 17, Huifeng Third Road, Zhongkai high tech Zone, Huizhou City, Guangdong Province

Applicant after: TCL Technology Group Co.,Ltd.

Address before: 516006 Guangdong province Huizhou Zhongkai hi tech Development Zone No. nineteen District

Applicant before: TCL RESEARCH AMERICA Inc.

GR01 Patent grant
GR01 Patent grant