CN107463405B - Application program updating method and device - Google Patents

Application program updating method and device Download PDF

Info

Publication number
CN107463405B
CN107463405B CN201710659574.3A CN201710659574A CN107463405B CN 107463405 B CN107463405 B CN 107463405B CN 201710659574 A CN201710659574 A CN 201710659574A CN 107463405 B CN107463405 B CN 107463405B
Authority
CN
China
Prior art keywords
version number
application program
update
updating
configuration file
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
CN201710659574.3A
Other languages
Chinese (zh)
Other versions
CN107463405A (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.)
Shenzhen Huaao Data Technology Co Ltd
Original Assignee
Shenzhen Huaao Data 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 Shenzhen Huaao Data Technology Co Ltd filed Critical Shenzhen Huaao Data Technology Co Ltd
Priority to CN201710659574.3A priority Critical patent/CN107463405B/en
Publication of CN107463405A publication Critical patent/CN107463405A/en
Application granted granted Critical
Publication of CN107463405B publication Critical patent/CN107463405B/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/70Software maintenance or management
    • G06F8/71Version control; Configuration 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)
  • Stored Programmes (AREA)

Abstract

The invention provides an updating method and a device of an application program, wherein the method comprises a starting step of starting the application program, acquiring basic information of the application program and loading a pre-stored configuration file from a server; a judging step, judging whether the application program needs to be updated or not according to the basic information and the configuration file; and updating the application program according to the configuration file. According to the method and the device for updating the application program, the application program is updated by adopting the configuration file, so that repeated large-amount code compiling can be replaced, and the method and the device are simple and high in efficiency.

Description

Application program updating method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an update method and an update device for an application program.
Background
The fact-Native is a framework launched by Facebook, and develops an Application program (APP) Application using JS scripting language. And the JS script language cannot call sensitive information of the mobile phone, such as a camera module. Thus, if the APP needs to call system parameters/functions, a native page is still needed. That is, most APP development is a mixed development environment, i.e., a Native page, an RN (RN) page, and an H5 page coexist.
At present, in order to implement version update (for example, hot update and incremental update) in APP development under an RN framework, a large amount of fixed codes need to be written for implementation, that is, a developer needs to write a large amount of codes for each update, which is difficult in development and not high enough in efficiency.
Disclosure of Invention
The technical problem to be solved by the invention is to provide an application program updating method and device, which adopt a configuration file to update the application program, can replace repeated large-scale code compiling, and is simple and efficient.
In order to solve the technical problems, the technical scheme provided by the invention is as follows:
in one aspect, the present invention provides an updating method of an application program, including,
starting, namely starting an application program, acquiring basic information of the application program, and loading a pre-stored configuration file from a server;
a judging step, judging whether the application program needs to be updated or not according to the basic information and the configuration file;
and updating the application program according to the configuration file.
Further, the basic information of the application program comprises a current APP version number and a current RN version number.
Further, the configuration file comprises an APP version number list, an RN version number list, an increment table, a corresponding relation table between the APP version number and the RN version number, an update judgment rule and an RN update file downloading path.
Further, the step of judging specifically is to judge whether the application needs to be updated according to the APP version number list, the RN version number list and the update judgment rule in the configuration file, and according to the current APP version number and the current RN version number in the basic information.
Further, the updating step is specifically that,
updating the APP script according to the increment table in the configuration file;
updating the RN page according to a corresponding relation table between the APP version number and the RN version number in the configuration file and an RN update file downloading path; wherein,
the update of the application program comprises the update of the APP script and the update of the RN page.
In another aspect, the present invention further provides an apparatus for updating an application, including,
the starting unit is used for starting the application program, acquiring basic information of the application program and loading a pre-stored configuration file from the server;
the judging unit judges whether the application program needs to be updated or not according to the basic information and the configuration file;
and the updating unit updates the application program according to the configuration file.
Further, the basic information of the application program comprises a current APP version number and a current RN version number.
Further, the configuration file comprises an APP version number list, an RN version number list, an increment table, a corresponding relation table between the APP version number and the RN version number, an update judgment rule and an RN update file downloading path.
Further, the determining unit is specifically configured to determine whether the application needs to be updated according to the APP version number list, the RN version number list, and the update determining rule in the configuration file, and according to the current APP version number and the current RN version number in the basic information.
Further, the update unit is specifically adapted to,
updating the APP script according to the increment table in the configuration file;
updating the RN page according to a corresponding relation table between the APP version number and the RN version number in the configuration file and an RN update file downloading path; wherein,
the update of the application program comprises the update of the APP script and the update of the RN page.
According to the method and the device for updating the application program, the application program is updated by adopting the configuration file, so that repeated large-amount code compiling can be replaced, and the method and the device are simple and high in efficiency.
Drawings
Fig. 1 is a flowchart of an update method for an application program according to an embodiment of the present invention;
fig. 2 is a block diagram of an apparatus for updating an application according to an embodiment of the present invention.
Detailed Description
The invention is further illustrated by the following specific examples, which, however, are to be construed as merely illustrative, and not limitative of the remainder of the disclosure in any way whatsoever.
Example one
With reference to fig. 1, the method for updating an application program provided in this embodiment includes,
a starting step S1, starting the application program, acquiring the basic information of the application program, and loading the pre-stored configuration file from the server;
a judgment step S2, judging whether the application program needs to be updated according to the basic information and the configuration file;
and an updating step S3, updating the application program according to the configuration file.
According to the application program updating method provided by the embodiment of the invention, the application program is updated by adopting the configuration file, so that repeated large-amount code compiling can be replaced, and the method is simple and convenient and has high efficiency.
Preferably, the basic information of the application program comprises a current APP version number and a current RN version number.
Further preferably, the configuration file includes an APP version number list, an RN version number list, an increment table, a correspondence table between APP version numbers and RN version numbers, an update judgment rule, and an RN update file download path.
Specifically, the determining step S2 is to determine whether the application needs to be updated according to the APP version number list, the RN version number list, and the update determining rule in the configuration file, and according to the current APP version number and the current RN version number in the basic information. More specifically, in this embodiment, the current APP version number and the current RN version number are compared with the APP version number list and the RN version number list in the configuration file, and according to the update determination rule, it is determined whether the current APP version number and the current RN version number are within the update range, and to which version the current APP version number and the current RN version number are to be updated next time, and then it is determined whether the current APP version number and the current RN version number are to be updated to which specific version.
In this embodiment, the application program is updated according to the version number of the current application program, and the corresponding version file is updated according to different versions, it should be noted that each version of the application program has one version file. Specifically, for example, the determination rule list is updated as follows:
[{“6.5.+”,”0.35.1”},{”6.6.5.3”,”0.36.1”}]
for the regular expression "6.5. +" in the update judgment rule list, it means that the version of the current application program is adapted to the updated version as long as 6.5. the first versions (e.g., 6.5.1.2, 6.5.3.2, 6.5.4.2, etc.) all correspond to the same download package, and the version of the download package is 0.35.1, and if the version of the current application program is adapted to the updated version is the exact version 6.6.5.3, the version of the corresponding file download package is 0.36.1.
It should be noted that, in this embodiment, the rules in the update judgment rule list are not limited to 2 as listed above, and the length of the list needs to be configured according to the project requirements, which is not specifically limited in this embodiment.
More specifically, the updating step S3 is specifically,
updating the APP script according to the increment table in the configuration file;
updating the RN page according to a corresponding relation table between the APP version number and the RN version number in the configuration file and an RN update file downloading path; wherein,
the update of the application program comprises the update of the APP script and the update of the RN page.
It should be noted that the hot update is to update the code and the resource without reinstallation, and the incremental hot update is to simply push the modified and newly added code and resource to the user for downloading to implement the update of the application program, and the code and the resource of the incremental part are relatively small, so that the whole hot update process can be completed without the user's feeling.
In this embodiment, when the application is updated, a hot update mode is adopted, specifically, the APP script is updated according to a code of an increment portion pointed by an increment table in the configuration file, and according to a correspondence table between an APP version number and an RN version number in the configuration file and an RN update file download path, the picture resource related to the RN page is downloaded to the RN update file download path, so as to update the RN page.
Example two
With reference to fig. 2, the apparatus for updating an application provided in this embodiment includes,
the starting unit 1 is used for starting an application program, acquiring basic information of the application program and loading a pre-stored configuration file from a server;
the judging unit 2 is used for judging whether the application program needs to be updated or not according to the basic information and the configuration file;
and the updating unit 3 is used for updating the application program according to the configuration file.
The updating device for the application program provided by the embodiment of the invention adopts the configuration file to update the application program, can replace repeated large-scale code compiling, and is simple and convenient and high in efficiency.
Preferably, the basic information of the application program comprises a current APP version number and a current RN version number.
Further preferably, the configuration file includes an APP version number list, an RN version number list, an increment table, a correspondence table between APP version numbers and RN version numbers, an update judgment rule, and an RN update file download path.
Specifically, the determining unit 2 is specifically configured to determine whether the application needs to be updated according to the APP version number list, the RN version number list, and the update determining rule in the configuration file, and according to the current APP version number and the current RN version number in the basic information. More specifically, in this embodiment, the current APP version number and the current RN version number are compared with the APP version number list and the RN version number list in the configuration file, and according to the update determination rule, it is determined whether the current APP version number and the current RN version number are within the update range, and to which version the current APP version number and the current RN version number are to be updated next time, and then it is determined whether the current APP version number and the current RN version number are to be updated to which specific version.
In this embodiment, the application program is updated according to the version number of the current application program, and the corresponding version file is updated according to different versions, it should be noted that each version of the application program has one version file. Specifically, for example, the determination rule list is updated as follows:
[{“6.5.+”,”0.35.1”},{”6.6.5.3”,”0.36.1”}]
for the regular expression "6.5. +" in the update judgment rule list, it means that the version of the current application program is adapted to the updated version as long as 6.5. the first versions (e.g., 6.5.1.2, 6.5.3.2, 6.5.4.2, etc.) all correspond to the same download package, and the version of the download package is 0.35.1, and if the version of the current application program is adapted to the updated version is the exact version 6.6.5.3, the version of the corresponding file download package is 0.36.1.
It should be noted that, in this embodiment, the rules in the update judgment rule list are not limited to 2 as listed above, and the length of the list needs to be configured according to the project requirements, which is not specifically limited in this embodiment.
More specifically, the updating unit 3 is specifically configured to,
updating the APP script according to the increment table in the configuration file;
updating the RN page according to a corresponding relation table between the APP version number and the RN version number in the configuration file and an RN update file downloading path; wherein,
the update of the application program comprises the update of the APP script and the update of the RN page.
It should be noted that the hot update is to update the code and the resource without reinstallation, and the incremental hot update is to simply push the modified and newly added code and resource to the user for downloading to implement the update of the application program, and the code and the resource of the incremental part are relatively small, so that the whole hot update process can be completed without the user's feeling.
In this embodiment, when the application is updated, a hot update mode is adopted, specifically, the APP script is updated according to a code of an increment portion pointed by an increment table in the configuration file, and according to a correspondence table between an APP version number and an RN version number in the configuration file and an RN update file download path, the picture resource related to the RN page is downloaded to the RN update file download path, so as to update the RN page.
Although the present invention has been described to a certain extent, it is apparent that appropriate changes in the respective conditions may be made without departing from the spirit and scope of the present invention. It is to be understood that the invention is not limited to the described embodiments, but is to be accorded the scope consistent with the claims, including equivalents of each element described.

Claims (4)

1. An updating method of an application program, comprising,
starting, namely starting an application program, acquiring basic information of the application program, and loading a pre-stored configuration file from a server;
a judging step, judging whether the application program needs to be updated or not according to the basic information and the configuration file;
updating, namely updating the application program according to the configuration file;
the basic information of the application program includes: a current APP version number and a current RN version number;
the configuration file comprises: the method comprises the steps of obtaining an APP version number list, an RN version number list, an increment table, a corresponding relation table between the APP version number and the RN version number, an update judgment rule and an RN update file downloading path;
the judging step specifically comprises the following steps: and judging whether the application program needs to be updated or not according to the APP version number list, the RN version number list and the updating judgment rule in the configuration file, and the current APP version number and the current RN version number in the basic information.
2. The method for updating an application program according to claim 1, wherein the updating step is specifically,
updating the APP script according to the increment table in the configuration file;
updating the RN page according to a corresponding relation table between the APP version number and the RN version number in the configuration file and an RN update file downloading path; wherein,
the update of the application program comprises the update of the APP script and the update of the RN page.
3. An apparatus for updating an application program, comprising,
the starting unit is used for starting the application program, acquiring the basic information of the application program and loading a pre-stored configuration file from the server;
the judging unit judges whether the application program needs to be updated or not according to the basic information and the configuration file;
the updating unit updates the application program according to the configuration file;
the basic information of the application program includes: a current APP version number and a current RN version number;
the configuration file comprises: the method comprises the steps of obtaining an APP version number list, an RN version number list, an increment table, a corresponding relation table between the APP version number and the RN version number, an update judgment rule and an RN update file downloading path;
the judgment unit is specifically configured to: and judging whether the application program needs to be updated or not according to the APP version number list, the RN version number list and the updating judgment rule in the configuration file, and the current APP version number and the current RN version number in the basic information.
4. The application program updating apparatus according to claim 3, wherein the updating unit is specifically configured to,
updating the APP script according to the increment table in the configuration file;
updating the RN page according to a corresponding relation table between the APP version number and the RN version number in the configuration file and an RN update file downloading path; wherein,
the update of the application program comprises the update of the APP script and the update of the RN page.
CN201710659574.3A 2017-08-04 2017-08-04 Application program updating method and device Active CN107463405B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710659574.3A CN107463405B (en) 2017-08-04 2017-08-04 Application program updating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710659574.3A CN107463405B (en) 2017-08-04 2017-08-04 Application program updating method and device

Publications (2)

Publication Number Publication Date
CN107463405A CN107463405A (en) 2017-12-12
CN107463405B true CN107463405B (en) 2020-07-17

Family

ID=60548173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710659574.3A Active CN107463405B (en) 2017-08-04 2017-08-04 Application program updating method and device

Country Status (1)

Country Link
CN (1) CN107463405B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108572832B (en) * 2018-03-28 2021-07-06 福建天晴数码有限公司 Method and system for dynamically updating application version
CN108776592B (en) * 2018-05-23 2022-04-05 北京五八信息技术有限公司 Page construction method, device, equipment and storage medium
CN108804132A (en) * 2018-06-06 2018-11-13 中国平安人寿保险股份有限公司 A kind of hot method for refreshing, device, electronic equipment and the storage medium of configuration information
CN109491695B (en) * 2018-10-19 2021-08-06 华南理工大学 Incremental updating method for integrated android application
CN111679842B (en) * 2019-03-11 2023-06-23 阿里巴巴集团控股有限公司 Application program hot update processing method, device and system
CN111240730B (en) * 2020-02-29 2024-10-22 中国平安人寿保险股份有限公司 Application program updating method and device
CN115103345A (en) * 2022-07-22 2022-09-23 中国银行股份有限公司 System updating method and device based on near field communication

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104836843A (en) * 2015-03-31 2015-08-12 北京奇虎科技有限公司 Client application program updating method and device
CN105930185A (en) * 2016-04-19 2016-09-07 乐视控股(北京)有限公司 Application updating method and apparatus, terminal and server
CN106547569A (en) * 2016-11-28 2017-03-29 武汉斗鱼网络科技有限公司 A kind of page access method and apparatus in application
CN106789249A (en) * 2016-12-22 2017-05-31 北京五八信息技术有限公司 Hot update method, client and server

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104836843A (en) * 2015-03-31 2015-08-12 北京奇虎科技有限公司 Client application program updating method and device
CN105930185A (en) * 2016-04-19 2016-09-07 乐视控股(北京)有限公司 Application updating method and apparatus, terminal and server
CN106547569A (en) * 2016-11-28 2017-03-29 武汉斗鱼网络科技有限公司 A kind of page access method and apparatus in application
CN106789249A (en) * 2016-12-22 2017-05-31 北京五八信息技术有限公司 Hot update method, client and server

Also Published As

Publication number Publication date
CN107463405A (en) 2017-12-12

Similar Documents

Publication Publication Date Title
CN107463405B (en) Application program updating method and device
RU2643484C2 (en) Generation of own code from code in intermediate language for application
CN108874464B (en) Automatic scanning assembly method and device for middleware and storage medium
CN107741844B (en) Method and device for generating application installation package
WO2017071191A1 (en) Method and device for displaying plug-in view element in host application page
CN106325847B (en) Method and device for acquiring application program function based on iOS platform
CN107688529B (en) Component debugging method and device
CN105159788B (en) Method and system for dynamically sharing resources between Android applications
CN104066077A (en) OTA downloading and upgrading method and device thereof
CN107656729B (en) List view updating apparatus, method and computer-readable storage medium
CN106874035B (en) Method for updating application (app) built-in H5 and framework thereof
CN104077162A (en) Mobile terminal application template updating and issuing method and device
CN106681749B (en) Local code patch updating method and device based on android platform
CN108647032B (en) Application loading method and device, computer device and computer readable storage medium
CN111881019A (en) User interface testing method and device
CN108170430B (en) Interface display method and system
CN106775754A (en) The compatible processing method and processing device of application
CN108733370B (en) Stylized display method, device, terminal and storage medium of native APP
CN103793248A (en) Method and device for upgrading application program
CN101551746A (en) UI interface configuration method of mobile communication terminal
CN107704499A (en) A kind of page jump control method and device of application program
CN104052769A (en) Method, apparatus and system for updating resources contained by mobile terminal application
CN104484201A (en) Method and device for updating software tool development package of IOS (Internetwork Operating System) equipment
CN105700900B (en) A kind of method and device optimizing wireless lan function
CN106293790B (en) application program upgrading method and device based on Firefox operating system

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
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 518000 2203/2204, Building 1, Huide Building, Beizhan Community, Minzhi Street, Longhua District, Shenzhen, Guangdong

Patentee after: SHENZHEN AUDAQUE DATA TECHNOLOGY Ltd.

Address before: 518000 units J and K, 12 / F, block B, building 7, Baoneng Science Park, Qinghu Industrial Zone, Qingxiang Road, Longhua New District, Shenzhen City, Guangdong Province

Patentee before: SHENZHEN AUDAQUE DATA TECHNOLOGY Ltd.