Equipment processing system upgrading method and device based on non-backup partition, electronic equipment and computer readable medium
By adopting the device processing system upgrade method without backup partitions in the network camera, the problem of dual backup file system occupies storage resources and transmission resources is solved, and the hardware storage cost and transmission resources are reduced, ensuring the upgrade of the device processing system Integrity.
Patent Information
- Application Number
- CN202411217035.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2024-12-24
AI Technical Summary
Deploying a dual backup file system in a network camera results in excessive storage resources, increasing hardware storage costs, and consuming more transmission resources when upgrading the processor system.
The device processing system upgrade method without backup partition is adopted. By configuring the network camera processing system to load partitions, kernel partitions, system file partitions, program storage partitions, user configuration partitions and associated partitions for storage boots, so as to achieve no backup partitions when upgrading the system. The upgrade package checksum is performed directly in the program storage partition, and initializes it through the initial system configuration data in the memory card to ensure the integrity of the upgrade.
It reduces the use of storage resources in the device processing system, reduces the hardware storage cost, and reduces the use of transmission resources when obtaining burned packets from the server, realizing the upgrade of the device processing system without backup partitions.
Smart Images

Figure CN119182903A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of embedded system development, and in particular to a method, apparatus, electronic device, and computer-readable medium for upgrading a device processing system based on a non-backup partition. Background Art
[0002] The device processing system upgrade method is a technology used to upgrade the processing system in the network camera. At present, embedded IPC (Internet Protocol Camera, network camera) devices basically adopt a dual backup file system solution when upgrading product functions. Two systems, one for normal use and one for upgrade. That is, first upgrade the backup file system, and then upgrade the main system partition through the backup file system.
[0003] However, in practice, it is found that when the above method is used to upgrade the equipment processing system, the following technical problems often occur:
[0004] First, deploying a dual backup file system in the IPC device for upgrading the device processing system occupies a lot of storage resources and increases the hardware storage cost;
[0005] Second, since a dual backup file system is deployed in the IPC device, a burning package corresponding to the dual backup file system needs to be set during the processor system upgrade process, thereby occupying more transmission resources when obtaining the burning package from the server.
[0006] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention
[0007] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0008] Some embodiments of the present disclosure propose a method, apparatus, electronic device and computer-readable medium for upgrading a device processing system based on a non-backup partition to solve one or more of the technical problems mentioned in the above background technology section.
[0009] In the first aspect, some embodiments of the present disclosure provide a method for upgrading a device processing system based on a non-backup partition, which is applied to a network camera, and is characterized in that the processing system of the network camera is configured into the following partitions: a storage boot loading partition, a kernel partition, a system file partition, a program storage partition, a user configuration partition, and an associated partition. The method includes: in response to receiving a system upgrade instruction, extracting an identifier of the system upgrade instruction to obtain an upgrade configuration identifier, wherein the upgrade configuration identifier represents a system upgrade mode selected by the user, and the system upgrade mode includes: a memory card upgrade mode or a remote upgrade mode; in response to determining that the upgrade configuration identifier represents a memory card upgrade mode, reading a memory card through the storage boot loading partition to determine whether a memory card is inserted into the network camera; in response to determining that the memory card is read successfully, performing an upgrade package detection on the memory card to detect whether a system upgrade package is stored in the memory card; in response to detecting the system upgrade package in the memory card, performing an upgrade package partition verification on the system upgrade package to obtain a partition verification result, wherein the upgrade package partition verification is to compare the verification identifier file included in the system upgrade package with the above verification identifier file. The current configuration file stored in the program storage partition is verified; in response to determining that the above partition verification result passes, the program stored in the above program storage partition is upgraded based on the above system upgrade package, and the upgraded network camera is restarted; the upgraded network camera is controlled to perform empty shot shooting, and the shooting data and the shooting video in the shooting process are used to detect the function of the upgraded network camera to obtain the upgrade verification result; in response to determining that the above upgrade verification result fails, the processing system of the network camera is initialized using the initial system configuration data included in the above storage card, and the upgrade operation is performed again after the initialization, wherein the initialization includes initializing the boot loading partition, kernel partition, system file partition, program storage partition, user configuration partition and associated partition stored in the processing system.
[0010] In a second aspect, some embodiments of the present disclosure provide a device for processing system upgrades based on a device without backup partitions, the device comprising: an identification extraction unit, configured to extract an identification of the system upgrade instruction in response to receiving a system upgrade instruction, and obtain an upgrade configuration identification, wherein the upgrade configuration identification represents a system upgrade mode selected by a user, and the system upgrade mode comprises: a memory card upgrade mode or a remote upgrade mode; a memory card reading unit, configured to read a memory card through the storage boot loading partition in response to determining that the upgrade configuration identification represents a memory card upgrade mode, so as to determine whether the network camera is inserted into the memory card; an upgrade package detection unit, configured to perform an upgrade package detection on the memory card in response to determining that the memory card is read successfully, so as to detect whether a system upgrade package is stored in the memory card; an upgrade package partition verification unit, configured to perform an upgrade package partition verification on the system upgrade package in response to detecting a system upgrade package in the memory card, and obtain a partition verification result, wherein The upgrade package partition verification is to verify the verification identification file included in the system upgrade package with the current configuration file stored in the above-mentioned program storage partition; the program upgrade unit is configured to upgrade the program stored in the above-mentioned program storage partition based on the above-mentioned system upgrade package in response to determining that the above-mentioned partition verification result has passed, and restart the upgraded network camera; the control and detection unit is configured to control the upgraded network camera to perform empty shot shooting, and use the data and the captured image during the shooting process to detect the function of the above-mentioned upgraded network camera to obtain the upgrade verification result; the system initialization unit is configured to initialize the processing system of the above-mentioned network camera using the initial system configuration data included in the above-mentioned storage card in response to determining that the above-mentioned upgrade verification result has not passed, and perform the upgrade operation again after initialization, wherein the initialization includes initializing the boot loading partition, kernel partition, system file partition, program storage partition, user configuration partition and associated partition stored in the processing system.
[0011] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.
[0012] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.
[0013] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the device processing system upgrade method based on the non-backup partition of some embodiments of the present disclosure, the occupation of storage resources in the device processing system can be reduced, and the hardware storage cost can be reduced. Specifically, the reason for occupying more storage resources and increasing the hardware storage cost is that: a dual backup file system for upgrading the device processing system is deployed in the IPC device. Based on this, the device processing system upgrade method based on the non-backup partition of some embodiments of the present disclosure, the network camera used, its processing system is configured as the following partitions: storage boot loading partition, kernel partition, system file partition, program storage partition, user configuration partition and associated partition. Among them, no backup partition is set. Therefore, there is no need to embed a storage chip for storing the dual backup file system in the device of the network camera, which can be used to reduce the hardware storage cost. On this basis, the device processing system upgrade method based on the non-backup partition realizes the upgrade of the device processing system through the following steps: first, in response to receiving a system upgrade instruction, the above system upgrade instruction is extracted to obtain an upgrade configuration identifier. Among them, the above upgrade configuration identifier represents the system upgrade mode selected by the user, and the above system upgrade mode includes: storage card upgrade mode or remote upgrade mode. Here, the system upgrade instruction can be used to determine the upgrade mode required for the system upgrade. Then, in response to determining that the upgrade configuration identifier represents the memory card upgrade mode, the memory card is read through the storage boot loading partition to determine whether the network camera is inserted into the memory card. In response to determining that the memory card is successfully read, the memory card is tested for the upgrade package to detect whether the system upgrade package is stored in the memory card. Next, in response to detecting the system upgrade package in the memory card, the system upgrade package is verified for the upgrade package partition to obtain the partition verification result. In response, the upgrade package partition verification is to verify the verification identification file included in the system upgrade package with the current configuration file stored in the program storage partition. The upgrade package partition verification is used to avoid errors in the upgrade package and confirm the program functions that need to be upgraded in the program storage partition of the network camera. Afterwards, in response to determining that the partition verification result is passed, the program stored in the program storage partition is upgraded based on the system upgrade package, and the upgraded network camera is restarted. Thus, a system upgrade without a backup partition is achieved. In addition, the upgraded network camera is controlled to shoot an empty shot, and the shooting data and the shooting video in the shooting process are used to detect the function of the upgraded network camera to obtain the upgrade verification result. Here, the detection can be used to verify whether the various program functions of the upgraded network camera are abnormal. Finally, in response to determining that the upgrade verification result fails, the processing system of the network camera is initialized using the initial system configuration data included in the memory card, and the upgrade operation is performed again after the initialization.The initialization includes initializing the boot loading partition, kernel partition, system file partition, program storage partition, user configuration partition and associated partition in the processing system. Therefore, in the case of abnormal upgrade, the system can be initialized through the initial system configuration data in the storage card to facilitate re-upgrade of the system. Therefore, the upgrade verification and recovery functions of the dual partition system can be replaced to realize the upgrade of the device processing system without a backup partition. Furthermore, not only the hardware storage cost is reduced, but also the occupation of storage resources by the system partition can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0015] Figure 1 is a flowchart of some embodiments of a method for upgrading a device processing system based on a non-backup partition according to the present disclosure;
[0016] Figure 2 It is a structural schematic diagram of some embodiments of the device processing system upgrade apparatus based on non-backup partition according to the present disclosure;
[0017] Figure 3 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0018] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0019] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0020] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0021] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0022] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0023] With regard to the collection, storage, and use of user personal information (such as aerial videos shot by user webcams) involved in this disclosure, relevant organizations or individuals must fulfill obligations including conducting personal information security impact assessments, fulfilling the obligation to inform the personal information subject, and obtaining the prior authorization and consent of the personal information subject before performing the corresponding operations.
[0024] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0025] Figure 1 The process 100 of some embodiments of the device processing system upgrade method based on no backup partition according to the present disclosure is shown. The device processing system upgrade method based on no backup partition is applied to a network camera, characterized in that the processing system of the network camera is configured as the following partitions: storage boot loading partition, kernel partition, system file partition, program storage partition, user configuration partition and associated partition. Among them, the storage boot loading partition (boot partition) can be a partition for storing and loading system core files. The kernel partition (kernel) can be used to run the system kernel program. The system file partition (rootfs) can be used to store system files. The program storage partition (system) can be a partition for storing program functions for processing image or video shooting. The user configuration partition (usr_data) can include the user's configuration data for the network camera. The associated partition (Miscellaneous) can be a partition for storing backup files and system recovery tools. It can be seen from this that compared with commonly used embedded devices, the system does not need a backup partition. At the same time, in order to realize the upgrade of the device processing system, the program can be placed in a separate partition, and a small upgrade program can be made at the same time to upgrade the program and put it in the file system. Thus, the system upgrade is realized.
[0026] The device processing system upgrade method based on the non-backup partition includes the following steps:
[0027] Step 101: In response to receiving a system upgrade instruction, extract an identifier of the system upgrade instruction to obtain an upgrade configuration identifier.
[0028] In some embodiments, the execution subject of the method for processing a system upgrade based on a device without a backup partition may extract an identifier of the system upgrade instruction in response to receiving the system upgrade instruction to obtain an upgrade configuration identifier. The upgrade configuration identifier may represent a system upgrade mode selected by a user. The system upgrade mode may include: a memory card upgrade mode or a remote upgrade mode. Secondly, the upgrade configuration identifier may be extracted from a preset field of the system upgrade instruction.
[0029] Step 102: in response to determining that the upgrade configuration identifier represents a memory card upgrade mode, the memory card is read through the storage boot loading partition to determine whether the network camera is inserted with the memory card.
[0030] In some embodiments, the execution subject may respond to determining that the upgrade configuration identifier represents a memory card upgrade mode, and read the memory card through the storage boot loading partition to determine whether the network camera is inserted with a memory card. If the memory card can be read, it is determined that the memory card has been inserted. If the memory card is not read, a voice prompt may be given to the user to reinsert the card.
[0031] Step 103 , in response to determining that the memory card is read successfully, performing an upgrade package detection on the memory card to detect whether a system upgrade package is stored in the memory card.
[0032] In some embodiments, the execution subject may perform an upgrade package detection on the memory card in response to determining that the memory card is successfully read, so as to detect whether a system upgrade package is stored in the memory card. Among them, it can be determined whether a system upgrade package is stored by reading an upgrade package version identifier corresponding to an upgrade package field in the memory card. Specifically, if an upgrade package version identifier is detected, it is determined that an upgrade package identifier is stored. If an upgrade package version identifier is not detected, it is determined that a system upgrade package is not stored. Here, the upgrade package version identifier may represent a version number of a system upgrade.
[0033] Step 104 , in response to detecting the system upgrade package in the memory card, performing an upgrade package partition check on the system upgrade package to obtain a partition check result.
[0034] In some embodiments, the execution subject may perform upgrade package partition verification on the system upgrade package in response to detecting the system upgrade package in the storage card to obtain a partition verification result. The upgrade package partition verification may be a verification of the verification identification file included in the system upgrade package with the current configuration file stored in the program storage partition.
[0035] In some optional implementations of some embodiments, the execution subject performs upgrade package partition verification on the system upgrade package to obtain a partition verification result, which may include the following steps:
[0036] The first step is to proofread the verification identification file in the system upgrade package and the current configuration file stored in the program storage partition to generate a group of function identifications to be upgraded. The verification identification file may include a set of function identifications to be upgraded. Each function identification to be upgraded in the set of function identifications to be upgraded may represent an upgradeable function in the program storage partition and a corresponding function version identification. The current configuration file may include a current function identification set to represent the current function and the corresponding function identification in the program storage partition. The proofreading process may be to determine the current function identification whose corresponding function version identification is different between the set of function identifications to be upgraded and the current set of function identifications.
[0037] In the second step, the above-mentioned function identification group to be upgraded is determined as the partition verification result.
[0038] Step 105 , in response to determining that the partition verification result passes, upgrading the program stored in the program storage partition based on the system upgrade package, and restarting the upgraded network camera.
[0039] In some embodiments, the execution subject may, in response to determining that the partition verification result passes, upgrade the program stored in the program storage partition based on the system upgrade package, and restart the upgraded network camera.
[0040] In some optional implementations of some embodiments, the system upgrade package may further include a system upgrade file corresponding to each to-be-upgraded function identifier in the to-be-upgraded function identifier set. And the execution subject, in response to determining that the partition verification result passes, upgrades the program stored in the program storage partition based on the system upgrade package, and restarts the upgraded network camera, which may include the following steps:
[0041] By using the system upgrade files in the system upgrade package corresponding to the function identifiers to be upgraded included in the partition verification result, the programs stored in the program storage partition are replaced according to the identifier correspondence to complete the program upgrade.
[0042] Step 106, controlling the upgraded network camera to shoot an empty shot, and using the shooting data and the shooting video in the shooting process to detect the function of the upgraded network camera, to obtain the upgrade verification result.
[0043] In some embodiments, the above-mentioned execution subject can control the upgraded network camera to shoot an empty shot, and use the shooting data and shooting video during the shooting process to detect the function of the upgraded network camera to obtain the upgrade verification result. Among them, after the network camera is restarted, it can be controlled to shoot an empty shot to obtain the shooting video. Here, before shooting, the user can be prompted to shoot an empty shot, and the shooting can be performed after the user's authorization. Specifically, the user can also be notified to cover the lens to avoid leakage of user privacy.
[0044] In some optional implementations of some embodiments, the shooting data may include at least one of the following: sensor data, aperture value, focal length value, zoom factor, frame rate; and the execution subject uses the shooting data and the shooting video in the shooting process to detect the function of the upgraded network camera to obtain the upgrade verification result, which may include the following steps:
[0045] The first step is to determine whether the sensor data, aperture value, focal length value, zoom factor, and frame rate in the above shooting data are within the corresponding preset data range. Among them, each of the sensor data, aperture value, focal length value, zoom factor, and frame rate has a corresponding preset data range. For example, the focal length value corresponds to a preset focal length threshold range.
[0046] In the second step, in response to determining that the sensor data, aperture value, focal length value, zoom factor, and frame rate are all within the corresponding preset data range, the image resolution, image clarity value, image format identifier, image storage occupancy, image type identifier, image color model identifier of the image in the above-mentioned captured video, and the video encoding format identifier, video bit rate, video sampling rate, video bit rate, and video bit stream of the above-mentioned captured video are determined. Among them, if all the data are within the corresponding preset data range, it indicates that the upgraded system program is running normally.
[0047] The third step is to generate an upgrade verification result indicating that the upgrade verification has passed in response to determining that the image resolution, image clarity value, image storage occupancy, video bit rate, video sampling rate, video bit rate, and video bit stream are all within the corresponding preset data range, and the image format identifier, image type identifier, image color model identifier, and video encoding format identifier all correspond to the preset upgrade identifier. Among them, all the data here meet the upgrade conditions, which can indicate that the image processing function of the network camera has been upgraded. The upgrade meets the conditions including being within the corresponding preset data range and corresponding to the preset upgrade identifier.
[0048] The fourth step is to generate an upgrade verification result indicating that the upgrade verification has failed in response to determining that the image resolution, image clarity value, image storage occupancy, video bit rate, video sampling rate, video bit rate, and video bit stream are all within the corresponding preset data ranges, and at least one of the image format identifier, image type identifier, image color model identifier, and video encoding format identifier does not meet the preset upgrade conditions.
[0049] Step 107, in response to determining that the upgrade verification result fails, initializing the processing system of the network camera using the initial system configuration data included in the memory card, and performing the upgrade operation again after the initialization.
[0050] In some embodiments, the execution subject may, in response to determining that the upgrade verification result has not passed, initialize the processing system of the network camera using the initial system configuration data included in the storage card, and perform the upgrade operation again after initialization. The initialization may include initializing the boot loading partition, kernel partition, system file partition, program storage partition, user configuration partition, and associated partition in the processing system. Here, performing the upgrade operation again may include: upgrading the program stored in the program storage partition again based on the system upgrade package, and restarting the upgraded network camera.
[0051] In some optional implementations of some embodiments, the initial system configuration data includes initial configuration data and partition resource ratios corresponding to storage boot loading partitions, kernel partitions, system file partitions, program storage partitions, user configuration partitions, and associated partitions; and the execution subject, in response to determining that the upgrade verification result fails, initializes the processing system of the network camera using the initial system configuration data included in the storage card, which may include the following steps:
[0052] The first step is to format the data in the storage boot loading partition, kernel partition, system file partition, program storage partition, user configuration partition and associated partition in the above processing system, and re-divide the partition size according to the corresponding partition resource ratio. Among them, the data in the storage boot loading partition, kernel partition, system file partition, program storage partition, user configuration partition and associated partition in the above processing system can be formatted through a preset formatting function. Secondly, the partition division can be performed according to the corresponding allocation resource ratio of each partition through a preset partitioning program or partition assistant and other software.
[0053] In the second step, each initial configuration data is deployed in the corresponding partition after division to complete the initialization.
[0054] In practice, since the programs in the upgraded program storage partition are associated with each partition, in the event of an upgrade exception, it is necessary to format the data in the storage boot loading partition, kernel partition, system file partition, program storage partition, user configuration partition and associated partitions in the processing system to avoid errors in the dependencies between partitions for re-upgrade.
[0055] Optionally, the above execution entity may further perform the following steps:
[0056] The first step is to obtain a system remote upgrade package adapted to the network camera model from a server in response to determining that the upgrade configuration identifier represents a remote upgrade mode, wherein the system remote upgrade package includes a remote verification identifier file.
[0057] The second step is to use the system remote upgrade package to upgrade the network camera, and restart the upgraded network camera. The program file can be replaced according to the corresponding program identifier in the system remote upgrade package to complete the system upgrade. Here, different program functions can correspond to different program files or algorithm functions, and thus, they can be replaced by the identifier index.
[0058] The third step is to control the upgraded network camera to shoot an empty shot in response to the completion of the restart, and to detect the function of the upgraded network camera using the shooting data and the shooting video during the shooting process, so as to obtain the remote upgrade verification result. The implementation method and effect of the shooting and detection steps can refer to the embodiment and related contents in the above step 106, and will not be described in detail.
[0059] In the fourth step, in response to determining that the upgrade verification result fails, an initialization remote configuration file is obtained from the server, and the system of the network camera is initialized using the initialization remote configuration file.
[0060] Step 5: In response to the completion of the initialization, the upgrade operation is performed again.
[0061] Optionally, the above execution entity may further perform the following steps:
[0062] The first step is, in response to determining that the above-mentioned upgrade verification result or the above-mentioned remote upgrade verification result has passed, merging the above-mentioned verification identification file or the above-mentioned remote verification identification file with the above-mentioned current configuration file to generate an upgraded configuration file. Among them, the above-mentioned current configuration file can represent the identification directory of various image processing functions deployed by the above-mentioned network camera in the program storage partition. The above-mentioned upgraded configuration file can represent the version identification of various image processing functions deployed by the upgraded network camera in the program storage partition. Secondly, the fusion can be to combine the current function identification that does not participate in the upgrade in the current configuration file and the identification of the function to be upgraded that participates in the upgrade in the verification identification file or the above-mentioned remote verification identification file in the form of a key-value pair into an upgraded configuration file.
[0063] The second step is to store the upgraded configuration file and determine that the device processing system of the network camera has been upgraded.
[0064] The above steps 104 to 107 and their related contents are an inventive point of the embodiment of the present disclosure, which solves the second technical problem mentioned in the background technology: "Since a dual backup file system is deployed in the IPC device, it is necessary to set a burning package corresponding to the dual backup file system during the processor system upgrade process, so that more transmission resources are required when obtaining the burning package from the server." The factors that lead to the need to occupy more transmission resources when obtaining the burning package from the server are often as follows: Since a dual backup file system is deployed in the IPC device, it is necessary to set a burning package corresponding to the dual backup file system during the processor system upgrade process. In order to achieve this effect, firstly, the network camera based on the device processing system upgrade method without backup partition is not deployed with a backup interval. On this basis, it is determined whether a remote upgrade is required by judging the system upgrade instruction. Then, during the remote upgrade process, a system remote upgrade package adapted to the above network camera model is obtained from the server. Specifically, firstly, the storage boot loading partition, kernel partition, system file partition, program storage partition, user configuration partition and associated partition in the processing system are divided into unchanged partitions and changed partitions. For example, the data in the boot loading partition, kernel partition, system file partition, user configuration partition and associated partition are basically unchanged partitions, which can be left unchanged during the upgrade process without being upgraded or adjusted. At the same time, the program functions that need to be upgraded and adjusted are concentrated in the program storage partition. Therefore, only the program functions in the program storage partition can be upgraded accordingly. In addition, because the backup partition is reduced and the program functions in the program storage partition can be directly upgraded, the size of the system remote upgrade package can be reduced. Furthermore, the purpose of reducing the transmission resources occupied when obtaining the burning package from the server can be achieved.
[0065] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the device processing system upgrade method based on the non-backup partition of some embodiments of the present disclosure, the occupation of storage resources in the device processing system can be reduced, and the hardware storage cost can be reduced. Specifically, the reason for occupying more storage resources and increasing the hardware storage cost is that: a dual backup file system for upgrading the device processing system is deployed in the IPC device. Based on this, the device processing system upgrade method based on the non-backup partition of some embodiments of the present disclosure, the network camera used, its processing system is configured as the following partitions: storage boot loading partition, kernel partition, system file partition, program storage partition, user configuration partition and associated partition. Among them, no backup partition is set. Therefore, there is no need to embed a storage chip for storing the dual backup file system in the device of the network camera, which can be used to reduce the hardware storage cost. On this basis, the device processing system upgrade method based on the non-backup partition realizes the upgrade of the device processing system through the following steps: first, in response to receiving a system upgrade instruction, the above system upgrade instruction is extracted to obtain an upgrade configuration identifier. Among them, the above upgrade configuration identifier represents the system upgrade mode selected by the user, and the above system upgrade mode includes: storage card upgrade mode or remote upgrade mode. Here, the system upgrade instruction can be used to determine the upgrade mode required for the system upgrade. Then, in response to determining that the upgrade configuration identifier represents the memory card upgrade mode, the memory card is read through the storage boot loading partition to determine whether the network camera is inserted into the memory card. In response to determining that the memory card is successfully read, the memory card is tested for the upgrade package to detect whether the system upgrade package is stored in the memory card. Next, in response to detecting the system upgrade package in the memory card, the system upgrade package is verified for the upgrade package partition to obtain the partition verification result. In response, the upgrade package partition verification is to verify the verification identification file included in the system upgrade package with the current configuration file stored in the program storage partition. The upgrade package partition verification is used to avoid errors in the upgrade package and confirm the program functions that need to be upgraded in the program storage partition of the network camera. Afterwards, in response to determining that the partition verification result is passed, the program stored in the program storage partition is upgraded based on the system upgrade package, and the upgraded network camera is restarted. Thus, a system upgrade without a backup partition is achieved. In addition, the upgraded network camera is controlled to shoot an empty shot, and the shooting data and the shooting video in the shooting process are used to detect the function of the upgraded network camera to obtain the upgrade verification result. Here, the detection can be used to verify whether the various program functions of the upgraded network camera are abnormal. Finally, in response to determining that the upgrade verification result fails, the processing system of the network camera is initialized using the initial system configuration data included in the memory card, and the upgrade operation is performed again after the initialization.The initialization includes initializing the boot loading partition, kernel partition, system file partition, program storage partition, user configuration partition and associated partition in the processing system. Therefore, in the case of abnormal upgrade, the system can be initialized through the initial system configuration data in the storage card to facilitate re-upgrade of the system. Therefore, the upgrade verification and recovery functions of the dual partition system can be replaced to realize the upgrade of the device processing system without a backup partition. Furthermore, not only the hardware storage cost is reduced, but also the occupation of storage resources by the system partition can be reduced.
[0066] Further references Figure 2 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a device for upgrading a device processing system based on a non-backup partition. These device embodiments are similar to Figure 1 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0067] like Figure 2As shown, some embodiments of the device processing system upgrade apparatus 200 based on a device without backup partitions include: an identification extraction unit 201, a memory card reading unit 202, an upgrade package detection unit 203, an upgrade package partition verification unit 204, a program upgrade unit 205, a control and detection unit 206 and a system initialization unit 207. The identification extraction unit 201 is configured to extract the identification of the system upgrade instruction in response to receiving the system upgrade instruction, and obtain the upgrade configuration identification, wherein the upgrade configuration identification represents the system upgrade mode selected by the user, and the system upgrade mode includes: memory card upgrade mode or remote upgrade mode; the memory card reading unit 202 is configured to read the memory card through the storage boot loading partition in response to determining that the upgrade configuration identification represents the memory card upgrade mode, so as to determine whether the network camera is inserted into the memory card; the upgrade package detection unit 203 is configured to perform upgrade package detection on the memory card in response to determining that the memory card is read successfully, so as to detect whether the system upgrade package is stored in the memory card; the upgrade package partition verification unit 204 is configured to perform upgrade package partition verification on the system upgrade package in response to detecting the system upgrade package in the memory card, and obtain the partition verification result, wherein the upgrade package partition verification is to verify the system upgrade package included in the system upgrade package. The verification identification file corresponds to the current configuration file stored in the above-mentioned program storage partition; the program upgrade unit 205 is configured to upgrade the program stored in the above-mentioned program storage partition based on the above-mentioned system upgrade package in response to determining that the above-mentioned partition verification result has passed, and restart the upgraded network camera; the control and detection unit 206 is configured to control the upgraded network camera to perform empty shot shooting, and use the data during the shooting process and the captured image to detect the function of the above-mentioned upgraded network camera to obtain the upgrade verification result; the system initialization unit 207 is configured to initialize the processing system of the above-mentioned network camera using the initial system configuration data included in the above-mentioned storage card in response to determining that the above-mentioned upgrade verification result has not passed, and perform the upgrade operation again after the initialization, wherein the initialization includes initializing the boot loading partition, kernel partition, system file partition, program storage partition, user configuration partition and associated partition stored in the processing system.
[0068] It is understood that the units described in the device 200 are similar to those described in the reference Figure 1 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 200 and the units included therein, and will not be described in detail here.
[0069] Reference below Figure 3 , which shows a structural schematic diagram of an electronic device (eg, a computing device) 300 suitable for implementing some embodiments of the present disclosure. Figure 3The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0070] like Figure 3 As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory 302 or a program loaded from a storage device 308 into a random access memory 303. Various programs and data required for the operation of the electronic device 300 are also stored in the random access memory 303. The processing device 301, the read-only memory 302, and the random access memory 303 are connected to each other via a bus 304. An input / output interface 305 is also connected to the bus 304.
[0071] Typically, the following devices may be connected to the I / O interface 305: input devices 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 308 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 309. The communication devices 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0072] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the read-only memory 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0073] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0074] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0075] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: in response to receiving a system upgrade instruction, extracts the identifier of the system upgrade instruction to obtain an upgrade configuration identifier, wherein the upgrade configuration identifier represents the system upgrade mode selected by the user, and the system upgrade mode includes: memory card upgrade mode or remote upgrade mode; in response to determining that the upgrade configuration identifier represents the memory card upgrade mode, reads the memory card through the storage boot loading partition to determine whether the network camera is inserted into the memory card; in response to determining that the memory card is read successfully, performs an upgrade package detection on the memory card to detect whether the system upgrade package is stored in the memory card; in response to detecting the system upgrade package in the memory card, performs an upgrade package partition check on the system upgrade package to obtain a partition check result, wherein the upgrade package partition check result is obtained. The partition verification is to verify the verification identification file included in the system upgrade package with the current configuration file stored in the above-mentioned program storage partition; in response to determining that the above-mentioned partition verification result is passed, the program stored in the above-mentioned program storage partition is upgraded based on the above-mentioned system upgrade package, and the upgraded network camera is restarted; the upgraded network camera is controlled to perform empty shot shooting, and the shooting data and shooting video in the shooting process are used to detect the function of the above-mentioned upgraded network camera to obtain the upgrade verification result; in response to determining that the above-mentioned upgrade verification result is not passed, the processing system of the above-mentioned network camera is initialized using the initial system configuration data included in the above-mentioned storage card, and the upgrade operation is performed again after initialization, wherein the initialization includes initializing the boot loading partition, kernel partition, system file partition, program storage partition, user configuration partition and associated partition stored in the processing system.
[0076] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0077] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0078] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The units described may also be provided in a processor, for example, may be described as: a processor including an identification extraction unit, a memory card reading unit, an upgrade package detection unit, an upgrade package partition verification unit, a program upgrade unit, a control and detection unit, and a system initialization unit. The names of these units do not, in certain cases, constitute limitations on the units themselves, for example, a program upgrade unit may also be described as a "unit for upgrading programs stored in a program storage partition based on a system upgrade package".
[0079] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0080] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A device processing system upgrade method based on non-backup partition, applied to network cameras, characterized in that: The processing system of the network camera is configured into the following partitions: a storage boot loading partition, a kernel partition, a system file partition, a program storage partition, a user configuration partition and an associated partition, including: In response to receiving a system upgrade instruction, extracting an identifier of the system upgrade instruction to obtain an upgrade configuration identifier, wherein the upgrade configuration identifier represents a system upgrade mode selected by a user, and the system upgrade mode includes: a memory card upgrade mode or a remote upgrade mode; In response to determining that the upgrade configuration identifier represents a memory card upgrade mode, reading the memory card through the storage boot loading partition to determine whether the network camera is inserted with a memory card; In response to determining that the memory card is read successfully, performing an upgrade package detection on the memory card to detect whether a system upgrade package is stored in the memory card; In response to detecting the system upgrade package in the memory card, performing upgrade package partition verification on the system upgrade package to obtain a partition verification result, wherein the upgrade package partition verification is to verify the verification identification file included in the system upgrade package with the current configuration file stored in the program storage partition; In response to determining that the partition verification result passes, upgrading the program stored in the program storage partition based on the system upgrade package, and restarting the upgraded network camera; Controlling the upgraded network camera to shoot an empty shot, and using the shooting data and the shooting video in the shooting process to detect the function of the upgraded network camera, and obtaining the upgrade verification result; In response to determining that the upgrade verification result fails, the processing system of the network camera is initialized using the initial system configuration data included in the memory card, and the upgrade operation is performed again after the initialization, wherein the initialization includes initializing the boot loading partition, kernel partition, system file partition, program storage partition, user configuration partition and associated partitions in the processing system.
2. The method according to claim 1, wherein: The method further comprises: In response to determining that the upgrade configuration identifier represents a remote upgrade mode, obtaining a system remote upgrade package adapted to the network camera model from a server, wherein the system remote upgrade package includes a remote verification identification file; Using the system remote upgrade package to perform a system upgrade on the network camera, and restarting the upgraded network camera; In response to the completion of the restart, the upgraded network camera is controlled to shoot an empty shot, and the shooting data and the shooting video in the shooting process are used to detect the function of the upgraded network camera to obtain a remote upgrade verification result; In response to determining that the upgrade verification result fails, obtaining an initialization remote configuration file from the server, and initializing the system of the network camera using the initialization remote configuration file; In response to the initialization being completed, the upgrade operation is performed again.
3. The method according to claim 1 or 2, wherein: The method further comprises: In response to determining that the upgrade verification result or the remote upgrade verification result passes, the verification identification file or the remote verification identification file is merged with the current configuration file to generate an upgraded configuration file, wherein the current configuration file represents an identification directory of various image processing functions deployed by the network camera in the program storage partition, and the upgraded configuration file represents a version identification of various image processing functions deployed by the upgraded network camera in the program storage partition; The upgraded configuration file is stored, and it is determined that the device processing system of the network camera has been upgraded.
4. The method according to claim 1, wherein: The performing upgrade package partition verification on the system upgrade package to obtain a partition verification result includes: Performing proofreading processing on the verification identification file in the system upgrade package and the current configuration file stored in the program storage partition to generate a to-be-upgraded function identification group, wherein the verification identification file includes a to-be-upgraded function identification set, each to-be-upgraded function identification in the to-be-upgraded function identification set represents an upgradable function in the program storage partition and a corresponding function version identification, the current configuration file includes a current function identification set to represent the current function in the program storage partition and the corresponding function identification, and the proofreading processing is to determine the current function identification whose corresponding function version identification is different from the to-be-upgraded function identification set and the current function identification set; The to-be-upgraded function identification group is determined as a partition verification result.
5. The method according to claim 4, wherein: The system upgrade package also includes a system upgrade file corresponding to each to-be-upgraded function identifier in the to-be-upgraded function identifier set; as well as The step of upgrading the program stored in the program storage partition based on the system upgrade package includes: By using the system upgrade files in the system upgrade package corresponding to the identifiers of the functions to be upgraded included in the partition verification result, the programs stored in the program storage partition are replaced according to the identifier correspondence to complete the program upgrade.
6. A device processing system upgrade device based on non-backup partition, comprising: an identification extraction unit, configured to extract an identification from the system upgrade instruction in response to receiving the system upgrade instruction, and obtain an upgrade configuration identification, wherein the upgrade configuration identification represents a system upgrade mode selected by a user, and the system upgrade mode includes: a memory card upgrade mode or a remote upgrade mode; a memory card reading unit configured to, in response to determining that the upgrade configuration identifier represents a memory card upgrade mode, read the memory card through the storage boot loading partition to determine whether the network camera is inserted with a memory card; an upgrade package detection unit, configured to, in response to determining that the memory card is read successfully, perform an upgrade package detection on the memory card to detect whether a system upgrade package is stored in the memory card; an upgrade package partition verification unit, configured to, in response to detecting the system upgrade package in the memory card, perform upgrade package partition verification on the system upgrade package to obtain a partition verification result, wherein the upgrade package partition verification is to verify the verification identification file included in the system upgrade package with the current configuration file stored in the program storage partition; a program upgrade unit, configured to upgrade the program stored in the program storage partition based on the system upgrade package in response to determining that the partition verification result passes, and restart the upgraded network camera; The control and detection unit is configured to control the upgraded network camera to shoot an empty shot, and detect the function of the upgraded network camera using the data and the captured image during the shooting process to obtain an upgrade verification result; The system initialization unit is configured to initialize the processing system of the network camera using the initial system configuration data included in the storage card in response to determining that the upgrade verification result fails, and to perform the upgrade operation again after the initialization, wherein the initialization includes initializing the boot loading partition, kernel partition, system file partition, program storage partition, user configuration partition and associated partitions in the processing system.
7. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
8. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
