Communication module upgrading method and device for network camera, equipment and medium

By obtaining and applying differential upgrade packages suitable for the current version, the compatibility issues and waste of storage resources during the upgrade process of the webcam communication module are solved, and the accuracy and efficiency of the upgrade are improved.

CN119440599APending Publication Date: 2025-02-14SHENZHEN ADDX INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411468891.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

During the communication module upgrade process of the webcam, the upgrade package from one version to the latest version can be directly obtained, which may cause the current version of the communication module to be incompatible with the upgrade package, resulting in interruption or failure during the upgrade process, and the communication module is added The number of times the upgrade failed, and it occupies storage resources and wastes storage resources.

Method used

By obtaining the upgrade package header information of the corresponding preset communication module identifier from the preset server, performing firmware upgrade detection processing, obtaining the incremental differential upgrade index record information set, traversing to obtain the differential upgrade package identifier suitable for the current version, obtaining and applying Target differential upgrade package file for differential upgrade processing.

Benefits of technology

It improves the accuracy of the communication module upgrade, reduces the number of failures in the communication module upgrade, avoids the waste of storage resources, and ensures the stability and efficiency of the upgrade process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440599A_ABST
    Figure CN119440599A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a communication module upgrading method and device for a network camera, equipment and a medium. A specific embodiment of the method comprises the following steps: acquiring upgrade patch header information corresponding to a preset communication module identifier from a preset server; performing firmware upgrade detection processing on a preset communication module corresponding to the preset communication module identifier; in response to determining that the firmware upgrading detection information represents that upgrading is needed, obtaining an increment difference upgrading index record information set from a preset server; reading a current version identifier of a preset communication module; traversing the incremental difference upgrading index record information set; in response to the determination that the traversal information is the differential upgrade package identifier, determining the traversal information as a target differential upgrade package identifier; and obtaining a target differential upgrade package file corresponding to the target differential upgrade package identifier from a preset server so as to perform differential upgrade processing on the preset communication module. According to the embodiment, the number of communication module upgrading failures and the waste of network camera storage resources are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a communication module upgrade method, device, equipment, and medium for a network camera. Background Art

[0002] With the popularization of network cameras, the development of Internet technology and wireless communication technology, upgrading the communication module built into the network camera helps to support more functions and services. Upgrading the communication module of the network camera is a technology for upgrading the communication module built into the network camera. At present, when upgrading the communication module built into the network camera, the commonly used method is to directly obtain an upgrade package from a fixed version to the latest version to upgrade the communication module built into the network camera.

[0003] However, when the communication module built into the network camera is upgraded in the above manner, the following technical problems often occur:

[0004] The initial versions of the communication modules built into different network cameras are various. Directly obtaining an upgrade package from a fixed version to the latest version, and upgrading the communication module built into the network camera, only obtaining the latest version of the upgrade package without considering whether the current version (initial version) of the communication module is applicable to the upgrade package from a version to the latest version, may cause the current version of the communication module to be incompatible with the upgrade package, and the upgrade process may be interrupted or fail, increasing the number of communication module upgrade failures. At the same time, when the communication module upgrade fails, the network camera may try to re-upgrade multiple times, and each upgrade attempt requires storage space (for example, space is occupied to generate a log file for recording upgrade information), which increases the waste of network camera storage resources during the communication module upgrade process.

[0005] 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 to a person of ordinary skill in the art. Summary of the invention

[0006] 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.

[0007] Some embodiments of the present disclosure provide a communication module upgrade method, device, electronic device, and computer-readable medium for a network camera to solve one or more of the technical problems mentioned in the above background technology section.

[0008] In a first aspect, some embodiments of the present disclosure provide a communication module upgrade method for a network camera, the method comprising: obtaining upgrade package header information corresponding to a preset communication module identifier from a preset server; based on the above-mentioned upgrade package header information, performing firmware upgrade detection processing on the preset communication module corresponding to the above-mentioned preset communication module identifier to obtain firmware upgrade detection information; in response to determining that the above-mentioned firmware upgrade detection information indicates that an upgrade is required, obtaining an incremental differential upgrade index record information set from the above-mentioned preset server; reading the current version identifier of the above-mentioned preset communication module; based on the above-mentioned current version identifier, traversing the above-mentioned incremental differential upgrade index record information set to obtain traversal information corresponding to the current version identifier; in response to determining that the above-mentioned traversal information indicates that no qualified differential upgrade index record information has been traversed, issuing a communication module upgrade failure warning; in response to determining that the above-mentioned traversal information is a differential upgrade package identifier, determining the above-mentioned traversal information as a target differential upgrade package identifier; obtaining a target differential upgrade package file corresponding to the above-mentioned target differential upgrade package identifier from the above-mentioned preset server to perform differential upgrade processing on the above-mentioned preset communication module.

[0009] In a second aspect, some embodiments of the present disclosure provide a communication module upgrade device for a network camera, the device comprising: a first acquisition unit, configured to acquire upgrade package header information corresponding to a preset communication module identifier from a preset server; an upgrade detection processing unit, configured to perform firmware upgrade detection processing on a preset communication module corresponding to the preset communication module identifier based on the upgrade package header information, to obtain firmware upgrade detection information; a second acquisition unit, configured to acquire an incremental differential upgrade index record information set from the preset server in response to determining that the firmware upgrade detection information indicates that an upgrade is required; a reading unit, configured to read the current version of the preset communication module. This identifier; a traversal unit, configured to traverse the above-mentioned incremental differential upgrade index record information set based on the above-mentioned current version identifier, and obtain the traversal information corresponding to the current version identifier; an early warning unit, configured to respond to determining that the above-mentioned traversal information represents that the qualified differential upgrade index record information has not been traversed, and issue a communication module upgrade failure early warning; a determination unit, configured to respond to determining that the above-mentioned traversal information is a differential upgrade package identifier, and determine the above-mentioned traversal information as a target differential upgrade package identifier; a differential upgrade processing unit, configured to obtain a target differential upgrade package file corresponding to the above-mentioned target differential upgrade package identifier from the above-mentioned preset server, so as to perform differential upgrade processing on the above-mentioned preset communication module.

[0010] 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.

[0011] 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.

[0012] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the communication module upgrade method for network cameras of some embodiments of the present disclosure, the accuracy of the communication module upgrade for network cameras is improved. Specifically, the reason for the waste of network camera storage resources during the communication module upgrade process is that the initial versions of the communication modules built into different network cameras are various. Directly obtaining an upgrade package from a fixed version to the latest version, upgrading the communication module built into the network camera, and only obtaining the latest version of the upgrade package, without considering whether the current version (initial version) of the communication module can be applied to the upgrade package from a version to the latest version, may cause the current version of the communication module to be incompatible with the upgrade package, and the upgrade process may be interrupted or failed, increasing the number of communication module upgrade failures. At the same time, when the communication module upgrade fails, the network camera may try to re-upgrade multiple times, and each upgrade attempt requires storage space (for example, occupying space to generate a log file for recording upgrade information), which increases the waste of network camera storage resources during the communication module upgrade process. Based on this, the communication module upgrade method for network cameras of some embodiments of the present disclosure first obtains the upgrade package header information corresponding to the preset communication module identifier from the preset server. Thus, the upgrade package header information used for performing firmware upgrade detection processing on the preset communication module can be obtained. The above-mentioned firmware upgrade detection processing can detect whether the preset communication module needs to be upgraded. Then, based on the above-mentioned upgrade package header information, the preset communication module corresponding to the above-mentioned preset communication module identifier is subjected to firmware upgrade detection processing to obtain firmware upgrade detection information. Next, in response to determining that the above-mentioned firmware upgrade detection information indicates that an upgrade is required, an incremental differential upgrade index record information set is obtained from the above-mentioned preset server. Thus, an incremental differential upgrade index record information set for traversing the target differential upgrade package identifier can be obtained. The above-mentioned target differential upgrade package identifier can be an identifier of a differential upgrade package corresponding to the version of the current version identifier of the above-mentioned preset communication module. Afterwards, the current version identifier of the above-mentioned preset communication module is read. Thus, the current version identifier of the preset communication module that needs to be updated can be determined. Then, based on the above-mentioned current version identifier, the above-mentioned incremental differential upgrade index record information set is traversed to obtain the traversal information corresponding to the current version identifier. Thus, the traversal information corresponding to the current version identifier can be traversed through the incremental differential upgrade index record information set. Afterwards, in response to determining that the traversal information indicates that no qualified differential upgrade index record information has been traversed, a communication module upgrade failure warning is issued. Thus, in the case where the traversal information corresponding to the current version identifier has not been traversed, a communication module upgrade failure warning can be issued. Next, in response to determining that the traversal information is a differential upgrade package identifier, the traversal information is determined as a target differential upgrade package identifier.Thus, the target differential upgrade package identifier of the differential upgrade package corresponding to the current version identifier of the preset communication module can be determined on the premise of traversing to the differential upgrade package identifier corresponding to the current version identifier. Based on the target differential upgrade package identifier, the target differential upgrade package file corresponding to the target differential upgrade package identifier is obtained from the preset server to perform differential upgrade processing on the preset communication module. Thus, the target differential upgrade package file applicable to the current version of the preset communication module can be obtained, and the preset communication module is differentially upgraded through the target differential upgrade package file. Also because the target differential upgrade package identifier applicable to the current version of the preset communication module is traversed through the incremental differential upgrade index record information set. Then, the preset communication module is differentially upgraded by obtaining the target differential upgrade package file corresponding to the target differential upgrade package identifier, which reduces the possibility of incompatibility between the current version of the communication module and the upgrade package during the upgrade process, reduces the number of failed communication module upgrades, and further reduces the number of attempts to re-upgrade the network camera, and reduces the waste of network camera storage resources during the communication module upgrade process. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] 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.

[0014] Figure 1 is a flow chart of some embodiments of a communication module upgrade method for a network camera according to the present disclosure;

[0015] Figure 2 It is a structural schematic diagram of some embodiments of the communication module upgrade device for network cameras according to the present disclosure;

[0016] 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

[0017] 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.

[0018] 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.

[0019] 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.

[0020] 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".

[0021] 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.

[0022] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0023] Figure 1 The process 100 of some embodiments of the communication module upgrade method for a network camera according to the present disclosure is shown. The communication module upgrade method for a network camera includes the following steps:

[0024] Step 101: Acquire upgrade package header information corresponding to a preset communication module identifier from a preset server.

[0025] In some embodiments, the execution subject of the communication module upgrade method for the network camera (for example, the main processor or microcontroller of the network camera) obtains the upgrade package header information corresponding to the preset communication module identifier from the preset server through a wired connection method or a wireless connection method. Among them, the above-mentioned preset server can be a server for updating the communication module (for example, a 4G module) built into each preset network camera. The above-mentioned preset server can store the upgrade package header information, incremental differential upgrade index record information set, differential upgrade package file and other related information required in the communication module upgrade process. The above-mentioned upgrade package header information can be the metadata of the incremental differential upgrade package file. The above-mentioned upgrade package header information includes the format information to be verified and the target version identifier. The above-mentioned format information to be verified can be a magic string (MagicString). The above-mentioned target version identifier can be the version identifier of the communication module after the software or firmware applied by the communication module of the network camera is updated (for example, the version number or ID of the latest version of the communication module). The above-mentioned incremental differential upgrade package file can be a file storing an incremental differential upgrade package file set (for example, a compressed file storing an incremental differential upgrade package file set). The incremental differential upgrade package file in the incremental differential upgrade package file set may be a file storing a differential package. Each incremental differential upgrade index record information in the incremental differential upgrade index record information set includes a differential upgrade package identifier, a source version identifier, an update version identifier, an upgrade description information, a file offset information, and a read length information. The differential upgrade package identifier may be an identifier of a differential package. The source version identifier may be a version identifier of a communication module to be upgraded. The update version identifier may represent a version identifier (e.g., a version number or ID) of the upgraded communication module. The upgrade description information may be text information describing the upgrade in detail. For example, the upgrade description information may be “Update content: Add support for 5G networks and increase data transmission rate”. The file offset information may be information indicating the starting position of the upgrade package file read. For example, the file offset information may be “file_offset=200 (indicating reading from the 200th byte)”. The read length information may be the number of bytes read from the upgrade package file. For example, the read length information may be “read_length=50 (indicating reading 50 bytes of data)”.

[0026] It should be noted that the above-mentioned wireless connection methods may include but are not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.

[0027] Step 102: Based on the upgrade packet header information, perform firmware upgrade detection processing on the preset communication module corresponding to the preset communication module identifier to obtain firmware upgrade detection information.

[0028] In some embodiments, the execution subject may perform firmware upgrade detection processing on the preset communication module corresponding to the preset communication module identifier based on the upgrade packet header information to obtain firmware upgrade detection information. The firmware detection information may be text information or a Boolean value indicating whether an upgrade is required. For example, the firmware upgrade detection information indicating that an upgrade is required may be represented by a Boolean value of True. The firmware upgrade detection information indicating that an upgrade is not required may be represented by a Boolean value of False.

[0029] In some optional implementations of some embodiments, the execution subject may perform firmware upgrade detection processing on the preset communication module corresponding to the preset communication module identifier based on the upgrade packet header information to obtain firmware upgrade detection information through the following steps:

[0030] The first step is to determine the format information to be verified included in the upgrade package header information as the target format information to be verified.

[0031] The second step is to compare the target format information to be verified with the preset verification format information to obtain comparison information. In practice, the execution subject can determine whether the target format information to be verified is the same as the preset verification format information by comparing the characters bit by bit. When the target format information to be verified is different from the preset verification format information, the execution subject can determine the text information representing the difference between the target format information to be verified and the preset verification format information as the comparison information. When the target format information to be verified is the same as the preset verification format information, the execution subject can determine the text information representing the sameness between the target format information to be verified and the preset verification format information as the comparison information.

[0032] In the third step, in response to determining that the comparison information indicates that the target format information to be verified is the same as the preset verification format information, the target version identifier included in the upgrade package header information is determined as the target version identifier to be compared.

[0033] The fourth step is to read the current version identification of the preset communication module. In practice, the execution subject can read the current version identification of the preset communication module by executing the task corresponding to the preset reading task information. The preset reading task information can be an AT command for communicating with the preset communication module to read the current version identification.

[0034] The fifth step is to compare the target version identifier to be compared with the current version identifier to obtain version identifier comparison information. In practice, first, the execution entity may determine the similarity between the target version identifier to be compared and the current version identifier as the comparison similarity. Then, when the comparison similarity is equal to a preset value, the execution entity may determine the text information representing that the target version identifier is the same as the current version identifier as the version identifier comparison information. When the comparison similarity is less than the preset value, the execution entity may determine the text information representing that the target version identifier is different from the current version identifier as the version identifier comparison information. Among them, the comparison similarity may be Jaccard similarity. The preset value may be 1.

[0035] In step 6, in response to determining that the version identifier comparison information indicates that the target version identifier is different from the current version identifier, the information indicating that an upgrade is required is determined as firmware upgrade detection information.

[0036] In some optional implementations of some embodiments, after comparing the target format information to be verified with the preset verification format information to obtain the comparison information, the execution subject may further perform the following steps:

[0037] The first step is, in response to determining that the format information to be verified represented by the comparison information is different from the preset verification format information, sending information representing that there is a problem with the differential upgrade package file corresponding to the upgrade package header information to the preset user terminal, and stopping the update operation. The information representing that there is a problem with the differential upgrade package file corresponding to the upgrade package header information may be text information. The preset user terminal may be a terminal of a technician responsible for upgrading the communication module built into the network camera or a user of the network camera using the built-in communication module, for example, the preset user terminal may be a mobile phone of the technician or the user.

[0038] Step 103: in response to determining that the firmware upgrade detection information indicates that an upgrade is required, obtaining an incremental differential upgrade index record information set from a preset server.

[0039] In some embodiments, the execution subject may obtain an incremental differential upgrade index record information set from the preset server in response to determining that the firmware upgrade detection information indicates that an upgrade is required.

[0040] Step 104, read the current version identifier of the preset communication module.

[0041] In some embodiments, the execution entity may read the current version identifier of the preset communication module.

[0042] Step 105: based on the current version identifier, traverse the incremental differential upgrade index record information set to obtain traversal information corresponding to the current version identifier.

[0043] In some embodiments, the execution subject may traverse the incremental differential upgrade index record information set based on the current version identifier to obtain traversal information corresponding to the current version identifier.

[0044] In some optional implementations of some embodiments, the execution subject may traverse the incremental differential upgrade index record information set based on the current version identifier through the following steps to obtain traversal information corresponding to the current version identifier:

[0045] The first step is to determine each source version identifier included in the incremental differential upgrade index record information set as each source version identifier to be retrieved, wherein each source version identifier to be retrieved corresponds to each incremental differential upgrade index record information in the incremental differential upgrade index record information set.

[0046] In the second step, in response to determining that there is a source version identifier to be retrieved that is the same as the current version identifier among the above-mentioned source version identifiers to be retrieved, the source version identifier to be retrieved that is the same as the current version identifier among the above-mentioned source version identifiers to be retrieved is determined as the target source version identifier.

[0047] In the third step, the incremental differential upgrade index record information corresponding to the target source version identifier in the incremental differential upgrade index record information set is determined as the target differential record information.

[0048] The fourth step is to determine the update version identifier included in the target differential record information as traversal information.

[0049] In step 5, in response to determining that there is no source version identifier to be retrieved that is the same as the current version identifier among the above-mentioned source version identifiers to be retrieved, information indicating that no qualified differential upgrade index record information has been traversed is determined as traversal information. The above-mentioned differential upgrade index record information indicating that no qualified differential upgrade index record information has been traversed can be text information.

[0050] Step 106 : in response to determining that the traversal information indicates that no qualified differential upgrade index record information has been traversed, a communication module upgrade failure warning is issued.

[0051] In some embodiments, the execution subject may issue a warning of a communication module upgrade failure in response to determining that the traversal information indicates that no qualified differential upgrade index record information has been traversed.

[0052] In some optional implementations of some embodiments, the execution subject may perform the following steps in response to determining that the traversal information representation does not traverse to the differential upgrade index record information that meets the conditions, and issue a warning of the failure of the communication module upgrade:

[0053] In the first step, in response to determining that the traversal information indicates that no qualified differential upgrade index record information has been traversed, a preset communication module identifier and information indicating the lack of differential upgrade packages and upgrade failure are stored in a preset log file. The information indicating the lack of differential upgrade packages and upgrade failure can be text information.

[0054] In the second step, information indicating that the preset communication module corresponding to the preset communication module identifier has failed to be upgraded is sent to a preset user terminal.

[0055] Step 107: In response to determining that the traversal information is a differential upgrade package identifier, determine the traversal information as a target differential upgrade package identifier.

[0056] In some embodiments, the execution subject may determine the traversal information as a target differential upgrade package identifier in response to determining that the traversal information is a differential upgrade package identifier.

[0057] Step 108: based on the target differential upgrade package identifier, obtain a target differential upgrade package file corresponding to the target differential upgrade package identifier from a preset server to perform differential upgrade processing on the preset communication module.

[0058] In some embodiments, the execution subject may obtain the target differential upgrade package file corresponding to the target differential upgrade package identifier from the preset server based on the target differential upgrade package identifier, so as to perform differential upgrade processing on the preset communication module.

[0059] In some optional implementations of some embodiments, the execution subject may obtain the target differential upgrade package file corresponding to the target differential upgrade package identifier from the preset server through the following steps based on the target differential upgrade package identifier, so as to perform differential upgrade processing on the preset communication module:

[0060] The first step is to determine the incremental differential upgrade index record information including the target differential upgrade package identifier.

[0061] In the second step, the file offset information and the read length information included in the incremental difference upgrade index record information are determined as the file read starting point position information and the target read length information respectively.

[0062] The third step is to extract the storage data corresponding to the file reading starting point position information and the target reading length information in the target differential upgrade package file. In practice, the execution subject can call a preset extraction function to extract the storage data corresponding to the file reading starting point position information and the target reading length information in the target differential upgrade package file. As an example, the execution subject can call a preset extraction function to move the file pointer of the target differential upgrade package file to the position corresponding to the file reading starting point position information. Then, the storage information of the length corresponding to the target reading length information in the target differential upgrade package file is read from the position specified by the file pointer. Among them, the preset extraction function can be an fseek function.

[0063] The fourth step is to determine the extracted storage data as differential firmware data.

[0064] The fifth step is to execute the task corresponding to the preset update task information to trigger the preset communication module to perform a firmware upgrade based on the differential firmware data. The preset update task information may be an AT command that triggers the preset communication module to upgrade the firmware of the preset communication module according to the differential firmware data. In practice, first, the preset communication module may back up the current version of the firmware. Then, the preset communication module may apply the differential firmware data to the current version of the firmware to perform a firmware update.

[0065] In the process of adopting technical solutions to solve the problems mentioned in the background technology, the following problems are often accompanied:

[0066] During the update process, when obtaining the various data required for the upgrade from the preset server (for example, the incremental differential upgrade index record information set, the upgrade package header information, and the incremental differential upgrade package file), the network connection between the network camera and the preset server is often unstable or abnormal, resulting in failure to obtain the data required for the upgrade. The network camera may repeatedly try to connect due to the failure to obtain, resulting in a waste of broadband resources (for example, when the network is not connected, the network camera sends multiple requests and still occupies bandwidth). At the same time, only obtaining the data required for the communication module upgrade from the preset server through the local area network, when the network is unstable or unavailable, directly trying to download the data required for the upgrade from the server may cause the upgrade to fail, increasing the number of communication module upgrade failures.

[0067] In the face of the above technical problems, the inventors decided to adopt the following solutions:

[0068] In some optional implementations of some embodiments, before obtaining the upgrade package header information corresponding to the preset communication module identifier from the preset server, the execution subject may further perform the following steps:

[0069] The first step is to perform the following detection and processing on the network connection status with the above-mentioned preset server:

[0070] The first sub-step is to send a preset data packet to the preset server, wherein the preset data packet may be a heartbeat packet.

[0071] The second sub-step is to determine the sending time and system time of sending the preset data packet.

[0072] The third sub-step is to perform the following determination steps according to the above sending time and system time:

[0073] Sub-step 1: Determine the time interval between the system time and the sending time. In practice, the execution entity may determine the difference between the determined system time and the sending time as the time interval between the system time and the sending time.

[0074] Sub-step 2: in response to determining that the time interval is less than or equal to a preset value, executing the following steps:

[0075] The first sub-step is, in response to detecting the feedback information sent by the preset server, determining the information indicating that the connection is normal as the network status detection result. The feedback information may be text information.

[0076] In the second sub-step, in response to not detecting the feedback information sent by the preset server, the system time is determined again after a preset time period of the sending time, and the determination step is performed again according to the re-determined system time. In practice, the execution subject can determine the system time through an API interface provided by a built-in operating system.

[0077] In a fourth sub-step, in response to determining that the time interval is greater than a preset value and no feedback information sent by the preset server is detected, information indicating a connection abnormality is determined as a network status detection result.

[0078] The second step is to send a warning message and a preset communication module identifier indicating abnormal network connection to the incremental differential upgrade package download terminal in response to determining that the network status detection result indicates abnormal connection, so that the above-mentioned download terminal can download the incremental differential upgrade index record information set, upgrade package header information and incremental differential upgrade package file set corresponding to the above-mentioned preset communication module identifier to the secure digital card. The above-mentioned incremental differential upgrade package download terminal can be a terminal (e.g., a mobile phone, a computer) of a technician responsible for the upgrade or a user of a network camera with a built-in communication module. The above-mentioned secure digital card can be an SD card (full name Secure Digital Memory Card) used to download the incremental differential upgrade index record information set, upgrade package header information and incremental differential upgrade package file set.

[0079] The third step is to perform differential upgrade processing on the preset communication module through the secure digital card in response to detecting that the user inserts the secure digital card into the preset interface built into the network camera. In practice, the execution subject can detect whether the user inserts the secure digital card into the preset interface built into the network camera through electrical signal detection technology. Optionally, the execution subject can also detect whether the user inserts the secure digital card into the preset interface built into the network camera through a built-in capacitive sensor. Among them, the preset interface can be an SPI interface or an SDIO interface. In practice, the execution subject can obtain the upgrade package header information corresponding to the preset communication module identifier from the secure digital card. Then, based on the upgrade package header information, the preset communication module corresponding to the preset communication module identifier is subjected to firmware upgrade detection processing to obtain firmware upgrade detection information. In response to determining that the firmware upgrade detection information indicates that an upgrade is required, an incremental differential upgrade index record information set is obtained from the secure digital card. Then, the current version identifier of the preset communication module is read. Afterwards, based on the current version identifier, the incremental differential upgrade index record information set is traversed to obtain the traversal information corresponding to the current version identifier. Next, in response to determining that the traversal information indicates that no qualified differential upgrade index record information has been traversed, a communication module upgrade failure warning is issued. Then, in response to determining that the traversal information is a differential upgrade package identifier, the traversal information is determined as a target differential upgrade package identifier. Next, a target differential upgrade package file corresponding to the target differential upgrade package identifier is obtained from the secure digital card to perform differential upgrade processing on the preset communication module.

[0080] The above technical solution and its related contents, as an inventive point of the embodiment of the present disclosure, solve the technical problem of "waste of broadband resources and increase in the number of communication module upgrade failures". The factors that lead to the waste of broadband resources and the increase in the number of communication module upgrade failures are often as follows: during the update process, when obtaining the various data required for the upgrade from the preset server (for example, the incremental differential upgrade index record information set, the upgrade package header information and the incremental differential upgrade package file), the network connection between the network camera and the preset server is often unstable or abnormal, resulting in the failure to obtain the data required for the upgrade. The network camera may repeatedly try to connect due to the failure to obtain, resulting in a waste of broadband resources (for example, when the network is not connected, the network camera sends multiple requests and still occupies bandwidth). At the same time, only the data required for the communication module upgrade is obtained from the preset server through the local area network. When the network is unstable or unavailable, directly trying to download the data required for the upgrade from the server may cause the upgrade to fail, increasing the number of communication module upgrade failures. If the above factors are solved, the effect of reducing the waste of broadband resources and the number of communication module upgrade failures can be achieved. In order to achieve this effect, first, the network connection status with the above preset server is detected and processed as follows: In the first sub-step, a preset data packet is sent to the above preset server. The second sub-step is to determine the sending time and system time of sending the preset data packet. The third sub-step is to perform the following determination steps according to the sending time and the system time: Sub-step 1 is to determine the time interval between the system time and the sending time. Sub-step 2 is to perform the following steps in response to determining that the time interval is less than or equal to the preset value: The first sub-step is to determine the information representing the normal connection as the network status detection result in response to detecting the feedback information sent by the preset server. Thus, it is possible to detect whether the server sends feedback information by sending a preset data packet to the server, and when the feedback information sent by the server is detected, the information representing the normal connection is determined as the network status detection result. The second sub-step is to determine the system time again after the preset time period of the sending time in response to not detecting the feedback information sent by the preset server, and perform the above determination step again according to the re-determined system time. The fourth sub-step is to determine the information representing the abnormal connection as the network status detection result in response to determining that the time interval is greater than the preset value and the feedback information sent by the preset server is not detected. Thus, when the time interval after the sending time of sending the preset data packet exceeds the preset value and the feedback information sent by the server is still not received, the network status detection result representing the abnormal connection can be obtained. The above steps can be used to detect the network connection between the network camera and the preset server.Next, in response to determining that the network status detection result indicates that the connection is abnormal, an early warning message indicating abnormal network connection and a preset communication module identifier are sent to the incremental differential upgrade package download terminal, so that the download terminal can download the incremental differential upgrade index record information set, upgrade package header information, and incremental differential upgrade package file set corresponding to the preset communication module identifier to the secure digital card. Thus, when the network connection between the network camera and the preset server is unstable or abnormal, the incremental differential upgrade index record information set, upgrade package header information, and incremental differential upgrade package file set corresponding to the preset communication module identifier can be downloaded to the secure digital card through the download terminal. Afterwards, in response to detecting that the user inserts the secure digital card into the preset interface built into the network camera, the preset communication module is differentially upgraded through the secure digital card. Thus, when the network connection between the network camera and the preset server is unstable or abnormal, the preset communication module can be differentially upgraded through the secure digital card, which reduces the possibility of failure to obtain upgrade data due to abnormal network connection, reduces the number of times the network camera repeatedly attempts to connect due to failed acquisition, and reduces the waste of broadband resources. Also, because the network connection between the network camera and the preset server is detected, the preset communication module is differentially upgraded through the secure digital card when the connection network is unstable or abnormal, reducing the number of communication module upgrade failures caused by LAN instability or abnormality.

[0081] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the communication module upgrade method for network cameras of some embodiments of the present disclosure, the accuracy of the communication module upgrade for network cameras is improved. Specifically, the reason for the waste of network camera storage resources during the communication module upgrade process is that the initial versions of the communication modules built into different network cameras are various. Directly obtaining an upgrade package from a fixed version to the latest version, upgrading the communication module built into the network camera, and only obtaining the latest version of the upgrade package, without considering whether the current version (initial version) of the communication module can be applied to the upgrade package from a version to the latest version, may cause the current version of the communication module to be incompatible with the upgrade package, and the upgrade process may be interrupted or failed, increasing the number of communication module upgrade failures. At the same time, when the communication module upgrade fails, the network camera may try to re-upgrade multiple times, and each upgrade attempt requires storage space (for example, occupying space to generate a log file for recording upgrade information), which increases the waste of network camera storage resources during the communication module upgrade process. Based on this, the communication module upgrade method for network cameras of some embodiments of the present disclosure first obtains the upgrade package header information corresponding to the preset communication module identifier from the preset server. Thus, the upgrade package header information used for performing firmware upgrade detection processing on the preset communication module can be obtained. The above-mentioned firmware upgrade detection processing can detect whether the preset communication module needs to be upgraded. Then, based on the above-mentioned upgrade package header information, the preset communication module corresponding to the above-mentioned preset communication module identifier is subjected to firmware upgrade detection processing to obtain firmware upgrade detection information. Next, in response to determining that the above-mentioned firmware upgrade detection information indicates that an upgrade is required, an incremental differential upgrade index record information set is obtained from the above-mentioned preset server. Thus, an incremental differential upgrade index record information set for traversing the target differential upgrade package identifier can be obtained. The above-mentioned target differential upgrade package identifier can be an identifier of a differential upgrade package corresponding to the version of the current version identifier of the above-mentioned preset communication module. Afterwards, the current version identifier of the above-mentioned preset communication module is read. Thus, the current version identifier of the preset communication module that needs to be updated can be determined. Then, based on the above-mentioned current version identifier, the above-mentioned incremental differential upgrade index record information set is traversed to obtain the traversal information corresponding to the current version identifier. Thus, the traversal information corresponding to the current version identifier can be traversed through the incremental differential upgrade index record information set. Afterwards, in response to determining that the traversal information indicates that no qualified differential upgrade index record information has been traversed, a communication module upgrade failure warning is issued. Thus, in the case where the traversal information corresponding to the current version identifier has not been traversed, a communication module upgrade failure warning can be issued. Next, in response to determining that the traversal information is a differential upgrade package identifier, the traversal information is determined as a target differential upgrade package identifier.Thus, the target differential upgrade package identifier of the differential upgrade package corresponding to the current version identifier of the preset communication module can be determined on the premise of traversing to the differential upgrade package identifier corresponding to the current version identifier. Based on the target differential upgrade package identifier, the target differential upgrade package file corresponding to the target differential upgrade package identifier is obtained from the preset server to perform differential upgrade processing on the preset communication module. Thus, the target differential upgrade package file applicable to the current version of the preset communication module can be obtained, and the preset communication module is differentially upgraded through the target differential upgrade package file. Also because the target differential upgrade package identifier applicable to the current version of the preset communication module is traversed through the incremental differential upgrade index record information set. Then, the preset communication module is differentially upgraded by obtaining the target differential upgrade package file corresponding to the target differential upgrade package identifier, which reduces the possibility of incompatibility between the current version of the communication module and the upgrade package during the upgrade process, reduces the number of failed communication module upgrades, and further reduces the number of attempts to re-upgrade the network camera, and reduces the waste of network camera storage resources during the communication module upgrade process.

[0082] Further references Figure 2 As an implementation of the methods shown in the figures, the present disclosure provides some embodiments of a communication module upgrade device for a network camera. These device embodiments are similar to Figure 1 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.

[0083] like Figure 2As shown, in some embodiments, a communication module upgrade device 200 for a network camera includes: a first acquisition unit 201, an upgrade detection process 202, a second acquisition unit 203, a reading unit 204, a traversal unit 205, an early warning unit 206, a determination unit 207 and a differential upgrade process 208. Among them, the first acquisition unit is configured to obtain upgrade package header information corresponding to a preset communication module identifier from a preset server; the upgrade detection processing unit is configured to perform firmware upgrade detection processing on the preset communication module corresponding to the preset communication module identifier based on the above-mentioned upgrade package header information to obtain firmware upgrade detection information; the second acquisition unit is configured to obtain an incremental differential upgrade index record information set from the above-mentioned preset server in response to determining that the above-mentioned firmware upgrade detection information indicates that an upgrade is required; the reading unit is configured to read the current version identifier of the above-mentioned preset communication module; the traversal unit is configured to traverse the above-mentioned current version identifier based on the above-mentioned current version identifier. The above-mentioned incremental differential upgrade index record information set obtains traversal information corresponding to the current version identifier; the early warning unit is configured to respond to determining that the above-mentioned traversal information indicates that the qualified differential upgrade index record information has not been traversed, and issue a warning of communication module upgrade failure; the determination unit is configured to respond to determining that the above-mentioned traversal information is a differential upgrade package identifier, and determine the above-mentioned traversal information as a target differential upgrade package identifier; the differential upgrade processing unit is configured to obtain the target differential upgrade package file corresponding to the above-mentioned target differential upgrade package identifier from the above-mentioned preset server based on the above-mentioned target differential upgrade package identifier, so as to perform differential upgrade processing on the above-mentioned preset communication module.

[0084] 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 contained therein, and will not be described in detail here.

[0085] Reference below Figure 3 , which shows a structural schematic diagram of an electronic device 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The 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.

[0086] like Figure 3As 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 (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0087] 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.

[0088] 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 includes a 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 ROM 302. When the computer program is executed by the processing device 301, the functions defined in the method of some embodiments of the present disclosure are executed.

[0089] 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 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 thereof. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction 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, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. 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 thereof.

[0090] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText 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.

[0091] The computer-readable medium may be included in the electronic device; or may exist separately without being incorporated into the electronic device. The computer-readable medium carries one or more programs. When one or more programs are executed by the electronic device, the electronic device: obtains upgrade package header information corresponding to a preset communication module identifier from a preset server; based on the upgrade package header information, performs firmware upgrade detection processing on the preset communication module corresponding to the preset communication module identifier to obtain firmware upgrade detection information; in response to determining that the firmware upgrade detection information indicates that an upgrade is required, obtains an incremental differential upgrade index record information set from the preset server; reads the current version identifier of the preset communication module; based on the current version identifier, traverses the incremental differential upgrade index record information set to obtain traversal information corresponding to the current version identifier; in response to determining that the traversal information indicates that no qualified differential upgrade index record information has been traversed, issues a communication module upgrade failure warning; in response to determining that the traversal information is a differential upgrade package identifier, determines the traversal information as a target differential upgrade package identifier; based on the target differential upgrade package identifier, obtains a target differential upgrade package file corresponding to the target differential upgrade package identifier from the preset server to perform differential upgrade processing on the preset communication module.

[0092] 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).

[0093] 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.

[0094] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor comprising a first acquisition unit, an upgrade detection process, a second acquisition unit, a reading unit, a traversal unit, an early warning unit, a determination unit, and a differential upgrade process. Among them, the names of these units do not constitute a limitation on the unit itself in certain circumstances, for example, the determination unit may also be described as "a unit that determines the traversal information as a target differential upgrade package identifier in response to determining that the traversal information is a differential upgrade package identifier".

[0095] 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.

[0096] 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 technical features, but should also cover other technical solutions formed by any combination of technical features or their equivalent features without departing from the inventive concept. For example, a technical solution formed by replacing the features with (but not limited to) the technical features with similar functions disclosed in the embodiments of the present disclosure.

Claims

1. A communication module upgrade method for a network camera, comprising: Obtaining upgrade package header information corresponding to a preset communication module identifier from a preset server; Based on the upgrade packet header information, a firmware upgrade detection process is performed on the preset communication module corresponding to the preset communication module identifier to obtain firmware upgrade detection information; In response to determining that the firmware upgrade detection information indicates that an upgrade is required, obtaining an incremental differential upgrade index record information set from the preset server; Reading the current version identifier of the preset communication module; Based on the current version identifier, traverse the incremental differential upgrade index record information set to obtain traversal information corresponding to the current version identifier; In response to determining that the traversal information indicates that no qualified differential upgrade index record information has been traversed, a communication module upgrade failure warning is issued; In response to determining that the traversal information is a differential upgrade package identifier, determining the traversal information as a target differential upgrade package identifier; A target differential upgrade package file corresponding to the target differential upgrade package identifier is obtained from the preset server to perform differential upgrade processing on the preset communication module.

2. The method according to claim 1, wherein: In response to determining that the traversal information indicates that no qualified differential upgrade index record information has been traversed, a communication module upgrade failure warning is issued, including: In response to determining that the traversal information indicates that no qualified differential upgrade index record information has been traversed, a preset communication module identifier and information indicating that the differential upgrade package is missing and the upgrade has failed are stored in a preset log file; The information indicating that the preset communication module corresponding to the preset communication module identifier has failed to be upgraded is sent to the preset user terminal.

3. The method according to claim 1, wherein: The upgrade package header information includes format information to be verified and a target version identifier, and the firmware upgrade detection processing is performed on the preset communication module corresponding to the preset communication module identifier based on the upgrade package header information to obtain firmware upgrade detection information, including: Determining the format information to be verified included in the upgrade package header information as the target format information to be verified; Comparing the target format information to be verified with the preset verification format information to obtain comparison information; In response to determining that the comparison information represents that the target format information to be verified is the same as the preset verification format information, determining the target version identifier included in the upgrade package header information as the target version identifier to be compared; Reading the current version identifier of the preset communication module; Compare the target version identifier to be compared with the current version identifier to obtain version identifier comparison information; In response to determining that the version identification comparison information indicates that the target version identification is different from the current version identification, the information indicating that an upgrade is required is determined as firmware upgrade detection information.

4. The method according to claim 1, wherein: Each incremental differential upgrade index record information in the incremental differential upgrade index record information set includes a differential upgrade package identifier, a source version identifier, an update version identifier, upgrade description information, file offset information, and read length information, and based on the current version identifier, traversing the incremental differential upgrade index record information set to obtain traversal information corresponding to the current version identifier, including: Determine each source version identifier included in the incremental differential upgrade index record information set as each source version identifier to be retrieved, wherein each source version identifier to be retrieved in the each source version identifier to be retrieved corresponds one-to-one to each incremental differential upgrade index record information in the incremental differential upgrade index record information set; In response to determining that there is a to-be-searched source version identifier that is identical to the current version identifier among the various to-be-searched source version identifiers, determining the to-be-searched source version identifier that is identical to the current version identifier among the various to-be-searched source version identifiers as the target source version identifier; Determine the incremental differential upgrade index record information corresponding to the target source version identifier in the incremental differential upgrade index record information set as the target differential record information; Determining the update version identifier included in the target differential record information as traversal information; In response to determining that there is no source version identifier to be retrieved that is the same as the current version identifier among the source version identifiers to be retrieved, information indicating that no qualified differential upgrade index record information has been traversed is determined as traversal information.

5. The method according to claim 3, wherein: After the target format information to be verified is compared with the preset verification format information to obtain the comparison information, the method further includes: In response to determining that the comparison information represents that the target format information to be verified is different from the preset verification format information, information representing that there is a problem with the differential upgrade package file corresponding to the upgrade package header information is sent to a preset user terminal, and the update operation is stopped.

6. The method according to claim 1, wherein: The target differential upgrade package file includes differential firmware data, and the target differential upgrade package file corresponding to the target differential upgrade package identifier is obtained from the preset server to perform differential upgrade processing on the preset communication module, including: Determine the incremental differential upgrade index record information including the target differential upgrade package identifier; Determine the file offset information and the read length information included in the incremental difference upgrade index record information as the file read starting point position information and the target read length information respectively; Extracting the stored data corresponding to the file reading starting point position information and the target reading length information in the target differential upgrade package file; determining the extracted storage data as differential firmware data, and storing the differential firmware data to the network camera; The task corresponding to the preset update task information is executed to trigger the preset communication module to perform a firmware upgrade based on the differential firmware data.

7. A communication module upgrade device for a network camera, comprising: A first acquisition unit is configured to acquire upgrade package header information corresponding to a preset communication module identifier from a preset server; An upgrade detection processing unit is configured to perform firmware upgrade detection processing on the preset communication module corresponding to the preset communication module identifier based on the upgrade packet header information to obtain firmware upgrade detection information; A second acquisition unit is configured to acquire an incremental difference upgrade index record information set from the preset server in response to determining that the firmware upgrade detection information indicates that an upgrade is required; A reading unit, configured to read a current version identifier of the preset communication module; A traversal unit is configured to traverse the incremental differential upgrade index record information set based on the current version identifier to obtain traversal information corresponding to the current version identifier; An early warning unit is configured to issue an early warning of a communication module upgrade failure in response to determining that the traversal information representation does not traverse to differential upgrade index record information that meets the conditions; a determining unit configured to, in response to determining that the traversal information is a differential upgrade package identifier, determine the traversal information as a target differential upgrade package identifier; The differential upgrade processing unit is configured to obtain a target differential upgrade package file corresponding to the target differential upgrade package identifier from the preset server to perform differential upgrade processing on the preset communication module.

8. 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 6.

9. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.