A method, apparatus, device and medium for adding a network camera
By detecting idle or multiplexed channels, time-sharing multiplexing and conditional replacement of IPC are realized, which solves the cumbersome operation problems when adding IPC in NVR, and improves efficiency and automation.
Patent Information
- Application Number
- CN202210341767.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-29
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-03-29
AI Technical Summary
When adding a network hard disk recorder (NVR) exceeds the maximum number of channels or bandwidth, the addition fails. It requires manual deletion of the connected IPC, which is cumbersome and inefficient.
By detecting idle channels or channels that support multiplexing, IPC time-sharing multiplexing or selecting channels that meet preset conditions to replace, automatically adding a new IPC to avoid manual operations.
Improve the efficiency of adding IPC in NVR, automatically handles super channel and ultra-bandwidth situations, reduces user operations, and ensures data transmission needs that have been connected to IPC.
Smart Images

Figure CN114900653B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of video surveillance, and particularly to a method, device, equipment and medium for adding an IP camera. Background Art
[0002] Network video surveillance systems play an increasingly important role in people's daily lives. A network video surveillance system usually consists of a Network Video Recorder (NVR), an IP Camera (IPC), a router, a display, etc. Both the NVR and the IPC are connected to the router, and network communication between the NVR and the IPC is achieved through the router. The NVR can store the audio and video data sent by the IPC, and the display is connected to the video output interface of the NVR to display the audio and video data sent by the IPC.
[0003] Before the NVR and the IPC perform data transmission, the IPC needs to be added to the NVR, that is, a channel is added for the IPC. The existing methods for adding an IPC are mainly carried out when there are enough channels. When the maximum number of channels is exceeded, the existing methods for adding an IPC will all fail. If you want to continue adding, you need to manually select one or more channels to delete the connected IPCs to support adding a new IPC to the NVR. The user operation is cumbersome and the efficiency of adding network cameras is low. Summary of the Invention
[0004] Embodiments of this application provide a method, device, equipment and medium for adding an IP camera, which are used to improve the efficiency of adding an IP camera to a network video recorder.
[0005] In a first aspect, an embodiment of this application provides a method for adding an IP camera, which is applied to a network video recorder NVR. The NVR is connected to an IP camera IPC. The method includes:
[0006] Obtain an addition instruction for a first IPC;
[0007] Detect whether there is an idle channel without an access IPC;
[0008] If there is no such idle channel, detect whether there is a first channel that supports multiplexing among multiple channels with multiple IPCs connected; wherein, the first channel has a second IPC connected;
[0009] If there is such a first channel, add the first IPC to the first channel, and control the first IPC and the second IPC to multiplex the first channel time-divisionally.
[0010] In a possible embodiment, after controlling the first IPC and the second IPC to time-division multiplex the first channel, the method further includes:
[0011] Obtain a plurality of first data segments sent by the first IPC in a plurality of first preset time periods, splice the plurality of first data segments to obtain first data;
[0012] Obtain a plurality of second data segments sent by the second IPC in a plurality of second preset time periods, splice the plurality of second data segments to obtain second data.
[0013] In a possible embodiment, after detecting whether there is a first channel that supports multiplexing among a plurality of channels to which a plurality of IPCs are connected, the method further includes:
[0014] If the first channel does not exist, determine a second channel that meets a preset condition from the plurality of channels;
[0015] Delete a third IPC connected to the second channel, and add the first IPC to the second channel.
[0016] In a possible embodiment, determining a second channel that meets a preset condition from the plurality of channels includes:
[0017] Calculate the average bitstream of the plurality of channels within a preset time, and determine the channel with the largest average bitstream as the second channel; or,
[0018] According to the time when the plurality of channels add IPCs, determine the channel with the earliest or latest time as the second channel; or,
[0019] According to the priorities of the plurality of channels, determine the channel with the lowest priority as the second channel.
[0020] In a possible embodiment, after detecting whether there is an idle channel to which no IPC is connected, the method further includes:
[0021] If the idle channel exists, add the first IPC to the idle channel.
[0022] In a possible embodiment, if the idle channel exists, adding the first IPC to the idle channel includes:
[0023] If the idle channel exists, detect whether the bitstream of the first IPC is greater than the current available bandwidth of the NVR; wherein, the current available bandwidth of the NVR is the difference between the maximum bandwidth supported by the NVR and the total current bitstream of the plurality of IPCs;
[0024] If it is greater than the current available bandwidth of the NVR, detect whether there is a fourth IPC among the multiple IP cameras that can reduce the bitstream;
[0025] If there is the fourth IPC, control the fourth IPC to send data to the NVR according to the reduced bitstream, and add the first IPC to the idle channel, where the sum of the reduced bitstream and the bitstreams of other IP cameras is less than or equal to the difference between the maximum bandwidth supported by the NVR and the bitstream of the first IPC, and the other IP cameras are the IP cameras among the multiple IP cameras except the fourth IPC.
[0026] In a second aspect, an embodiment of the present application provides a device for adding a network camera. The device is disposed in a network video recorder (NVR), and the NVR is connected to an IP camera (IPC). The device includes:
[0027] An obtaining module, configured to obtain an adding instruction of a first IPC;
[0028] A detecting module, configured to detect whether there is an idle channel without an IPC connected;
[0029] The detecting module is further configured to, if there is no such idle channel, detect whether there is a first channel that supports multiplexing among multiple channels to which multiple IP cameras are connected; wherein the second IPC is connected to the first channel.
[0030] An adding module, configured to, if there is the first channel, add the first IPC to the first channel and control the first IPC and the second IPC to multiplex the first channel time-divisionally.
[0031] In a possible embodiment, the device further includes an obtaining module, and the obtaining module is configured to:
[0032] After controlling the first IPC and the second IPC to multiplex the first channel time-divisionally, obtain multiple first data segments sent by the first IPC in multiple first preset time periods, splice the multiple first data segments to obtain first data;
[0033] Obtain multiple second data segments sent by the second IPC in multiple second preset time periods, and splice the multiple second data segments to obtain second data.
[0034] In a possible embodiment, the method further includes: the device further includes a determining module and a deleting module;
[0035] The determining module is configured to, after detecting whether there is a first channel that supports multiplexing among multiple channels to which multiple IP cameras are connected, if there is no such first channel, determine a second channel that meets a preset condition from the multiple channels;
[0036] The deletion module is used to delete the third IPC accessing the second channel and add the first IPC to the second channel.
[0037] In a possible embodiment, the determining module is specifically configured to perform one of the following:
[0038] Calculate the average bitstream of the multiple channels within a preset time, and determine the channel with the largest average bitstream as the second channel; or,
[0039] Determine the channel with the earliest or latest time of adding IPCs among the multiple channels as the second channel according to the time of adding IPCs to the multiple channels; or,
[0040] Determine the channel with the lowest priority as the second channel according to the priorities of the multiple channels.
[0041] In a possible embodiment, the adding module is further configured to:
[0042] After detecting whether there is an idle channel without an access IPC, if there is such an idle channel, add the first IPC to the idle channel.
[0043] In a possible embodiment, the detecting module is further configured to:
[0044] If there is such an idle channel, detect whether the bitstream of the first IPC is greater than the current available bandwidth of the NVR; where the current available bandwidth of the NVR is the difference between the maximum bandwidth supported by the NVR and the total current bitstreams of the multiple IPCs;
[0045] If it is greater than the current available bandwidth of the NVR, detect whether there is a fourth IPC among the multiple IPCs that can reduce its bitstream;
[0046] The adding module is specifically configured to: if there is such a fourth IPC, control the fourth IPC to send data to the NVR at the reduced bitstream, and add the first IPC to the idle channel, where the reduced bitstream and the total bitstreams of the other IPCs are less than or equal to the difference between the maximum bandwidth supported by the NVR and the bitstream of the first IPC, and the other IPCs are the IPCs among the multiple IPCs except the fourth IPC.
[0047] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0048] At least one processor, and
[0049] A memory communicatively connected to the at least one processor;
[0050] Wherein, the memory stores instructions executable by the at least one processor, and the at least one processor implements the method according to any one of the first aspect by executing the instructions stored in the memory.
[0051] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing computer instructions, which when run on a computer cause the computer to execute the method according to any one of the first aspect.
[0052] In the embodiment of the present application, after the network video recorder (NVR) receives an addition instruction of the first IPC, when it is determined that there is no idle channel for unconnected IPCs, it first detects whether there is a first channel that supports multiplexing among multiple channels to which multiple IPCs are already connected. Among them, the second IPC is already connected to the first channel. If there is a first channel, the first IPC is added to the first channel, and the first IPC and the second IPC are controlled to time-division multiplex the first channel. This method does not require user operation and automatically adds new IPCs, which can improve the efficiency of the NVR adding IPCs. Moreover, the method of two IPCs time-division multiplexing the same channel can add new IPCs as much as possible without deleting the already connected IPCs, ensuring the data transmission requirements of the already connected IPCs to the NVR. Description of the Drawings
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0054] Figure 1 It is an application scenario diagram of a method for adding a network camera provided by an embodiment of the present application;
[0055] Figure 2 It is a schematic flowchart of a method for adding a network camera provided by an embodiment of the present application;
[0056] Figure 3 It is a flowchart of a method for adding an IPC when there is no idle channel provided by an embodiment of the present application;
[0057] Figure 4 It is a flowchart of a method for adding an IPC when there is an idle channel provided by an embodiment of the present application;
[0058] Figure 5 It is a schematic structural diagram of a device for adding a network camera provided by an embodiment of the present application;
[0059] Figure 6 A structural schematic diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0060] To make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part rather than all of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without making creative efforts belong to the scope of protection of the present application. Without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other arbitrarily. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0061] In the description and claims of the present application and the above accompanying drawings, the terms "first" and "second" are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices.
[0062] In the embodiments of the present application, "a plurality of" may represent at least two, for example, it may be two, three or more, and the embodiments of the present application do not make any limitations.
[0063] Currently, there are usually two ways to add an IPC to an NVR. One is the manual addition method, and the other is the automatic addition method. The process of manually adding an IPC mainly includes: determining the IPC to be added, configuring the IP address, port number, login account, login password, etc. of the IPC, selecting the channel to be connected on the NVR, and clicking the "Connect" button to bind the IPC and the channel for connection. The process of automatically adding an IPC mainly includes: searching for the IPCs within the same network segment as the NVR, obtaining the access information of the searched IPCs, binding the searched and unconnected IPCs to the idle channels of the NVR, and using the access information of the IPCs for connection, and adding the connected IPCs to the channel list of the NVR.
[0064] Whether it is the method of manually adding IPC or the method of automatically adding IPC, it is carried out on the premise that the network bandwidth of the NVR is sufficient and the number of channels is sufficient. However, limited by the hardware performance of the NVR, the maximum network bandwidth and the maximum number of channels supported by it are certain. When exceeding the maximum network bandwidth or the maximum number of channels of the NVR, the existing method of adding IPC will fail. If you want to continue adding, you need to manually select one or more channels to delete the connected IPC to support adding new IPCs to the NVR, resulting in cumbersome user operations and low efficiency of adding network cameras.
[0065] In view of this, an embodiment of the present application provides a method for adding a network camera, and this method can be executed by a network video recorder NVR. Hereinafter, some simple introductions will be made to the application scenarios applicable to the technical solutions of the embodiments of the present application. It should be noted that the application scenarios described below are only used to illustrate the embodiments of the present application rather than to limit them. In the specific implementation process, the technical solutions provided by the embodiments of the present application can be flexibly applied according to actual needs.
[0066] Please refer to Figure 1 , which is a schematic diagram of the application scenario of a method for adding a network camera provided by an embodiment of the present application. This application scenario schematic diagram includes a network video recorder 110 and a network camera 120. It should be noted that Figure 1 taking one network camera 120 as an example, in fact, the number of network cameras 120 to be added is not limited. That is to say, a network video recorder 110 can add multiple network cameras 120.
[0067] After the network video recorder 110 adds the network camera 120 to the corresponding channel, the network camera 120 can send the collected audio and video data to the network video recorder 110. Among them, the specific process of how the network video recorder 110 adds the network camera 120 will be introduced in detail below.
[0068] The above introduced the application scenario. Next, in combination with the Figure 1 application scenario shown, taking the network video recorder 110 in Figure 1 executing the method for adding a network camera as an example for introduction. Please refer to Figure 2 , which is a schematic flowchart of a method for adding a network camera provided by an embodiment of the present application.
[0069] S201. Obtain an addition instruction for the first IPC.
[0070] Whether adding IPC to the NVR manually or automatically, the NVR will obtain the addition instruction for the IPC. The first IPC is any IPC to be added. The following introduces several ways to obtain the addition instruction for the first IPC.
[0071] In the first method, the NVR generates an addition instruction for the first IPC in real time in response to a user's addition operation.
[0072] The addition operation can be a single click operation, a double click operation, a long press operation, etc. on the "Connect" button of the NVR. The "Connect" button can be a physical button or a virtual button on the NVR. For example, after the user enters the connection information of the first IPC, which includes the IP address, port number, login account, login password, etc., and presses the "Connect" button, the NVR immediately generates an addition instruction for the first IPC.
[0073] In the second method, the NVR automatically generates an addition instruction for the first IPC in response to a user's setting operation.
[0074] For example, the user can pre-set preset conditions in the NVR. The preset conditions are, for example, that the local time of the NVR reaches the preset time, the NVR has idle channels, etc. When the NVR meets the preset conditions, it automatically generates an addition instruction for the first IPC.
[0075] In the third method, the NVR receives an addition instruction sent by the first IPC.
[0076] For example, after the first IPC generates an addition instruction, it sends the addition instruction to the NVR in the same network segment, and the NVR can obtain the addition instruction of the first IPC.
[0077] S202. Detect whether there is an idle channel without an IPC connected.
[0078] Considering that the number of channels of the NVR is limited, after the NVR obtains the addition instruction of the first IPC, it can detect whether there is an idle channel without an IPC connected.
[0079] S203. If there is no idle channel, detect whether there is a first channel that supports multiplexing among multiple channels with multiple IPCs connected.
[0080] If there is no idle channel, it means that the maximum number of channels of the NVR has been exceeded, which is simply called over-channel. Then, detect whether there is a first channel that supports multiplexing among multiple channels with multiple IPCs connected, where the first channel has a second IPC connected.
[0081] S204. If there is a first channel, add the first IPC to the first channel and control the first IPC and the second IPC to multiplex the first channel time-divisionally.
[0082] Channel Time-Sharing Multiplexing (CTSM) means that multiple IP cameras share the same channel and alternately use this channel to send the audio and video data they collect to the NVR. For example, the first IP camera first occupies the first channel to send audio and video data to the NVR. After reaching the preset duration, the second IP camera then occupies the first channel to send audio and video data to the NVR. After reaching the preset duration, the first IP camera then occupies the first channel to send audio and video data to the NVR, and so on.
[0083] After the NVR controls the first IP camera and the second IP camera to time-share the first channel, it obtains multiple first data segments sent by the first IP camera in multiple first preset time periods, splices the multiple first data segments to obtain the first data, and obtains multiple second data segments sent by the second IP camera in multiple second preset time periods, and splices the multiple second data segments to obtain the second data. The durations of the first preset time period and the second preset time period can be the same. For example, the duration of each IP camera occupying the first channel each time is 1 hour. The durations of the first preset time period and the second preset time period can also be different. For example, the duration of the first IP camera occupying the first channel each time is 1 hour, and the duration of the second IP camera occupying the first channel each time is 2 hours.
[0084] Taking the duration of both the first preset time period and the second preset time period as T as an example, the process of two IP cameras time-sharing a channel is introduced by way of example.
[0085] For example, when the first IP camera and the second IP camera time-share the first channel, the duration of each IP camera occupying the first channel each time is T. When the first IP camera sends the first data segment to the NVR through the first channel, the connection is disconnected after T time, and the right to use the first channel is given to the second IP camera. The second IP camera sends the second data segment to the NVR through the first channel, and the connection is disconnected after T time, and the right to use the first channel is given to the first IP camera. The first IP camera then sends the first data segment to the NVR through the first channel, and so on. Finally, the NVR splices the multiple first data segments sent by the first IP camera to obtain the complete first data sent by the first IP camera. And splices the multiple second data segments sent by the second IP camera to obtain the complete second data sent by the second IP camera.
[0086] In the embodiments of the present application, taking the example that two IP cameras share one channel in a time-division multiplexing manner, the duration of each of the two IP cameras occupying the channel in a day is one-half of a day. In fact, there may be a situation where N IP cameras share one channel in a time-division multiplexing manner, where N is an integer greater than 2, and the duration of each IP camera occupying the channel in a day is one-Nth of a day. Considering that the more IP cameras sharing the same channel, the more video information will be lost. Therefore, the time-division multiplexing of two IP cameras for one channel is the optimal implementation method.
[0087] It should be noted that S203 - S204 are optional. When there is an idle channel, S203 - S204 may not be executed. That is to say, according to whether there is an idle channel, it can be divided into two cases. To more clearly illustrate the method for adding an IP camera provided by the embodiments of the present application, the following will introduce these two cases separately. First, introduce the first case where there is no idle channel.
[0088] After the NVR detects whether there is an idle channel without an IP camera connected, if it is determined that there is no idle channel, it then detects whether there is a first channel that supports multiplexing among multiple channels with multiple IP cameras connected, where the first channel has a second IP camera connected. According to whether there is a first channel, the first case can be further divided into two cases, which will be introduced separately below.
[0089] Case 1 in the first case:
[0090] If there is no idle channel and there is a first channel, add the first IP camera to the first channel, and control the first IP camera and the second IP camera to share the first channel in a time-division multiplexing manner. The specific process of time-division multiplexing refers to the content described in S204 above and will not be elaborated here.
[0091] Case 2 in the first case:
[0092] If there is no idle channel and there is no first channel, determine a second channel that meets the preset conditions from multiple channels, delete the third IP camera connected to the second channel, and add the first IP camera to the second channel. When there are multiple second channels that meet the preset conditions, delete the third IP camera of the second channel with the largest channel number. There are various ways to determine the second channel, which will be introduced separately below.
[0093] Method 1: Delete Maximum Code Stream (DMCS).
[0094] The NVR can calculate the average bitrate of multiple channels within a preset time, and determine the channel with the maximum average bitrate as the second channel. Herein, the bitrate refers to the data traffic per unit time, with the unit of kbps (i.e., kilobits per second), and the average bitrate refers to the ratio of the sum of all bitrates within the preset time to the preset time. The meaning of multiple channels can be referred to the content discussed above, and will not be elaborated here.
[0095] In the embodiment of the present application, the third IPC accessing the second channel is deleted, that is, the IPC corresponding to the channel with the maximum average bitrate is selected to be deleted, so as to ensure that there is more available bandwidth for the NVR and it can meet the requirements of the IPC to be added as much as possible.
[0096] Method 2: First Add First Delete (FAFD).
[0097] The NVR can determine the second channel according to the time when multiple channels add IPCs, and determine the channel with the earliest time as the second channel. The meaning of multiple channels can be referred to the content discussed above, and will not be elaborated here.
[0098] In the embodiment of the present application, the third IPC accessing the second channel is deleted, that is, the IPC corresponding to the channel with the earliest addition time is deleted. The earliest addition time indicates the longest recording time. In the case where a large amount of audio and video data has been recorded, the IPC of this channel can be deleted to ensure the recording requirements of the new IP.
[0099] Method 3: First Add Last Delete (FALD).
[0100] The NVR can determine the second channel according to the time when multiple channels add IPCs, and determine the channel with the latest time as the second channel. The meaning of multiple channels can be referred to the content discussed above, and will not be elaborated here.
[0101] In the embodiment of the present application, the third IPC accessing the second channel is deleted, that is, the IPC corresponding to the channel with the latest addition time is deleted.
[0102] Method 4: Delete Lowest Priority Channel (DLPC).
[0103] The NVR can determine the priorities of multiple channels according to the priorities of the multiple IPCs already accessed, and determine the channel with the lowest priority as the second channel. The meaning of multiple channels can be referred to the content discussed above, and will not be elaborated here.
[0104] For example, each time an IPC is added to the NVR, a level can be assigned to the IPC according to the importance of the area where the IPC is located. The maximum number of channels supported by the NVR is N. Therefore, the level of each added IPC is one of the N levels. The level of each channel is the level of the IPC connected to that channel. The smaller the level, the higher the priority; the larger the level, the lower the priority.
[0105] In the embodiment of the present application, deleting the third IPC connected to the second channel, that is, deleting the IPC corresponding to the lowest priority channel. The IPC corresponding to the channel with the lowest priority is usually set in an unimportant area. Deleting the IPC corresponding to this channel will not affect the IPC corresponding to the channel with a higher priority from collecting audio and video data in important areas.
[0106] In case 2 of the first situation introduced above, after the NVR deletes the third IPC connected to the second channel, the first IPC can be directly added to the second channel. Considering that the maximum bandwidth supported by the NVR is limited, even if there are sufficient channels, insufficient bandwidth will also cause the addition of the first IPC to fail. Therefore, in a possible embodiment, after the NVR deletes the third IPC connected to the second channel, it can detect whether the bitstream of the first IPC is greater than the current available bandwidth of the NVR, that is, detect whether it exceeds the bandwidth. The current available bandwidth of the NVR is the difference between the maximum bandwidth supported by the NVR and the sum of the current bitstreams of the multiple already-connected IP Cs.
[0107] Specifically, after the NVR deletes the third IPC connected to the second channel, if the bitstream of the first IPC is less than the current available bandwidth of the NVR, the first IPC is directly added to the second channel. If the bitstream of the first IPC is greater than the current available bandwidth of the NVR, a third channel that meets the preset conditions is determined from the remaining IP Cs, and the IPC connected to the third channel is deleted. At this time, the current available bandwidth of the NVR increases, and it continues to detect whether the bitstream of the first IPC is greater than the current available bandwidth of the NVR until the bitstream of the first IPC is less than the current available bandwidth of the NVR, and the first IPC is added to any channel that meets the preset conditions. Among them, the remaining IP Cs refer to the IP Cs among the multiple originally-connected IP Cs except for the deleted IPC. The method for determining the third channel refers to the method for determining the second channel described above and will not be elaborated here.
[0108] To more clearly illustrate the entire process of adding an IPC by the NVR in the case of exceeding channels, please refer to Figure 3 , which is a flowchart of a method for adding an IPC provided by the embodiment of the present application when there is no idle channel.
[0109] S301. Detect whether there is a first channel that supports multiplexing.
[0110] In the case of super channels, the NVR detects whether there is a first channel that supports multiplexing among multiple channels to which multiple IP cameras are connected. If there is a first channel, S302 is executed, that is, the first IP camera is connected by channel time-division multiplexing. If there is no first channel, S303 is executed, that is, the IP camera of one channel is deleted.
[0111] S302: Connect the first IP camera by channel time-division multiplexing.
[0112] In the case of super channels and when the first channel supports multiplexing, the NVR also adds the first IP camera to the first channel and controls the first IP camera and the second IP camera to time-division multiplex the first channel. For the meaning of the second IP camera and the process of time-division multiplexing, please refer to the content described above and will not be elaborated here.
[0113] S303: Delete the IP camera of one channel.
[0114] In the case of super channels and when none of the multiple channels support multiplexing, the NVR determines a second channel that meets the preset conditions from the multiple channels and deletes the third IP camera connected to the second channel. For the method of determining the second channel, please refer to the four methods described above and will not be elaborated here.
[0115] S304: Detect whether the bitstream of the first IP camera is greater than the current available bandwidth of the NVR.
[0116] After the NVR deletes the third IP camera connected to the second channel, it detects whether the bitstream of the first IP camera is greater than the current available bandwidth of the NVR. For the meaning of the bitstream and the current available bandwidth, please refer to the content described above and will not be elaborated here. If the bitstream of the first IP camera is less than the current available bandwidth of the NVR, S305 is executed, that is, the first IP camera is connected. If the bitstream of the first IP camera is greater than the current available bandwidth of the NVR, S303 is continued to be executed to continue deleting the IP camera of one channel.
[0117] S305: Connect the first IP camera.
[0118] The NVR adds the first IP camera to the second channel and connects the first IP camera through the second channel.
[0119] It should be noted that Figure 3 Including two cases of super channels, S301 - S302 is the case of super channels but not super bandwidth, and S301 - S303 - S304 - S305 is the case of super channels and super bandwidth. Only one of these cases needs to be executed each time.
[0120] In the embodiments of the present application, in the case of a super channel, two methods of channel time-division multiplexing and IPC deletion are provided. Channel time-division multiplexing is preferred, and new IPCs are added as much as possible without deleting IPCs. And four methods of DMCS, FAFD, FALD, and DLPC are provided for IPC deletion, and users can set according to their own needs, so as to meet the needs of users in multiple aspects.
[0121] The first case where there is no idle channel is introduced above. Now, the second case where there is an idle channel is introduced.
[0122] After the NVR determines that there is an idle channel, the first IPC can be directly added to the idle channel. Or considering the problem of ultra-wideband, after the NVR determines that there is an idle channel, it can further detect whether the bitstream of the first IPC is greater than the current available bandwidth of the NVR, that is, detect whether it is over bandwidth. The meaning of the current available bandwidth can be referred to the content discussed above and will not be elaborated here. According to whether it is greater than the current available bandwidth of the NVR, the second case can be further divided into multiple cases, which will be introduced separately below.
[0123] Case 1 in the second case: If the bitstream of the first IPC is less than the current available bandwidth of the NVR, the first IPC is added to the idle channel.
[0124] Case 2 in the second case: If the bitstream of the first IPC is greater than the current available bandwidth of the NVR, it is detected whether there is a fourth IPC whose bitstream can be reduced.
[0125] In a possible embodiment, after the NVR determines that the bitstream of the first IPC is greater than the current available bandwidth of the NVR, it can directly detect whether there is a fourth IPC whose bitstream can be reduced among multiple IPCs.
[0126] In a possible embodiment, after the NVR determines that the bitstream of the first IPC is greater than the current available bandwidth of the NVR, it can detect whether there is a first channel that supports multiplexing among multiple channels to which multiple IPCs are connected. If there is no first channel that supports multiplexing, it then detects whether there is a fourth IPC whose bitstream can be reduced among multiple IPCs.
[0127] In a possible embodiment, after the NVR determines that there is an idle channel, the bitstream of the first IPC is greater than the current available bandwidth of the NVR, and there is a first channel that supports multiplexing, the first IPC is added to the first channel, and the first IPC and the second IPC are controlled to multiplex the first channel time-divisionally. For the meaning of the second IPC and the process of time-division multiplexing, please refer to the content of S204 described above, which will not be elaborated here. For example, the IPC_A to be accessed requires 8 Mbps of bandwidth, and the bandwidth occupied by the already accessed IPC_B is 4 Mbps. Now the current available bandwidth of the NVR is 5 Mbps. Since 5 Mbps < 8 Mbps, the NVR cannot access IPC_A. After the IPC_A and the IPC_B channels are multiplexed time-divisionally, when IPC_A uses the channel, IPC_B disconnects, and the 4 Mbps of bandwidth it uses is also returned to the NVR. At this time, the current available bandwidth of the NVR, 4 Mbps + 5 Mbps > 8 Mbps, can meet the access bandwidth requirements of IPC_A.
[0128] In a possible embodiment, considering that the user may turn off the bitstream reduction setting that is default enabled on the NVR in order to ensure the quality of the recorded video. The NVR can detect whether the bitstream reduction setting is enabled after determining that the bitstream of the first IPC is greater than the current available bandwidth of the NVR, or after determining that the bitstream of the first IPC is greater than the current available bandwidth of the NVR and determining that there is no channel that supports multiplexing. After confirming that the bitstream reduction setting is enabled, it then detects whether there is a fourth IPC among multiple IPCs whose bitstream can be reduced.
[0129] Specifically, if the NVR detects that the bitstream reduction setting is not enabled, the NVR can automatically enable the bitstream reduction setting, or the NVR can display a prompt message and, in response to the user's setting operation, enable the bitstream reduction setting. The prompt message is used to prompt the user that the NVR has turned off the bitstream reduction setting. If the NVR detects that the bitstream reduction setting is not enabled, or does not detect that the user enables the bitstream reduction setting within a preset time after displaying the prompt message, it determines a second channel that meets the preset conditions from multiple channels, deletes the third IPC accessing the second channel, and adds the first IPC to the second channel. For the specific process of determining the second channel, deleting the third IPC, and adding the first IPC, please refer to part of the content of Case 2 in the first case described above, which will not be elaborated here.
[0130] Furthermore, after the NVR detects whether there is a fourth IPC whose bitstream can be reduced, according to whether there is a fourth IPC whose bitstream can be reduced, Case 2 in the second case can be further divided into multiple cases, which are introduced below.
[0131] Case 2A: If there is a fourth IPC that can reduce the bitstream, control the fourth IPC to send data to the NVR according to the reduced bitstream, and add the first IPC to the idle channel.
[0132] Specifically, when there are multiple fourth IPs that can reduce the bitstream, the NVR can arbitrarily select one fourth IPC to send data to the NVR according to the reduced bitstream. The fourth IPC can reduce the bitstream by a preset amplitude, for example, reducing 512 KB each time, and recalculate the current available bandwidth of the NVR until the bitstream of the first IPC is less than the current available bandwidth of the NVR. In other words, until the sum of the reduced bitstream and the bitstreams of other IPs is less than or equal to the difference between the maximum bandwidth supported by the NVR and the bitstream of the first IPC. Other IPs are IPs other than the fourth IPC among the multiple IPs.
[0133] Considering that the bitstream of each IPC has a lower limit value, and the audio and video with a bitstream lower than the lower limit value has too low clarity to meet the actual requirements. If the bitstream of a fourth IPC has been reduced to the lower limit value, and the sum of the reduced bitstream and the bitstreams of other IPs is still greater than the difference between the maximum bandwidth supported by the NVR and the bitstream of the first IPC, the NVR can continue to randomly select another fourth IPC from the multiple fourth IPs, and control both fourth IPs to send data to the NVR according to the reduced bitstream, and so on, until the sum of the reduced bitstream and the bitstreams of other IPs is less than the difference between the maximum bandwidth supported by the NVR and the bitstream of the first IPC.
[0134] Case 2B: If there is no fourth IPC that can reduce the bitstream, determine a second channel that meets the preset conditions from multiple channels, delete the third IPC connected to the second channel, and add the first IPC to the second channel.
[0135] For the specific process of determining the second channel, deleting the third IPC, and adding the first IPC, please refer to part of the content of Case 2 in the first case discussed above, and will not be elaborated here.
[0136] To more clearly illustrate the entire process of the NVR adding an IPC without exceeding the channel, please refer to Figure 4 , which is the flowchart of the method for adding an IPC when there is an idle channel provided by the embodiment of the present application.
[0137] S401. Detect whether the bitstream of the first IPC is greater than the current available bandwidth of the NVR.
[0138] After the NVR determines that there is an idle channel, it can detect whether the bitstream of the first IPC is greater than the current available bandwidth of the NVR, that is, without exceeding the channel, it detects whether the bandwidth is exceeded. For the meaning of the current available bandwidth of the NVR, please refer to the content discussed above and will not be elaborated here. If the bitstream of the first IPC is less than the current available bandwidth of the NVR, then S402 is executed, that is, the first IPC is connected. If the bitstream of the first IPC is greater than the current available bandwidth of the NVR, then S403 is continued to be executed, that is, it is detected whether there is a first channel that supports multiplexing.
[0139] S402. Connect the first IPC.
[0140] The NVR adds the first IPC to the second channel and connects the first IPC through the second channel.
[0141] S403. Detect whether there is a first channel that supports multiplexing.
[0142] When the NVR does not exceed the channel but exceeds the bandwidth, it detects whether there is a first channel that supports multiplexing among the multiple channels to which multiple IP Cs have been connected. If there is a first channel, then S404 is executed, that is, the first IPC is connected by using channel time division multiplexing. If there is no first channel, then S405 is executed, that is, it is detected whether the setting of reducing the bitstream is enabled.
[0143] S404. Connect the first IPC by using channel time division multiplexing.
[0144] Among the multiple channels, there is a first channel that supports multiplexing. Among them, the second IPC has been connected to the first channel. Then the NVR also adds the first IPC to the first channel and controls the first IPC and the second IPC to time division multiplex the first channel. For the process of time division multiplexing, please refer to the content discussed in S204 above and will not be elaborated here.
[0145] S405. Detect whether the setting of reducing the bitstream is enabled.
[0146] When the NVR does not exceed the channel, exceeds the bandwidth, and does not support multiplexing, it can detect whether the setting of reducing the bitstream is enabled. If the setting of reducing the bitstream is enabled, then S406 is executed, that is, it is detected whether there is a fourth IPC whose bitstream can be reduced. If the setting of reducing the bitstream is not enabled, then S409 is executed, that is, the IPC of one channel is deleted.
[0147] S406. Detect whether there is a fourth IPC among the multiple IP Cs whose bitstream can be reduced.
[0148] When the NVR does not exceed the channels, has ultra-wideband, does not support multiplexing, and the bitrate reduction is enabled, it detects whether there is a fourth IPC among the connected multiple IP cameras that can reduce the bitrate. If there is a fourth IPC that can reduce the bitrate, it executes S407, that is, reduces the bitrate of an IPC on one channel. If there is no fourth IPC that can reduce the bitrate, it executes S409, that is, deletes an IPC on one channel.
[0149] S407: Reduce the bitrate of an IPC on one channel.
[0150] For the specific process of how to reduce the bitrate, please refer to the content of Case 2A described above, and it will not be elaborated here.
[0151] S408: Detect whether the first connection requirement is met.
[0152] Among them, the first connection requirement means that after reducing the bitrate of an IPC on one channel, whether the bitrate of the first IPC is greater than the current available bandwidth of the NVR. If the bitrate of the first IPC is still greater than the current available bandwidth of the NVR, continue to execute S407, that is, continue to reduce the bitrate of an IPC on one channel. If the bitrate of the first IPC is less than the current available bandwidth of the NVR, execute S402, that is, connect the first IPC.
[0153] S409: Delete an IPC on one channel.
[0154] The NVR determines a second channel that meets the preset conditions from multiple channels and deletes the third IPC connected to the second channel. For the method of determining the second channel, please refer to the four methods described above, and it will not be elaborated here.
[0155] S410: Detect whether the second connection requirement is met.
[0156] Among them, the second connection requirement means that after deleting an IPC on one channel, whether the bitrate of the first IPC is greater than the current available bandwidth of the NVR. If the bitrate of the first IPC is still greater than the current available bandwidth of the NVR, continue to execute S409, that is, continue to delete an IPC on one channel. If the bitrate of the first IPC is less than the current available bandwidth of the NVR, execute S402, that is, connect the first IPC.
[0157] It should be noted that Figure 4 Including four cases of not exceeding channels, S401 - S402 is the case of not exceeding channels and not exceeding bandwidth, and S401 - S403 - S404, S401 - S403 - S405 - S406 - S407 - S408 - S402, S401 - S403 - S405 - S406 - S409 - S410 - S402 are three different cases of not exceeding channels but exceeding bandwidth. Only one of these cases needs to be executed each time.
[0158] In the embodiments of the present application, the IPC is directly added without exceeding the channel and the bandwidth. In the case of not exceeding the channel but exceeding the bandwidth, three methods are provided, namely channel time-division multiplexing, bitstream reduction, and IPC deletion. Channel time-division multiplexing and bitstream reduction are preferentially considered. Both of these methods can add new IPCs as much as possible without deleting the IPCs.
[0159] In summary, the embodiments of the present application provide a comprehensive solution for adding IPCs to an NVR in the case of exceeding the bandwidth and the channel, including three methods: channel time-division multiplexing, bitstream reduction, and IPC deletion. It can automatically add new IPCs to appropriate channels, avoiding the user from manually selecting channels to delete and then add IPCs, reducing user operations, and improving the efficiency of adding IPCs to the NVR.
[0160] Based on the same inventive concept, the present application provides a device for adding network cameras. The device is disposed in the network video recorder NVR described above, and the NVR is connected to the network camera IPC. Please refer to Figure 5 , and the device includes:
[0161] An acquisition module 501, configured to acquire an addition instruction for a first IPC;
[0162] A detection module 502, configured to detect whether there is an idle channel without an access IPC;
[0163] The detection module 502 is further configured to, if there is no idle channel, detect whether there is a first channel that supports multiplexing among multiple channels with multiple IPCs connected; wherein, a second IPC is connected to the first channel;
[0164] An addition module 503, configured to, if there is a first channel, add the first IPC to the first channel and control the first IPC and the second IPC to time-division multiplex the first channel.
[0165] In a possible embodiment, the device further includes an obtaining module 504, and the obtaining module 504 is configured to:
[0166] After controlling the first IPC and the second IPC to time-division multiplex the first channel, acquire multiple first data segments sent by the first IPC in multiple first preset time periods, splice the multiple first data segments to obtain first data;
[0167] Acquire multiple second data segments sent by the second IPC in multiple second preset time periods, and splice the multiple second data segments to obtain second data.
[0168] In a possible embodiment, the device further includes a determination module 505 and a deletion module 506;
[0169] A determination module 505, configured to, after detecting whether there is a first channel that supports multiplexing among multiple channels to which multiple IP cameras are connected, if there is no first channel, determine a second channel that meets a preset condition from the multiple channels;
[0170] A deletion module 506, configured to delete a third IP camera connected to the second channel and add a first IP camera to the second channel.
[0171] In a possible embodiment, the determination module 505 is specifically configured to perform one of the following:
[0172] Calculate the average bitstream of multiple channels within a preset time, and determine the channel with the largest average bitstream as the second channel; or,
[0173] According to the time when multiple channels add IP cameras, determine the channel with the earliest or latest time as the second channel; or,
[0174] According to the priorities of multiple channels, determine the channel with the lowest priority as the second channel.
[0175] In a possible embodiment, the addition module 503 is further configured to:
[0176] After detecting whether there is an idle channel to which no IP camera is connected, if there is an idle channel, add the first IP camera to the idle channel.
[0177] In a possible embodiment, the detection module 502 is further configured to:
[0178] If there is an idle channel, detect whether the bitstream of the first IP camera is greater than the current available bandwidth of the NVR; wherein, the current available bandwidth of the NVR is the difference between the maximum bandwidth supported by the NVR and the sum of the current bitstreams of multiple IP cameras;
[0179] If it is greater than the current available bandwidth of the NVR, detect whether there is a fourth IP camera among multiple IP cameras that can reduce the bitstream;
[0180] The addition module 503 is specifically configured to: if there is a fourth IP camera, control the fourth IP camera to send data to the NVR at the reduced bitstream, and add the first IP camera to the idle channel, wherein the reduced bitstream and the sum of the bitstreams of other IP cameras are less than or equal to the difference between the maximum bandwidth supported by the NVR and the bitstream of the first IP camera, and the other IP cameras are the IP cameras other than the fourth IP camera among multiple IP cameras.
[0181] As an embodiment, Figure 5 The described device can be used to execute Figures 2-4 The method for adding a network camera described in the illustrated embodiment. Therefore, for the functions that can be achieved by each functional module of the device, reference can be made toFigures 2-4 The description of the illustrated embodiments will not be repeated here.
[0182] It should be noted that although several modules or sub - modules of the device are mentioned in the above - detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present invention, the features and functions of two or more of the above - described modules can be embodied in one unit. Conversely, the features and functions of one module described above can be further divided and embodied by multiple modules.
[0183] Based on the same inventive concept, an electronic device is also provided in the embodiments of the present application. Please refer to Figure 6 , and the device includes:
[0184] At least one processor 601, and a memory 602 connected to at least one processor 601. In the embodiments of the present application, the specific connection medium between the processor 601 and the memory 602 is not limited. Figure 6 In [reference], it is taken as an example that the processor 601 and the memory 602 are connected through a bus 600. The bus 600 is represented by a thick line in Figure 6 . The connection manners between other components are only for illustrative purposes and are not to be regarded as limiting. The bus 600 can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, Figure 6 it is only represented by a thick line in [reference], but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 601 can also be called a controller, and there is no limitation on the name.
[0185] In the embodiments of the present application, the memory 602 stores instructions executable by at least one processor 601. By executing the instructions stored in the memory 602, at least one processor 601 can execute Figures 2-4 any of the methods for adding a network camera described above. The processor 601 can also implement Figure 5 the functions of each module in the device shown in
[0186] Among them, the processor 601 is the control center of the device. It can connect various parts of the entire control device through various interfaces and lines. By running or executing the instructions stored in the memory 602 and calling the data stored in the memory 602, various functions of the device and process data, so as to monitor the device as a whole.
[0187] In a possible design, the processor 601 may include one or more processing units. The processor 601 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 601 either. In some embodiments, the processor 601 and the memory 602 may be implemented on the same chip, and in some embodiments, they may also be separately implemented on independent chips.
[0188] The processor 601 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method for adding a network camera disclosed in combination with the embodiments of the present application may be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
[0189] As a non-volatile computer-readable storage medium, the memory 602 can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The memory 602 may include at least one type of storage medium. For example, it may include flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (RAM), a static random access memory (SRAM), a programmable read-only memory (PROM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic memory, a magnetic disk, an optical disc, etc. The memory 602 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 602 in the embodiments of the present application may also be a circuit or any other device capable of implementing a storage function, for storing program instructions and / or data.
[0190] By programming the design of the processor 601, the code corresponding to the method for adding a network camera introduced in the foregoing embodiments can be solidified into the chip, so that the chip can execute when running Figures 2-4Steps of the method for adding a network camera as shown. How to design and program the processor 601 is a well-known technology to those skilled in the art and will not be elaborated here.
[0191] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer is enabled to execute the method for adding a network camera as described in any of the foregoing discussions. Since the principle of the above computer-readable storage medium for solving problems is similar to that of the method for adding a network camera, the implementation of the above computer-readable storage medium can refer to the implementation of the method, and the repeated parts will not be elaborated.
[0192] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0193] The present application is described with reference to the flowcharts and / or block diagrams of the method, device (system), and computer program product according to the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the specified functions in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0194] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing devices to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the specified functions in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0195] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions for implementing the steps of the process Figure 1 in one process or a plurality of processes and / or boxes Figure 1 or steps of the functions specified in one box or a plurality of boxes.
[0196] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.
Claims
1. A method for adding a network camera, characterized in that, Applied to a network video recorder (NVR), the NVR is connected to a network camera (IPC), and the method includes: Obtaining an add instruction for a first IPC; the first IPC is any IPC to be added; Check whether there are idle channels that are not connected to IPC; If the idle channel does not exist, detecting whether there is a first channel supporting multiplexing among the multiple channels connected to the multiple IPCs; wherein the first channel is connected to the second IPC; If the first channel exists, add the first IPC to the first channel, and control the first IPC and the second IPC to time-share the first channel; If the first channel does not exist, determining a second channel that meets the preset conditions from the multiple channels; deleting the third IPC connected to the second channel, and adding the first IPC to the second channel; Determining the second channel that meets the preset conditions from the multiple channels includes: calculating the average bit rate of the multiple channels within a preset time, and determining the channel with the largest average bit rate as the second channel; or, based on the time when the IPC is added to the multiple channels, determining the channel with the earliest or latest time as the second channel; or, based on the priority of the multiple channels, determining the channel with the lowest priority as the second channel.
2. The method according to claim 1, wherein, After controlling the first IPC and the second IPC to time-share multiplex the first channel, the method further includes: Acquire multiple first data fragments sent by the first IPC in multiple first preset time periods, and splice the multiple first data fragments to obtain first data; Acquire multiple second data fragments sent by the second IPC in multiple second preset time periods, and splice the multiple second data fragments to obtain second data.
3. The method according to claim 1, wherein After detecting whether there is an idle channel that is not connected to the IPC, the method further includes: If the idle channel exists, the first IPC is added to the idle channel.
4. The method according to claim 3, wherein If the idle channel exists, adding the first IPC to the idle channel includes: If the idle channel exists, detecting whether the bitrate of the first IPC is greater than the current available bandwidth of the NVR; wherein the current available bandwidth of the NVR is the difference between the maximum bandwidth supported by the NVR and the sum of the current bitrates of the multiple IPCs; If it is greater than the current available bandwidth of the NVR, detecting whether there is a fourth IPC in the multiple IPCs that can reduce the bit rate; If the fourth IPC exists, control the fourth IPC to send data to the NVR at the reduced bitrate, and add the first IPC to the idle channel, wherein the sum of the reduced bitrate and the bitrates of other IPCs is less than or equal to the difference between the maximum bandwidth supported by the NVR and the bitrate of the first IPC, and the other IPCs are IPCs other than the fourth IPC among the multiple IPCs.
5. A device for adding a network camera, characterized in that, The device is provided in a network video recorder (NVR), which is connected to an IP camera (IPC). The device comprises: An acquisition module, configured to acquire an instruction to add a first IPC; the first IPC is any IPC to be added; A detection module is used to detect whether there is an idle channel that is not connected to the IPC; The detection module is further configured to detect whether there is a first channel supporting multiplexing among the multiple channels connected to the multiple IPCs if the idle channel does not exist; wherein the first channel is connected to the second IPC; an adding module, configured to add the first IPC to the first channel if the first channel exists, and control the first IPC and the second IPC to time-share multiplex the first channel; The device further includes a determination module and a deletion module, wherein the determination module is configured to determine a second channel that meets a preset condition from the multiple channels if the first channel does not exist; the deletion module is configured to delete a third IPC connected to the second channel and add the first IPC to the second channel; When determining the second channel that meets the preset conditions from the multiple channels, the determination module is specifically configured to: calculate the average bitrate of the multiple channels within a preset time and determine the channel with the largest average bitrate as the second channel; or, based on the time when the IPC was added to the multiple channels, determine the channel with the earliest or latest time as the second channel; or, based on the priority of the multiple channels, determine the channel with the lowest priority as the second channel.
6. The device according to claim 5, characterized in that The apparatus further includes an obtaining module, wherein the obtaining module is configured to: Acquire multiple first data fragments sent by the first IPC in multiple first preset time periods, and splice the multiple first data fragments to obtain first data; Acquire multiple second data fragments sent by the second IPC in multiple second preset time periods, and splice the multiple second data fragments to obtain second data.
7. An electronic device, characterized in that, include: a memory for storing program instructions; A processor is configured to call the program instructions stored in the memory and execute the method according to any one of claims 1 to 4 according to the obtained program instructions.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a computer, the computer is caused to perform the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
IPC access method based on physical port of network access equipment, and NVR
CN104883547A
Multichannel video content analysis system using video multiplexing
US20130155250A1