Power quota allocation method and device for network video recorder, and electronic equipment

By dynamically allocating the rated power quota of the network video recorder, the problem of wasted power supply resources is solved, and more efficient power management and IPC compatibility are achieved.

CN121967618APending Publication Date: 2026-05-01ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG DAHUA TECH CO LTD
Filing Date
2026-01-23
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In existing technologies, the power supply resources of network video recorders are wasted, and the power quota cannot be dynamically adjusted to meet the power consumption requirements of intelligent IPCs.

Method used

By responding to the connection between peripherals and the motherboard, the total power quota of peripherals is dynamically determined, and the unused remaining power quota in the rated power quota of the network video recorder is allocated to the network camera to achieve dynamic power management.

Benefits of technology

Maximize the use of the power supply's rated power quota, support more or higher power consumption IPC access, avoid power resource waste, and improve power supply efficiency and compatibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121967618A_ABST
    Figure CN121967618A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a power quota allocation method and device for a network video recorder and electronic equipment, and the method comprises the steps: enabling the network video recorder to dynamically determine a peripheral total power quota corresponding to at least one peripheral through responding to the connection of the at least one peripheral with a mainboard, and enabling the peripheral total power quota of the at least one peripheral to be matched with the power quota of the network video recorder; according to the peripheral total power quota and the mainboard power quota, the unoccupied residual power quota in the power supply rated power quota of the network video recorder is allocated to at least one network camera, the power supply rated power quota of the network video recorder is utilized to the maximum extent, the waste of power resources is avoided, and the power utilization rate of the network video recorder is improved. Compared with a fixed power quota allocation mode in the prior art, the method dynamically allocates the residual power quota to at least one network camera, has good compatibility, can directly improve the power supply efficiency of the NVR, efficiently utilizes the power supply rated power quota of the power adapter, and provides more power resources for the network camera.
Need to check novelty before this filing date? Find Prior Art

Description

Power quota allocation methods, devices and electronic equipment for network video recorders Technical Field

[0001] This application relates to the field of power management technology, and more specifically, to a power quota allocation method, apparatus, and electronic device for a network video recorder. Background Technology

[0002] A Power over Ethernet Network Video Recorder (POE NVR) is a monitoring device that combines Power over Ethernet (POE) technology with Network Video Recorder (NVR) functionality. It transmits power and data to network cameras (IPCs) simultaneously via standard Ethernet cables (such as Cat5e / Cat6). In related technologies, a fixed power supply quota is pre-allocated to the IPCs. However, this fixed power supply quota method can lead to a waste of power supply resources. Summary of the Invention

[0003] This application provides a power quota allocation method, apparatus, and electronic device for a network video recorder, to at least solve the technical problem of wasted power supply resources in network video recorders in related technologies.

[0004] According to one aspect of the embodiments of this application, a power quota allocation method for a network video recorder is provided. The network video recorder includes a motherboard and at least one network camera, the motherboard being connected to the at least one network camera. The method includes: in response to at least one peripheral device being connected to the motherboard, determining a total power quota for the peripheral device corresponding to the at least one peripheral device; allocating a power quota other than the total power quota for the peripheral device and the motherboard power quota from the rated power quota of the network video recorder to the at least one network camera; the motherboard power quota refers to the power quota corresponding to the motherboard; the rated power quota refers to the maximum power of the network video recorder.

[0005] According to another aspect of the embodiments of this application, a power quota allocation device for a network video recorder is also provided, comprising: the network video recorder including a motherboard and at least one network camera, the motherboard being connected to the at least one network camera, the device comprising: a determining unit, configured to determine a total power quota for the at least one peripheral device in response to the connection of the at least one peripheral device to the motherboard; and an allocation unit, configured to allocate power quotas other than the total power quotas for the peripheral devices and the motherboard power quotas from the rated power quotas of the network video recorder to the at least one network camera; wherein the motherboard power quota refers to the power quotas corresponding to the motherboard; and the rated power quotas refer to the maximum power of the network video recorder.

[0006] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed by a processor.

[0007] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the steps in any of the method embodiments described above.

[0008] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to perform the steps of any of the above method embodiments through the computer program.

[0009] Through this application, in response to at least one peripheral device connecting to the motherboard, the network video recorder can dynamically determine the total power quota corresponding to the at least one peripheral device. Based on the current total power quota of the peripheral devices and the motherboard power quota, the unused remaining power quota in the network video recorder's rated power quota is allocated to at least one network camera. This maximizes the utilization of the network video recorder's rated power quota, supports the access of more or higher power IPCs, and avoids the waste of power resources. Compared with the fixed power quota allocation method in related technologies, dynamically allocating the remaining power quota to at least one network camera has good compatibility, can directly improve the power supply efficiency of the NVR, efficiently utilize the rated power quota of the power adapter, and provide more power resources for the network cameras. Therefore, it can solve the technical problem of wasted power supply resources in network video recorders in related technologies. Attached Figure Description

[0010] Figure 1 is a schematic diagram of an application scenario of a power quota allocation method for a network video recorder according to an embodiment of this application;

[0011] Figure 2 is a flowchart illustrating an optional power quota allocation method for a network video recorder according to an embodiment of this application;

[0012] Figure 3 is a block diagram of the power of an optional NVR according to an embodiment of this application;

[0013] Figure 4 is a block diagram of an optional power distribution of a power supply device according to an embodiment of this application;

[0014] Figure 5 is a schematic diagram of an optional current detector according to an embodiment of this application;

[0015] Figure 6 is a flowchart of an optional NVR power quota allocation according to an embodiment of this application;

[0016] Figure 7 is a schematic flowchart of an optional NVR overpower management according to an embodiment of this application;

[0017] Figure 8 is a schematic diagram of an optional display device priority switching instruction according to an embodiment of this application;

[0018] Figure 9 is a structural block diagram of a power quota allocation device for an optional network video recorder according to an embodiment of this application;

[0019] Figure 10 is a computer system architecture block diagram of an optional electronic device according to an embodiment of this application. Detailed Implementation

[0020] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0021] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0022] According to one aspect of the embodiments of this application, a power quota allocation method for a network video recorder is provided. Optionally, in this embodiment, the above-described power quota allocation method for a network video recorder can be applied, but is not limited to, to a hardware environment including a network video camera 102 and a peripheral device 104 as shown in FIG. 1. The network video recorder includes a motherboard 1022 and at least one network camera 1024, the motherboard 1022 being connected to at least one network camera 1024, and at least one peripheral device 104 being connected to the motherboard 1022.

[0023] The power quota allocation method of the network video recorder in this application embodiment can be executed by the network video camera 102. Taking the execution of the power quota allocation method of the network video recorder in this embodiment by the network video camera 102 as an example, FIG2 is a schematic flowchart of an optional power quota allocation method of the network video recorder according to an embodiment of this application. As shown in FIG2, the process of the method may include the following steps S202 to S204.

[0024] Step S202: In response to at least one peripheral device being connected to the motherboard, determine the total power quota of the peripheral device corresponding to the at least one peripheral device.

[0025] Step S204: Allocate the power quota of the network video recorder, excluding the total power quota of the external devices and the power quota of the motherboard, to at least one network camera; the motherboard power quota refers to the power quota corresponding to the motherboard; the power quota of the network video recorder refers to the maximum power of the network video recorder.

[0026] The power quota allocation method for network video recorders in this embodiment can be applied to the fields of power supply technology, power management technology, and data processing technology, and can be applied to scenarios where power quotas are allocated to network video recorders.

[0027] A Power over Ethernet Network Video Recorder (POE NVR) is a monitoring device that combines Power over Ethernet (POE) technology with network video recorder (NVR) functionality. It transmits power and data to network cameras (IPCs) simultaneously via standard Ethernet cables (such as Cat5e / Cat6). It is used to receive, store, and manage video data from multiple network cameras. An IPC is an intelligent camera device integrating network communication protocols. It can receive power (POE power supply) and transmit video data via Ethernet cables and is a hardware component in a video surveillance system used to capture live video footage. The IPC is the object powered by the NVR via POE. Figure 3 is a block diagram of the power of an optional NVR according to an embodiment of this application. As shown in Figure 3, the total power of the NVR (i.e., the rated power of the power supply) P... NVR The total power P of the NVR originates from the power adapter. NVR Power P of the motherboard 主板 Total power of peripherals P 外设 and IPC power P POE Composition, IPC power P POE This mainly represents the power supplied by the NVR to all external IPCs, P POE P 额,POE P 额,POE The rated power allowance for POE (i.e., the rated power allowance for IPC).

[0028] The relevant technical solution is to manage the output power of PoE so that the IPC cannot exceed P. 额,POE Power consumption is a concern. With technological advancements, IPCs are evolving towards intelligence, incorporating technologies such as 360° surround-view intelligent monitoring, two-way intelligent image capture, and facial recognition. This means that IPCs with facial recognition will consume more power than those without. Therefore, researching how to improve the PoE power rating of NVRs without altering the power adapter's rated power is of great significance.

[0029] In related technologies, a fixed power supply quota is typically pre-allocated to the IPC. However, in most cases, users do not utilize all the functions of the NVR, resulting in some modules remaining idle. For example, in a multi-hard drive NVR, only one hard drive may be active, USB and HDMI ports may be disconnected, and alarm functions may be disabled, leaving the NVR with unused power quota. In short, in the aforementioned related technologies, as IPCs become more intelligent, their power consumption also increases. This is because the NVR's power consumption... 额,POE The power supply is constant and cannot provide power beyond the allocated amount, making it difficult to meet the increasing power consumption requirements of the IPC. When the NVR has a remaining power quota, it cannot automatically adjust the power quota, resulting in a waste of power supply resources.

[0030] To at least partially address the aforementioned technical issues, an automatic power allocation method based on NVR power quota is proposed. When the NVR has remaining power quota, this quota is allocated to the PoE (Power over Ethernet), i.e., the remaining power is allocated to the network cameras. This maximizes, rationalizes, and intelligently manages the NVR power quota. In this embodiment, in response to at least one peripheral device connecting to the motherboard, the network video recorder dynamically determines the total power quota corresponding to at least one peripheral device. Based on the current total peripheral power quota and the motherboard power quota, the unused remaining power quota from the network video recorder's rated power quota is allocated to at least one network camera. This maximizes the utilization of the network video recording's rated power quota, supports more or higher power consumption IPC access, and avoids wasting power resources. Compared to the fixed power quota allocation method in related technologies, dynamically allocating the remaining power quota to at least one network camera has good compatibility, directly improves the NVR's power supply efficiency, efficiently utilizes the power adapter's rated power quota, and provides more power resources for the network cameras.

[0031] In this embodiment, the motherboard is connected to at least one peripheral device. The peripheral device refers to an external device connected to the motherboard of the network video camera, such as a front panel, USB flash drive, hard drive, network cable, alarm board, mouse, fan, etc. The total power P of the peripheral devices is... 外设 Includes the power consumed by all peripherals.

[0032] The motherboard is the core component of a network video camera, used for data processing, controlling peripherals, and managing communication and power supply with the camera. For example, an NVR's motherboard is a bare board without any external devices connected, containing a small system consisting of a Central Processing Unit (CPU), Double Data Rate Synchronous Dynamic Random Access Memory (DDR), Flash Memory & Embedded Multi-Media Card (FLASH & EMMC), and various external interface chips. 主板 This mainly includes the power consumption of the DC-DC converter, CPU, DDR, and FLASH memory. Due to the difficulty in monitoring motherboard power consumption and the limited remaining power allowance, the motherboard power consumption is fixed at P. 主板 .

[0033] The total peripheral power quota refers to the total power consumed by all peripherals connected to the motherboard of the network video recorder in the NVR under normal operating conditions. The total peripheral power quota depends on the number of currently connected peripherals and their operating status.

[0034] Optionally, for each peripheral, a power consumption-workload relationship curve is established to obtain a power consumption curve. For example, these power consumption curves can be obtained through testing in a laboratory or constructed based on specifications provided by the manufacturer and user feedback data. A power consumption curve library is established for multiple power consumption curves, containing information on the power consumption changes of peripherals under different temperature and voltage conditions. When a peripheral is connected to the motherboard, the NVR reads the peripheral's identification information, such as device ID or model. Based on the device ID or model, the CPU in the motherboard queries the power consumption curve of the corresponding peripheral from the power consumption curve library. The CPU monitors the peripheral's workload (such as hard drive read / write speed, USB data transfer rate, etc.) in real time and maps the monitoring data onto the power consumption curve to determine the current power consumption. For each connected peripheral, the above process is repeated to obtain the current power consumption of each connected peripheral. The current power consumption of all peripherals is added together to obtain the total power quota for the peripherals. Alternatively, a peripheral status-power consumption preset table can be established. For example, the power consumption of a hard drive in standby and read / write states, and the power consumption of a USB device in loading and idle states. When a peripheral is connected to the motherboard, the NVR's motherboard will detect the peripheral's status. For example, the CPU will determine which peripherals are connected and their operating status through the I / O interface. Based on the detected peripheral connection and operating status, the CPU will query the preset power consumption table to obtain the current power consumption value of each peripheral. The power consumption values ​​of multiple peripherals connected to the motherboard will be added together to obtain the total power quota for all currently connected peripherals.

[0035] Network video recorders also include power adapters to provide the necessary operating voltage, i.e., to provide the power quota required for each component. The rated power quota refers to the maximum power of the network video recorder; for example, the rated power quota can be provided by the power adapter. The motherboard power quota refers to the power quota corresponding to the motherboard. After allocating the NVR's rated power quota to the total power quota of peripherals and the motherboard power quota, the remaining power quota from the NVR's rated power quota, excluding the total power quota of peripherals and the motherboard power quota, is dynamically allocated to the network cameras. Therefore, when the rated power quota remains fixed, the network camera's power quota is dynamically determined based on the total power quota of peripherals and the motherboard power quota. An increase in the total power quota of peripherals and the motherboard power quota results in a decrease in the network camera's power quota, and vice versa.

[0036] In related technologies, at the software level, there is a lack of power monitoring mechanisms, making it difficult to accurately grasp the actual power consumption of each peripheral in real time. Furthermore, NVR power allocation is statically determined based on a preset configuration parameter table; that is, the power quotas for each component (motherboard, peripherals, network cameras) are determined during device startup or configuration. This static configuration cannot adjust power quotas in a timely manner when peripheral power consumption changes dynamically. At the hardware level, the power quotas for the motherboard and peripherals are set at the factory and are not easily changed. When there is remaining power on the motherboard and peripherals, the remaining power cannot be allocated to the IPCs. Therefore, there are certain limitations at both the software and hardware levels. To solve the above problems, this embodiment dynamically allocates the remaining power quota from the NVR's rated power quota, excluding the total power quota for peripherals and the motherboard power quota, to the network cameras, maximizing the utilization of the rated power quota for network video recording.

[0037] Optionally, the CPU initializes the IIC interface, sets the correct baud rate and other communication parameters, and ensures a stable communication link with the PoE module of the network camera. The CPU scans the IIC bus to identify the address and identity of all connected network cameras. The CPU continuously monitors the usage of the motherboard and peripherals, including CPU utilization, memory usage, hard disk activity, etc., and obtains the current power consumption of the motherboard and peripherals based on their usage. The remaining power quota is obtained by subtracting the current power consumption of the motherboard and peripherals from the rated power of the power supply. Based on preset power saving rules, the power quota that can be allocated to the IPC is determined. For example, a preset power-saving rule could be to save 5W of power when CPU utilization is below 10% and 10W of power when the hard drive is idle. A power quota adjustment command is sent via the IIC protocol. An instruction packet containing power quota adjustment information is constructed, for example, instructing the PoE module to increase the power quota from 50W to 65W. The CPU sends the instruction packet to the PoE power supply module of each network camera via the IIC bus. The PoE module of the network camera receives the IIC command from the CPU and parses the power quota adjustment information. Based on the power quota adjustment information, the PoE module adjusts the power supply to the network camera, allowing the IPC to consume more power. After adjusting the power, the PoE module returns confirmation information to the CPU via IIC to ensure the command is executed correctly.

[0038] For example, assuming the NVR's rated power is 100W and its current power consumption is 60W (of which the motherboard's base power consumption is 30W, peripheral power consumption is 20W, and network camera power consumption is 10W), analysis reveals that the hard drive has not performed any read / write operations during the current period, saving 10W of power consumption. In addition, the CPU utilization is low, which can save another 5W of power consumption. The remaining power quota is calculated to be 15W. An IIC instruction packet is constructed to instruct the PoE module to adjust the network camera's power quota from the original 10W to 25W.

[0039] Alternatively, a power controller can be installed inside the NVR. The power controller is used to automatically adjust the corresponding power according to the load on the motherboard and the peripherals connected to the motherboard; continuously monitor the usage status of the motherboard and peripherals, and send an adjustment signal to the power controller when it detects that the usage rate of the motherboard and / or peripherals is lower than the preset usage rate (e.g., 10%); after receiving the adjustment signal, the power controller automatically adjusts the power supply of the motherboard and peripherals to save power consumption, calculates the total power of the motherboard and the total power of the peripherals after adjustment, allocates the power quota other than the total power of the motherboard and the total power of the peripherals in the power supply rated power quota to the network camera, and modifies the configuration parameter settings of the PoE power output to increase the power supply of the network camera.

[0040] For example, the NVR's rated power quota is 120W, the motherboard's fixed power consumption is 40W, and the IPC's rated power quota is 40W. Based on the feedback adjustment signal, the power controller automatically reduces the CPU power supply to an idle state when no hard drive is connected and the CPU utilization is as low as 5%, saving approximately 20W of power consumption; the hard drive enters a low-power mode, saving 10W of power consumption. After calculation, the remaining power quota is determined to be 30W, and the power controller allocates 30W of power to at least one network camera.

[0041] For example, if the NVR's power supply is rated at 60W and the motherboard power supply is rated at 20W, and the NVR is connected to three peripherals (such as a hard drive, a USB device, and a microcontroller; the hard drive consumes 5 watts, the USB device consumes 2 watts, and the microcontroller consumes 13 watts), then the total power quota for peripherals = hard drive power consumption + USB device power consumption + microcontroller interface power consumption = 20W. The power quota available for IPCs (i.e., the remaining power quota after deducting the total power quota for peripherals and the motherboard power consumption) is: power supply rated power quota - total power quota for peripherals - motherboard power consumption = 20W. In this way, by automatically adjusting the NVR's PoE power supply capability without changing the PoE power supply method, it can be well compatible with various existing PoE power allocation methods.

[0042] Through the embodiments provided in this application, in response to at least one peripheral device connecting to the motherboard, the network video recorder can dynamically determine the total power quota corresponding to the at least one peripheral device. Based on the current total power quota of the peripheral devices and the motherboard power quota, the unused remaining power quota in the rated power quota of the network video recorder is allocated to at least one network camera, maximizing the utilization of the rated power quota of the network video recorder, supporting more or higher power consumption IPC access, and avoiding the waste of power resources. Compared with the fixed power quota allocation method in related technologies, dynamically allocating the remaining power quota to at least one network camera has good compatibility, can directly improve the power supply efficiency of the NVR, efficiently utilize the rated power quota of the power adapter, and provide more power resources for the network camera. Therefore, it can solve the technical problem of wasted power supply resources in network video recorders in related technologies.

[0043] In one exemplary embodiment, the existing technology has the drawback of not being able to achieve dynamic power allocation. To solve this drawback, this embodiment sets up multiple current detectors, which correspond one-to-one with multiple peripheral interfaces. These detectors are used to monitor whether the corresponding peripheral interface is connected to a peripheral, and the power quota of the corresponding single peripheral after the peripheral is connected.

[0044] The motherboard includes multiple peripheral interfaces; each of the multiple peripheral interfaces is used to connect a peripheral; the network video recorder also includes multiple current detectors, each of which corresponds to one of the multiple peripheral interfaces; each of the multiple current detectors is connected in series between the peripheral interface and the peripheral corresponding to each current detector.

[0045] In this embodiment, the peripheral interface refers to the port on the NVR motherboard used for physical connection of peripherals. The motherboard connects to a peripheral through each of the multiple peripheral interfaces. For example, the peripheral interface can be a USB, HDMI, SATA, or other interfaces.

[0046] A current detector is an electronic device that monitors current to measure the actual current consumption of a peripheral device. Each current detector corresponds one-to-one with a peripheral interface, meaning that for every peripheral device connected to an interface, there is a current detector to monitor its current consumption in real time. The current detectors are connected in series between the peripheral interface and the peripheral device to ensure accurate acquisition of the effective current value flowing through the line. Figure 4 is a block diagram of an optional power distribution system according to an embodiment of this application. As shown in Figure 4, each of the multiple current detectors is connected in series between the peripheral interface and the peripheral device on the motherboard corresponding to each current detector.

[0047] In some embodiments, in response to at least one peripheral being connected to the motherboard, determining the total power quota of the peripheral corresponding to at least one peripheral includes: in response to at least one peripheral being connected to the motherboard, acquiring the effective current of each peripheral through a current detector corresponding to each of the at least one peripheral; determining the individual peripheral power quota of each peripheral based on the effective current and operating voltage of each peripheral; and determining the sum of the individual peripheral power quotas of each peripheral as the total power quota of the peripheral corresponding to at least one peripheral.

[0048] In this embodiment, the effective current refers to the actual operating current after deducting unstable factors such as line losses and peak current during device startup. The motherboard detecting the effective current means that the peripheral is in operation, and can calculate the actual power consumption of each peripheral (i.e., the power quota for a single peripheral) based on the effective current. The operating voltage refers to the stable voltage value required for the normal operation of the peripheral; the operating voltage of a peripheral is constant. For example, the operating voltage is usually determined by the peripheral specifications.

[0049] Individual peripheral power quota refers to the actual power quota for a single peripheral connected to the motherboard. Based on the peripheral's effective current and operating voltage, the power consumption of each peripheral can be calculated to obtain the individual peripheral power quota. For example, if a peripheral has an effective current of 2A and an operating voltage of 3V, according to P=UI, we know that P=UI=2A. 3V=6W, meaning the power rating of this peripheral device is 6W.

[0050] Since the NVR motherboard has multiple peripheral interfaces, the peripherals are sorted by number 1, 2...m (m is a positive integer), and the power of each peripheral is numbered P1, P2...P... m Since the operating voltage of the peripherals is constant, the operating voltage of each peripheral is defined as V1, V2, V3, V4, V5, V6, V7, V8, V9, V1, V1, V1, V2, V1, V1, V2, V3 ...2, V3, V4, V1, V1, V2, V3, V1, V2, V3, V1, V2, V3, V1 2. ......V m The effective current is defined as I1, I2...I m The CPU calculates the total peripheral power P based on the detected effective current and set voltage. 外设 (P) 外设 = I1V1 + I2V2 + ... + I m V m The effective current is sampled using a current detector.

[0051] Optionally, the individual peripheral power quotas for all peripherals connected to the motherboard's peripheral interfaces are calculated sequentially, and the individual peripheral power quotas for all peripherals connected to the motherboard's peripheral interfaces are added together to obtain the total peripheral power quota for all peripherals. For example, if there are 3 peripherals connected to the motherboard's peripheral interfaces, and the individual peripheral power quotas for the 3 peripherals are 5W, 8W, and 9W respectively, the total peripheral power quota is 22W (i.e., 5W + 8W + 9W).

[0052] In this embodiment, by connecting a current detector in series at each peripheral interface, the current consumption of the peripheral can be monitored in real time. Combined with the operating voltage of the peripheral, the power quota of each peripheral can be dynamically calculated, which helps to improve the power allocation efficiency of the NVR, ensures the maximum energy utilization of the NVR and its peripherals in actual use, reduces unnecessary power waste, and provides accurate data support for subsequent power quota adjustments.

[0053] In one exemplary embodiment, each current detector includes a shunt resistor, an operational amplifier, an analog-to-digital converter, and an integrator connected in series. Obtaining the effective current of each peripheral through the current detector corresponding to each of at least one peripheral includes: obtaining the voltage of the peripheral corresponding to each current detector through the shunt resistor; amplifying the voltage through the operational amplifier; converting the amplified voltage into a digital signal through the analog-to-digital converter; integrating the digital signal through the integrator to obtain the effective voltage; and converting the effective voltage into an effective current through the motherboard.

[0054] In this embodiment, a shunt resistor is a resistor used to convert the current flowing through a peripheral device into a voltage. For example, a shunt resistor typically has a low resistance value. When there is a voltage across the shunt resistor, it means that current is flowing through the shunt resistor, which indicates that the peripheral device connected in series with the shunt resistor is consuming power, that is, the peripheral device connected to the shunt resistor is in a working state, and thus the power consumed by the peripheral device can be detected.

[0055] An operational amplifier is a high-gain electronic amplifier used to amplify signals; an analog-to-digital converter (ADC) is an electronic component that converts analog signals into digital signals; an integrator is an electronic component used for signal processing, which accumulates changes in the input signal and outputs the average value over a period of time.

[0056] For example, Figure 5 is a schematic diagram of an optional current detector according to an embodiment of this application. As shown in Figure 5, the current detector is a tool for detecting the operating current of a peripheral device. It consists of a shunt resistor, an operational amplifier, an ADC sampling module, and an integration module. The shunt resistor R is connected in series between the peripheral device and the CPU. According to Ohm's law (I=V / R), given the resistance value of the shunt resistor, the actual current can be obtained by measuring the voltage across the resistor. Since the voltage drop across the shunt resistor is small, to ensure the accuracy of the measurement, the operational amplifier is first used to amplify this small voltage drop signal, and then the analog signal is converted into a digital signal by the ADC module, and finally transmitted to the CPU. Because the voltage fluctuates continuously during the operation of the device, the ADC sampling signal needs to be integrated to obtain the effective voltage V, which is the average value of the sampled voltage over a certain period of time. The effective current value I is calculated according to Ohm's law.

[0057] In this embodiment, by using a current detector including a shunt resistor, operational amplifier, analog-to-digital converter, and integrator, the NVR can accurately and reliably measure the real-time current consumption of each peripheral. This not only improves the accuracy of current measurement but also eliminates the influence of external environmental factors on the measurement results, ensuring the accuracy of peripheral power consumption assessment. It provides key measured data for dynamic power management, and the application of the integrator makes the measurement results more stable, even under conditions of large current fluctuations, it can obtain an effective current value that reflects the average power consumption of the peripheral.

[0058] In one exemplary embodiment, allocating power quotas other than the total power quota and motherboard power quota of a network video recorder to at least one network camera includes: determining the remaining power quota of peripherals; the remaining power quota of peripherals refers to the power quota other than the total power quota of peripherals in the rated power quota of peripherals; the rated power quota of peripherals refers to the maximum power quota reserved by the network video recorder for the accessed peripherals; determining the network camera flexible power quota based on the sum of the remaining power quota of peripherals and the rated power quota of the network camera, and allocating the network camera flexible power quota to at least one network camera; the rated power quota of the network camera refers to the maximum power quota reserved by the network video recorder for the accessed network camera; the network camera flexible power quota is greater than the network camera rated power quota.

[0059] In this embodiment, the peripheral remaining power quota refers to the power quota other than the total peripheral power quota in the peripheral rated power quota; the peripheral rated power quota refers to the maximum power quota reserved by the network video recorder for the access peripherals. It can be understood that the peripheral rated power quota is obtained by adding the peripheral total power quota and the peripheral remaining power quota, that is, peripheral rated power quota = peripheral total power quota + peripheral remaining power quota.

[0060] Optionally, based on the peripheral rated power quota reserved by the NVR for all peripherals, the total peripheral power quota consumed by the actually connected peripherals is subtracted to calculate the currently unused peripheral remaining power quota, i.e., peripheral remaining power quota = peripheral rated power quota - peripheral total power quota.

[0061] The rated power quota for a network camera is the maximum power quota reserved by the network video recorder for the network camera. The flexible power quota for a network camera refers to the additional power quota provided for the network camera beyond its rated power quota. The size of the flexible power quota is determined based on the remaining power quota of peripheral devices and the rated power quota of the network camera. In other words, the flexible power quota for a network camera = remaining power quota of peripheral devices + rated power quota of the network camera.

[0062] For example, Figure 6 is an optional NVR power quota allocation flowchart according to an embodiment of this application. As shown in Figure 6, no power quota management is performed when the device starts up, and the initial value of the POE quota (i.e., the rated power quota of the network camera) is P. K The actual power of the peripheral device (i.e., the total power quota of the peripheral device) P is obtained based on the detected current. 外设 Calculate the remaining power quota P of peripheral devices. 剩 Reallocate PoE power quotas, i.e., network camera flexible power quotas P A =P K +P 剩 .

[0063] In an optional embodiment, as shown in Figure 4, the power quotas from the NVR to the peripherals and PoE are defined as the peripheral rated power quota P, respectively. 额,外设 and network camera flexible power quota P A (Distinguish P) 额,POE The rated power of the power adapter is defined as the rated power quota P of the network video recorder's power supply. 额,电源 Due to the difficulty in monitoring motherboard power and the limited remaining power allocation, the motherboard power is fixed at P. 主板 The actual total power of an NVR is defined as P. NVR In actual use, there are situations where the NVR's peripherals are not connected, therefore P 外设 It is a variable value with a power range of 0 to P. 额,外设 By adding a current detector between the peripherals and the NVR's motherboard, the real-time power of the peripherals (i.e., the total power quota of the peripherals) is obtained. The remaining power quota of the peripherals is then allocated to PoE (Power over Ethernet). The flexible power quota P of the network camera is calculated accordingly. A (P) A = P 额,电源 - P 外设 - P 主板), P POE P A The CPU modifies the P in real time via the IIC protocol. A The improved power quota in this embodiment is shown in Table 1. It is assumed that the initial power quota of the NVR POE (i.e., the rated power quota of the network camera) is P. k The motherboard has four external peripherals.

[0064] Table 1

[0065]

[0066] Thus, the automatic power quota allocation method described in this embodiment can further increase the device's PoE power quota based on the peripheral power usage, enabling the NVR to connect more IPCs; simultaneously, it adjusts the PoE quota power P based on the actual power consumption of the peripherals (i.e., the total peripheral power quota). A (i.e., the network camera's flexible power quota) is automatically adjusted to ensure that the NVR has the maximum output power of POE in real time. This allows the power quota for POE to be reasonably increased while ensuring the stable operation of the NVR, enabling the NVR to connect more IPCs.

[0067] In this embodiment, by determining the remaining power quota of peripheral devices and adding the remaining power quota of peripheral devices to the rated power quota of network cameras, a flexible power quota for network cameras is obtained. This allows the NVR to dynamically redistribute the unused portion of the rated power quota, which not only improves the utilization rate of the NVR's power quota but also enhances the performance and functional flexibility of the network cameras.

[0068] In one exemplary embodiment, the method further includes: in response to the network video recorder not having any peripheral connected to the motherboard, allocating the peripheral rated power quota and the network camera rated power quota to at least one network camera; the peripheral rated power quota refers to the maximum power quota reserved by the network video recorder for the accessed peripheral; the network camera rated power quota refers to the maximum power quota reserved by the network video recorder for the accessed network camera.

[0069] In this embodiment, when no peripheral device is connected to the motherboard, the reserved peripheral rated power quota and the pre-specified network camera rated power quota are redistributed to at least one network camera.

[0070] For example, the CPU of the NVR continuously monitors the current changes of the peripheral interface through a current detector associated with the peripheral interface. Since the peripheral is not connected, the current detector is expected to report a current value close to zero. Once the current detector reports extremely low or zero current for a preset period of time (e.g., within 5 seconds), the CPU confirms that all peripheral interfaces are idle, determines that the peripheral's remaining power quota is equal to the peripheral's rated power quota, adds the peripheral's rated power quota to the network camera's rated power quota, and then allocates this network camera's flexible power quota to at least one network camera.

[0071] In this embodiment, when no external devices are connected, the rated power quota of the peripheral devices and the rated power quota of the network camera are merged and allocated to the network camera for use. This allows for a significant increase in the power availability of the network camera under specific conditions (i.e., when all peripheral interfaces are idle), thereby increasing the power consumption limit of the network camera without changing the hardware configuration or the power supply mechanism itself.

[0072] In one exemplary embodiment, after allocating the power quota of the network video recorder, excluding the total power quota of the peripherals and the motherboard power quota, to at least one network camera, the method further includes: in response to the network video recorder connecting to a new connected device and the total power quota of the network video recorder being greater than the power quota of the rated power supply, powering off the new connected device; the new connected device refers to a newly connected peripheral or a newly connected network camera.

[0073] If an NVR is already running at full power, connecting a new device (such as a peripheral) will cause the NVR to operate at overpower. For example, if no peripheral is connected and the PoE power quota is increased, the PoE will be used at full power. If a peripheral is then connected, the NVR power will exceed the rated power of the power adapter. In this case, the newly connected device should be powered off to avoid overloading the NVR.

[0074] In this embodiment, the total power quota of the network video recorder refers to the total power quota consumed by the network video recorder after connecting to a new connected device.

[0075] When a new device is connected to a network video recorder, the power of the new device will consume a portion of the network video recorder's rated power allowance. Therefore, it is necessary to determine whether the NVR's total power allowance exceeds the rated power allowance of its power adapter.

[0076] Optionally, the NVR checks each interface to confirm whether any new connected devices have been connected. If a new connected device is detected, it is marked as a device to be processed. At the same time, the NVR continuously monitors the total power quota of the network video recorder. Once the total power quota of the network video recorder is detected to exceed the rated power quota of the power supply, an over-power alarm is immediately triggered. A power-off command is generated for the device to be processed and sent to the power controller or PoE module of the corresponding interface through an internal communication mechanism (such as I2C or SMBus). After receiving the power-off command, the power controller or PoE module immediately cuts off the power supply to the device to be processed to reduce the total power consumption of the system and ensure that the total power quota of the NVR does not exceed the rated power quota of the power supply.

[0077] In an optional embodiment, as shown in Figure 6, after the PoE power quota is reallocated, if a user inserts a peripheral device, the P... NVR Is it less than or equal to P? 额,电源 If P NVR Less than or equal to P 额,电源 If the user inserts an external device, it will not affect the normal operation of the NVR device; if P NVR Greater than P 额,电源 In this case, over-power management is required. When the number of IPCs is increased, it's necessary to check whether the PoE power supply exceeds the initial value (i.e., the network camera's rated power quota). K When P POE Less than P K This means that even if a new IPC is included, its power consumption may decrease due to the shutdown of some IPC functions. Therefore, even if a new IPC is added, the PoE power supply may not exceed the initial value. In this case, the user's insertion of peripherals will not affect the normal operation of the NVR device; when P POE Greater than P K When this happens, it means that the PoE power supply is using up the peripheral's power quota. If the user plugs in a new connected device (such as a peripheral), a PoE error will occur. NVR Greater than P 额,电源 In this situation, overpower management is required; if P NVR Less than P 额,电源 The NVR device is operating normally.

[0078] Figure 7 is a schematic flowchart of an optional NVR overpower management according to an embodiment of this application. As shown in Figure 7, since the change in POE power quota originates from the usage of peripheral power, it is necessary to consider the overpower management of P... k <P POE <P k +P 剩In this case, PoE has already used the peripheral's power quota. If the user then plugs in a new connected device (such as a peripheral), causing the NVR's total power to exceed the power adapter's rated power, this power will be handled by the power adapter's Over-Current Protection (OCP). Over-Current Protection (OCP) is one of the core safety mechanisms of a power adapter, capable of withstanding I current for a time period T(s). OCP Current (P) 额,电源 <P OCP,电源 Thus, when the NVR operates at overpower, the power adapter's OCP function is used to automatically adjust the power within a certain time period. Using the power adapter's OCP function, the NVR's detection time is set to t(s) (t(s) < T(s)), and P is detected within this t(s) time range. NVR >P 额,电源 (P) NVR <P OCP,电源 The NVR operates at overpower, with power supplied by the power adapter OCP. Upon completion of the detection, the newly connected device (such as a peripheral) is powered off (i.e., the peripheral is powered off after t(s)).

[0079] In some embodiments, in addition to the strategy of powering off newly connected devices when the total power quota of the network video recorder exceeds the rated power quota of the power supply, power can also be applied to target connected devices. The target connected device refers to the least important device among the peripherals and network cameras connected to the network video recorder. The target connected device can be a newly connected device or an existing connected device. The number of target connected devices can be one or more, depending on the actual situation. The goal is to ensure that after powering off the target connected device, the total power quota of the network video recorder is less than or equal to the rated power quota of the power supply.

[0080] Optionally, the total power of the NVR is continuously monitored, and the importance of all connected devices in the current time and scenario is assessed. For example, in an unattended environment at night, peripherals with alarm functions are more important than those during the day; or when storage space is sufficient, the real-time backup function of the hard drive can be temporarily de-prioritized. The NVR calculates the power-off cost of each connected device and obtains the power-off cost of each connected device. Based on the power-off cost, one or more target connected devices with the lowest importance are selected to be disconnected. For example, if the cost of hard drive backup at night is lower than the cost of the alarm board during the day, the NVR will choose to disconnect the power supply to the hard drive while retaining the power supply to the alarm board. A power-off command is sent to the selected target connected device to put the target connected device into a low-power or completely power-off mode.

[0081] For example, suppose the NVR's power adapter has a rated power of 110W and the total power consumption is 115W. At night (2:00 AM), most of the monitored area is unoccupied, and the power outage cost of the hard drive real-time backup function is low. The NVR can choose to disconnect the power supply to the hard drives, saving about 10W of power per hard drive, thereby reducing the total power consumption to 105W, which meets the power requirements and the risk is controllable.

[0082] Alternatively, a weight can be assigned to the cost category corresponding to each connected device. Each connected device includes at least one cost category. For example, cost categories may include data loss costs, compliance risk costs, and business impact costs. The weight of the cost category is used to reflect the importance of power outage costs. The power outage cost for each connected device is calculated based on the weight of the cost category. For example, the power outage cost of hard drive A includes data loss cost (1000) and business impact cost (500), with weights of 0.6 and 0.3 respectively, and the power outage cost = 1000. 0.6 + 500 0.3 = 600 + 150 = 750; The power-off cost of microcontroller B includes user experience cost (300) and business impact cost (200), with weights of 0.7 and 0.3 respectively. Therefore, the power-off cost is 300. 0.7 + 200 0.3 = 210 + 60 = 270; The power-off cost of the USB mouse C includes user experience cost (50) and business impact cost (50), with weights of 0.8 and 0.2 respectively. Power-off cost = 50 0.8 + 50 0.2 = 40 + 10 = 50; By comparison, when it is necessary to disconnect two devices, the USB mouse C and the microcontroller B have the lowest power-off cost and can be used as the preferred power-off devices.

[0083] In this embodiment, when a new device is connected and the total power rating of the network video recorder exceeds the rated power rating of the power supply, the new device is powered off. This effectively manages and prevents the risk of over-power operation, ensuring that the NVR will never exceed its safe load limit under any circumstances, thereby protecting the device from damage caused by power overload.

[0084] In one exemplary embodiment, after powering off the newly connected device, the method further includes: in response to a device priority switching instruction, restoring power to the newly connected device and powering off the designated connected device; the device priority switching instruction is used to indicate that the object of the power-off process be switched to the designated connected device.

[0085] In this embodiment, the device priority switching command refers to the command issued through the control interface of the NVR, which is used to adjust the power supply priority between different devices in real time. For example, IPC2 is switched to power off first and peripherals are powered on first, or IPC4 is switched to power off first and peripherals are powered on first.

[0086] A designated connected device refers to a specific device specified by the device priority switching command that needs to be powered down to free up power quotas for the newly connected device. A designated connected device can be any device currently using power from the NVR, including but not limited to network cameras (IPCs) and peripherals.

[0087] For example, as shown in Figure 7, after powering off the inserted peripheral (i.e., powering off the newly connected device), the user manually selects whether to power off a certain IPC. If powering off a certain IPC is selected, that IPC is powered off, and the inserted peripheral is powered on. If the inserted peripheral is detected to be unplugged, the IPC is powered on again. If powering off a certain IPC is not selected, the inserted peripheral remains powered off, the NVR operates normally, and the aforementioned steps for the user to insert the peripheral are continued.

[0088] For example, Figure 8 is a schematic diagram of an optional display device priority switching instruction according to an embodiment of this application. As shown in Figure 8, the display screen shows "IPC1 power off, peripheral power on", "IPC2 power off, peripheral power on", "IPC3 power off, peripheral power on", "IPC4 power off, peripheral power on", and "plug in peripheral and power off, IPC works normally". Users can manually select to perform the corresponding operation.

[0089] Through this embodiment, the NVR can quickly respond to changes in device usage scenarios by using device priority switching commands, enabling real-time power redistribution from one device to another, ensuring that the continuous operation of high-priority devices is not affected; in addition, it can also optimize resource usage and avoid unnecessary power waste.

[0090] In one exemplary embodiment, after powering off the designated connected device, the method further includes: restoring power to the designated connected device in response to the new connected device disconnecting from the network video recorder.

[0091] Alternatively, the new connection device can be disconnected from the network video recorder by either physically unplugging the new connection device or by disconnecting it via software.

[0092] Optionally, if a new connected device is disconnected from the NVR, the NVR immediately recalculates the total power quota of the NVR system. Due to the disconnection of the new connected device, the power quota originally allocated to the new connected device is now available. Based on the reassessed power quota, it is determined whether it is possible to restore power to the previously disconnected designated connected device without exceeding the rated power quota of the power adapter. If the assessment results show that there is sufficient power margin, the NVR control center will send a power restoration signal to the NVR power management module. After receiving the signal from the control center, the power management module will restore power to the interface of the designated device to ensure that the device can start and operate normally.

[0093] For example, if a certain IPC is powered off and the peripheral is powered on, when the user no longer uses the peripheral and it is unplugged (for example, a current detector can detect whether the peripheral has been plugged in or unplugged), the corresponding IPC that was previously powered off will be powered on again.

[0094] This embodiment restores power to the designated connected device when the new connected device disconnects from the network video recorder. This ensures a rapid response and automatic adjustment of power quotas when the device connection status changes, restoring power to the connected device that was originally sacrificed to accommodate the new device. This enhances the system's flexibility and reduces power waste.

[0095] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0096] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / random access memory (RAM), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0097] According to another aspect of the embodiments of this application, a power quota allocation device for a network video recorder is also provided. This power quota allocation device can be used to implement the power quota allocation method for a network video recorder provided in the above embodiments, and will not be repeated hereafter. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0098] Figure 9 is a structural block diagram of a power quota allocation device for an optional network video recorder according to an embodiment of this application. As shown in Figure 9, the network video recorder includes a motherboard and at least one network camera. The motherboard is connected to at least one network camera. The power quota allocation device for the network video recorder includes a determination unit 902 and an allocation unit 904.

[0099] The determining unit 902 is configured to determine the total power quota of the peripheral corresponding to the at least one peripheral in response to the connection of at least one peripheral to the motherboard.

[0100] The allocation unit 904 is used to allocate the power quota of the network video recorder, excluding the total power quota of the external devices and the power quota of the motherboard, to at least one network camera; the motherboard power quota refers to the power quota corresponding to the motherboard; the power quota of the network video recorder refers to the maximum power of the network video recorder.

[0101] It should be noted that the determining unit 902 in this embodiment can be used to perform the above step S202, and the allocation unit 904 in this embodiment can be used to perform the above step S204.

[0102] Through the embodiments provided in this application, in response to at least one peripheral device connecting to the motherboard, the network video recorder can dynamically determine the total power quota corresponding to the at least one peripheral device. Based on the current total power quota of the peripheral devices and the motherboard power quota, the unused remaining power quota in the rated power quota of the network video recorder is allocated to at least one network camera, maximizing the utilization of the rated power quota of the network video recorder, supporting more or higher power consumption IPC access, and avoiding the waste of power resources. Compared with the fixed power quota allocation method in related technologies, dynamically allocating the remaining power quota to at least one network camera has good compatibility, can directly improve the power supply efficiency of the NVR, efficiently utilize the rated power quota of the power adapter, and provide more power resources for the network camera. Therefore, it can solve the technical problem of wasted power supply resources in network video recorders in related technologies.

[0103] In one exemplary embodiment, the motherboard includes a plurality of peripheral interfaces; each of the plurality of peripheral interfaces is used to connect to a peripheral; the network video recorder further includes a plurality of current detectors, each of the plurality of current detectors corresponding to one of the plurality of peripheral interfaces; each of the plurality of current detectors is connected in series between the peripheral interface corresponding to each current detector and the peripheral; a determining unit is configured to, in response to at least one peripheral being connected to the motherboard, acquire the effective current of each peripheral through the current detector corresponding to each of the at least one peripheral; determine the individual peripheral power quota of each peripheral based on the effective current and operating voltage of each peripheral; and determine the sum of the individual peripheral power quotas of each peripheral as the total peripheral power quota corresponding to the at least one peripheral.

[0104] In one exemplary embodiment, each current detector includes a shunt resistor, an operational amplifier, an analog-to-digital converter, and an integrator connected in series. A determining unit is used to obtain the voltage of the peripheral device corresponding to each current detector through the shunt resistor; the operational amplifier amplifies the voltage; the analog-to-digital converter converts the amplified voltage into a digital signal; the integrator integrates the digital signal to obtain an effective voltage; and the motherboard converts the effective voltage into an effective current.

[0105] In an exemplary embodiment, the allocation unit is configured to determine the remaining power quota of peripheral devices; the remaining power quota of peripheral devices refers to the power quota other than the total power quota of peripheral devices in the rated power quota of peripheral devices; the rated power quota of peripheral devices refers to the maximum power quota reserved by the network video recorder for the accessed peripheral devices; the network camera flexible power quota is determined based on the sum of the remaining power quota of peripheral devices and the rated power quota of the network camera, and the network camera flexible power quota is allocated to the at least one network camera; the rated power quota of the network camera refers to the maximum power quota reserved by the network video recorder for the accessed network camera; the network camera flexible power quota is greater than the rated power quota of the network camera.

[0106] In one exemplary embodiment, the apparatus further includes a first execution unit, which is configured to allocate a peripheral rated power quota and a network camera rated power quota to the at least one network camera in response to the network video recorder not having any peripherals connected to the motherboard; the peripheral rated power quota refers to the maximum power quota reserved by the network video recorder for the accessed peripherals; the network camera rated power quota refers to the maximum power quota reserved by the network video recorder for the accessed network cameras.

[0107] In an exemplary embodiment, the allocation unit is configured to, after allocating the power quota of the network video recorder (excluding the total power quota of peripherals and the motherboard power quota) to the at least one network camera, in response to the network video recorder connecting to a new connected device and the total power quota of the network video recorder being greater than the power quota of the rated power supply, power off the newly connected device; the new connected device refers to a newly connected peripheral or a newly connected network camera.

[0108] In an exemplary embodiment, the allocation unit is configured to, after powering down the newly connected device, restore power to the newly connected device in response to a device priority switching instruction, and power down a designated connected device; the device priority switching instruction is used to instruct the power-down object to be switched to the designated connected device.

[0109] In one exemplary embodiment, the allocation unit is configured to restore power supply to the designated connected device in response to the new connected device disconnecting from the network video recorder after the power-off process is performed on the designated connected device.

[0110] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0111] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein the program executes the steps in any of the above method embodiments when it is run.

[0112] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, ROMs, RAMs, portable hard drives, magnetic disks, or optical disks.

[0113] According to another aspect of the embodiments of this application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor is configured to perform the steps of any of the method embodiments described above via the computer program. In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0114] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.

[0115] According to another aspect of the embodiments of this application, a computer program product is also provided, comprising a computer program / instructions containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via communication section 1009, and / or installed from removable medium 1011. When the computer program is executed by central processing unit 1001, it performs various functions provided in the embodiments of this application. The sequence numbers of the embodiments of this application above are merely descriptive and do not represent the superiority or inferiority of the embodiments.

[0116] Figure 10 schematically illustrates a computer system architecture block diagram for an electronic device implementing embodiments of the present application. As shown in Figure 10, the computer system 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to a program stored in ROM 1002 or a program loaded from storage portion 1008 into RAM 1003. Various programs and data required for system operation are also stored in random access memory 1003. The CPU 1001, read-only memory 1002, and random access memory 1003 are interconnected via bus 1004. Input / output (I / O) interface 1005 is also connected to bus 1004.

[0117] The following components are connected to I / O interface 1005: an input section 1006 including a keyboard, mouse, etc.; an output section 1007 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a local area network card, modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to I / O interface 1005 as needed. Removable media 1011, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1010 as needed so that computer programs read from them can be installed into storage section 1008 as needed.

[0118] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1009, and / or installed from removable medium 1011. When the computer program is executed by central processing unit 1001, it performs various functions defined in the system of this application.

[0119] It should be noted that the computer system 1000 of the electronic device shown in Figure 10 is only an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0120] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0121] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.

Claims

1. A power quota allocation method for a network video recorder, characterized in that, The network video recorder includes a motherboard and at least one network camera, the motherboard being connected to the at least one network camera, and includes: in response to at least one peripheral device being connected to the motherboard, determining the total power quota of the peripheral device corresponding to the at least one peripheral device; allocating the power quota of the network video recorder, excluding the total power quota of the peripheral device and the motherboard power quota, to the at least one network camera; the motherboard power quota refers to the power quota corresponding to the motherboard; the rated power quota of the power supply refers to the maximum power of the network video recorder.

2. The method according to claim 1, characterized in that, The motherboard includes multiple peripheral interfaces; each of the multiple peripheral interfaces is used to connect to a peripheral device; the network video recorder also includes multiple current detectors, each of which corresponds to one of the multiple peripheral interfaces. Each of the plurality of current detectors is connected in series between the peripheral interface and the peripheral device corresponding to each current detector; The step of determining the total power quota of the peripherals corresponding to the at least one peripheral in response to the connection of at least one peripheral to the motherboard includes: obtaining the effective current of each peripheral through a current detector corresponding to each of the at least one peripheral in response to the connection of at least one peripheral to the motherboard; Based on the effective current and operating voltage of each peripheral, the individual peripheral power quota of each peripheral is determined, and the sum of the individual peripheral power quotas of each peripheral is determined as the total peripheral power quota corresponding to at least one peripheral.

3. The method according to claim 2, characterized in that, Each current detector includes a shunt resistor, an operational amplifier, an analog-to-digital converter, and an integrator connected in series. The step of obtaining the effective current of each peripheral through a current detector corresponding to each of the at least one peripheral includes: obtaining the voltage of the peripheral corresponding to each current detector through the shunt resistor; amplifying the voltage through the operational amplifier; converting the amplified voltage into a digital signal through the analog-to-digital converter; integrating the digital signal through the integrator to obtain an effective voltage; and converting the effective voltage into the effective current through the motherboard.

4. The method according to claim 1, characterized in that, The step of allocating the power quota of the network video recorder, excluding the total power quota of peripherals and the motherboard power quota, to the at least one network camera includes: determining the remaining power quota of peripherals; the remaining power quota of peripherals refers to the power quota of the rated power quota of peripherals excluding the total power quota of peripherals; the rated power quota of peripherals refers to the maximum power quota reserved by the network video recorder for the connected peripherals; determining the network camera flexible power quota based on the sum of the remaining power quota of peripherals and the rated power quota of the network camera, and allocating the network camera flexible power quota to the at least one network camera; the rated power quota of the network camera refers to the maximum power quota reserved by the network video recorder for the connected network camera; the network camera flexible power quota is greater than the network camera rated power quota.

5. The method according to claim 1, characterized in that, The method further includes: in response to the network video recorder not having any peripherals connected to the motherboard, allocating the peripheral rated power quota and the network camera rated power quota to the at least one network camera; the peripheral rated power quota refers to the maximum power quota reserved by the network video recorder for the connected peripherals; the network camera rated power quota refers to the maximum power quota reserved by the network video recorder for the connected network cameras.

6. The method according to any one of claims 1 to 5, characterized in that, After allocating the power quota of the network video recorder, excluding the total power quota of peripherals and the motherboard power quota, to the at least one network camera, the method further includes: in response to the network video recorder connecting to a new connected device and the total power quota of the network video recorder being greater than the power quota of the rated power supply, powering off the new connected device; the new connected device refers to a newly connected peripheral or a newly connected network camera.

7. The method according to claim 6, characterized in that, After powering off the newly connected device, the method further includes: in response to a device priority switching instruction, restoring power to the newly connected device and powering off a designated connected device; the device priority switching instruction is used to indicate that the object to be powered off should be switched to the designated connected device.

8. The method according to claim 7, characterized in that, After the power-off process is performed on the designated connected device, the method further includes: in response to the new connected device disconnecting from the network video recorder, restoring power supply to the designated connected device.

9. A power quota allocation device for a network video recorder, characterized in that, The network video recorder includes a motherboard and at least one network camera, the motherboard being connected to the at least one network camera. The device includes: a determining unit, configured to determine the total power quota of the at least one peripheral device in response to the connection of the at least one peripheral device to the motherboard; and an allocation unit, configured to allocate the power quota of the network video recorder, excluding the total power quota of the peripheral devices and the motherboard power quota, to the at least one network camera; wherein the motherboard power quota refers to the power quota corresponding to the motherboard; and the rated power quota refers to the maximum power of the network video recorder.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.