CN109582332B - System upgrading method and device for Internet camera - Google Patents

System upgrading method and device for Internet camera Download PDF

Info

Publication number
CN109582332B
CN109582332B CN201811325456.XA CN201811325456A CN109582332B CN 109582332 B CN109582332 B CN 109582332B CN 201811325456 A CN201811325456 A CN 201811325456A CN 109582332 B CN109582332 B CN 109582332B
Authority
CN
China
Prior art keywords
partition system
repair
partition
main
main partition
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
CN201811325456.XA
Other languages
Chinese (zh)
Other versions
CN109582332A (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.)
Sunell Technology Corp
Original Assignee
Sunell Technology Corp
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 Sunell Technology Corp filed Critical Sunell Technology Corp
Priority to CN201811325456.XA priority Critical patent/CN109582332B/en
Publication of CN109582332A publication Critical patent/CN109582332A/en
Application granted granted Critical
Publication of CN109582332B publication Critical patent/CN109582332B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof

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 is suitable for the technical field of Internet cameras, and provides a system upgrading method and a system upgrading device of an Internet camera, wherein the method comprises the following steps: starting a main partition system of the Internet camera; detecting whether a primary partition upgrade package for the primary partition system exists; if the main partition upgrading package aiming at the main partition system exists, starting a repair partition system of the Internet camera; guiding the repair partition system to download the main partition upgrade package; and upgrading the main partition system by adopting the main partition upgrading package. In the embodiment, an independent repair partition is configured, and the repair partition system in the repair partition realizes the upgrade operation of the main partition system, so that the equipment can be normally recovered after any partition is damaged in the upgrade process, and the backup of each partition by using excessive storage is avoided, thereby ensuring the upgrade safety and saving the hardware cost of the equipment.

Description

System upgrading method and device for Internet camera
Technical Field
The invention belongs to the technical field of internet cameras, and particularly relates to a system upgrading method of an internet camera, a system upgrading device of the internet camera, the internet camera and a computer readable storage medium.
Background
Internet cameras are a new generation of products that combine traditional cameras with web-based video technology. The video signal transmitted by the camera is compressed by the high-efficiency compression chip after being digitized, and is transmitted to the internet server through the network bus. Users on the network can directly use the browser to watch the camera image on the Internet server, and authorized users can also control the action of a camera holder lens or operate system configuration.
Generally, in order to ensure the upgrade security of the internet video camera, a backup of the door data file is required before the upgrade. Currently, there are two main backup approaches. One way of backup is to backup all partitions including application partitions, configuration partitions, kernel partitions, root file system partitions, etc. If all partitions are backed up, a large number of memory chips are required to implement the backup, resulting in an increase in hardware cost. And the other backup mode can save the hardware cost, namely only backing up the application partition, the configuration partition and the like before upgrading, but not backing up the kernel partition and the root file system partition. However, in this backup manner, if a power failure occurs during the upgrade process, a serious upgrade problem is caused, making the internet camera unusable.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, a method, a device, a terminal device and a storage medium for system upgrade of an internet camera, so as to solve the problem in the prior art that a device is unavailable after a failure occurs in an upgrade process of an internet camera.
A first aspect of an embodiment of the present invention provides a method for upgrading a system of an internet camera, including:
starting a main partition system of the Internet camera;
detecting whether a primary partition upgrade package for the primary partition system exists;
if the main partition upgrading package aiming at the main partition system exists, starting a repair partition system of the Internet camera;
guiding the repair partition system to download the main partition upgrade package;
and upgrading the main partition system by adopting the main partition upgrading package.
Optionally, the step of detecting whether there is a main partition upgrade package for the host system includes:
detecting whether a main partition system upgrading instruction sent by an internet server is received;
or detecting whether the main partition system fails to be upgraded, and if the main partition system fails to be upgraded, determining that a main partition upgrade package aiming at the main partition system exists.
Optionally, the step of detecting whether the primary partition system fails to be upgraded includes:
identifying preset identification bit information corresponding to the main partition system upgrading packet;
and detecting whether the preset identification bit information is different from the current identification bit information of the main partition system.
Optionally, the step of starting the repair partition system of the internet camera includes:
detecting whether an abnormality exists in a repair partition system of the Internet camera;
if the repaired partition system is not abnormal, setting a preset environment variable as a first numerical value, and starting the repaired partition system based on the environment variable of the first numerical value;
if the repair partition system is abnormal, downloading a repair partition upgrade package aiming at the repair partition system, and adopting the repair partition upgrade package to carry out upgrade operation on the repair partition system.
Optionally, the step of directing the repair partition system to download the main partition upgrade package includes:
determining the storage position of the main partition upgrading packet in an internet server;
downloading, by the repair partition system, the primary partition upgrade package from the storage location.
Optionally, the step of performing an upgrade operation on the primary partition system by using the primary partition upgrade package includes:
erasing data in a storage chip corresponding to the main partition system;
and writing the main partition upgrading packet into a corresponding storage chip of the main partition system.
Optionally, the method further comprises:
when a main partition system of the Internet camera is not normally started, detecting whether the main partition system is abnormal or not;
if the main partition system is abnormal, starting the repair partition system, guiding the repair partition system to download the main partition upgrade package, and performing upgrade operation on the main partition system by adopting the main partition upgrade package;
and if the main partition system is not abnormal, the main partition system is restarted.
A second aspect of an embodiment of the present invention provides a system upgrade apparatus for an internet camera, including:
the first starting module is used for starting a main partition system of the Internet camera;
a detection module for detecting whether a main partition upgrade package exists for the main partition system;
the second starting module is used for starting the repair partition system of the Internet camera when a main partition upgrading packet aiming at the main partition system exists;
the downloading module is used for guiding the repair partition system to download the main partition upgrading package;
and the upgrading module is used for upgrading the main partition system by adopting the main partition upgrading package.
Optionally, the detection module includes:
the upgrading instruction detection submodule is used for detecting whether a main partition system upgrading instruction sent by an internet server is received; alternatively, the first and second electrodes may be,
and the upgrading result detection submodule is used for detecting whether the main partition system fails to be upgraded, and if the main partition system fails to be upgraded, determining that a main partition upgrading packet aiming at the main partition system exists.
Optionally, the upgrade result detection sub-module includes:
the identification bit information identification unit is used for identifying preset identification bit information corresponding to the main partition system upgrading packet;
and the identification bit information detection unit is used for detecting whether the preset identification bit information is different from the current identification bit information of the main partition system.
Optionally, the second starting module comprises:
the repair partition system detection submodule is used for detecting whether the repair partition system of the Internet camera is abnormal or not;
the repair partition system starting sub-module is used for setting a preset environment variable as a first numerical value if the repair partition system is not abnormal, and starting the repair partition system based on the environment variable of the first numerical value;
and the repair partition system upgrading submodule is used for downloading a repair partition upgrading package aiming at the repair partition system if the repair partition system is abnormal, and upgrading the repair partition system by adopting the repair partition upgrading package.
Optionally, the downloading module includes:
the storage position determining submodule is used for determining the storage position of the main partition upgrading packet in the Internet server;
and the main partition upgrading package downloading submodule is used for downloading the main partition upgrading package from the storage position through the repair partition system.
Optionally, the upgrade module includes:
the data erasing submodule is used for erasing data in a storage chip corresponding to the main partition system;
and the data writing submodule is used for writing the main partition upgrading packet into a corresponding storage chip of the main partition system.
Optionally, the apparatus further comprises:
the main partition system detection module is used for detecting whether the main partition system of the Internet camera is abnormal or not when the main partition system is not normally started;
the main partition system upgrading module is used for starting the repair partition system when the main partition system is abnormal, guiding the repair partition system to download the main partition upgrading package, and upgrading the main partition system by adopting the main partition upgrading package;
and the main partition system starting module is used for restarting the main partition system when the main partition system is not abnormal.
A third aspect of the embodiments of the present invention provides an internet camera, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the system upgrade method of the internet camera when executing the computer program.
A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium storing a computer program, where the computer program is executed by a processor to implement the steps of the system upgrade method for an internet camera.
Compared with the background art, the embodiment of the invention has the following advantages:
in the embodiment of the invention, the main partition system of the Internet camera is started, whether the main partition upgrading packet aiming at the main partition system exists is detected, if the main partition upgrading packet exists, the repair partition system of the Internet camera can be started, and then the repair partition system is guided to download the main partition upgrading packet, so that the main partition system is upgraded by adopting the main partition upgrading packet. Aiming at the characteristic that an internet camera must access an internet server, the embodiment realizes the upgrading operation of the main partition system by configuring an independent repairing partition and the repairing partition system in the repairing partition, so that the device can be normally recovered after any partition is damaged in the upgrading process, and the device cannot occupy excessive storage to backup each partition, thereby ensuring the upgrading safety and saving the hardware cost of the device.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the embodiments or the description of the prior art will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 is a schematic flow chart illustrating steps of a system upgrade method for an internet camera according to an embodiment of the present invention;
fig. 2 is a flow chart illustrating steps of another method for upgrading a system of an internet camera according to an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating an online upgrade process for a primary partition system, according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating an online upgrade process for repairing a partitioned system according to an embodiment of the present invention;
FIG. 5 is a flow diagram of an automated repair of a primary partition system in accordance with an embodiment of the present invention;
FIG. 6 is a flow diagram of a forced reboot of a primary partition system according to an embodiment of the invention;
fig. 7 is a schematic diagram of a system upgrading apparatus of an internet camera according to an embodiment of the present invention;
fig. 8 is a schematic diagram of an internet camera according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
The technical solution of the present invention will be described below by way of specific examples.
Referring to fig. 1, a schematic flow chart illustrating steps of a system upgrading method for an internet camera according to an embodiment of the present invention is shown, which may specifically include the following steps:
s101, starting a main partition system of the Internet camera;
for ease of understanding, a brief description of the partitioning of the internet camera is provided below.
Generally, a partition can be regarded as a memory chip (flash), and an internet camera generally includes the following partitions:
kernel partition: the kernel partition is the most core part of the Linux operating system and is used for managing peripheral devices, processors, memories, hard disks and the like in the embedded system. The operating system located in the Kernel partition may be referred to as a main partition system.
Partitioning the Rootfs: i.e., the root file system partition, is a directory structure containing directory structures and files necessary for the start-up of the Linux operating system.
Boot partitioning: namely, the starting partition, is used for guiding the normal starting of the Kernel partition after the equipment is powered on.
Specifically, after the device is powered on, the Boot program is executed first, the Kernel is started by the Boot, after the Kernel loads the relevant driver, the Rootfs partition is mounted, and a default program in the Rootfs partition, which is generally an init program, is executed. Then, the init program returns to start other Linux kernel programs and the user's own programs. Some types of boots also have network access, flash, and erase capabilities.
The memory chip may further include an application partition, a configuration partition, and the like according to the difference between the data storage and the file configuration. The application partition and configuration partition may be partitions of user programs and files or data related to program configuration.
Upgrading partitions means that the corresponding flash blocks are erased and then written into a new program. If an exception occurs during an erase or write operation, the device will be rendered unusable. The upgrading process of the user partition, the configuration partition and other partitions is the same as that of the other two partitions (the Kernel partition and the Rootfs partition), except that the equipment can still be started after the upgrading of the other partitions fails, and once the Kernel partition and the Rootfs partition are damaged, the equipment cannot be started or restarted repeatedly.
S102, detecting whether a main partition upgrading packet aiming at the main partition system exists or not;
in the embodiment of the present invention, when an operating system (i.e., a main partition system) in a Kernel partition is upgraded, after the main partition system is started, whether a main partition upgrade package for the main partition system exists may be detected.
In a specific implementation, after the main partition system is started, the internet server in communication connection with the internet camera may send an upgrade instruction to the internet camera to notify the main partition system of upgrading. Therefore, whether the main partition system needs to be upgraded can be determined by detecting whether an upgrade instruction sent by the internet server is received.
Of course, if there is a problem with the primary partition system, for example, it is detected that the primary partition system fails to be upgraded at the previous time, it may be considered that the primary partition system needs to be upgraded again to restore the normal function of the primary partition system. In this case, it can also be considered that there is a main partition upgrade package for the main partition system.
If the main partition upgrading package for the main partition system exists, step S102 may be executed to start a repair partition system of the internet video camera, and upgrade or repair the main partition system is implemented by the repair partition system.
S103, starting a repair partition system of the Internet camera;
in embodiments of the present invention, the repair partition system may be a stand-alone partition system, not a backup of the primary partition system. The repair partition system comprises a simplified kernel (only comprising network related functions, read-write flash related functions and the like), and the repair partition system mainly has the functions of downloading a main partition system upgrade package from an internet server and upgrading the main partition system.
Since only the repair functionality of the main partition system is included, and no other business logic is included, the repair partition can be trimmed to a minimum, e.g., the total size of the Boot partition, the main partition, and the repair partition can be only 8MB (Megabyte).
S104, guiding the repair partition system to download the main partition upgrade package;
after the repair partition system is started, a Boot program in the Boot partition may Boot the repair partition system to download a main partition upgrade package from the internet server, and then step S104 is executed to complete the upgrade of the main partition system.
And S105, upgrading the main partition system by adopting the main partition upgrading package.
In the embodiment of the invention, the main partition system of the Internet camera is started, whether the main partition upgrading package aiming at the main partition system exists is detected, if so, the repair partition system of the Internet camera can be started, and then the repair partition system is guided to download the main partition upgrading package, so that the main partition system is upgraded by adopting the main partition upgrading package. Aiming at the characteristic that an internet camera must access an internet server, the embodiment realizes the upgrading operation of the main partition system by configuring an independent repairing partition and the repairing partition system in the repairing partition, so that the device can be normally recovered after any partition is damaged in the upgrading process, and the device cannot occupy excessive storage to backup each partition, thereby ensuring the upgrading safety and saving the hardware cost of the device.
Referring to fig. 2, a schematic flow chart illustrating steps of another method for upgrading a system of an internet camera according to an embodiment of the present invention is shown, which may specifically include the following steps:
s201, starting a main partition system of the Internet camera, and detecting whether the main partition system fails to be upgraded;
it should be noted that the present embodiment describes the present solution from the perspective of the main partition system failing in the previous upgrade. In this case, the main partition system needs to be upgraded again through a certain processing means to recover the corresponding functions.
In the embodiment of the invention, when the main partition system of the internet camera is started, whether the main partition system fails to be upgraded at the previous time can be detected.
In the embodiment of the present invention, whether the primary partition system fails to be upgraded or not can be confirmed by flag bit information of the partition in which the primary partition system is located.
In a specific implementation, whether the upgrade fails may be determined by identifying preset identification bit information corresponding to the upgrade package of the main partition system, and then detecting whether the preset identification bit information is different from the current identification bit information of the main partition system.
For example, the last few bytes of a partition may be used as identification bits, such as the last two bytes. The flag bit may be cleared to 0x0000 at the beginning of the upgrade partition. After the upgrade of each upgrade package is completed, the identification bit of each upgrade package should be determined, and if the identification bit of each upgrade package can be 0xfefe, after the upgrade is completed, whether the partition is correctly upgraded can be judged by judging whether the last two bytes of the partition are 0 xfefe. If the last two bytes of the upgraded partition are indeed 0xfefe, the upgrade is successful, and if not, the upgrade is failed.
If the upgrade failure of the main partition system is detected, it can be confirmed that a main partition upgrade package for the main partition system exists, and the main partition system needs to be upgraded or repaired again.
S202, detecting whether an abnormality exists in a repair partition system of the Internet camera;
in the embodiment of the invention, the upgrading or repairing of the main partition system can be realized by repairing the partition system.
The repair partition system in this embodiment may be a stand-alone partition system and not a backup of the primary partition system. The repair partition system comprises a simplified kernel and mainly has the function of downloading a main partition system upgrade package from an internet server to upgrade the main partition system.
Since only the repair functionality of the main partition system is included, and no other business logic is included, the repair partition can be trimmed to a minimum, e.g., the total size of the Boot partition, the main partition, and the repair partition can be only 8MB (Megabyte).
Before the repair partition system is adopted to upgrade or repair the main partition system, whether the repair partition system has an exception or not can be confirmed firstly. If there is no exception in the repair partition system, step S203 may be executed to start the repair partition system through a series of operations; if the repair partition system is abnormal, step S207 may be executed to perform an upgrade operation on the repair partition system by downloading a repair partition upgrade package for the repair partition system.
S203, setting a preset environment variable as a first numerical value, and starting the repair partition system based on the environment variable of the first numerical value;
in the embodiment of the invention, the environment variable in the Boot partition can be set as the first value firstly, and then the recovery partition system is started.
Boot partition contains uboot environment variable, and the function of the Boot partition is responsible for starting a main partition system or repairing the partition system.
In the embodiment of the invention, the setting of the uboot environment variable can be realized by a standard function provided by Boot partition, and whether the main partition system is started or the repair partition system is started is determined by judging the specific value of the uboot environment variable.
Specifically, when the uboot environment variable is erramsk 1, the repairing partition system is started, and a flow for repairing or upgrading the main partition system is entered, and when erramsk 0, the main partition system is started. Therefore, the first value is errisk ═ 1.
S204, guiding the repair partition system to download the main partition upgrade package;
in the embodiment of the invention, the repair partition system can be guided to download the main partition upgrade package from the internet server through the bootstrap program in the Boot partition.
In a specific implementation, the storage location of the primary partition upgrade package in the internet server may be determined first, and then the primary partition upgrade package may be downloaded from the storage location through the repair partition system.
S205, erasing data in a storage chip corresponding to the main partition system;
s206, writing the main partition upgrading packet into a corresponding storage chip of the main partition system;
generally, upgrading a partition is to erase a corresponding flash block and then write a new program.
Therefore, before formal upgrade, data in a memory chip corresponding to the main partition system needs to be erased, and then the downloaded main partition upgrade package is written into the memory chip and refreshed, thereby completing the upgrade process of the main partition system.
S207, downloading a repair partition upgrading package aiming at the repair partition system, and adopting the repair partition upgrading package to upgrade the repair partition system.
In the embodiment of the present invention, when there is an abnormality in the repair partition system, the repair partition system may be first upgraded.
Specifically, a repair partition upgrade package for a repair partition system may be downloaded, and then the repair partition upgrade package is used to perform an upgrade operation on the repair partition system.
In some cases, it may cause the main partition system to not boot properly. Therefore, as an example of the present invention, when the main partition system of the internet camera is not normally started, it may be detected whether the main partition system is abnormal, and if the main partition system is abnormal, a repair partition system may be started, the repair partition system is guided to download the main partition upgrade package, and the main partition system is upgraded by using the main partition upgrade package; if the main partition system has no abnormality, the main partition system can be started again.
For the convenience of understanding, the system upgrading method of the internet camera according to the present invention will be described in several cases.
1. Primary partition system online upgrade
Fig. 3 is a schematic diagram illustrating an online upgrade process of a main partition system according to an embodiment of the present invention. According to the upgrade process shown in fig. 3, after the internet camera is powered on, the main partition system can be started normally. At this time, if an upgrade package for the main partition system exists in the internet server, the internet server sends an upgrade instruction to the internet camera, and the internet camera can start an online upgrade process.
During upgrading, the repair partition system may be first detected to determine whether the repair partition system is normal. If the system of the repair partition is normal, a standard function provided by the Boot partition can be called to set the uboot environment variable to be ERrmask 1, and the internet camera is restarted.
After the Boot partition is restarted, if the environment variable in the Boot partition is errask 1, the repair partition system can be started, the main partition upgrade package is downloaded through the repair partition system, and the main partition system is upgraded by refreshing the main partition flash.
After the upgrade is completed, the environment variable errask in the Boot partition can be cleared, the internet camera is restarted again, if the errask is judged to be 0, the main partition system is started, and the upgrade process is ended.
Of course, when the repair partition system abnormality is detected, the repair partition system online process may be executed.
2. Repairing partition system online upgrades
Fig. 4 is a schematic diagram illustrating an online upgrade process of a repair partition system according to an embodiment of the present invention. According to the upgrade process shown in fig. 4, after the main partition system is normally started, it is detected whether the repair partition system is abnormal, if so, the repair partition upgrade package may be downloaded, and the upgrade of the repair partition system is completed by updating the flash where the repair partition system is located.
3. Automatic repair main partition system
In the embodiment of the invention, automatic repair of the main partition system can be realized. For example, when the main partition system cannot be normally started, the automatic repair of the main partition system can be completed through the boot of the boot partition.
Fig. 5 is a flow chart illustrating an automatic repair of a main partition system according to an embodiment of the present invention. According to the flow shown in fig. 5, after the internet camera is powered on, if the main partition system cannot be normally started, the Boot program may be started, and whether the main partition system is abnormal is detected, if so, the repair partition system may be started by setting an environment variable in the Boot partition to errask 1, and then guiding the repair partition system to download the main partition upgrade package, and updating the flash of the main partition, thereby completing the repair of the main partition system.
After the repair is completed, the internet camera can be restarted.
4. Forced restart main partition system
In the embodiment of the invention, forced restart of the main partition system can be realized.
Fig. 6 is a flowchart illustrating a forced reboot of a main partition system according to an embodiment of the present invention. According to the flow shown in fig. 6, after the internet camera is powered on, if the environment variable is found to be that the error is 1, it may be detected whether the repair partition is normal. If the repair partition system is normal, the repair partition system can be started, and the main partition system is upgraded through the repair partition system. If the partition system exception is repaired, an attempt may be made to boot the main partition system. At this time, the environment variable may not be cleared and still become errask 1, and then the repair partition system online upgrade flow is executed.
It should be noted that, the sequence numbers of the steps in the foregoing embodiments do not mean the execution sequence, and the execution sequence of each process should be determined by the function and the internal logic of the process, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
Referring to fig. 7, a schematic diagram of a system upgrade apparatus for an internet camera according to an embodiment of the present invention is shown, which may specifically include the following modules:
a first starting module 701, configured to start a main partition system of an internet camera;
a detecting module 702, configured to detect whether a primary partition upgrade package exists for the primary partition system;
a second starting module 703, configured to start a repair partition system of the internet camera when a main partition upgrade package exists for the main partition system;
a downloading module 704, configured to direct the repair partition system to download the main partition upgrade package;
an upgrade module 705, configured to perform an upgrade operation on the main partition system by using the main partition upgrade package.
In this embodiment of the present invention, the detection module 702 may specifically include the following sub-modules:
the upgrading instruction detection submodule is used for detecting whether a main partition system upgrading instruction sent by an internet server is received; alternatively, the first and second electrodes may be,
and the upgrading result detection submodule is used for detecting whether the main partition system fails to be upgraded, and if the main partition system fails to be upgraded, determining that a main partition upgrading packet aiming at the main partition system exists.
In the embodiment of the present invention, the upgrade result detection sub-module may specifically include the following units:
the identification bit information identification unit is used for identifying preset identification bit information corresponding to the main partition system upgrading packet;
and the identification bit information detection unit is used for detecting whether the preset identification bit information is different from the current identification bit information of the main partition system.
In this embodiment of the present invention, the second starting module 703 may specifically include the following sub-modules:
the repair partition system detection submodule is used for detecting whether the repair partition system of the Internet camera is abnormal or not;
the repair partition system starting sub-module is used for setting a preset environment variable as a first numerical value if the repair partition system is not abnormal, and starting the repair partition system based on the environment variable of the first numerical value;
and the repair partition system upgrading submodule is used for downloading a repair partition upgrading package aiming at the repair partition system if the repair partition system is abnormal, and upgrading the repair partition system by adopting the repair partition upgrading package.
In this embodiment of the present invention, the downloading module 704 may specifically include the following sub-modules:
the storage position determining submodule is used for determining the storage position of the main partition upgrading packet in the Internet server;
and the main partition upgrading package downloading submodule is used for downloading the main partition upgrading package from the storage position through the repair partition system.
In this embodiment of the present invention, the upgrade module 705 may specifically include the following sub-modules:
the data erasing submodule is used for erasing data in a storage chip corresponding to the main partition system;
and the data writing submodule is used for writing the main partition upgrading packet into a corresponding storage chip of the main partition system.
In the embodiment of the present invention, the apparatus may further include the following modules:
the main partition system detection module is used for detecting whether the main partition system of the Internet camera is abnormal or not when the main partition system is not normally started;
the main partition system upgrading module is used for starting the repair partition system when the main partition system is abnormal, guiding the repair partition system to download the main partition upgrading package, and upgrading the main partition system by adopting the main partition upgrading package;
and the main partition system starting module is used for restarting the main partition system when the main partition system is not abnormal.
For the apparatus embodiment, since it is substantially similar to the method embodiment, it is described relatively simply, and reference may be made to the description of the method embodiment section for relevant points.
Referring to fig. 8, a schematic diagram of an internet camera of one embodiment of the present invention is shown. As shown in fig. 8, the internet camera 800 of the present embodiment includes: a processor 810, a memory 820, and a computer program 821 stored in the memory 820 and operable on the processor 810. The processor 810, when executing the computer program 821, implements steps in various embodiments of the system upgrade method for the internet camera described above, such as steps S101 to S104 shown in fig. 1. Alternatively, the processor 810, when executing the computer program 821, implements the functions of the modules/units in the device embodiments, such as the functions of the modules 701 to 704 shown in fig. 7.
Illustratively, the computer program 821 may be partitioned into one or more modules/units that are stored in the memory 820 and executed by the processor 810 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which may be used to describe the execution process of the computer program 821 in the internet camera 800. For example, the computer program 821 may be divided into a first starting module, a detection module, a second starting module, a downloading module, and an upgrading module, and the specific functions of each module are as follows:
the first starting module is used for starting a main partition system of the Internet camera;
a detection module for detecting whether a main partition upgrade package exists for the main partition system;
the second starting module is used for starting the repair partition system of the Internet camera when a main partition upgrading packet aiming at the main partition system exists;
the downloading module is used for guiding the repair partition system to download the main partition upgrading package;
and the upgrading module is used for upgrading the main partition system by adopting the main partition upgrading package.
The internet camera 800 may be a desktop computer, a notebook, a palm top computer, a cloud server, or other computing devices. The internet camera 800 may include, but is not limited to, a processor 810 and a memory 820. Those skilled in the art will appreciate that fig. 8 is merely an example of the internet camera 800, and does not constitute a limitation of the internet camera 800, and may include more or less components than those shown, or combine some components, or different components, for example, the internet camera 800 may further include an input-output device, a network access device, a bus, etc.
The Processor 810 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 820 may be an internal storage unit of the internet camera 800, such as a hard disk or a memory of the internet camera 800. The memory 820 may also be an external storage device of the internet camera 800, such as a plug-in hard disk provided on the internet camera 800, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 820 may also include both an internal storage unit and an external storage device of the internet camera 800. The memory 820 is used to store the computer program 821 and other programs and data required by the internet camera 800. The memory 820 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that the foregoing division of the functional units and modules is merely illustrative for the convenience and simplicity of description. In practical applications, the above function allocation may be performed by different functional units or modules as needed, that is, the internal structure of the apparatus/terminal device is divided into different functional units or modules, so as to perform all or part of the above described functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method according to the above embodiments may be implemented by a computer program, which may be stored in a computer readable storage medium and used by a processor to implement the steps of the above embodiments of the method. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable storage medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable storage media that does not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same. 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; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (8)

1. A system upgrading method for an Internet camera is characterized by comprising the following steps:
starting a main partition system of the Internet camera;
detecting whether a primary partition upgrade package for the primary partition system exists;
if a main partition upgrading packet aiming at the main partition system exists, starting a repair partition system of the Internet camera, wherein the repair partition system is an independent partition system and comprises a simplified kernel, and the repair partition system is mainly used for downloading the main partition system upgrading packet from an Internet server and upgrading the main partition system;
guiding the repair partition system to download the main partition upgrade package;
adopting the main partition upgrading package to upgrade the main partition system;
when a main partition system of the Internet camera is not normally started, detecting whether the main partition system is abnormal or not;
if the main partition system is abnormal, starting the repair partition system, guiding the repair partition system to download the main partition upgrade package, and performing upgrade operation on the main partition system by adopting the main partition upgrade package;
if the main partition system is not abnormal, the main partition system is restarted;
the step of starting the repair partition system of the internet camera comprises the following steps:
detecting whether an abnormality exists in a repair partition system of the Internet camera;
if the repaired partition system is not abnormal, setting a preset environment variable as a first numerical value, and starting the repaired partition system based on the environment variable of the first numerical value;
if the repair partition system is abnormal, downloading a repair partition upgrade package aiming at the repair partition system, and adopting the repair partition upgrade package to carry out upgrade operation on the repair partition system;
the method further comprises the following steps:
after the internet camera is powered on, if the environment variable is errask which is 1, whether the repair partition is normal or not is detected, if the repair partition system is normal, the repair partition system can be started, the main partition system is upgraded through the repair partition system, and if the repair partition system is abnormal, the main partition system is started.
2. The method of claim 1, wherein the step of detecting whether a primary partition upgrade package exists for the primary partition system comprises:
detecting whether a main partition system upgrading instruction sent by an internet server is received;
or detecting whether the main partition system fails to be upgraded, and if the main partition system fails to be upgraded, determining that a main partition upgrade package aiming at the main partition system exists.
3. The method of claim 2, wherein the step of detecting whether the primary partition system fails to be upgraded comprises:
identifying preset identification bit information corresponding to the main partition system upgrading packet;
and detecting whether the preset identification bit information is different from the current identification bit information of the main partition system.
4. The method of claim 1, wherein the step of directing the repair partition system to download the main partition upgrade package comprises:
determining the storage position of the main partition upgrading packet in an internet server;
downloading, by the repair partition system, the primary partition upgrade package from the storage location.
5. The method of claim 4, wherein the step of performing an upgrade operation on the primary partition system using the primary partition upgrade package comprises:
erasing data in a storage chip corresponding to the main partition system;
and writing the main partition upgrading packet into a corresponding storage chip of the main partition system.
6. A system upgrade apparatus of an internet camera, comprising:
the first starting module is used for starting a main partition system of the Internet camera;
a detection module for detecting whether a main partition upgrade package exists for the main partition system;
the second starting module is used for starting a repair partition system of the Internet camera when a main partition upgrading packet aiming at the main partition system exists, wherein the repair partition system is an independent partition system and comprises a simplified kernel, and the repair partition system is mainly used for downloading the main partition system upgrading packet from an Internet server and upgrading the main partition system;
the downloading module is used for guiding the repair partition system to download the main partition upgrading package;
the upgrading module is used for upgrading the main partition system by adopting the main partition upgrading package;
the main partition system detection module is used for detecting whether the main partition system of the Internet camera is abnormal or not when the main partition system is not normally started;
the main partition system upgrading module is used for starting the repair partition system when the main partition system is abnormal, guiding the repair partition system to download the main partition upgrading package, and upgrading the main partition system by adopting the main partition upgrading package;
a main partition system starting module, configured to restart the main partition system when there is no abnormality in the main partition system
The second activation module comprises:
the repair partition system detection submodule is used for detecting whether the repair partition system of the Internet camera is abnormal or not;
the repair partition system starting sub-module is used for setting a preset environment variable as a first numerical value if the repair partition system is not abnormal, and starting the repair partition system based on the environment variable of the first numerical value;
the repair partition system upgrading submodule is used for downloading a repair partition upgrading package aiming at the repair partition system if the repair partition system is abnormal, and upgrading the repair partition system by adopting the repair partition upgrading package;
the system upgrading device is further used for detecting whether the repair partition is normal or not after the internet camera is powered on and if the environment variable is equal to 1, starting the repair partition system if the repair partition system is normal, upgrading the main partition system through the repair partition system, and starting the main partition system if the repair partition system is abnormal.
7. An internet camera comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the system upgrade method of the internet camera according to any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the system upgrade method for an internet camera according to any one of claims 1 to 5.
CN201811325456.XA 2018-11-08 2018-11-08 System upgrading method and device for Internet camera Active CN109582332B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811325456.XA CN109582332B (en) 2018-11-08 2018-11-08 System upgrading method and device for Internet camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811325456.XA CN109582332B (en) 2018-11-08 2018-11-08 System upgrading method and device for Internet camera

Publications (2)

Publication Number Publication Date
CN109582332A CN109582332A (en) 2019-04-05
CN109582332B true CN109582332B (en) 2022-04-01

Family

ID=65921900

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811325456.XA Active CN109582332B (en) 2018-11-08 2018-11-08 System upgrading method and device for Internet camera

Country Status (1)

Country Link
CN (1) CN109582332B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110333882B (en) * 2019-05-09 2023-03-14 阿波罗智联(北京)科技有限公司 System upgrading method, device, equipment and computer readable medium
CN111522571B (en) * 2020-03-12 2024-02-09 深圳英飞拓仁用信息有限公司 Equipment upgrading method and device, terminal equipment and storage medium
CN114995845A (en) * 2021-03-01 2022-09-02 晶晨半导体(上海)股份有限公司 OTA (over the air) upgrading method and device
CN112783535A (en) * 2021-03-10 2021-05-11 广州优胜汽车科技有限公司 Firmware upgrading method, embedded device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1749963A (en) * 2004-09-14 2006-03-22 华为技术有限公司 Upgrading method for Boot software and recovering method for Boot software
CN102508686A (en) * 2011-11-30 2012-06-20 苏州希图视鼎微电子有限公司 Method and system for realizing safe upgrading of system
CN106210877A (en) * 2016-08-17 2016-12-07 青岛海信电器股份有限公司 The method for upgrading system of intelligent television and device
CN107704258A (en) * 2017-10-27 2018-02-16 深圳市恒扬数据股份有限公司 Uboot upgrade methods, system and terminal device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9021457B2 (en) * 2013-01-22 2015-04-28 Apple Inc. Method and system for dynamically resizing enclosed storage device partitions

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1749963A (en) * 2004-09-14 2006-03-22 华为技术有限公司 Upgrading method for Boot software and recovering method for Boot software
CN102508686A (en) * 2011-11-30 2012-06-20 苏州希图视鼎微电子有限公司 Method and system for realizing safe upgrading of system
CN106210877A (en) * 2016-08-17 2016-12-07 青岛海信电器股份有限公司 The method for upgrading system of intelligent television and device
CN107704258A (en) * 2017-10-27 2018-02-16 深圳市恒扬数据股份有限公司 Uboot upgrade methods, system and terminal device

Also Published As

Publication number Publication date
CN109582332A (en) 2019-04-05

Similar Documents

Publication Publication Date Title
CN109582332B (en) System upgrading method and device for Internet camera
JP4371771B2 (en) Power management block used in non-volatile memory system
US6308265B1 (en) Protection of boot block code while allowing write accesses to the boot block
US9164756B2 (en) Software updating process for an embedded device
US8918778B2 (en) Method of fail safe flashing management device and application of the same
US8423991B2 (en) Embedded network device and firmware upgrading method
EP2998861B1 (en) Implementing and deleting method and device for intelligent terminal multi-operation system
US20070055969A1 (en) System and method for updating firmware
US9448889B2 (en) BIOS failover update with service processor
US7512777B2 (en) Method and system for maintaining system management BIOS
US10481901B2 (en) System and method for performing firmware update by patching
US9448808B2 (en) BIOS update with service processor without serial peripheral interface (SPI) access
US20050021933A1 (en) Method for booting computer system with memory card
CN103853566A (en) Basic input output system (BIOS) updating system and method
CN110874237A (en) Software upgrading method, device, terminal and readable storage medium
US20080098388A1 (en) Safe Flashing
CN104866397A (en) Computer System And Control Method
US10705827B2 (en) Method for updating system information of a computer device
CN113778485A (en) System operation method and device of electronic chip, electronic chip and storage medium
CN113094107B (en) Data protection method, device, equipment and computer storage medium
CN110795155B (en) System starting method and device, electronic equipment and storage medium
CN115129384A (en) Electronic equipment and running method of starting program of electronic equipment
CN112667444A (en) System upgrading method, storage medium and terminal equipment
CN102023906B (en) Microprocessor of portable terminal as well as portable terminal and repair method thereof
KR100575927B1 (en) Method for booting the nand flash memory using multi boot loader in mobile station

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