Method and device for upgrading battery camera by NVR (Network Video Recorder)

The NVR upgrade process managed by the cloud server, combined with the network disconnection and power failure retransmission mechanisms, solves the problems of low efficiency, low security and high network resource usage during the battery camera upgrade process, and realizes efficient and secure multi-channel upgrades.

CN120602768AActive Publication Date: 2025-09-05SHENZHEN INFINOVA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510769686.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-10
Publication Date
2025-09-05
Estimated Expiration
2045-06-10

AI Technical Summary

Technical Problem

The existing method of upgrading battery cameras in NVR has the problems of low upgrading efficiency, low security and high network resource occupation.

Method used

The upgrade process is managed by a cloud server. The new firmware upgrade package is obtained through the cloud server. After confirmation by the user, the NVR downloads it and sends it to the battery camera. The network disconnection and power failure retransmission mechanisms are used to ensure the integrity and security of the upgrade process. Multi-channel simultaneous upgrades are supported.

Benefits of technology

It optimizes upgrade efficiency and security, reduces operation and maintenance costs, reduces upgrade failure rate and network resource usage, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120602768A_ABST
    Figure CN120602768A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for upgrading a battery camera by an NVR (Network Video Recorder), and relates to the technical field of video monitoring and network communication. According to the method and the device for upgrading the battery camera by the NVR, the upgrading operation is simpler, the manual intervention in the upgrading process is less, the upgrading efficiency and the security are optimized, and the operation and maintenance cost is reduced; in the upgrading process, the NVR transmits a new firmware upgrading package to the battery camera by adopting a network-off continuous transmission and power-off retransmission mechanism, so that the failure rate of upgrading can be effectively reduced, the bandwidth occupied by upgrading is reduced, and the problem of high network resource occupation is solved; multi-channel battery camera upgrading can be carried out on the NVR at the same time, the NVR can be prevented from repeatedly downloading an upgrading package, the bandwidth occupied by upgrading is saved, and the upgrading duration is shortened; and the user can check the upgrading result through the user side, so that the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of video surveillance and network communication, and in particular to a method and device for upgrading an NVR to a battery camera. Background Art

[0002] Battery-powered cameras require no power cords, offer long battery life, are portable, and easy to install, making them widely used in security surveillance, intelligent transportation, and smart cities. Currently, upgrading battery-powered cameras in NVRs (network video recorders) typically involves two methods: using the firmware stored locally on the NVR, but this requires manual operation and is inefficient and insecure. Alternatively, wireless network upgrades can fail due to network fluctuations or power outages, requiring a new firmware download. This consumes significant network resources and wastes power.

[0003] Therefore, the existing method of upgrading battery cameras of NVR has the problems of low upgrading efficiency, low security and high network resource occupation during the upgrading process. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a method and device for upgrading an NVR to a battery camera, so as to solve the problems of low upgrading efficiency, low security and high network resource occupation in the existing NVR battery camera upgrading process.

[0005] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0006] The first aspect of the present invention provides a method for upgrading an NVR battery camera in a battery camera upgrade system, which comprises the following steps: a cloud server obtains a new firmware upgrade package, and if the version of the new firmware upgrade package is higher than the firmware version of the battery camera of one or some channels of the NVR, the cloud server sends an upgrade notification to a user terminal; when the user terminal receives the upgrade notification, it prompts the user that the battery camera of one or some channels of the NVR needs to be upgraded, and when the user terminal receives the upgrade confirmation instruction, it obtains the upgrade command from the cloud server and sends it to the NVR; after the NVR receives the upgrade command, it sends a download request to the cloud server to download the new firmware upgrade package; after the cloud server receives the download request, it returns the new firmware upgrade package to the NVR; after the NVR successfully downloads the new firmware upgrade package, the NVR sends the new firmware upgrade package to the battery cameras of all channels that need to be upgraded, and transmits data of a fixed size each time until all the data of the new firmware upgrade package is transmitted; after the battery camera receives the new firmware upgrade package, The upgrade starts after the package is installed, and the current firmware version number is returned to the NVR; the NVR receives the current firmware version number returned by the battery camera, determines whether the upgrade is successful based on the comparison result between the current firmware version number and the version of the new firmware upgrade package, and sends the upgrade result to the user end; the user end prompts the user of the success or failure of the upgrade based on the upgrade result, and returns the current firmware version number to the cloud server; the above steps are repeated until all battery cameras of all channels corresponding to the new firmware upgrade package of the NVR are successfully upgraded; wherein, during the process of the NVR battery camera sending the new firmware upgrade package, if it is detected that the battery camera is disconnected from the network, the NVR activates the network disconnection resume mechanism, and after the NVR and the battery camera are reconnected, the NVR continues to send the remaining data of the new firmware upgrade package to the battery camera; if it is detected that the battery camera is powered off, the NVR activates the power off retransmission mechanism, and after the NVR and the battery camera are reconnected, the NVR resends the new firmware upgrade package to the battery camera.

[0007] The second aspect of the present invention provides a method for upgrading a battery camera of an NVR applied to an NVR, which includes the following steps: after receiving an upgrade command sent by a user end, sending a download request to a cloud server to request downloading a new firmware upgrade package; after successfully downloading the new firmware upgrade package, sending the new firmware upgrade package to the battery cameras of all channels that need to be upgraded, transmitting data of a fixed size each time until all the data of the new firmware upgrade package is transmitted; receiving the current firmware version number returned by the battery camera after the upgrade, judging whether the upgrade is successful based on the comparison result between the current firmware version number and the version of the new firmware upgrade package, and sending the upgrade result to the user end; wherein, during the process of the NVR battery camera sending the new firmware upgrade package, if it is detected that the battery camera is disconnected from the network, the NVR activates a network disconnection resume mechanism, and after the NVR and the battery camera are reconnected, the NVR continues to send the remaining data of the new firmware upgrade package to the battery camera; if it is detected that the battery camera is powered off, the NVR activates a power off retransmission mechanism, and after the NVR and the battery camera are reconnected, the NVR resends the new firmware upgrade package to the battery camera.

[0008] The third aspect of the present invention provides a device for upgrading a battery camera in an NVR, which is configured in the NVR and includes: a download request module for sending a download request to a cloud server to request downloading a new firmware upgrade package after receiving an upgrade command sent by a user terminal; an upgrade package sending module for sending the new firmware upgrade package to battery cameras of all channels that need to be upgraded after successfully downloading the new firmware upgrade package, transmitting data of a fixed size each time until all data of the new firmware upgrade package is transmitted; an upgrade result judgment module for receiving the current firmware version number returned after the battery camera is upgraded, judging whether the upgrade is successful based on the comparison result between the current firmware version number and the version of the new firmware upgrade package, and sending the upgrade result to the cloud server; The result is sent to the user end; the download request module, the upgrade package sending module and the upgrade result judgment module are repeatedly operated in sequence until all the battery cameras of the channels corresponding to the new firmware upgrade package of the NVR are successfully upgraded; wherein, during the process of the NVR battery camera sending the new firmware upgrade package, if the upgrade package sending module detects that the battery camera is disconnected from the network, the NVR starts the network disconnection resume transmission mechanism, and after the NVR and the battery camera are reconnected, the NVR continues to send the remaining data of the new firmware upgrade package to the battery camera; if the battery camera is detected to be powered off, the NVR starts the power off retransmission mechanism, and after the NVR and the battery camera are reconnected, the NVR resends the new firmware upgrade package to the battery camera.

[0009] The above-mentioned method and device for upgrading battery cameras of NVR have simpler upgrading operations and less manual intervention in the upgrading process, thus optimizing upgrading efficiency and security and reducing operation and maintenance costs. During the upgrading process, NVR adopts the network disconnection and power-off retransmission mechanisms to transmit new firmware upgrade packages to battery cameras, which can effectively reduce the failure rate of upgrading and reduce the bandwidth occupied by upgrading, thus solving the problem of high network resource usage. It supports upgrading multi-channel battery cameras of NVR at the same time, thus avoiding repeated downloading of upgrade packages by NVR, saving bandwidth occupied by upgrading and shortening upgrading time. Users can view the upgrading results through the user terminal, thus improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 A flowchart of a method for upgrading an NVR to a battery camera in a battery camera upgrade system provided by one embodiment of the present invention;

[0011] Figure 2 A flowchart of a method for upgrading a battery camera in an NVR provided by an embodiment of the present invention;

[0012] Figure 3 A schematic diagram of the structure of an apparatus for upgrading an NVR to a battery-powered camera according to an embodiment of the present invention. DETAILED DESCRIPTION

[0013] In order to enable those skilled in the art to more clearly understand the objectives, technical solutions and advantages of the present invention, the present invention is further described below with reference to the accompanying drawings and embodiments.

[0014] The present invention provides a method for upgrading a battery camera using an NVR, which is applied to a battery camera upgrade system. The battery camera upgrade system includes a cloud server, a user terminal (such as a mobile phone, tablet, etc.), an NVR, and a battery camera. The cloud server is connected and communicated with the user terminal and the NVR, and can be used to store the firmware upgrade package (update program) of the battery camera and control the release, verification, and push of the firmware upgrade package. The user terminal can be used to associate with the NVR and the battery camera, thereby enabling functions such as browsing the real-time stream of the camera, modifying camera parameters, and viewing recordings; the NVR is associated with the battery camera via Halow WiFi and performs operations such as audio and video reception and data interaction; as a terminal device, the battery camera does not require a power cord, has long battery life, is easy to carry, easy to install, is not restricted by the network, and due to the characteristics of Halow WiFi, can communicate with the NVR over long distances, which has great advantages over ordinary WiFi cameras.

[0015] When the user side associates with the NVR and battery camera, the user side associates with the NVR by setting an account. Each account can be associated with multiple NVRs, but each NVR can only be associated with one account. Each NVR can be associated with multiple battery cameras, but each battery camera can only be associated with one NVR. The upgrade system has extremely strong security.

[0016] like Figure 1 As shown, in one embodiment of the present invention, the method for upgrading the battery camera of the NVR includes the following steps:

[0017] S10. The cloud server obtains a new firmware upgrade package. If the version of the new firmware upgrade package is higher than the firmware version of the battery camera of one or some channels of the NVR, the cloud server sends an upgrade notification to the user terminal.

[0018] S20, when the user terminal receives the upgrade notification, it prompts the user that the battery camera of one or some channels of the NVR needs to be upgraded, and when the user confirms the upgrade instruction, it obtains the upgrade command from the cloud server and sends it to the NVR;

[0019] S30. After receiving the upgrade command, the NVR sends a download request to the cloud server to request downloading the new firmware upgrade package;

[0020] S40: After receiving the download request, the cloud server returns the new firmware upgrade package to the NVR;

[0021] S50, after the NVR successfully downloads the new firmware upgrade package, the NVR sends the new firmware upgrade package to the battery cameras of all channels that need to be upgraded, sending data of a fixed size each time until all the data of the new firmware upgrade package is transmitted;

[0022] S60: After receiving the new firmware upgrade package, the battery camera starts upgrading and returns the current firmware version number to the NVR.

[0023] S70. The NVR receives the current firmware version number returned by the battery camera, determines whether the upgrade is successful based on the comparison result between the current firmware version number and the version of the new firmware upgrade package, and sends the upgrade result to the user terminal;

[0024] S80: The user terminal notifies the user of the success or failure of the upgrade based on the upgrade result, and returns the current firmware version number to the cloud server;

[0025] S90. The cloud server determines whether all battery cameras of the NVR channels corresponding to the new firmware upgrade package have been successfully upgraded. If so, the process ends; if not, the process returns to step S10.

[0026] Before starting the upgrade process, that is, before step S10, the administrator needs to import the new firmware upgrade package into the cloud server to prepare for the upgrade.

[0027] In step S50, since the battery camera works for a maximum of 5 minutes each time, the present invention transmits the new firmware upgrade package to the battery camera in multiple times. The NVR transmits a maximum of 1MB of data to the battery camera each time until all the data of the new firmware upgrade package is transmitted. The battery camera accumulates the size of the received data to obtain a completed new firmware upgrade package.

[0028] During the process of the NVR battery camera sending the new firmware upgrade package, if the network environment is poor and the data transmission is slow, the NVR will wait until all the data is sent. Specifically, if a weak network is detected (the signal strength is lower than the set value), the NVR will send a wake-up command every preset time (such as 30 seconds) to wake up the battery camera and query the battery camera for the data size and CRC check code of the received upgrade package. If the CRC check passes, the NVR will continue to send the remaining data of the new firmware upgrade package to the battery camera.

[0029] During the process of the NVR battery camera sending the new firmware upgrade package, if it detects that the battery camera is disconnected from the network, the NVR will activate the network-resuming transmission mechanism. After the NVR and the battery camera are reconnected, the NVR will continue to send the remaining data of the new firmware upgrade package to the battery camera. Specifically, if it detects that the battery camera is disconnected from the network, the NVR will activate the network-resuming transmission mechanism and send a wake-up command every preset time (such as 30 seconds) to wake up the battery camera. After the NVR and the battery camera are reconnected, the NVR will query the battery camera for the size of the received upgrade package data and the CRC check code. If the CRC check passes, the NVR will continue to send the remaining data of the new firmware upgrade package to the battery camera.

[0030] During the process of the NVR battery camera sending the new firmware upgrade package, if it detects that the battery camera is powered off, the NVR will activate the power-off retransmission mechanism. After the NVR and the battery camera are reconnected, the NVR will resend the new firmware upgrade package to the battery camera. Specifically, if it detects that the battery camera is powered off, the NVR will activate the power-off retransmission mechanism. Within a set time range (e.g., 10 minutes) from the time the user confirms the upgrade, it will send a wake-up command every preset time (e.g., 30 seconds) to wake up the battery camera until the NVR and the battery camera are reconnected. The NVR will then resend the new firmware upgrade package to the battery camera.

[0031] In this embodiment, the NVR upgrade method for battery-powered cameras requires only the administrator to import the firmware upgrade package during the upgrade preparation phase and the user to confirm the upgrade authorization in step S20. The remaining steps are automatically completed under the NVR's control, ultimately indicating a success or failure result. This minimizes manual intervention. Users can check the success of the upgrade on the user-side app. If not, there is an update button on the app; users can click it again to continue the upgrade process.

[0032] The method for upgrading the battery camera of the NVR of this embodiment has a simpler upgrade operation and less manual intervention in the upgrade process, thereby optimizing the upgrade efficiency and security and reducing the operation and maintenance costs. During the upgrade process, the NVR adopts the network disconnection resume transmission and power off retransmission mechanism to transmit the new firmware upgrade package to the battery camera, which can effectively reduce the failure rate of the upgrade and reduce the bandwidth occupied by the upgrade, solving the problem of high network resource usage. The method supports simultaneous multi-channel battery camera upgrades for the NVR, which can avoid the NVR from repeatedly downloading the upgrade package, saving the upgrade bandwidth and shortening the upgrade time. The user can view the upgrade results through the user terminal, thereby improving the user experience.

[0033] In a preferred embodiment of the present invention, step S40 further includes: upon receiving the download request, the cloud server performs a validity and security verification on the download request. If the verification passes, the new firmware upgrade package is returned to the NVR; if the verification fails, the new firmware upgrade package is not returned to the NVR. By performing a validity and security verification on the download request and returning the new firmware upgrade package to the NVR only after the verification passes, the cloud server ensures the validity and security of the download request and prevents unauthorized access and tampering of the firmware upgrade package.

[0034] In a preferred embodiment of the present invention, step S50 further includes: after the NVR successfully downloads the new firmware upgrade package, it performs integrity and legality verification on the new firmware upgrade package. If the verification passes, the NVR sends the new firmware upgrade package to all battery-powered cameras on all channels that require the upgrade, with the new firmware upgrade package being transmitted in multiple batches, each time containing a fixed size of data, until the entire new firmware upgrade package is transmitted. If the verification fails, the new firmware upgrade package is deleted and the upgrade is terminated. After the NVR downloads the new firmware upgrade package, it performs integrity and legality verification on the new firmware upgrade package. Only after confirming that the firmware upgrade package is complete and legal is the new firmware upgrade package sent to the battery-powered cameras, thereby ensuring the effectiveness and security of the upgrade.

[0035] In a preferred embodiment of the present invention, step S60 further includes: after the battery-powered camera receives the new firmware upgrade package, it verifies the new firmware upgrade package for integrity and validity. If the verification passes, the upgrade begins and the current firmware version number is returned to the NVR. If the verification fails, the new firmware upgrade package is deleted and the upgrade is terminated. By verifying the integrity and validity of the new firmware upgrade package and confirming its integrity and validity before starting the upgrade, the battery-powered camera ensures the effectiveness and security of the upgrade.

[0036] In a preferred embodiment of the present invention, step S10 further includes:

[0037] S11. The cloud server obtains the new firmware upgrade package;

[0038] S12. The cloud server determines, based on the model of the new firmware upgrade package, that the new firmware upgrade package is applicable to the battery camera of one or more channels of the NVR;

[0039] S13. The cloud server determines whether the description of the new firmware upgrade package conforms to a preset format. If so, step S14 is executed. If not, the release of the new firmware upgrade package is stopped.

[0040] S14. The cloud server determines whether the version of the new firmware upgrade package is higher than the firmware version of the battery camera of one or some channels of the NVR. If so, it sends an upgrade notification to the user end and adds a data signature to the header of the new firmware upgrade package. The information in the data signature includes the upgrade package type, upgrade package size, MD5 checksum, and the proprietary model ID of the battery camera. If not, the release of the new firmware upgrade package is stopped.

[0041] In steps S13-S14, the firmware upgrade package's version description is pre-set to "Major Version. Minor Version. Patch Version." If the new firmware upgrade package's description conforms to the pre-set format, the system determines whether the new firmware upgrade package's version is higher than the battery camera's original firmware version. Only if the new firmware upgrade package's version is higher will the new firmware upgrade package be released. For example, if the battery camera's original firmware version is 1.2.5250101 and a firmware upgrade package with version 1.1.5250102 is received, the upgrade will not be allowed if the minor version value of the package is lower than the minor version value of the original firmware version. However, if the received firmware upgrade package is version 1.3.5250102, the upgrade will be allowed.

[0042] In this embodiment, the cloud server can uniformly control the firmware version of the battery camera. The firmware upgrade package can only be released when the firmware version conforms to the preset format and the version is incremental. This solves the problem of version confusion and conflict caused by the lack of unified control of the firmware version of the battery camera by the cloud server.

[0043] The step S20 further includes:

[0044] S21, when the user terminal receives the upgrade notification, it prompts the user that the battery camera of one or some channels of the NVR needs to be upgraded, and waits for the user to confirm the upgrade instruction;

[0045] S22. Upon receiving the user's instruction to confirm the upgrade, the user terminal obtains an upgrade command from the cloud server. The upgrade command includes the upgrade package path, identity authentication ID, digital signature, and timeout period.

[0046] S23. The user terminal sends the upgrade command to the NVR.

[0047] In step S21, the user terminal prompts the user through the update button that the battery camera of one or some channels of the NVR needs to be upgraded. The user can choose to click the update button at any time to upgrade.

[0048] In step S22, the path of the upgrade package uses an encrypted URL address, and the NVR can request the cloud server to download the new firmware upgrade package through the URL address; the identity authentication ID is the user identity authentication ID; the information in the digital signature includes the upgrade package type, upgrade package size, MD5 checksum, and the proprietary model ID of the battery camera; the timeout time refers to the timeout time for the NVR to download the firmware upgrade package from the cloud server. The NVR needs to request to download the firmware upgrade package before the timeout time. If the firmware upgrade package is requested to be downloaded after the timeout time, the cloud server will not return the firmware upgrade package, indicating that the upgrade failed. There will be a prompt on the user end, and the user needs to re-authorize the upgrade, which enhances security.

[0049] The step S30 further includes:

[0050] S31. After receiving the upgrade command, the NVR generates a download request according to the upgrade command. The information in the download request includes the path of the upgrade package, identity authentication ID, digital signature and timeout period;

[0051] S32. The NVR sends the download request to the cloud server to request downloading the new firmware upgrade package.

[0052] The step S40 further includes:

[0053] S41. After receiving the download request, the cloud server parses the download request to obtain the upgrade package path, identity authentication ID, digital signature, and timeout period;

[0054] S42. The cloud server verifies whether the download request is safe or abnormal based on the identity authentication ID, digital signature and timeout period. If the download request is safe, the new firmware upgrade package is returned to the NVR. If the download request is abnormal, the new firmware upgrade package is not returned to the NVR.

[0055] In step S40, if the identity authentication ID, digital signature, and timeout period all pass verification, the download request is considered secure. Otherwise, the download request is considered abnormal. The cloud server verifies the legitimacy and security of the download request and returns the new firmware upgrade package to the NVR only after it passes verification. This ensures the legitimacy and security of the download request and prevents unauthorized access and tampering with the firmware upgrade package.

[0056] The step S50 further includes:

[0057] S51. After the NVR successfully downloads the new firmware upgrade package, it parses the data signature to obtain the upgrade package type, upgrade package size, MD5 checksum, and the battery camera's proprietary model ID, so that the NVR can verify the integrity and legitimacy of the data package.

[0058] S52, the NVR determines whether the upgrade package type, upgrade package size, MD5 checksum, and battery camera's proprietary model ID are all verified. If so, step S53 is executed. If not, the new firmware upgrade package is deleted and the upgrade is stopped.

[0059] S53: The NVR determines whether the battery cameras of all channels that need to be upgraded are online. If so, step S54 is executed. If not, a wake-up command is sent to wake up the battery camera. After the battery camera successfully communicates with the NVR, step S54 is executed again.

[0060] S54: The NVR sends the new firmware upgrade package to all battery-powered cameras on all channels that require an upgrade. The new firmware upgrade package is transmitted in multiple batches, with each batch containing a fixed amount of data, until all data in the new firmware upgrade package is transmitted. Specifically, before sending the new firmware upgrade package, the NVR categorizes all connected battery-powered cameras by manufacturer or model. That is, the NVR simultaneously sends the new firmware upgrade package to all battery-powered cameras on all channels that require an upgrade. This prevents the NVR from repeatedly downloading firmware upgrade packages, conserves bandwidth, and shortens the upgrade process.

[0061] In steps S51-S54, after the NVR successfully downloads the new firmware upgrade package, it first verifies the package's integrity and legitimacy. If the package type, size, MD5 checksum, and the battery camera's proprietary model ID all pass verification, the package is considered complete and legal. Otherwise, the package is abnormal and will be deleted. Next, the NVR checks whether the battery camera in the upgrade channel is online. If not, it must be awakened. After sending the wake-up command, the NVR checks to see if communication with the battery camera is successful. If the battery camera fails to communicate with the NVR or the NVR is unable to wake the camera, transmission is temporarily disabled. The NVR will wake the battery camera at regular intervals until communication is successful. If communication is successful, the NVR transmits the firmware upgrade package to the battery camera, each transmission of a fixed size, until the entire new firmware upgrade package is complete.

[0062] In step S50, when the upgrade package type, upgrade package size, MD5 checksum, and proprietary model ID of the battery camera are all verified, it means that the firmware upgrade package is complete and legal. At this time, the new firmware upgrade package is sent to the battery camera for upgrading, which can ensure the effectiveness and security of the upgrade.

[0063] The step S60 further includes:

[0064] S61. After receiving the new firmware upgrade package, the battery camera parses the data signature to obtain the upgrade package type, upgrade package size, MD5 checksum, and the battery camera's proprietary model ID.

[0065] S62: The battery camera determines whether the upgrade package type, upgrade package size, MD5 checksum, and the battery camera's proprietary model ID are all verified. If so, step S63 is executed. If not, the new firmware upgrade package is deleted and the upgrade is stopped.

[0066] S63. The battery camera runs the new firmware upgrade package to start upgrading. If the upgrade is successful, the version number of the new firmware upgrade package is used as the current firmware version number to the NVR. If the upgrade fails, the original firmware version number of the battery camera is used as the current firmware version number to the NVR.

[0067] In step S60, when the upgrade package type, upgrade package size, MD5 checksum, and battery camera's proprietary model ID are all verified, it means that the firmware upgrade package is complete and legal. At this time, the battery camera starts upgrading again to ensure the effectiveness and security of the upgrade.

[0068] like Figure 2 As shown, the present invention also provides a method for upgrading a battery camera of an NVR applied to an NVR, which comprises the following steps:

[0069] S110, after receiving the upgrade command sent by the user terminal, sending a download request to the cloud server to request downloading the new firmware upgrade package;

[0070] S120: After the new firmware upgrade package is successfully downloaded, the new firmware upgrade package is sent to the battery cameras of all channels that need to be upgraded, with fixed-size data being sent each time until all data in the new firmware upgrade package is transmitted;

[0071] S130, receiving the current firmware version number returned after the battery camera is upgraded, determining whether the upgrade is successful based on a comparison result between the current firmware version number and the version of the new firmware upgrade package, and sending the upgrade result to the user terminal;

[0072] Among them, during the process of the NVR battery camera sending the new firmware upgrade package, if it is detected that the battery camera is disconnected from the network, the NVR will start the network disconnection resumption mechanism. After the NVR and the battery camera are reconnected, the NVR will continue to send the remaining data of the new firmware upgrade package to the battery camera; if it is detected that the battery camera is powered off, the NVR will start the power off retransmission mechanism. After the NVR and the battery camera are reconnected, the NVR will resend the new firmware upgrade package to the battery camera.

[0073] Steps S110, S120, and S130 of this embodiment correspond to Figure 1 The specific definitions of steps S30, S50, S70, and steps S110, S120, and S130 in the embodiment shown can be found in the above description. Figure 1 The definitions of steps S30, S50, and S70 in the illustrated embodiment are not repeated here.

[0074] The method for upgrading the battery camera of the NVR of this embodiment has a simpler upgrade operation and less manual intervention in the upgrade process, thereby optimizing the upgrade efficiency and security and reducing the operation and maintenance costs. During the upgrade process, the NVR adopts the network disconnection resume transmission and power off retransmission mechanism to transmit the new firmware upgrade package to the battery camera, which can effectively reduce the failure rate of the upgrade and reduce the bandwidth occupied by the upgrade, solving the problem of high network resource usage. The method supports simultaneous multi-channel battery camera upgrades for the NVR, which can avoid the NVR from repeatedly downloading the upgrade package, saving the upgrade bandwidth and shortening the upgrade time. The user can view the upgrade results through the user terminal, thereby improving the user experience.

[0075] In a preferred embodiment of the present invention, step S120 further includes: after successfully downloading the new firmware upgrade package, performing integrity and legitimacy verification on the new firmware upgrade package. If the verification passes, the new firmware upgrade package is sent to all battery-powered cameras on all channels that require the upgrade, with each data transmission consisting of a fixed size until the entire new firmware upgrade package is complete. If the verification fails, the new firmware upgrade package is deleted and the upgrade is terminated. After downloading the new firmware upgrade package, the NVR performs integrity and legitimacy verification, confirming the package's integrity and legitimacy before sending it to the battery-powered cameras, thereby ensuring the effectiveness and security of the upgrade.

[0076] based on Figure 2 The embodiment shown is a method for upgrading a battery camera of an NVR. The present invention also provides a device for upgrading a battery camera of an NVR configured in the NVR. Figure 3 As shown, the device for upgrading the NVR battery camera includes:

[0077] Download request module 110, for executing Figure 2 In the method for upgrading a battery-powered camera of an NVR in the illustrated embodiment, step S110 is used to send a download request to the cloud server to request downloading of a new firmware upgrade package after receiving an upgrade command sent by the user terminal.

[0078] Upgrade package sending module 120, used to execute Figure 2 Step S120 in the method for upgrading the battery camera of the NVR in the illustrated embodiment is used to send the new firmware upgrade package to the battery cameras of all channels that need to be upgraded after successfully downloading the new firmware upgrade package, transmitting data of a fixed size each time until all the data in the new firmware upgrade package is transmitted.

[0079] Upgrade result judgment module 130, used to execute Figure 2 Step S130 in the method for upgrading an NVR battery camera in the illustrated embodiment is used to receive the current firmware version number returned after the battery camera is upgraded, determine whether the upgrade is successful based on the comparison result between the current firmware version number and the version of the new firmware upgrade package, and send the upgrade result to the user end.

[0080] Among them, when the NVR battery camera sends the new firmware upgrade package, if the upgrade package sending module 120 detects that the battery camera is disconnected from the network, the NVR starts the network disconnection resumption mechanism. After the NVR and the battery camera are reconnected, the NVR continues to send the remaining data of the new firmware upgrade package to the battery camera; if it is detected that the battery camera is powered off, the NVR starts the power off retransmission mechanism. After the NVR and the battery camera are reconnected, the NVR resends the new firmware upgrade package to the battery camera.

[0081] The device for upgrading the NVR battery camera of this embodiment has a simpler upgrade operation and less manual intervention in the upgrade process, which optimizes the upgrade efficiency and safety and reduces the operation and maintenance costs. During the upgrade process, the NVR adopts the network disconnection and power-off retransmission mechanism to transmit the new firmware upgrade package to the battery camera, which can effectively reduce the failure rate of the upgrade and reduce the bandwidth occupied by the upgrade, solving the problem of high network resource usage. It supports simultaneous multi-channel battery camera upgrades for the NVR, which can avoid the NVR from repeatedly downloading the upgrade package, saving the upgrade bandwidth and shortening the upgrade time. The user can view the upgrade results through the user terminal, which improves the user experience.

[0082] The above description is merely a preferred embodiment of the present invention and does not constitute any form of limitation to the present invention. Those skilled in the art may make various equivalent changes and improvements based on the above embodiment. Any equivalent changes or modifications made within the scope of the claims shall fall within the scope of protection of the present invention.

Claims

1. A method for upgrading a battery camera of an NVR, characterized in that: The method for upgrading a battery camera from an NVR is applied to a battery camera upgrade system. The battery camera upgrade system includes a cloud server, a user terminal, an NVR, and a battery camera. The method for upgrading a battery camera from an NVR includes the following steps: S10. The cloud server obtains a new firmware upgrade package. If the version of the new firmware upgrade package is higher than the firmware version of the battery camera of one or some channels of the NVR, the cloud server sends an upgrade notification to the user terminal. S20, when the user terminal receives the upgrade notification, it prompts the user that the battery camera of one or some channels of the NVR needs to be upgraded, and when the user confirms the upgrade instruction, it obtains the upgrade command from the cloud server and sends it to the NVR; S30. After receiving the upgrade command, the NVR sends a download request to the cloud server to request downloading the new firmware upgrade package; S40: After receiving the download request, the cloud server returns the new firmware upgrade package to the NVR; S50, after the NVR successfully downloads the new firmware upgrade package, the NVR sends the new firmware upgrade package to the battery cameras of all channels that need to be upgraded, sending data of a fixed size each time until all the data of the new firmware upgrade package is transmitted; S60: After receiving the new firmware upgrade package, the battery camera starts upgrading and returns the current firmware version number to the NVR. S70. The NVR receives the current firmware version number returned by the battery camera, determines whether the upgrade is successful based on the comparison result between the current firmware version number and the version of the new firmware upgrade package, and sends the upgrade result to the user terminal; S80: The user terminal notifies the user of the success or failure of the upgrade based on the upgrade result, and returns the current firmware version number to the cloud server; Repeat steps S10 to S80 until all battery cameras of all channels of the NVR corresponding to the new firmware upgrade package are successfully upgraded; Among them, during the process of the NVR battery camera sending the new firmware upgrade package, if it is detected that the battery camera is disconnected from the network, the NVR will start the network disconnection resumption mechanism. After the NVR and the battery camera are reconnected, the NVR will continue to send the remaining data of the new firmware upgrade package to the battery camera; if it is detected that the battery camera is powered off, the NVR will start the power off retransmission mechanism. After the NVR and the battery camera are reconnected, the NVR will resend the new firmware upgrade package to the battery camera.

2. The method for upgrading an NVR to a battery camera as claimed in claim 1, wherein: The step S40 further includes: after receiving the download request, the cloud server verifies the legitimacy and security of the download request, and returns the new firmware upgrade package to the NVR if the verification passes; if the verification fails, the new firmware upgrade package is not returned to the NVR.

3. The method for upgrading an NVR to a battery camera as claimed in claim 2, wherein: The step S50 further includes: after the NVR successfully downloads the new firmware upgrade package, the NVR verifies the integrity and legitimacy of the new firmware upgrade package. If the verification passes, the NVR sends the new firmware upgrade package to the battery cameras of all channels that need to be upgraded, transmitting data of a fixed size each time until all the data of the new firmware upgrade package is transmitted; if the verification fails, the new firmware upgrade package is deleted and the upgrade is stopped.

4. The method for upgrading an NVR to a battery camera as claimed in claim 3, wherein: The step S60 further includes: after the battery camera receives the new firmware upgrade package, verifying the integrity and legitimacy of the new firmware upgrade package. If the verification passes, the upgrade begins and the current firmware version number is returned to the NVR; if the verification fails, the new firmware upgrade package is deleted and the upgrade is stopped.

5. The method for upgrading an NVR to a battery camera as claimed in claim 4, wherein: The step S10 further includes: S11. The cloud server obtains the new firmware upgrade package; S12. The cloud server determines, based on the model of the new firmware upgrade package, that the new firmware upgrade package is applicable to the battery camera of one or more channels of the NVR; S13. The cloud server determines whether the description of the new firmware upgrade package conforms to a preset format. If so, step S14 is executed. If not, the release of the new firmware upgrade package is stopped. S14. The cloud server determines whether the version of the new firmware upgrade package is higher than the firmware version of the battery camera of one or some channels of the NVR. If so, it sends an upgrade notification to the user terminal and adds a data signature to the header of the new firmware upgrade package. The data signature includes the upgrade package type, upgrade package size, MD5 checksum, and the battery camera's proprietary model ID. If not, the release of the new firmware upgrade package is stopped. The step S20 further includes: S21, when the user terminal receives the upgrade notification, it prompts the user that the battery camera of one or some channels of the NVR needs to be upgraded, and waits for the user to confirm the upgrade instruction; S22. Upon receiving the user's instruction to confirm the upgrade, the user terminal obtains an upgrade command from the cloud server. The upgrade command includes the upgrade package path, identity authentication ID, digital signature, and timeout period. S23, the user terminal sends the upgrade command to the NVR; The step S30 further includes: S31. After receiving the upgrade command, the NVR generates a download request according to the upgrade command. The information in the download request includes the path of the upgrade package, identity authentication ID, digital signature and timeout period; S32. The NVR sends the download request to the cloud server to request downloading the new firmware upgrade package; The step S40 further includes: S41. After receiving the download request, the cloud server parses the download request to obtain the upgrade package path, identity authentication ID, digital signature, and timeout period; S42. The cloud server verifies whether the download request is safe or abnormal based on the identity authentication ID, digital signature and timeout period. If the download request is safe, the new firmware upgrade package is returned to the NVR. If the download request is abnormal, the new firmware upgrade package is not returned to the NVR. The step S50 further includes: S51. After the NVR successfully downloads the new firmware upgrade package, it parses the data signature to obtain the upgrade package type, upgrade package size, MD5 checksum, and the battery camera's proprietary model ID; S52, the NVR determines whether the upgrade package type, upgrade package size, MD5 checksum, and battery camera's proprietary model ID are all verified. If so, step S53 is executed. If not, the new firmware upgrade package is deleted and the upgrade is stopped. S53: The NVR determines whether the battery cameras of all channels that need to be upgraded are online. If so, step S54 is executed. If not, a wake-up command is sent to wake up the battery camera. After the battery camera successfully communicates with the NVR, step S54 is executed again. S54. The NVR sends the new firmware upgrade package to the battery cameras of all channels that need to be upgraded, sending data of a fixed size each time until all the data in the new firmware upgrade package is transmitted; The step S60 further includes: S61. After receiving the new firmware upgrade package, the battery camera parses the data signature to obtain the upgrade package type, upgrade package size, MD5 checksum, and the battery camera's proprietary model ID. S62: The battery camera determines whether the upgrade package type, upgrade package size, MD5 checksum, and the battery camera's proprietary model ID are all verified. If so, step S63 is executed. If not, the new firmware upgrade package is deleted and the upgrade is stopped. S63. The battery camera runs the new firmware upgrade package to start upgrading. If the upgrade is successful, the version number of the new firmware upgrade package is used as the current firmware version number to the NVR. If the upgrade fails, the original firmware version number of the battery camera is used as the current firmware version number to the NVR.

6. The method for upgrading an NVR to a battery camera as claimed in claim 1, wherein: If the battery camera is detected to be disconnected from the network, the NVR starts the disconnection resuming mechanism. After the NVR and the battery camera are reconnected, the NVR continues to send the remaining data of the new firmware upgrade package to the battery camera, including: If the battery camera is detected to be disconnected from the network, the NVR will start the network disconnection and transmission mechanism, sending a wake-up command every preset time to wake up the battery camera; After the NVR is reconnected to the battery camera, the NVR queries the battery camera for the size of the received upgrade package data and the CRC check code. If the CRC check passes, the NVR continues to send the remaining data of the new firmware upgrade package to the battery camera.

7. The method for upgrading an NVR to a battery camera as claimed in claim 6, wherein: If the battery camera is detected to be powered off, the NVR starts the power-off retransmission mechanism. After the NVR is reconnected to the battery camera, the NVR resends the new firmware upgrade package to the battery camera, including: If the battery camera is detected to be powered off, the NVR will start the power-off retransmission mechanism. Within a set time range starting from the user confirming the upgrade, the NVR will send a wake-up command every preset time to wake up the battery camera until the NVR and the battery camera are reconnected. The NVR resends the new firmware upgrade package to the battery camera.

8. A method for upgrading a battery camera of an NVR, characterized in that: The method for upgrading an NVR to a battery camera is applied to an NVR, and the method for upgrading an NVR to a battery camera comprises the following steps: S110, after receiving the upgrade command sent by the user terminal, sending a download request to the cloud server to request downloading the new firmware upgrade package; S120: After the new firmware upgrade package is successfully downloaded, the new firmware upgrade package is sent to the battery cameras of all channels that need to be upgraded, with fixed-size data being sent each time until all data in the new firmware upgrade package is transmitted; S130, receiving the current firmware version number returned after the battery camera is upgraded, determining whether the upgrade is successful based on a comparison result between the current firmware version number and the version of the new firmware upgrade package, and sending the upgrade result to the user terminal; Among them, during the process of the NVR battery camera sending the new firmware upgrade package, if it is detected that the battery camera is disconnected from the network, the NVR will start the network disconnection resumption mechanism. After the NVR and the battery camera are reconnected, the NVR will continue to send the remaining data of the new firmware upgrade package to the battery camera; if it is detected that the battery camera is powered off, the NVR will start the power off retransmission mechanism. After the NVR and the battery camera are reconnected, the NVR will resend the new firmware upgrade package to the battery camera.

9. The method for upgrading an NVR to a battery camera as claimed in claim 8, wherein: The step S120 further includes: after successfully downloading the new firmware upgrade package, verifying the integrity and legitimacy of the new firmware upgrade package; if the verification passes, sending the new firmware upgrade package to the battery cameras of all channels that need to be upgraded, transmitting data of a fixed size each time until all data of the new firmware upgrade package is transmitted; if the verification fails, deleting the new firmware upgrade package and stopping the upgrade.

10. A device for upgrading an NVR battery camera, characterized in that: The device for upgrading the NVR to a battery-powered camera is configured in the NVR, and the device for upgrading the NVR to a battery-powered camera includes: The download request module is used to send a download request to the cloud server to download the new firmware upgrade package after receiving the upgrade command sent by the user terminal; An upgrade package sending module is used to send the new firmware upgrade package to the battery cameras of all channels that need to be upgraded after the new firmware upgrade package is successfully downloaded, with fixed-size data being sent each time until all data in the new firmware upgrade package is transmitted; An upgrade result judgment module is used to receive the current firmware version number returned by the battery camera after the upgrade, determine whether the upgrade is successful based on the comparison result of the current firmware version number with the version of the new firmware upgrade package, and send the upgrade result to the user terminal; The download request module, the upgrade package sending module and the upgrade result judgment module are repeatedly operated in sequence until all the battery cameras of the channels corresponding to the new firmware upgrade package of the NVR are successfully upgraded; Among them, when the NVR battery camera sends the new firmware upgrade package, if the upgrade package sending module detects that the battery camera is disconnected from the network, the NVR will start the network disconnection resumption mechanism. After the NVR and the battery camera are reconnected, the NVR will continue to send the remaining data of the new firmware upgrade package to the battery camera; if it is detected that the battery camera is powered off, the NVR will start the power off retransmission mechanism. After the NVR and the battery camera are reconnected, the NVR will resend the new firmware upgrade package to the battery camera.

Citation Information

Patent Citations

  • Remote automatic upgrading method for digital monitoring equipment

    CN101841536A

  • Methods and systems for updating operating system of electric vehicle

    US20180072162A1