CN108897565B - Software upgrading method and device in electronic equipment and electronic equipment - Google Patents

Software upgrading method and device in electronic equipment and electronic equipment Download PDF

Info

Publication number
CN108897565B
CN108897565B CN201810628238.7A CN201810628238A CN108897565B CN 108897565 B CN108897565 B CN 108897565B CN 201810628238 A CN201810628238 A CN 201810628238A CN 108897565 B CN108897565 B CN 108897565B
Authority
CN
China
Prior art keywords
application program
information
upgrading
upgrade
version
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
CN201810628238.7A
Other languages
Chinese (zh)
Other versions
CN108897565A (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 Autel Intelligent Aviation Technology Co Ltd
Original Assignee
Shenzhen Autel Intelligent Aviation 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 Autel Intelligent Aviation Technology Co Ltd filed Critical Shenzhen Autel Intelligent Aviation Technology Co Ltd
Priority to CN201810628238.7A priority Critical patent/CN108897565B/en
Priority to PCT/CN2018/106554 priority patent/WO2019242133A1/en
Publication of CN108897565A publication Critical patent/CN108897565A/en
Application granted granted Critical
Publication of CN108897565B publication Critical patent/CN108897565B/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
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories

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 embodiment of the invention relates to the technical field of software upgrading, and discloses a software upgrading method and device in electronic equipment and the electronic equipment. Wherein the method comprises the following steps: acquiring version information of a first application program in a system of the electronic equipment; determining upgrade information of the first application program from pre-stored upgrade information of the application program of the system according to the version information of the first application program, wherein the pre-stored upgrade information of the application program of the system is stored in a storage device in the electronic equipment; and upgrading the first application program according to the upgrading information. By the software upgrading method in the electronic equipment, the stability of software upgrading can be effectively improved.

Description

Software upgrading method and device in electronic equipment and electronic equipment
Technical Field
The embodiment of the invention relates to the technical field of software upgrading, in particular to a software upgrading method in electronic equipment, a software upgrading device in electronic equipment and the electronic equipment.
Background
Software upgrades for various electronic devices, such as aircraft, remote control devices, etc., are often required for the purpose of better meeting the needs of users or preventing the intrusion of viruses. Software upgrade, i.e., the upgrading of an application, refers to the updating of software or an application from a low version to a high version. Usually, when a software developer writes software, because designers consider incomplete or incomplete functions of the software at that time, after the software is released, the software developer needs to modify or add new functions to the program, that is, replace a low software version with a high software version, so as to repair a part of BUG and the like of the low version. The software of the electronic equipment can have better performance and better optimized effect than the original version after being upgraded, so that a user can have better experience.
In the process of implementing the invention, the inventor finds that the related art has at least the following problems: at present, the software upgrading stability of electronic equipment is poor. Poor software upgrading stability means that in the software upgrading process, if an emergency situation, such as power failure, occurs, the software upgrading will fail. And the failure of the software upgrade may seriously affect the normal use function of the electronic equipment.
Disclosure of Invention
Embodiments of the present invention provide a method and an apparatus for upgrading software in an electronic device, and an electronic device, which can improve the stability of software upgrading of the electronic device, and ensure that even if an emergency such as a power failure occurs during the software upgrading process, the software can be upgraded again after being powered on again.
The embodiment of the invention discloses the following technical scheme:
in a first aspect, an embodiment of the present invention provides a method for upgrading software in an electronic device, where the method includes:
acquiring version information of a first application program in a system of the electronic equipment;
determining upgrade information of the first application program from pre-stored upgrade information of the application program of the system according to the version information of the first application program, wherein the pre-stored upgrade information of the application program of the system is stored in a storage device in the electronic equipment;
and upgrading the first application program according to the upgrading information.
In some embodiments, the version information is used to indicate whether a version number of the first application exists.
In some embodiments, the determining upgrade information of the first application from pre-stored upgrade information of applications of the system according to the version information of the first application includes:
and when the version number exists in the acquired version information and the version number in the acquired version information is smaller than the pre-stored version number of the first application program of the system, determining the upgrading information of the first application program from the pre-stored upgrading information of the application program of the system.
In some embodiments, the determining upgrade information of the first application from pre-stored upgrade information of applications of the system according to the version information of the first application includes:
and when the acquired version information is used for indicating that the version number of the first application program does not exist, determining upgrading information of the first application program from prestored upgrading information of application programs of the system.
In some embodiments, the version information of the first application is generated after the system runs a start script to start the first application in the system.
In some embodiments, the start script is further configured to start an upgrade script in the storage device, so that the storage device runs the upgrade script.
In some embodiments, the obtaining version information of the first application in the system of the electronic device includes:
and obtaining version information of the first application program in the system of the electronic equipment by running the upgrading script.
In some embodiments, the upgrade information comprises a second application and/or a configuration file for the second application; wherein the second application is an upgraded version of the first application.
In some embodiments, the upgrading the first application according to the upgrade information includes:
and overlaying the upgrading information on the first application program and/or the configuration information of the first application program at an application layer of the system.
In a second aspect, an embodiment of the present invention provides a software upgrading apparatus in an electronic device, where the apparatus includes:
the version information acquisition module is used for acquiring the version information of a first application program in a system of the electronic equipment;
the upgrading information determining module is used for determining upgrading information of the first application program from prestored upgrading information of the application program of the system according to the version information of the first application program, wherein the prestored upgrading information of the application program of the system is stored in a storage device in the electronic equipment;
and the upgrading module is used for upgrading the first application program according to the upgrading information.
In some embodiments, the version information is used to indicate whether a version number of the first application exists.
In some embodiments, the upgrade information determination module is specifically configured to:
and when the version number exists in the acquired version information and the version number in the acquired version information is smaller than the pre-stored version number of the first application program of the system, determining the upgrading information of the first application program from the pre-stored upgrading information of the application program of the system.
In some embodiments, the upgrade information determination module is specifically configured to:
and when the acquired version information is used for indicating that the version number of the first application program does not exist, determining upgrading information of the first application program from prestored upgrading information of application programs of the system.
In some embodiments, the version information of the first application is generated after the system runs a start script to start the first application in the system.
In some embodiments, the start script is further configured to start an upgrade script in the storage device, so that the storage device runs the upgrade script.
In some embodiments, the version information obtaining module is specifically configured to:
and obtaining version information of the first application program in the system of the electronic equipment by running the upgrading script.
In some embodiments, the upgrade information comprises a second application and/or a configuration file for the second application; wherein the second application is an upgraded version of the first application.
In some embodiments, the upgrade module is specifically configured to:
and overlaying the upgrading information on the first application program and/or the configuration information of the first application program at an application layer of the system.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the software upgrade method in an electronic device as described above.
In a fourth aspect, embodiments of the present invention provide a computer program product comprising a computer program stored on a non-volatile computer-readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the software upgrade method in an electronic device as described above.
In a fifth aspect, the embodiment of the present invention further provides a non-volatile computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions for causing a computer to execute the software upgrading method in an electronic device as described above.
According to the embodiment of the invention, the first application program in the system of the electronic equipment is upgraded through the upgrade information determined from the pre-stored upgrade information of the application program of the system of the electronic equipment, and because the pre-stored upgrade information of the application program of the system of the electronic equipment is stored in the storage device of the electronic equipment, even if sudden conditions such as power failure occur in the upgrade process, the upgrade information of the pre-stored application program of the system of the electronic equipment stored in the storage device of the electronic equipment cannot be damaged, and after the power is re-turned on, the upgrade information can be determined from the pre-stored upgrade information of the application program of the system of the electronic equipment again to be upgraded again, so that the stability of software upgrade in the electronic equipment is improved, and the normal use of the electronic equipment is further ensured.
Drawings
Fig. 1 is a schematic diagram of an application environment of a software upgrading method in an electronic device according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of software upgrade in an electronic device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a system of an electronic device according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a software upgrading apparatus in an electronic device according to an embodiment of the present invention;
fig. 5 is a schematic hardware structure diagram of a system in an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
Fig. 1 is a schematic diagram of one application environment of a software upgrading method in an electronic device according to an embodiment of the present invention. Wherein, the application environment comprises: an upgrade terminal 10 and an electronic device 20, the upgrade terminal 10 being communicatively connected to the electronic device.
Wherein, this electronic equipment 20 includes: storage 21, system 22 and a body (not shown). The storage device 21 may be fixedly provided in the body of the electronic apparatus 20, or the storage device 21 may be detachably connected to the body of the electronic apparatus 20. For example, the electronic apparatus 20 body is provided with an interface for accommodating a storage device 21, which can be accommodated in the interface and electrically connected with a system 22 in the electronic apparatus 20 through the interface. System 22 refers to a computer system in an electronic device, which may include hardware; system software for controlling hardware, such as an operating system, compiler, etc.; and applications, etc. Electronic device 20 may include a plurality of systems, such as a flight control system, a master control system, a vision system, a graph transmission system, and the like, when electronic device 20 is an aircraft, and each system may or may not include an operating system.
The upgrade terminal 10 may install an application program related to upgrading the electronic device, and the upgrade terminal 10 may upgrade the application program in the system 22 of the electronic device 20 by using the application program, for example, the upgrade terminal may transmit upgrade information to the corresponding system 22 of the electronic device 20, that is, the upgrade terminal 10 may transmit the upgrade information of the application program of the system 22 to the electronic device 20. The upgrade information may include an upgrade package and a configuration file of the application program, etc. The upgrade information may be requested from the upgrade terminal 10 to the server, or the upgrade information may be pushed from the server to the upgrade terminal 10.
In the embodiment of the present application, before the electronic device 20 performs software upgrade, the upgrade terminal 10 may first transmit upgrade information of an application program of the system 22 to the storage device 21 of the electronic device 20.
For example, the manner of transmission may include: when the storage device 21 is fixedly arranged in the electronic equipment 20, the upgrading terminal 10 can send the upgrading information of the application program of the system 22 to the storage device 21 in a wireless connection mode; alternatively, the upgrade terminal 10 writes the upgrade information of the application program of the system 22 into the storage device 21 by a wired connection method. When the storage device 21 is detachably provided in the electronic apparatus 20, the upgrade terminal 10 may be connected to the storage device 21 through an interface for accommodating the storage device 21, and may transmit upgrade information of an application program of the system 22 to the storage device 21.
In this embodiment, the upgrade terminal 10 may include terminal devices such as a smart phone, a personal computer, and a wearable smart device.
The electronic device 20 is an execution subject for executing the software upgrading method in the electronic device provided by the embodiment of the present invention. In particular, when the embodiment of the application is applied to the field of unmanned aerial vehicles, the electronic equipment can be an aircraft or remote control equipment. Wherein, the aircraft can include: fixed wing aircraft, multi-rotor aircraft, and the like. The aircraft may be referred to herein as an Unmanned Aerial Vehicle (UAV).
An application scenario of the embodiment of the present application is exemplarily described below with a UAV as an example.
The UAV includes: storage device 21, system 22, and a body (not shown).
The storage device 21 may be any device with a storage function, and may be built in the UAV, or may be removable, such as an SD card. The storage device 21 is used to store upgrade information of an application program of the system 22.
The system 22 is a system including an application in the UAV. For example, the system 22 may be: one, more or all of a picture transmission system, an electric tuning system, a camera system, a flight control system, a vision system and the like. Wherein, an independent operating system may be configured in the system 22, one or more application programs are provided in the system 22, and the software upgrading method in the electronic device is applicable to one or more of the above systems, or all of the application programs. A software upgrade in the electronic device is also an upgrade of the application programs in the system 22.
In order to make the UAV better meet the user's needs, software upgrade is usually required for the UAV, that is, upgrade the application program of the system 22 of the UAV, so as to optimize the functions of the UAV and enable the user to have a better experience.
In combination with the above application scenarios, embodiments of the present invention mainly aim to provide a method and an apparatus for upgrading software in an electronic device, and an electronic device, which can improve the stability of software upgrading of electronic devices such as UAVs, and further ensure the normal use of the electronic device.
The embodiments of the present invention will be further explained with reference to the drawings.
Example 1:
fig. 2 is a schematic flowchart of a software upgrading method in an electronic device according to an embodiment of the present invention. The method can be executed by various electronic devices with certain logical operation processing capacity, such as an aircraft, a remote control device and the like. The method can be used for upgrading various software, such as upgrading embedded software with an operating system or embedded software (application program) without the operating system.
Referring to fig. 2, the method for upgrading software in an electronic device includes:
201: version information of a first application in a system of the electronic device is obtained.
The first application program in the system of the electronic device is a computer program located in the system for performing one or more specific tasks. The first application may refer to any application in the system. For example, as shown in fig. 3, the electronic apparatus includes: a system and a storage device. The system of the electronic device takes an embedded system as an example, and for the embedded system, the Flash partition of the embedded system comprises three parts: uboot partition, kernel partition, and rootfs partition. Wherein several application programs (e.g. App)11、App12、...、App1N) And a configuration file (e.g., Config) of the first application11、Config12、...、Config1N) And the method is placed in a rootfs partition of the embedded system, namely an application layer of the embedded system. Wherein each application corresponds to a configuration file, such as App11And Config11And (7) corresponding. The software upgrading in the electronic device is also to upgrade the application program in the system of the electronic device.
The version information of the first application program is generated after the system runs a start script (loader script) to start the first application program in the system. For example, a loader script is run to launch a first application in the rootfs partition to generate version information for the first application.
Optionally, the start script is further configured to start an upgrade script (upgrade loader script) in a storage device of the electronic device, so that the storage device runs the upgrade script, so as to upgrade the first application program.
Specifically, acquiring version information of a first application program in a system of the electronic device includes: and obtaining version information of the first application program in the system of the electronic equipment by running the upgrading script.
Specifically, the trigger condition for starting the upgrade script in the storage device of the electronic device by the start script includes, but is not limited to, any one of the following: 1. after the electronic equipment or the system of the electronic equipment is started; 2. when a system of the electronic equipment enters an upgrading mode; 3. the electronic equipment or the system of the electronic equipment is powered off and then powered on again. For example, due to an emergency, the electronic device or a system of the electronic device is powered off, and after the electronic device or the system of the electronic device is powered on again, the loader script automatically finds an upgrade script (upgrade loader script) of the storage device and starts the upgrade loader script, so that the storage device runs the upgrade loader script, thereby ensuring that the first application program in the system is continuously upgraded, and improving the upgrade stability. And after the power is re-electrified, the loader script can automatically find the upgrade loader script and start the upgrade script, so that the version information of the first application program in the system of the electronic equipment can be obtained by running the upgrade script, subsequent upgrade can be performed, the whole upgrade process after the power is re-electrified does not need manual participation, upgrade can be automatically and intelligently realized, and the upgrade speed is effectively improved.
The version information is used for indicating whether the version number of the first application program exists or not. That is, when the first application program runs normally, the version number of the first application program is generated, for example, the currently running application program is App1n(N ═ 1, 2 … … N), the application App1nCorresponding configuration file Config1nThen the currently running application App1nAfter normal operation, the corresponding current version number is generated and is corresponding to V1nFor example, a version number of "1.0.0" is generated; and when the first application program cannot normally run due to misoperation or BUG existing in the first application program and the like, the version number cannot be generated. And determining the upgrading information of the first application program subsequently based on whether the version number of the first application program exists or not.
202: and according to the version information of the first application program, determining the upgrading information of the first application program from prestored upgrading information of the application program of the system.
Wherein the pre-stored upgrade information of the application program of the system is stored in a storage device in the electronic device.
The existing upgrading method generally finishes software upgrading by downloading or copying an upgrading file, the upgrading stability of the method is poor, the downloaded or copied upgrading file can be damaged if the method meets the emergency conditions such as power failure or misoperation, the software upgrading cannot be carried out again after the upgrading file is electrified again because the upgrading file is damaged, namely, the software upgrading fails when the emergency conditions such as power failure or misoperation are met. Failure of a software upgrade may seriously affect the normal use functionality of the electronic device.
In the present embodiment, since the upgrade information of the application program of the system is stored in advance, that is, the pre-stored upgrade information of the application program of the system is stored in the storage device in the electronic device, and determining upgrade information of the first application program from pre-stored upgrade information of application programs of the system according to version information of the first application program, and thus, even if the emergency such as power failure or misoperation occurs in the upgrading process, the upgrading information of the application program of the system of the electronic equipment stored in the storage device of the electronic equipment is not damaged, after the power is re-powered on, the upgrade information can be re-determined from the pre-stored upgrade information of the application program of the system of the electronic equipment so as to re-upgrade, therefore, the stability of software upgrading in the electronic equipment is improved, and the normal use of the electronic equipment is further ensured.
The upgrading information comprises a second application program and/or a configuration file of the second application program; wherein the second application is an upgraded version of the first application. For example, as illustrated in fig. 2, the first application included in the system of the electronic device is an App11、App12、...、App1NThe corresponding configuration file is Config11、Config12、...、Config1N(ii) a In the storage device of the electronic equipment, the electronic equipment and the storage deviceIn response, the first application App11、App12、...、App1NThe upgrading information is a second application program App21、App22、...、App2NAnd/or a configuration file Config of said second application21、Config22、...、Config2N
Based on the version information in step 202, to indicate whether the version number of the first application program exists, therefore, the determining the upgrade information of the first application program from the pre-stored upgrade information of the application programs of the system according to the version information of the first application program may include the following two ways:
1. and when the version number exists in the acquired version information and the version number in the acquired version information is smaller than the pre-stored version number of the first application program of the system, determining the upgrading information of the first application program from the pre-stored upgrading information of the application program of the system. For example, a first application App in a system of the electronic device is acquired1nHas a version number V in the version information1nThe version number V1nThe corresponding version number V of the first application program of the system stored in the storage device in advance2nIf the version number V1nLess than version number V2nE.g. version number V1nIs 1.0.0, version number V2nIf the version number of the first application program is "2.0.0", the upgrade information of the first application program is determined from the pre-stored upgrade information of the application programs of the system, otherwise, the version number of the first application program indicated by the acquired version information is the latest version number of the first application program, that is, the first application program does not need to be upgraded, so that the upgrade efficiency is improved. At this time, first reminding information can be output, and the first reminding information is used for representing that the version number of the first application program is the latest version number.
2. And when the acquired version information is used for indicating that the version number of the first application program does not exist, determining upgrading information of the first application program from prestored upgrading information of application programs of the system. When the acquired version information is used for indicating that the version number of the first application program does not exist, the first application program is characterized to be in an abnormal operation state, and if the first application program is in the abnormal operation state due to power failure or misoperation, the upgrade information of the first application program needs to be determined from the pre-stored upgrade information of the application programs of the system, so that the first application program can be upgraded subsequently.
203: and upgrading the first application program according to the upgrading information.
In one implementation, the upgrade information may be written to the system in an overlay manner. The upgrade information may include an upgrade package or an installation package of an upgrade version of the first application program, that is, the upgrade information may be understood as the second application program and a configuration file corresponding to the second application program.
Specifically, the upgrading, by the electronic device, the first application program according to the upgrade information specifically includes: and overlaying the upgrading information on the first application program and/or the configuration information of the first application program in an application layer of the system so as to further improve the upgrading stability. The application layer of the system is also the rootfs partition in fig. 2. Compared with a Flash area flashing mode, the upgrading stability can be improved. Meanwhile, the contents in the uboot partition and the kernel partition in the Flash area are reserved, so that the upgrading efficiency is improved.
Since one or more application programs are included in the system of the electronic device, when a plurality of application programs exist, the respective application programs can be upgraded in turn. The upgrading sequence can be a default upgrading sequence of the system, or can be set by a user in a self-defined way, for example, according to the default serial number of each application program of the system, each application program is upgraded in sequence; or upgrading the application programs in sequence according to the importance levels of the application programs to the user, and the like. The sequential upgrading of the application may be as follows:
Figure BDA0001699672340000121
in order to improve the upgrading efficiency, a breakpoint identifier can be set in the upgrading information, and the breakpoint identifier is used for recording an identifier of the application program being upgraded. Furthermore, when an emergency such as power failure occurs, and after power is re-powered on, the loader script finds the upgrade loader script of the storage device and runs, according to the breakpoint identifier, the upgrade loader script can quickly find the first application program which is being upgraded when the breakpoint is reached, and re-upgrade the first application program according to the upgrade information, that is, the configuration files of the corresponding second application program and the corresponding second application program are covered and replaced by the configuration files of the first application program and the corresponding second application program, so that the upgrade stability of the first application program is ensured.
Furthermore, the breakpoint identification can also be used for recording the upgrading process of the application program being upgraded, and then after the application program is powered on again, the first application program can be continuously upgraded based on the record in the breakpoint identification, so that the upgrading efficiency of the application program is further improved.
And after the electronic device finishes upgrading the application program in the system, second reminding information can be output, wherein the second reminding information is used for representing that the first application program is upgraded, namely that the software in the electronic device is upgraded successfully.
In the embodiment of the invention, the first application program in the system of the electronic equipment is upgraded through the upgrade information determined from the pre-stored upgrade information of the application program of the system of the electronic equipment, and because the upgrade information of the application program of the system of the pre-stored electronic equipment is stored in the storage device of the electronic equipment, even if sudden conditions such as power failure or misoperation occur in the upgrade process, the upgrade information of the application program of the system of the pre-stored electronic equipment stored in the storage device of the electronic equipment cannot be damaged, and after the power is re-powered on, the upgrade information can be determined from the upgrade information of the application program of the system of the pre-stored electronic equipment again to be upgraded again, so that the stability of software upgrade in the electronic equipment is improved, and the normal use of the electronic equipment is ensured.
Example 2:
fig. 4 is a schematic diagram of a software upgrading apparatus in an electronic device according to an embodiment of the present invention. The software upgrading device can be configured in various electronic devices, such as an aircraft and the like. Specifically, this aircraft can be unmanned aerial vehicle etc..
Referring to fig. 4, the software upgrade 40 in the electronic device includes: a version information acquisition module 401, an upgrade information determination module 402, and an upgrade module 403.
Specifically, the version information obtaining module 401 is configured to obtain version information of a first application program in a system of the electronic device.
The first application program in the system of the electronic device is a computer program located in the system for performing one or more specific tasks. The first application may refer to any application in the system. The upgrade module 403 upgrades software in the electronic device, that is, upgrades an application program in a system of the electronic device.
The version information of the first application program is generated after the system runs a start script (loader script) to start the first application program in the system. For example, a loader script is run to launch a first application in the rootfs partition to generate version information for the first application.
Optionally, the start script is further configured to start an upgrade script (upgrade loader script) in a storage device of the electronic device, so that the storage device runs the upgrade script, so as to upgrade the first application program.
Specifically, the version information obtaining module 401 is specifically configured to: and obtaining version information of the first application program in the system of the electronic equipment by running the upgrading script.
The version information is used for indicating whether the version number of the first application program exists or not. That is, when the first application program operates normally, the version number of the first application program is generated; and when the first application program cannot normally run due to misoperation or BUG existing in the first application program and the like, the version number cannot be generated. And determining the upgrading information of the first application program subsequently based on whether the version number of the first application program exists or not.
Specifically, the upgrade information determining module 402 is configured to determine, according to the version information of the first application program, upgrade information of the first application program from pre-stored upgrade information of application programs of the system.
Wherein the pre-stored upgrade information of the application program of the system is stored in a storage device in the electronic device.
The existing upgrading method generally finishes software upgrading by downloading or copying an upgrading file, the upgrading stability of the method is poor, the downloaded or copied upgrading file can be damaged if the method meets the emergency conditions such as power failure or misoperation, the software upgrading cannot be carried out again after the upgrading file is electrified again because the upgrading file is damaged, namely, the software upgrading fails when the emergency conditions such as power failure or misoperation are met. Failure of a software upgrade may seriously affect the normal use functionality of the electronic device.
In this embodiment, since the upgrade information of the application program of the system is pre-stored, that is, the pre-stored upgrade information of the application program of the system is stored in the storage device of the electronic device, the upgrade information determination module 402 may determine the upgrade information of the first application program from the pre-stored upgrade information of the application program of the system according to the version information of the first application program, so that even if an emergency such as a power failure or an incorrect operation occurs during the upgrade process, the upgrade information of the application program of the system of the electronic device stored in the storage device of the electronic device is not damaged, and after the power is re-turned on, the upgrade information determination module 402 may re-determine the upgrade information from the pre-stored upgrade information of the application program of the system of the electronic device, so that the subsequent upgrade module 403 can re-perform upgrade, therefore, the stability of software upgrading in the electronic equipment is improved, and the normal use of the electronic equipment is further ensured.
The upgrading information comprises a second application program and/or a configuration file of the second application program; wherein the second application is an upgraded version of the first application.
The upgrade information determining module 402 determines the upgrade information of the first application program from the pre-stored upgrade information of the application programs of the system according to the version information of the first application program, and may include the following two ways:
1. and when the version number exists in the acquired version information and the version number in the acquired version information is smaller than the pre-stored version number of the first application program of the system, determining the upgrading information of the first application program from the pre-stored upgrading information of the application program of the system. For example, a first application App in a system of the electronic device is acquired1nHas a version number V in the version information1nThe version number V1nThe corresponding version number V of the first application program of the system stored in the storage device in advance2nIf the version number V1nLess than version number V2nE.g. version number V1nIs 1.0.0, version number V2nIf the version number of the first application program is "2.0.0", the upgrade information of the first application program is determined from the pre-stored upgrade information of the application programs of the system, otherwise, the version number of the first application program indicated by the acquired version information is the latest version number of the first application program, that is, the first application program does not need to be upgraded, so that the upgrade efficiency is improved. At this time, first reminding information can be output, and the first reminding information is used for representing that the version number of the first application program is the latest version number.
2. And when the acquired version information is used for indicating that the version number of the first application program does not exist, determining upgrading information of the first application program from prestored upgrading information of application programs of the system. When the acquired version information is used for indicating that the version number of the first application program does not exist, the first application program is characterized to be in an abnormal operation state, and if the first application program is in the abnormal operation state due to power failure or misoperation, the upgrade information of the first application program needs to be determined from the pre-stored upgrade information of the application programs of the system, so that the first application program can be upgraded subsequently.
Specifically, the upgrading module 403 is configured to upgrade the first application program according to the upgrading information.
In one implementation, the upgrade information may be written to the system in an overlay manner. The upgrade information may include an upgrade package or an installation package of an upgrade version of the first application program, that is, the upgrade information may be understood as the second application program and a configuration file corresponding to the second application program.
Specifically, the upgrade module 403 upgrades the application program by overwriting rather than erasing. Specifically, the upgrade module 403 is specifically configured to: and overlaying the upgrading information on the first application program and/or the configuration information of the first application program in an application layer of the system so as to further improve the upgrading stability. The application layer of the system is also the rootfs partition in fig. 2. Compared with a Flash area flashing mode, the upgrading stability can be improved. Meanwhile, the contents in the uboot partition and the kernel partition in the Flash area are reserved, so that the upgrading efficiency is improved.
Since one or more application programs are included in the system of the electronic device, when a plurality of application programs exist, the respective application programs can be upgraded in turn. The upgrading sequence can be a system default upgrading sequence or a user-defined setting.
In order to improve the upgrading efficiency, a breakpoint identifier can be set in the upgrading information, and the breakpoint identifier is used for recording an identifier of the application program being upgraded. Furthermore, when an emergency such as power failure occurs, and after power is turned on again, the loader script finds the upgrade loader script of the storage device and runs, and according to the breakpoint identifier, the upgrade loader script can quickly find the first application program being upgraded when the breakpoint occurs, and the upgrade module 403 can upgrade the first application program again according to the upgrade information, that is, the configuration files of the corresponding second application program and the corresponding second application program are covered and replaced with the configuration files of the first application program and the corresponding first application program, without starting to upgrade from the first application program, so that the upgrade stability of the first application program is ensured.
Furthermore, the breakpoint identification can also be used for recording the upgrading process of the application program being upgraded, and then after the application program is powered on again, the first application program can be continuously upgraded based on the record in the breakpoint identification, so that the upgrading efficiency of the application program is further improved.
Moreover, after the upgrade module 403 finishes upgrading the application program in the system, second reminding information may be output, where the second reminding information is used to indicate that the first application program is upgraded, that is, the software in the electronic device is upgraded successfully.
It should be noted that, in the embodiment of the present invention, the software upgrading apparatus 40 in the electronic device may execute the software upgrading method in the electronic device provided in the method embodiment, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in the embodiment of the software upgrading apparatus 40 in the electronic device, reference may be made to the software upgrading method in the electronic device provided by the method embodiment.
Example 3:
fig. 5 is a schematic hardware structure diagram of a system in an electronic device according to an embodiment of the present invention. As shown in fig. 5, a system 50 in the electronic device includes:
one or more processors 501 and a memory 502, with one processor 501 being an example in fig. 5.
The processor 501 and the memory 502 may be connected by a bus or other means, such as the bus connection in fig. 5.
The memory 502, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the software upgrading method in the electronic device in the embodiment of the present invention (for example, the version information acquiring module 401, the upgrading information determining module 402, and the upgrading module 403 shown in fig. 4). The processor 501 executes various functional applications of the system 50 in the electronic device and data processing, i.e., a software upgrading method in the electronic device implementing the method embodiment, by executing the nonvolatile software program, instructions and modules stored in the memory 502.
The memory 502 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the system 50 in the electronic device, and the like. Further, the memory 502 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 502 optionally includes memory located remotely from processor 501, which may be connected to system 50 in an electronic device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory 502, and when executed by the one or more processors 501, perform the software upgrading method in the electronic device in the method embodiment, for example, perform the above-described method steps 201 to 203 in fig. 2, and implement the functions of the 401-403 module in fig. 4.
The system 50 in the electronic device may further include a communication interface for enabling communication with other devices, such as a terminal device. Other devices included in the system 50 of the electronic device are not limited herein.
The system 50 in the electronic device can execute the software upgrading method in the electronic device provided by the method embodiment, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in the system embodiment of the electronic device, reference may be made to the software upgrading method in the electronic device provided in the method embodiment.
An embodiment of the present invention provides a computer program product comprising a computer program stored on a non-volatile computer-readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the method of software upgrade in an electronic device as described above. For example, the above-described method steps 201 to 203 in fig. 2 are executed to implement the functions of the 401-403 module in fig. 4.
An embodiment of the present invention provides a non-volatile computer-readable storage medium, where computer-executable instructions are stored, and the computer-executable instructions are used to enable a computer to execute the software upgrading method in the electronic device. For example, the above-described method steps 201 to 203 in fig. 2 are executed to implement the functions of the 401-403 module in fig. 4.
It should be noted that the above-described device embodiments are merely illustrative, wherein the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that the embodiments may be implemented by software plus a general hardware platform, and may also be implemented by hardware. It will be understood by those skilled in the art that all or part of the processes in the methods for implementing the embodiments may be implemented by hardware associated with computer program instructions, and the programs may be stored in a computer readable storage medium, and when executed, may include processes of the embodiments of the methods as described. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; within the idea of the invention, also technical features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (6)

1. A method for upgrading software in an electronic device, comprising:
acquiring version information of a first application program in a system of the electronic equipment;
determining upgrade information of the first application program from pre-stored upgrade information of the application program of the system according to the version information of the first application program, wherein the pre-stored upgrade information of the application program of the system is stored in a storage device in the electronic equipment;
determining upgrade information of the first application program from pre-stored upgrade information of application programs of the system according to the version information of the first application program, wherein the determining of the upgrade information of the first application program comprises determining the upgrade information of the first application program from the pre-stored upgrade information of the application programs of the system when a version number exists in the acquired version information and the version number in the acquired version information is smaller than the pre-stored version number of the first application program of the system, or determining the upgrade information of the first application program from the pre-stored upgrade information of the application programs of the system when the acquired version information is used for indicating that the version number of the first application program does not exist;
upgrading the first application program according to the upgrading information, wherein the upgrading information comprises a second application program and/or a configuration file of the second application program, and the second application program is an upgrading version of the first application program;
upgrading the first application program according to the upgrading information, wherein the upgrading information is covered on the first application program and/or the configuration information of the first application program in an application layer of the system;
the method comprises the steps of updating the first application program according to the breakpoint identification, wherein the updating information comprises the breakpoint identification, and the breakpoint identification is used for recording the identification of the application program being updated.
2. The method of claim 1, wherein the version information of the first application is generated after the system runs a boot script to boot the first application in the system.
3. The method of claim 2, wherein the start script is further configured to start an upgrade script in the storage device to cause the storage device to run the upgrade script.
4. The method of claim 3, wherein obtaining version information of the first application in the system of the electronic device comprises:
and obtaining version information of the first application program in the system of the electronic equipment by running the upgrading script.
5. An apparatus for upgrading software in an electronic device, the apparatus comprising:
the version information acquisition module is used for acquiring the version information of a first application program in a system of the electronic equipment;
the upgrading information determining module is used for determining upgrading information of the first application program from prestored upgrading information of the application program of the system according to the version information of the first application program, wherein the prestored upgrading information of the application program of the system is stored in a storage device in the electronic equipment;
determining upgrade information of the first application program from pre-stored upgrade information of application programs of the system according to the version information of the first application program, wherein the determining of the upgrade information of the first application program comprises determining the upgrade information of the first application program from the pre-stored upgrade information of the application programs of the system when a version number exists in the acquired version information and the version number in the acquired version information is smaller than the pre-stored version number of the first application program of the system, or determining the upgrade information of the first application program from the pre-stored upgrade information of the application programs of the system when the acquired version information is used for indicating that the version number of the first application program does not exist;
the upgrading module is used for upgrading the first application program according to the upgrading information, wherein the upgrading information comprises a second application program and/or a configuration file of the second application program, and the second application program is an upgrading version of the first application program;
upgrading the first application program according to the upgrading information, wherein the upgrading information is covered on the first application program and/or the configuration information of the first application program in an application layer of the system;
the upgrade information comprises a breakpoint identification, the breakpoint identification is used for recording an identification of the application program being upgraded, and the device is further used for upgrading the first application program according to the breakpoint identification and the upgrade information.
6. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.
CN201810628238.7A 2018-06-19 2018-06-19 Software upgrading method and device in electronic equipment and electronic equipment Active CN108897565B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810628238.7A CN108897565B (en) 2018-06-19 2018-06-19 Software upgrading method and device in electronic equipment and electronic equipment
PCT/CN2018/106554 WO2019242133A1 (en) 2018-06-19 2018-09-19 Software upgrading method in electronic device, apparatus and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810628238.7A CN108897565B (en) 2018-06-19 2018-06-19 Software upgrading method and device in electronic equipment and electronic equipment

Publications (2)

Publication Number Publication Date
CN108897565A CN108897565A (en) 2018-11-27
CN108897565B true CN108897565B (en) 2021-06-18

Family

ID=64345009

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810628238.7A Active CN108897565B (en) 2018-06-19 2018-06-19 Software upgrading method and device in electronic equipment and electronic equipment

Country Status (2)

Country Link
CN (1) CN108897565B (en)
WO (1) WO2019242133A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109511012B (en) * 2018-11-30 2021-06-08 深圳创维数字技术有限公司 Set top box upgrade test method, device, electronic equipment and medium
CN110502271A (en) * 2019-07-22 2019-11-26 平安科技(深圳)有限公司 Application program based on block chain sends out version method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008027149A (en) * 2006-07-20 2008-02-07 Hitachi Ltd Maintenance information management system
CN102004657A (en) * 2010-12-15 2011-04-06 周佳 Electronic equipment and updating method thereof
CN102955699A (en) * 2011-08-17 2013-03-06 施耐德电器工业公司 Software upgrade package creating method and software upgrading method
CN103324507A (en) * 2013-06-25 2013-09-25 宇龙计算机通信科技(深圳)有限公司 Method and apparatus for updating terminal preset application program
CN104461594A (en) * 2013-09-22 2015-03-25 杭州海康威视数字技术股份有限公司 Updating method and device of embedded operating system
CN106484450A (en) * 2015-08-28 2017-03-08 青岛海信移动通信技术股份有限公司 A kind of method for upgrading software and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030100297A1 (en) * 2001-11-27 2003-05-29 Riordan Kenneth B. Method of software configuration assurance in programmable terminal devices
US20140059534A1 (en) * 2012-08-22 2014-02-27 General Electric Company Method and system for software management

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008027149A (en) * 2006-07-20 2008-02-07 Hitachi Ltd Maintenance information management system
CN102004657A (en) * 2010-12-15 2011-04-06 周佳 Electronic equipment and updating method thereof
CN102955699A (en) * 2011-08-17 2013-03-06 施耐德电器工业公司 Software upgrade package creating method and software upgrading method
CN103324507A (en) * 2013-06-25 2013-09-25 宇龙计算机通信科技(深圳)有限公司 Method and apparatus for updating terminal preset application program
CN104461594A (en) * 2013-09-22 2015-03-25 杭州海康威视数字技术股份有限公司 Updating method and device of embedded operating system
CN106484450A (en) * 2015-08-28 2017-03-08 青岛海信移动通信技术股份有限公司 A kind of method for upgrading software and device

Also Published As

Publication number Publication date
CN108897565A (en) 2018-11-27
WO2019242133A1 (en) 2019-12-26

Similar Documents

Publication Publication Date Title
CN105745617B (en) Selective power management for pre-boot firmware updates
US9507604B2 (en) Boot method and boot system
CN110083374B (en) Upgrade rollback method, system and terminal equipment
CN109165055B (en) Unmanned system component loading method and device, computer equipment and medium
CN107391193A (en) A kind of client, the system and method for configuration server
US20240111549A1 (en) Method and apparatus for constructing android running environment
CN112732273A (en) Application deployment method, device and system
CN108897565B (en) Software upgrading method and device in electronic equipment and electronic equipment
US9208320B2 (en) Software distribution system and software distribution method
CN110865819B (en) OS installation method, server and system
US11876676B2 (en) Network node firmware update
CN113434182A (en) Method and device for realizing immediate effect of firmware upgrade of solid state disk and computer equipment
CN114840242A (en) System upgrading method and device of electronic equipment and readable storage medium
CN108459868A (en) A kind of software start-up method, device, terminal and storage medium
CN106293790B (en) application program upgrading method and device based on Firefox operating system
US11295018B1 (en) File system modification
WO2023141502A1 (en) Technologies for over-the-air updates for telematics systems
CN106445601A (en) Device and method for plugin upgrading
CN109347937B (en) Intelligent remote upgrading method applied to video monitoring equipment
CN109428936B (en) APP upgrading method, device, system, electronic equipment and storage medium
CN105282614B (en) A kind of upgrade method of module TV, module TV and upgrade-system
CN109976788B (en) Intelligent terminal miniature vulnerability restoration method, intelligent terminal, equipment and server
CN116166283A (en) Container arrangement deployment method, system, electronic equipment and storage medium
US20140325270A1 (en) Method and a device for managing an application referenced by a device
CN115525064A (en) Method, system, equipment and application for processing restart critical phase of formation airplane

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
CB02 Change of applicant information

Address after: 518055 Guangdong city of Shenzhen province Nanshan District Xili Street Xueyuan Road No. 1001 Chi Yuen Building 9 layer B1

Applicant after: Shenzhen daotong intelligent Aviation Technology Co.,Ltd.

Address before: 518055 Guangdong city of Shenzhen province Nanshan District Xili Street Xueyuan Road No. 1001 Chi Yuen Building 9 layer B1

Applicant before: AUTEL ROBOTICS Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant