CN112099817B - Automatic app updating method and system - Google Patents

Automatic app updating method and system Download PDF

Info

Publication number
CN112099817B
CN112099817B CN202010749526.5A CN202010749526A CN112099817B CN 112099817 B CN112099817 B CN 112099817B CN 202010749526 A CN202010749526 A CN 202010749526A CN 112099817 B CN112099817 B CN 112099817B
Authority
CN
China
Prior art keywords
update
installation package
latest
installation
version number
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
CN202010749526.5A
Other languages
Chinese (zh)
Other versions
CN112099817A (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.)
Iap Fujian technology Co ltd
Original Assignee
Iap Fujian technology 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 Iap Fujian technology Co ltd filed Critical Iap Fujian technology Co ltd
Priority to CN202010749526.5A priority Critical patent/CN112099817B/en
Publication of CN112099817A publication Critical patent/CN112099817A/en
Application granted granted Critical
Publication of CN112099817B publication Critical patent/CN112099817B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides an automatic app updating method and system in the technical field of software updating, wherein the method comprises the following steps: step S10, detecting the latest version number of the app, and downloading the latest installation package based on the latest version number and the local version number; step S20, automatically installing the latest installation package based on the installation mode flag bit of the latest installation package; step S30, detecting the latest installation package and judging whether the version callback is needed; and step S40, recording the updating information of the local installation package. The invention has the advantages that: automatic updating and version rollback of the app are achieved, and user experience is greatly improved.

Description

Automatic app updating method and system
Technical Field
The present invention relates to the field of software updating technologies, and in particular, to a method and a system for automatically updating an app.
Background
With the rapid development of information technology and economy, mobile devices such as smart phones and computers have become popular and become indispensable devices in life and work of people. With the increasing importance of mobile devices to life and work of people, various apps are increasing, but the life cycle of various apps is short, and the apps need to be updated frequently, and the update cycle is often within several weeks.
However, conventionally, the app needs to be updated manually, and a large amount of work is generated in the updating process, so that the updating and upgrading speed is slow, and the app can only be updated from a low version to a high version, and sometimes, the high version has a BUG but has already finished updating, and cannot be rolled back, which seriously affects the user experience.
Therefore, how to provide a method and a system for automatically updating an app to implement automatic update and version rollback of the app and further improve user experience is a problem to be solved urgently.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method and a system for automatically updating an app, so as to implement automatic update and version rollback of the app, thereby improving user experience.
In a first aspect, the present invention provides an app automatic update method, including the following steps:
step S10, detecting the latest version number of the app, and downloading the latest installation package based on the latest version number and the local version number;
step S20, automatically installing the latest installation package based on the installation mode flag bit of the latest installation package;
step S30, detecting the latest installation package and judging whether a version callback is needed;
and step S40, recording the updating information of the local installation package.
Further, the step S10 is specifically:
detecting the latest version number of the app by using the update management class, judging whether the local version number recorded by the update information recording class is consistent with the latest version number, and if not, downloading the latest installation package by using the update management class; if yes, the flow is ended.
Further, the step S20 specifically includes:
step S21, the update management class judges whether the installation mode flag bit of the latest installation package is forced update or non-forced update, if the installation mode flag bit is forced update, the latest installation package is automatically installed, and the step S30 is entered; if the update is not forced, the process proceeds to step S22;
step S22, judging whether the user selects updating, if yes, automatically installing the latest installation package, and entering step S30; if not, the process proceeds to step S40.
Further, the step S30 is specifically:
detecting whether the newly installed installation package has a BUG, if so, downloading the old installation package by using a callback interface class, installing, and then entering step S40; if not, the process proceeds to step S40.
Further, in step S40, the update information at least includes a local version number, a release time, a function description, an app name, an installation method flag, a download link, and an update content description.
In a second aspect, the present invention provides an app automatic update system, including the following modules:
the installation package downloading module is used for detecting the latest version number of the app and downloading the latest installation package based on the latest version number and the local version number;
the installation package automatic installation module is used for automatically installing the latest installation package based on the installation mode flag bit of the latest installation package;
the version callback module is used for detecting the latest installation package to be installed and judging whether the version callback is needed or not;
and the update information recording module is used for recording the update information of the local installation package.
Further, the installation package downloading module specifically includes:
detecting the latest version number of the app by using the update management class, judging whether the local version number recorded by the update information recording class is consistent with the latest version number, and if not, downloading the latest installation package by using the update management class; if yes, the flow is ended.
Further, the step of automatically installing the installation package comprises:
the installation mode judging unit is used for judging whether the installation mode flag bit of the latest installation package is forced update or non-forced update by the update management class, if the installation mode flag bit is forced update, the latest installation package is automatically installed, and the latest installation package enters the version callback module; if the updating is not forced, entering a user installation unit;
the user installation unit is used for judging whether the user selects updating, if so, automatically installing the latest installation package, and entering the version callback module; if not, entering an updated information recording module.
Further, the version callback module specifically includes:
detecting whether the newly installed installation package has a BUG, if so, downloading the old installation package by using a callback interface class, installing the old installation package, and entering an update information recording module; if not, entering an updated information recording module.
Further, in the update information recording module, the update information at least includes a local version number, release time, function description, app name, installation mode flag bit, download link, and update content description.
The invention has the advantages that:
by comparing version numbers, if the latest version number is inconsistent with the local version number, downloading the latest installation package, selecting forced update or non-forced update based on the installation mode flag bit of the latest installation package, performing BUG detection on the latest installation package after installation is completed, if BUG exists, downloading the old installation package and installing, and recording the update information of the local installation package, so as to facilitate next update; when there is the version number of update promptly, and the mounting means flag bit is for forcing the update, then carries out the automatic update of app, can carry out the version when the app of update has the BUG and roll back, has simplified the flow of app update for traditional, has practiced thrift user's time, and supports the version to roll back, and then very big promotion user experience.
Drawings
The invention will be further described with reference to the following examples with reference to the accompanying drawings.
Fig. 1 is a flowchart of an app automatic update method according to the present invention.
Fig. 2 is a schematic structural diagram of an app automatic update system according to the present invention.
Detailed Description
The technical scheme in the embodiment of the application has the following general idea: and comparing the version numbers, downloading the latest installation package if the latest version number is inconsistent with the local version number, selecting forced update or non-forced update based on the installation mode flag bit of the latest installation package, performing BUG detection on the latest installation package after installation, downloading and installing the old installation package if the BUG exists, and recording the update information of the local installation package, thereby realizing automatic update and version rollback of the app.
Referring to fig. 1 to 2, a preferred embodiment of an app automatic update method according to the present invention includes the following steps:
step S10, detecting the latest version number of the app, and downloading the latest installation package of the app based on the latest version number and the local version number of the app;
step S20, automatically installing the latest installation package based on the installation mode flag bit of the latest installation package; the installation mode flag bit comprises a forced update and an unforced update, for example, the forced update is set to 1, and the unforced update is set to 0;
step S30, detecting the latest installation package and judging whether the version callback is needed;
step S40, recording the update information of the local installation package by using the update information record class, and completing the automatic update of the app; for example, the old local version number is 001, the latest version number is 002, and if there is no BUG after updating, the update information of the installation package with the version number of 002 is recorded; and if the BUG appears after updating, the installation package with the version number of 001 is downloaded again for installation, and the updating information of the installation package with the version number of 001 is recorded.
The step S10 specifically includes:
detecting the latest version number of the app by using an update management class (AppUpdateManager), judging whether the local version number recorded by an update information recording class (AppUpdateInfo) is consistent with the latest version number, and if not, downloading the latest installation package by using the update management class; if yes, the flow is ended.
The step S20 specifically includes:
step S21, the update management class judges whether the installation mode flag bit of the latest installation package is forced update or non-forced update, if the installation mode flag bit is forced update, the latest installation package is automatically installed, and the step S30 is entered; if the update is not forced, the process proceeds to step S22;
step S22, judging whether the user selects updating based on an operation instruction issued by the user, if so, automatically installing the latest installation package, and entering step S30; if not, the process proceeds to step S40.
The step S30 specifically includes:
detecting whether the installed latest installation package has a BUG, if so, downloading the old installation package by using a callback interface class (DownloadCallable), and entering the step S40 after the installation; if not, the process proceeds to step S40.
In step S40, the update information at least includes a local version number, release time, function description, app name, installation mode flag, download link, and update content description.
The update management class (AppUpdateManager) is used for detecting the version number of the installation package, downloading and installing the installation package; the update information recording class (ApppUpdateInfo) is used for recording the update information of the app, supporting reading the information from the local specified directory file and storing the update information into the local specified directory file; the callback interface class (DownloadCallable) is used for version rollback when the app does not want to be updated, i.e., the old installation package is downloaded and installed.
The invention discloses a preferred embodiment of an app automatic updating system, which comprises the following modules:
the installation package downloading module is used for detecting the latest version number of the app and downloading the latest installation package of the app based on the latest version number and the local version number of the app;
the installation package automatic installation module is used for automatically installing the latest installation package based on the installation mode flag bit of the latest installation package; the installation mode flag bit comprises a forced update and an unforced update, for example, the forced update is set to 1, and the unforced update is set to 0;
the version callback module is used for detecting the latest installation package to be installed and judging whether the version callback is needed or not;
the update information recording module is used for recording the update information of the local installation package by using the update information record class to complete the automatic update of the app; for example, the old local version number is 001, the latest version number is 002, and if there is no BUG after updating, the update information of the installation package with the version number of 002 is recorded; and if the BUG appears after updating, the installation package with the version number of 001 is downloaded again for installation, and the updating information of the installation package with the version number of 001 is recorded.
The installation package downloading module specifically comprises:
detecting the latest version number of the app by using an update management class (AppUpdateManager), judging whether the local version number recorded by an update information recording class (AppUpdateInfo) is consistent with the latest version number, and if not, downloading the latest installation package by using the update management class; if yes, the flow is ended.
The step-installation-package automatic installation module comprises:
the installation mode judging unit is used for judging whether the installation mode flag bit of the latest installation package is forced update or non-forced update by the update management class, if the installation mode flag bit is forced update, the latest installation package is automatically installed, and the latest installation package enters the version callback module; if the updating is not forced, entering a user installation unit;
the user installation unit is used for judging whether the user selects updating or not based on an operation instruction issued by the user, if so, automatically installing the latest installation package, and entering the version callback module; if not, entering an updated information recording module.
The version callback module is specifically:
detecting whether the installed latest installation package has a BUG, if so, downloading the old installation package by using a callback interface class (DownloadCallable), installing, and entering an update information recording module; if not, entering an updated information recording module.
In the update information recording module, the update information at least includes a local version number, release time, function description, app name, installation mode flag bit, download link, and update content description.
The update management class (AppUpdateManager) is used for detecting the version number of the installation package, downloading and installing the installation package; the update information recording class (ApppUpdateInfo) is used for recording the update information of the app, supporting reading the information from the local specified directory file and storing the update information into the local specified directory file; the callback interface class (DownloadCallable) is used for version rollback when the app does not want to be updated, i.e., the old installation package is downloaded and installed.
In summary, the invention has the advantages that:
comparing the version numbers, downloading the latest installation package if the latest version number is not consistent with the local version number, selecting forced update or non-forced update based on the installation mode flag bit of the latest installation package, performing BUG detection on the latest installation package after installation, downloading and installing an old installation package if BUG exists, and recording the update information of the local installation package, so as to facilitate the next update; when there is the version number of update promptly, and the mounting means flag bit is for forcing the update, then carries out the automatic update of app, can carry out the version when the app of update has the BUG and roll back, has simplified the flow of app update for traditional, has practiced thrift user's time, and supports the version to roll back, and then very big promotion user experience.
While specific embodiments of the invention have been described, it will be understood by those skilled in the art that the specific embodiments described are illustrative only and are not limiting upon the scope of the invention, as equivalent modifications and variations as will be made by those skilled in the art in light of the spirit of the invention are intended to be included within the scope of the appended claims.

Claims (2)

1. An app automatic update method, characterized in that: the method comprises the following steps:
step S10, detecting the latest version number of the app by using the update management class, judging whether the local version number recorded by the update information recording class is consistent with the latest version number, if not, downloading the latest installation package by using the update management class; if yes, ending the process;
step S20, automatically installing the latest installation package based on the installation mode flag bit of the latest installation package; the installation mode flag bit comprises a forced update and an unforced update, the forced update is set to be 1, and the unforced update is set to be 0;
step S30, detecting whether the newly installed installation package has BUG, if so, downloading the old installation package by using the callback interface class and installing, and then entering step S40; if not, go to step S40;
step S40, recording the updating information of the local installation package; the updating information at least comprises a local version number, release time, function description, app name, installation mode flag bit, download link and updating content description;
the step S20 specifically includes:
step S21, the update management class judges whether the installation mode flag bit of the latest installation package is forced update or non-forced update, if the installation mode flag bit is forced update, the latest installation package is automatically installed, and the step S30 is proceeded; if the update is not forced, the process proceeds to step S22;
step S22, judging whether the user selects updating based on an operation instruction issued by the user, if so, automatically installing the latest installation package, and entering step S30; if not, the process proceeds to step S40.
2. An app automatic update system characterized by: the system comprises the following modules:
the installation package downloading module is used for detecting the latest version number of the app by using the update management class, judging whether the local version number recorded by the update information record class is consistent with the latest version number or not, and downloading the latest installation package by using the update management class if the local version number recorded by the update information record class is not consistent with the latest version number; if yes, ending the process;
the installation package automatic installation module is used for automatically installing the latest installation package based on the installation mode flag bit of the latest installation package; the installation mode flag bit comprises a forced update and an unforced update, the forced update is set to be 1, and the unforced update is set to be 0;
the version callback module is used for detecting whether the newly installed installation package has BUG, if so, downloading the old installation package by using the callback interface class and entering the update information recording module after installation; if not, entering an updated information recording module;
the update information recording module is used for recording the update information of the local installation package; the updating information at least comprises a local version number, release time, function description, app name, installation mode flag bit, download link and updating content description;
the installation package automatic installation module includes:
the installation mode judging unit is used for judging whether the installation mode flag bit of the latest installation package is forced update or non-forced update by the update management class, if the installation mode flag bit is forced update, the latest installation package is automatically installed, and the latest installation package enters the version callback module; if the updating is not forced, entering a user installation unit;
the user installation unit is used for judging whether the user selects updating or not based on an operation instruction issued by the user, if so, automatically installing the latest installation package, and entering the version callback module; if not, entering an updated information recording module.
CN202010749526.5A 2020-07-30 2020-07-30 Automatic app updating method and system Active CN112099817B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010749526.5A CN112099817B (en) 2020-07-30 2020-07-30 Automatic app updating method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010749526.5A CN112099817B (en) 2020-07-30 2020-07-30 Automatic app updating method and system

Publications (2)

Publication Number Publication Date
CN112099817A CN112099817A (en) 2020-12-18
CN112099817B true CN112099817B (en) 2022-09-06

Family

ID=73749871

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010749526.5A Active CN112099817B (en) 2020-07-30 2020-07-30 Automatic app updating method and system

Country Status (1)

Country Link
CN (1) CN112099817B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113342643B (en) * 2021-05-31 2024-03-22 重庆长安汽车股份有限公司 Automatic test method and system for vehicle FOTA function

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107239307A (en) * 2017-05-31 2017-10-10 北京小米移动软件有限公司 The display methods and device of version updating information
CN108616391A (en) * 2018-04-11 2018-10-02 杭州嘉楠耘智信息科技有限公司 Method and system for upgrading equipment firmware at server side

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160267730A1 (en) * 2014-12-12 2016-09-15 Romesh Wadhwani SmartKey Apparatuses, Methods and Systems
CN107426342A (en) * 2017-09-26 2017-12-01 四川长虹电器股份有限公司 A kind of method of the Android phone application upgrade of reusable extension
CN108459865A (en) * 2018-01-25 2018-08-28 成都贝发信息技术有限公司 A kind of newer detection method of application APP
CN109408096A (en) * 2018-12-05 2019-03-01 国云科技股份有限公司 A kind of method that Distributed Application heat updates

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107239307A (en) * 2017-05-31 2017-10-10 北京小米移动软件有限公司 The display methods and device of version updating information
CN108616391A (en) * 2018-04-11 2018-10-02 杭州嘉楠耘智信息科技有限公司 Method and system for upgrading equipment firmware at server side

Also Published As

Publication number Publication date
CN112099817A (en) 2020-12-18

Similar Documents

Publication Publication Date Title
US11106446B2 (en) Preinstalled application management method for mobile terminal and mobile terminal
EP3992796A1 (en) Inter-process communication method, apparatus and device
US20140173578A1 (en) Method and apparatus for installing and updating software
US9411573B2 (en) Testing framework for applications
CN105335183A (en) Software upgrade method and system
CN102346673A (en) Method and device for upgrading mobile phone system
WO2017186066A1 (en) Software management method and apparatus
CN104077161A (en) Client application updating method and device
CN112099817B (en) Automatic app updating method and system
CN105468422A (en) Method and system for optimizing operation system
KR100700578B1 (en) Method for upgrading firmware in mobile phone
CN106775876B (en) Method for quickly starting application by android system
CN110750280A (en) Application upgrading method and system based on Android platform and storage medium
WO2020199543A1 (en) Method and apparatus applicable to release and upgrade of hybrid application, and intelligent device
CN106603289B (en) LMT configuration file smooth upgrading method
EP3333702A1 (en) System and method for automatic redeployment of applications in an integrated development environment
CN102768628A (en) Method and device for preinstallation of third party application
CN112181467A (en) Method and device for upgrading memory firmware of terminal, terminal and storage medium
CN104461612A (en) Data processing method and device
CN111857752A (en) PostgreSQL database installation method, device and equipment
CN116149768A (en) Application icon display method and device, storage medium and vehicle platform
CN116048546A (en) System upgrading method, electronic equipment and computer readable storage medium
CN114489691A (en) Browser extension installation and automatic updating method
CN103488503B (en) Oftware updating method and device
CN111061699B (en) Method and device for updating version of electric energy meter database

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