CN113254037A - Version upgrading method and device, electronic equipment and storage medium - Google Patents

Version upgrading method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113254037A
CN113254037A CN202110515598.8A CN202110515598A CN113254037A CN 113254037 A CN113254037 A CN 113254037A CN 202110515598 A CN202110515598 A CN 202110515598A CN 113254037 A CN113254037 A CN 113254037A
Authority
CN
China
Prior art keywords
partition
target
local
upgrading
upgrade package
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.)
Pending
Application number
CN202110515598.8A
Other languages
Chinese (zh)
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 Tianshitong Vision Co ltd
Original Assignee
Shenzhen Tianshitong Vision 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 Tianshitong Vision Co ltd filed Critical Shenzhen Tianshitong Vision Co ltd
Priority to CN202110515598.8A priority Critical patent/CN113254037A/en
Publication of CN113254037A publication Critical patent/CN113254037A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The invention discloses a version upgrading method, a version upgrading device, electronic equipment and a storage medium, and relates to the technical field of software upgrading, wherein the version upgrading method comprises the following steps: acquiring a target upgrade package; analyzing the target upgrading packet to obtain a target partition of the target upgrading packet; acquiring a local partition corresponding to a target partition; respectively checking the target partition and the local partition to obtain a target check value corresponding to the target partition and a local check value corresponding to the local partition; if the target check value is different from the local check value, erasing and writing the local partition; and upgrading the version according to the erased local partition. The version upgrading method can reduce the probability of the problem that the NVR cannot be normally started due to upgrading failure of the network video recorder during software upgrading, and simultaneously reduce the time for software upgrading.

Description

Version upgrading method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of software upgrading technologies, and in particular, to a version upgrading method and apparatus, an electronic device, and a storage medium.
Background
Nvr (network Video recorder), i.e. network hard disk recorder, is a kind of Video recording equipment, which is used in cooperation with network camera or Video encoder to realize recording of digital Video transmitted through network. In the software upgrading process of the NVR, the reason why the NVR cannot be normally started due to upgrading failure mainly includes the following points: (1) and frequently erasing device errors caused by flash. flash has erasing service life, and frequent erasing can affect the service life; (2) the important partition erasing and writing abnormality is caused by artificial or irresistible power-off operation in the upgrading process. In the process of erasing important areas of flash, such as boot, kernel, and rootfs, because the partition is erased and unwritten due to power failure, or the data is unwritten, NVR cannot be normally started.
At present, the NVR software upgrading mode is to divide the erasing data according to the flash partition and write the data content of the new upgrade package. The method can erase and write the flash regardless of the change of the content of each partition before and after upgrading, and has the following defects: (1) frequent erasing can affect the life of the flash. If the data of the partition is not changed before and after upgrading, erasing is not necessary. (2) Different types of flash, the size of flash written and erased affects the upgrade time. If the partition data is not changed before and after upgrading, the number of erased partitions can be reduced, and the upgrading time can be shortened. (3) The probability of incapability of starting due to abnormal erasing and writing of important flash areas is increased. In each upgrade, the important area is erased and written regardless of whether the important area needs to be erased or not, and the probability of incapability of starting due to abnormal erasing or power failure is increased.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art. Therefore, the embodiment of the invention provides a version upgrading method, which can reduce the probability of the problem that the network video recorder fails to upgrade and the NVR cannot be normally started during software upgrading, and simultaneously reduce the time for software upgrading.
The embodiment of the invention also provides a version upgrading device.
The embodiment of the invention also provides the electronic equipment.
The embodiment of the invention also provides a computer readable storage medium.
The version upgrading method according to the embodiment of the first aspect of the invention comprises the following steps:
acquiring a target upgrade package;
analyzing the target upgrading packet to obtain a target partition of the target upgrading packet;
acquiring a local partition corresponding to the target partition;
respectively checking the target partition and the local partition to obtain a target check value corresponding to the target partition and a local check value corresponding to the local partition;
erasing the local partition if the target check value is different from the local check value;
and upgrading the version according to the erased local partition.
The version upgrading method according to the embodiment of the first aspect of the invention has at least the following beneficial effects: the method comprises the steps of firstly obtaining a target upgrading packet, then analyzing the target upgrading packet to obtain a target partition of the target upgrading packet, obtaining a local partition corresponding to the target partition, then respectively checking the target partition and the local partition to obtain a target check value corresponding to the target partition and a local check value corresponding to the local partition, erasing the local partition if the target check value is different from the local check value, and finally performing version upgrading according to the erased local partition, so that the probability of the problem that the network video recorder fails in upgrading software and cannot normally start the NVR can be reduced, and the time for upgrading software can be reduced.
According to some embodiments of the invention, the method further comprises: and if the target check value is the same as the local check value, analyzing the target upgrade package to obtain a target partition of the target upgrade package.
According to some embodiments of the present invention, before the analyzing the target upgrade package to obtain the target partition of the target upgrade package, the method further includes: acquiring a plurality of partition files of the target upgrade package; detecting data integrity of the plurality of partition files; and if the data of the partition files are complete, executing the step of analyzing the target upgrade package.
According to some embodiments of the invention, the method further comprises: and if the data of the partition files are incomplete, executing the step of acquiring the target upgrade package.
According to some embodiments of the present invention, the analyzing the target upgrade package to obtain the target partition of the target upgrade package includes: analyzing the partition selection condition corresponding to the target upgrade package; and selecting the target partition from the plurality of partition files according to the partition selection condition.
According to some embodiments of the present invention, the performing version upgrade according to the erased local partition includes: acquiring target data of the target partition; and writing the target data into the erased local partition so as to carry out version upgrading operation on the local partition.
The version upgrading device according to the second aspect embodiment of the present invention includes:
the first acquisition module is used for acquiring a target upgrade package;
the analysis module is used for analyzing the target upgrading packet to obtain a target partition of the target upgrading packet;
the second acquisition module is used for acquiring a local partition corresponding to the target partition;
the verification module is used for respectively verifying the target partition and the local partition to obtain a target verification value corresponding to the target partition and a local verification value corresponding to the local partition;
the erasing module is used for erasing the local partition if the target check value is different from the local check value;
and the upgrading module is used for upgrading the version according to the erased local partition.
The version upgrading device according to the embodiment of the second aspect of the invention has at least the following advantages: by executing the version upgrading method of the embodiment of the first aspect of the invention, the probability of the problem that the NVR cannot be normally started due to upgrading failure of the network video recorder during software upgrading can be reduced, and the time for software upgrading is reduced.
An electronic device according to an embodiment of the third aspect of the invention includes: at least one processor, and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions that are executed by the at least one processor to cause the at least one processor to implement a version upgrade method according to the first aspect when executing the instructions.
According to the electronic device of the embodiment of the third aspect of the invention, at least the following beneficial effects are achieved: by executing the version upgrading method of the embodiment of the first aspect of the invention, the probability of the problem that the network video recorder fails to upgrade and the NVR cannot be normally started during software upgrading can be reduced, and the time for software upgrading is reduced at the same time.
A computer-readable storage medium according to an embodiment of the fourth aspect of the present invention, the storage medium storing computer-executable instructions for causing a computer to perform a version upgrade method according to the first aspect.
The computer-readable storage medium according to the fourth aspect of the present invention has at least the following advantages: by executing the version upgrading method of the embodiment of the first aspect of the invention, the probability of the problem that the network video recorder fails to upgrade and the NVR cannot be normally started during software upgrading can be reduced, and the time for software upgrading is reduced at the same time.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a flowchart illustrating a version upgrade method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a version upgrade process performed on an erased local partition according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a version upgrading apparatus according to an embodiment of the present invention;
fig. 4 is a functional block diagram of an electronic device according to an embodiment of the invention.
Reference numerals:
the system comprises a first acquisition module 300, a parsing module 310, a second acquisition module 320, a verification module 330, an erasing module 340, an upgrading module 350, a processor 400, a memory 410, a data transmission module 420, a camera 430 and a display screen 440.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
In the description of the present invention, unless otherwise explicitly limited, terms such as arrangement, installation, connection and the like should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meanings of the above terms in the present invention in combination with the specific contents of the technical solutions.
First, several terms referred to in the present application are resolved:
1. NVR: network Video Recorder, i.e. Network hard disk Recorder. The main function of NVR is to receive, store and manage digital video code streams transmitted by IPC (network camera) devices through a network, thereby realizing the advantage of a distributed architecture brought by networking.
2. CRC: cyclic Redundancy Check (crc), which is the most commonly used error checking code in the field of data communication, is characterized in that the lengths of the information field and the Check field can be arbitrarily selected.
At present, the NVR software upgrading mode is to divide the erasing data according to the flash partition and write the data content of the new upgrade package. The method can erase and write the flash regardless of the change of the content of each partition before and after upgrading, and has the following defects: (1) frequent erasing can affect the life of the flash. If the data of the partition is not changed before and after upgrading, erasing is not necessary. (2) Different types of flash, the size of flash written and erased affects the upgrade time. If the partition data is not changed before and after upgrading, the number of erased partitions can be reduced, and the upgrading time can be shortened. (3) The probability of incapability of starting due to abnormal erasing and writing of important flash areas is increased. In each upgrade, the important area is erased and written regardless of whether the important area needs to be erased or not, and the probability of incapability of starting due to abnormal erasing or power failure is increased.
Based on this, the embodiment of the invention provides a version upgrading method, a version upgrading device, an electronic device and a storage medium, which can reduce the probability of the problem that the network video recorder fails to upgrade and causes the problem that the NVR cannot be normally started during software upgrading, and reduce the time for software upgrading.
Referring to fig. 1, a version upgrade method according to an embodiment of the first aspect of the present invention includes:
and step S100, acquiring a target upgrade package.
Wherein, the target upgrade package may be an upgrade package for upgrading the NVR. Optionally, the target upgrade package may be read from a mobile storage device (e.g., a usb disk, a mobile hard disk, etc.), or may be downloaded through a cloud server, that is, the upgrade package is downloaded from the cloud server to the NVR locally.
And step S110, analyzing the target upgrading packet to obtain a target partition of the target upgrading packet.
The target partition can be a partition file in the target upgrade package, and the target partition can be one or more. Optionally, file information and integrity detection is performed on the target upgrade package, for example, CRC is performed on the partition data files in the target upgrade package, and if the data of the target upgrade package is complete, the target upgrade package may be unpacked to obtain each partition file, including: important partitions such as uboot partition, kernel partition and rootfs partition, and each partition file of the target upgrade package can be set according to the partition composition of an actual product. The target partitions can be selected from the partition files according to requirements, for example, the uboot partitions are used as the target partitions, and the uboot partitions, the kernel partitions and the rootfs partitions can be simultaneously used as a plurality of target partitions respectively.
Step S120, a local partition corresponding to the target partition is acquired.
Wherein the local partition may be a partition file that the NVR locally corresponds to the target partition. Optionally, if the target partition is an uboot partition, the uboot partition in the NVR local may be used as a local partition corresponding to the target partition; if the target partition is a kernel partition, taking the kernel partition in the NVR local as a local partition corresponding to the target partition; if the target partition is a rootfs partition, the rootfs partition in the NVR local can be used as a local partition corresponding to the target partition
Step S130, the target partition and the local partition are respectively verified, and a target verification value corresponding to the target partition and a local verification value corresponding to the local partition are obtained.
Optionally, CRC check may be performed on the target partition to obtain a CRC check value corresponding to the target partition, that is, the target check value is obtained; the CRC can be performed on the local partition to obtain a CRC value corresponding to the local partition, namely the local check value. And then whether the target check value corresponding to the target upgrade package is consistent with the local check value of the NVR can be judged, and the version detection is carried out on the target upgrade package stored in the NVR.
In step S140, if the target verification value is different from the local verification value, the local partition is erased.
Optionally, assuming that the target partition is an uboot partition, the check value of the uboot partition in the target upgrade package is different from the check value of the local uboot partition of the NVR, that is, if the target check value is different from the local check value, it may be determined that the data in the target partition is new content compared with the data in the local partition, and the data in the partition is changed before and after the upgrade, so that it may be determined that the target upgrade package is a new version, and therefore, the local partition with inconsistent check value needs to be erased, and only the local partition with different partition content from the target partition is controlled to be erased, thereby avoiding the problem that the NVR cannot be started due to device errors caused by frequently erasing the flash partition and the abnormal important flash area, and reducing the upgrade time.
And S150, upgrading the version according to the erased local partition.
Optionally, after erasing the local partition, the new data content in the target partition may be written into the local partition, that is, the NVR is updated.
According to the version upgrading method, the target upgrading packet is obtained firstly, then the target upgrading packet is analyzed to obtain the target partition of the target upgrading packet, the local partition corresponding to the target partition is obtained, then the target partition and the local partition are verified respectively to obtain the target verification value corresponding to the target partition and the local verification value corresponding to the local partition, if the target verification value is different from the local verification value, the local partition is erased, finally, the version upgrading is carried out according to the erased local partition, the probability that the network video recorder fails in upgrading the software and the NVR cannot be started normally can be reduced, and meanwhile, the software upgrading time is shortened.
In some embodiments of the present invention, the version upgrade method further comprises:
and if the target check value is the same as the local check value, analyzing the target upgrade package to obtain a target partition of the target upgrade package. Optionally, assuming that the target partition is an uboot partition, the check value of the uboot partition in the target upgrade package is the same as the check value of the local uboot partition of the NVR, that is, if the target check value is the same as the local check value, it may be determined that there is no change before and after the upgrade of the partition data, so that the local uboot partition of the NVR does not need to be erased, so as to reduce erasing frequency and upgrade time. Further, after it is determined that the uboot partition in the NVR local is not required to be erased and written, the check values of other partitions in the target upgrade package and the partition corresponding to the NVR local may be continuously compared, that is, the target upgrade package is analyzed to obtain the target partition of the target upgrade package, for example, the kernel partition in the target upgrade package is used as a new target partition, the check value of the new target partition is compared with the check value of the kernel partition in the NVR local, and whether the partition data is changed before and after being upgraded is determined. All important partitions in the target upgrade package are sequentially compared one by one, the local partitions with different check values are erased, the local partitions with the same check values do not need to be erased, the problem that the service life of the flash is affected by frequent erasing is solved, and the erasing service life of the flash partitions is prolonged.
In some embodiments of the present invention, before parsing the target upgrade package to obtain the target partition of the target upgrade package, the method further includes:
and acquiring a plurality of partition files of the target upgrade package. Optionally, the unlocking of the target upgrade package may obtain each partition data file of the target upgrade package, for example, the important area of the target upgrade package includes: and uboot partitioning, kernel partitioning, rootfs partitioning and the like to obtain a plurality of partition files of the target upgrade package.
Data integrity of a plurality of partition files is detected. Optionally, the data file structure of the partition file may be a designated file header + partition data, where the designated file header includes necessary information and a CRC check value, and the partition data is data content of the partition. CRC (cyclic redundancy check) can be performed on a plurality of partition files in the target upgrade package, namely, the partition data files in the target upgrade package are checked, and the data integrity of the partition files in the target upgrade package is checked. If the CRC values of the partition files are the same, the data integrity of the target upgrade package can be determined; if the CRC values of the partition files are different, the data of the target upgrade package can be determined to be incomplete.
And if the data of the partition files are complete, analyzing the target upgrade package. Optionally, when CRC check values of the plurality of partition files are the same, it may be determined that data of the plurality of partition files is complete, and therefore it may be determined that data of the target upgrade package is complete, and the target upgrade package may be analyzed to obtain the target partition of the target upgrade package. The integrity of the target upgrade package is checked in advance, and if the data is complete, the target upgrade package is analyzed, so that the integrity of the file of the target upgrade package can be ensured.
In some embodiments of the present invention, the version upgrade method further comprises:
and if the data of the partition files are incomplete, executing the step of acquiring the target upgrade package. Optionally, if CRC check values of the partition files are different, it may be determined that data of the target upgrade package is incomplete, and therefore the incomplete target upgrade package cannot be analyzed, and if a new upgrade package needs to be obtained again, the step of obtaining the target upgrade package is skipped. When the data of the target upgrade package is incomplete, in order to avoid analyzing the target upgrade package to make mistakes, a new upgrade package needs to be obtained again, and the data integrity and accuracy of the target upgrade package can be ensured.
In some embodiments of the present invention, analyzing the target upgrade package to obtain the target partition of the target upgrade package includes:
and analyzing the partition selection condition corresponding to the target upgrade package. The partition selecting condition may be a specific condition for selecting the target partition from the plurality of partition files in the target upgrade package. Optionally, the partition selection condition may be set according to a requirement, for example, the partition selection condition may be a specific condition determined according to an actual product flash partition composition, such as a specific condition for determining that the partition file of the target upgrade package is an important partition.
And selecting a target partition from the plurality of partition files according to the partition selection condition. Optionally, if the partition selection condition is a specific condition for determining that the partition file of the target upgrade package is an important partition, the target partition may be selected according to the partition selection condition, for example, it is assumed that the plurality of partition files of the target upgrade package include: the uboot partition, the kernel partition, the rootfs partition and the like can be formed according to the flash partition of an actual product, the uboot partition is selected to serve as a target partition, the kernel partition can be selected to serve as the target partition according to the flash partition of the actual product, and the rootfs partition can be selected to serve as the target partition. The target partition is selected from the partition files in the target upgrading packet through the partition selection condition, the important region and the target partition of the flash can be extracted, the target partition can be erased and written one by one, and the software upgrading time is shortened.
Referring to fig. 2, in some embodiments of the present invention, performing version upgrade according to the erased local partition includes:
step S200, acquiring target data of the target partition.
Wherein the target data may be partition data in the target partition. Optionally, if the check values of the target partition and the local partition are different and the data contents are inconsistent, the NVR local partition needs to be erased and written to write new partition data, and the target data of the target partition can be used as new partition data written to the NVR local partition.
Step S210, writing the target data into the erased local partition so as to perform version upgrading operation on the local partition.
Optionally, the target data may be used as new partition data written into the NVR local partition, so that the target data may be written into the erased local partition to perform operations related to the upgrading of the NVR. When the partition data is changed before and after being upgraded, the corresponding local partition is erased, and the new partition data (namely the target data) in the target partition is written into the erased local partition, so that the number of erased partitions is reduced, and the upgrading time is shortened.
The following describes the procedure of the version upgrading method according to an embodiment of the present invention in detail. It is to be understood that the following description is only exemplary, and not a specific limitation of the invention.
The version upgrading method comprises the following steps:
firstly, an upgrade package is obtained.
The upgrade package may be read from a mobile storage device (e.g., a usb disk or a mobile hard disk), or may be downloaded by a cloud server to obtain the upgrade package of the NVR. If the upgrade package is downloaded through the cloud server, the upgrade package can be downloaded from the cloud server to the NVR local.
And secondly, carrying out integrity check and version detection on the upgrade package.
And (3) carrying out integrity detection on the upgrade package: the upgrade package may be unpacked to obtain each partition file, including: uboot partition, kernel partition, rootfs partition, etc. The data file structure of the partition file may be a designated header + partition data, where the designated header contains necessary information and a CRC check value, and the partition data is data content of the partition. Furthermore, CRC (cyclic redundancy check) can be carried out on each partition file, if the obtained check values are the same, the upgrade packet data can be determined to be complete, and therefore version detection can be carried out on the upgrade packet according to the local corresponding partition of the NVR (namely the local partition of the NVR corresponding to the partition file in the upgrade packet); if the obtained check values are different, it can be determined that the upgrade package data is incomplete, so that the first step needs to be executed again, namely, the upgrade package is obtained again.
And (3) carrying out version detection on the upgrade package: if the obtained upgrade packet data is complete, performing CRC on the local partition, and judging whether a CRC value corresponding to a partition file of the upgrade packet is consistent with a CRC value of the local partition, so as to judge whether the content of the NVR local partition is the same as the content of the new version in the upgrade packet, namely, whether the upgrade packet is the new version, thereby realizing the version detection of the upgrade packet. If the CRC value corresponding to the partition file of the upgrade package is consistent with the CRC value of the local partition, the data of the local partition before and after the upgrade is determined to be unchanged, so that the local partition is not required to be erased and written; if the CRC value corresponding to the partition file of the upgrade package is not consistent with the CRC value of the local partition, partition data in the partition file of the upgrade package can be determined to be new data, so that version upgrade needs to be performed on the partition, whether the data of the partition files in the upgrade package are the new data or not can be sequentially judged, and therefore all the corresponding local partitions needing to be upgraded are extracted.
And thirdly, upgrading the NVR.
When the CRC check value corresponding to the partition file of the upgrade package is not consistent with the CRC check value of the local partition, the new data in the upgrade package needs to be written into the NVR local partition, all the data of the corresponding local partition that needs to be upgraded can be erased, and the new partition data in the corresponding upgrade package is sequentially written into the erased local partition, thereby completing the version upgrade of the NVR.
The version upgrading method can reduce the probability of the problem that the NVR cannot be normally started due to upgrading failure of the network video recorder during software upgrading, and simultaneously reduce the time of software upgrading
Referring to fig. 3, a version upgrade apparatus according to a second aspect embodiment of the present invention includes:
the first acquisition module is used for acquiring a target upgrade package;
the analysis module is used for analyzing the target upgrade package to obtain a target partition of the target upgrade package;
the second acquisition module is used for acquiring a local partition corresponding to the target partition;
the verification module is used for respectively verifying the target partition and the local partition to obtain a target verification value corresponding to the target partition and a local verification value corresponding to the local partition;
the erasing module is used for erasing the local partition if the target check value is different from the local check value;
and the upgrading module is used for upgrading the version according to the erased local partition.
By executing the version upgrading method of the embodiment of the first aspect of the invention, the version upgrading device can reduce the probability of the problem that the NVR cannot be normally started due to upgrading failure of the network video recorder during software upgrading, and simultaneously reduce the time for software upgrading.
Referring to fig. 4, an embodiment of the third aspect of the present invention further provides a functional module diagram of an electronic device, including: at least one processor 400, and a memory 410 communicatively coupled to the at least one processor 400; and the system also comprises a data transmission module 420, a camera 420 and a display screen 440.
Wherein the processor 400 is adapted to perform the version-up method in the first embodiment by calling a computer program stored in the memory 410.
The data transmission module 420 is connected to the processor 400, and is used for implementing data interaction between the data transmission module 420 and the processor 400.
The cameras 430 may include a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera 430 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The display screen 440 may be used to display information entered by the user or provided to the user. The Display screen 440 may include a Display panel, and optionally, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel may cover the display panel, and when the touch panel detects a touch operation thereon or nearby, the touch panel transmits the touch operation to the processor 400 to determine the type of the touch event, and then the processor 400 provides a corresponding visual output on the display panel according to the type of the touch event. In some embodiments, the touch panel may be integrated with the display panel to implement input and output functions.
The memory, as a non-transitory storage medium, may be used to store non-transitory software programs as well as non-transitory computer-executable programs, such as the version-up method in the embodiment of the first aspect of the present invention. The processor implements the version upgrade method in the above-described first embodiment by executing the non-transitory software program and the instructions stored in the memory.
The memory 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 the version-up method executed in the embodiment of the first aspect described above. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the terminal over 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 non-transitory software programs and instructions required to implement the version-up method in the first aspect embodiment described above are stored in a memory and, when executed by one or more processors, perform the version-up method in the first aspect embodiment described above.
Embodiments of the fourth aspect of the present invention also provide a computer-readable storage medium storing computer-executable instructions for: the version upgrade method in the embodiment of the first aspect is performed.
In some embodiments, the storage medium stores computer-executable instructions, which are executed by one or more control processors, for example, by one of the processors in the electronic device of the third aspect, and may cause the one or more processors to execute the version upgrade method in the first aspect.
The embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present invention.
The above-described embodiments of the apparatus are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, i.e. may be located in one place, or may also be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
One of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an illustrative embodiment," "an example," "a specific example," or "some examples" or the like mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims (9)

1. The version upgrading method is characterized by comprising the following steps:
acquiring a target upgrade package;
analyzing the target upgrading packet to obtain a target partition of the target upgrading packet;
acquiring a local partition corresponding to the target partition;
respectively checking the target partition and the local partition to obtain a target check value corresponding to the target partition and a local check value corresponding to the local partition;
erasing the local partition if the target check value is different from the local check value;
and upgrading the version according to the erased local partition.
2. The method of claim 1, further comprising:
and if the target check value is the same as the local check value, analyzing the target upgrade package to obtain a target partition of the target upgrade package.
3. The method of claim 1, wherein before the parsing the target upgrade package to obtain the target partition of the target upgrade package, further comprising:
acquiring a plurality of partition files of the target upgrade package;
detecting data integrity of the plurality of partition files;
and if the data of the partition files are complete, executing the step of analyzing the target upgrade package.
4. The method of claim 3, further comprising:
and if the data of the partition files are incomplete, executing the step of acquiring the target upgrade package.
5. The method of claim 3, wherein the parsing the target upgrade package to obtain the target partition of the target upgrade package comprises:
analyzing the partition selection condition corresponding to the target upgrade package;
and selecting the target partition from the plurality of partition files according to the partition selection condition.
6. The method according to any of claims 1 to 5, wherein said performing version-up according to said erased local partition comprises:
acquiring target data of the target partition;
and writing the target data into the erased local partition so as to carry out version upgrading operation on the local partition.
7. Version upgrading device, its characterized in that includes:
the first acquisition module is used for acquiring a target upgrade package;
the analysis module is used for analyzing the target upgrading packet to obtain a target partition of the target upgrading packet;
the second acquisition module is used for acquiring a local partition corresponding to the target partition;
the verification module is used for respectively verifying the target partition and the local partition to obtain a target verification value corresponding to the target partition and a local verification value corresponding to the local partition;
the erasing module is used for erasing the local partition if the target check value is different from the local check value;
and the upgrading module is used for upgrading the version according to the erased local partition.
8. An electronic device, comprising:
at least one processor, and,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions for execution by the at least one processor to cause the at least one processor, when executing the instructions, to implement the version-up method of any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that the storage medium stores computer-executable instructions for causing a computer to perform the version upgrade method according to any one of claims 1 to 6.
CN202110515598.8A 2021-05-12 2021-05-12 Version upgrading method and device, electronic equipment and storage medium Pending CN113254037A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110515598.8A CN113254037A (en) 2021-05-12 2021-05-12 Version upgrading method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110515598.8A CN113254037A (en) 2021-05-12 2021-05-12 Version upgrading method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113254037A true CN113254037A (en) 2021-08-13

Family

ID=77222906

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110515598.8A Pending CN113254037A (en) 2021-05-12 2021-05-12 Version upgrading method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113254037A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110320794A1 (en) * 2010-06-28 2011-12-29 Chung-Jen Yang Flash System And Method For Updating The Flash System
CN106598686A (en) * 2017-01-03 2017-04-26 青岛海信移动通信技术股份有限公司 Method and apparatus for realizing differential upgrading debugging in system partition
CN111522571A (en) * 2020-03-12 2020-08-11 深圳英飞拓科技股份有限公司 Equipment upgrading method and device, terminal equipment and storage medium
CN111966375A (en) * 2020-08-13 2020-11-20 科华恒盛股份有限公司 Firmware upgrading method, system, equipment and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110320794A1 (en) * 2010-06-28 2011-12-29 Chung-Jen Yang Flash System And Method For Updating The Flash System
CN106598686A (en) * 2017-01-03 2017-04-26 青岛海信移动通信技术股份有限公司 Method and apparatus for realizing differential upgrading debugging in system partition
CN111522571A (en) * 2020-03-12 2020-08-11 深圳英飞拓科技股份有限公司 Equipment upgrading method and device, terminal equipment and storage medium
CN111966375A (en) * 2020-08-13 2020-11-20 科华恒盛股份有限公司 Firmware upgrading method, system, equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
US20070226400A1 (en) Information processing apparatus and method of using otp memory
CN105718268A (en) Method and device for verifying OTA multi-pack upgrading
CN106250192A (en) The method for upgrading software of host computer and system
US20100186007A1 (en) Image display apparatus and method for controlling the same
CN108848418B (en) Set-top box centralized upgrading method
CN110928559A (en) Data burning method and device, electronic equipment and storage medium
CN104915226A (en) Network device software starting method, device and network device
CN108228215B (en) OTA upgrade package pushing method and device for terminal equipment
CN109684573A (en) Target Photo display methods and device, storage medium, electronic equipment
CN109766140A (en) A kind of localization method and device that set-top box starting is abnormal
CN110362371B (en) View level control method, device and system, computer equipment and medium
CN115620799A (en) Firmware simulation-based fault site backtracking method and equipment and readable storage medium
WO2016082450A1 (en) Method for upgrading user terminal, and user terminal
CN112783764B (en) Automatic testing method and device for application program, storage medium and terminal
CN113254037A (en) Version upgrading method and device, electronic equipment and storage medium
CN113032183A (en) System management method, device, computer equipment and storage medium
CN116185774A (en) Log monitoring installation method, device, computer equipment and storage medium
CN107172493B (en) OTA (over the air) upgrading method compatible with different partition types
CN112181467B (en) Method and device for upgrading memory firmware of terminal, terminal and storage medium
CN110262875B (en) Communication method and system of Windows virtual machine and KVM host based on patch mechanism
CN108549539A (en) A kind of method and device carrying out equipment remote upgrade
CN112908390A (en) Data storage method and device, electronic equipment and storage medium
CN108920480B (en) Processing method and device for file system exception and computer storage medium
CN109347937B (en) Intelligent remote upgrading method applied to video monitoring equipment
CN112905422A (en) Alarm rule management method and equipment based on search server

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210813