CN112911226A - Method, system and storage medium for automatically adding network camera - Google Patents

Method, system and storage medium for automatically adding network camera Download PDF

Info

Publication number
CN112911226A
CN112911226A CN202110068424.1A CN202110068424A CN112911226A CN 112911226 A CN112911226 A CN 112911226A CN 202110068424 A CN202110068424 A CN 202110068424A CN 112911226 A CN112911226 A CN 112911226A
Authority
CN
China
Prior art keywords
network
hard disk
current
video recorder
host
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110068424.1A
Other languages
Chinese (zh)
Other versions
CN112911226B (en
Inventor
水新星
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202110068424.1A priority Critical patent/CN112911226B/en
Publication of CN112911226A publication Critical patent/CN112911226A/en
Application granted granted Critical
Publication of CN112911226B publication Critical patent/CN112911226B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/181Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/78Television signal recording using magnetic recording
    • H04N5/781Television signal recording using magnetic recording on disks or drums

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Closed-Circuit Television Systems (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The application discloses a method, a system and a storage medium for automatically adding a network camera, wherein the method is applied to a device access system, the device access system comprises the network camera and a plurality of network video recorders, and the method comprises the following steps: selecting one network hard disk video recorder from a plurality of network hard disk video recorders to be set as a host, and setting other network hard disk video recorders as slaves; acquiring response information from the network camera and the slave machine by using the host machine; generating a pairing table by using the host computer based on the response information, wherein the pairing table comprises the pairing relation between the network camera and the network video recorder; and sending the allocation table to the slave machine by using the host machine so that the network hard disk video recorder adds the corresponding network camera. By the mode, the network video cameras can be automatically added to the network hard disk video recorders.

Description

Method, system and storage medium for automatically adding network camera
Technical Field
The present application relates to the field of monitoring technologies, and in particular, to a method, a system, and a storage medium for automatically adding a network camera.
Background
The Network Video Camera (IP Camera, IPC) is to be accessed to the Network Video Recorder (NVR, Network Video Recorder) for storing and managing Video, the prior art can only search, add and set resolution or code stream size on each Network Video Recorder in a manual mode, the operation is very complicated, and the operation is greatly dependent on the experience of operators to configure and manage the Network Video Camera, the difficulty coefficient is greatly increased under the condition that the number of the Network Video recorders and the Network Video cameras is numerous, and the possible situations are as follows: 1. adding omission for part of network cameras; 2. the same network camera is added by a plurality of network hard disk video recorders; 3. the access bandwidth and decoding performance of the network camera and the network hard disk video recorder are not matched, so that system failure is caused. In addition, if the personnel first contact the monitoring equipment, the access bandwidth, the decoding performance and the like of the network video recorder are unfamiliar, the performance exceeds the standard possibly, and a stable and reliable security monitoring system cannot be formed.
Disclosure of Invention
The application provides a method, a system and a storage medium for automatically adding a network camera, which can realize that a plurality of network hard disk video recorders automatically add the network camera.
In order to solve the technical problem, the technical scheme adopted by the application is as follows: a method for automatically adding a network camera is provided, the method is applied to a device access system, the device access system comprises the network camera and a plurality of network hard disk video recorders, the method comprises the following steps: selecting one network hard disk video recorder from a plurality of network hard disk video recorders to be set as a host, and setting other network hard disk video recorders as slaves; acquiring response information from the network camera and the slave machine by using the host machine; generating a pairing table by using the host computer based on the response information, wherein the pairing table comprises the pairing relation between the network camera and the network video recorder; and sending the allocation table to the slave machine by using the host machine so that the network hard disk video recorder adds the corresponding network camera.
In order to solve the above technical problem, another technical solution adopted by the present application is: the equipment access system comprises a network camera and a plurality of network hard disk video recorders, wherein the network hard disk video recorders are used for selecting one network hard disk video recorder from the plurality of network hard disk video recorders to be set as a host, and other network hard disk video recorders are set as slaves; the host is used for acquiring response information from the network camera and the slave; generating a pairing table based on the response information, wherein the pairing table comprises the pairing relation between the network camera and the network video recorder; and issuing the allocation table to the slave machine so that the network hard disk video recorder adds the corresponding network camera.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided a computer-readable storage medium for storing a computer program, which, when executed by a processor, is used to implement the method for automatically adding a webcam in the above technical solution.
Through the scheme, the beneficial effects of the application are that: firstly, selecting one network hard disk video recorder from all network hard disk video recorders as a host, and using the rest network hard disk video recorders as slave machines; then the host collects information from all the slaves and the network camera; the host can generate the pairing relation between the network camera and the network hard disk video recorder by utilizing the collected response information to form a pairing table and send the pairing table to the slave, so that the slave and the host can add corresponding network cameras according to the pairing table, automatic addition of the network cameras under the condition that a plurality of network hard disk video recorders are arranged is realized, each network hard disk video recorder does not need to be operated independently to add the network cameras, resource distribution can be carried out by one network hard disk video recorder, the realization is simple, one network camera can only be added by one network hard disk video recorder, addition of some network cameras cannot be omitted, and the system stability is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts. Wherein:
fig. 1 is a schematic structural diagram of an embodiment of a device access system provided in the present application;
FIG. 2 is a schematic flow chart diagram illustrating an embodiment of a method for automatically adding a web camera provided in the present application;
FIG. 3 is a schematic flow chart diagram illustrating another embodiment of a method for automatically adding a web camera provided by the present application;
FIG. 4 is a schematic flow chart of step 304 in the embodiment shown in FIG. 3;
FIG. 5 is a schematic grouping diagram of the network camera and the network video recorder in the embodiment shown in FIG. 3;
FIG. 6 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Because prior art has only solved the problem that a network video recorder adds the network camera automatically, can't solve the coordinated resource between many network video recorders, the problem that this application will be solved is: when a plurality of network hard disk video recorders are arranged in the system, how to realize effective resource allocation, parameter adjustment and automatic equipment addition of all the network cameras in the local area network is realized, and the specific scheme is described below.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an embodiment of a device access system provided in the present application, where the device access system includes a network camera 11 and a plurality of network hard disk recorders (not shown).
The network hard disk video recorder is used for selecting one network hard disk video recorder from the plurality of network hard disk video recorders to be set as a host 121, and the other network hard disk video recorders are set as slaves 122; specifically, the network hard disk recorder may be connected to the network camera 11 through a router (not shown in the figure), and a button is provided on the network hard disk recorder, and when the user triggers the button, an election operation is performed to select one of all the network hard disk recorders as the host 121.
The master 121 is connected to the slave 122 and the network camera 11, and is configured to acquire response information from the network camera 11 and the slave 122; specifically, the master 121 may broadcast information to the slave 122 and the network camera 11 in the local area network where the slave 122 and the network camera 11 are located, so that the slave 122 and the network camera 11 feed back a response message to the master 121 after receiving the information.
After receiving response information fed back by the slave 122 and the network camera 11, the host 121 generates a pairing table based on the response information, wherein the pairing table includes a pairing relationship between the network camera 11 and the network hard disk video recorder; the master 121 issues an allocation table to the slave 122, so that the network hard disk recorder adds the corresponding network camera 11; specifically, the master 121 and the slave 122 can find information of the network camera 11 connected thereto from the pairing table, thereby adding the corresponding network camera 11.
The equipment access system of the embodiment can be a video monitoring system, the pairing relationship between all network hard disk video recorders and network cameras in a local area network where the network hard disk video recorders are located can be established by one network hard disk video recorder, the host can issue an automatic adding task to the host and the slave, the automatic adding of the network cameras is completed by the host and the slave according to a pairing table, the operation of each network hard disk video recorder is not required to be independently performed, the unified management can be performed, and the operation of a user is facilitated.
Referring to fig. 2, fig. 2 is a schematic flowchart of an embodiment of a method for automatically adding a network camera according to the present application, where the method is applied to a device access system in the above embodiment, the device access system includes a network camera and a plurality of network hard disk recorders, and the method includes:
step 21: one network hard disk video recorder is selected from the network hard disk video recorders to be set as a host, and other network hard disk video recorders are set as slaves.
The user can trigger a button on a certain network video recorder in the equipment access system to start to select one network video recorder from all network video recorders as a host; if it is determined that one network hard disk recorder in the system is the master, the rest network hard disk recorders except the master are slaves.
Step 22: and acquiring response information from the network camera and the slave by using the host.
After the master in the system is selected, the master may send collection information to all slaves and the network cameras, where the collection information is used to identify that a receiving party (including the slaves and the network cameras) feeds back response information after receiving the collection information, where the response information includes information related to the slaves/the network cameras, such as: address, device type, serial number or device capabilities, etc.
Step 23: and generating a pairing table by the host computer based on the response information.
After receiving the response information sent by the slave and the network camera, the host can pair the network camera with the network video recorder to generate a pairing table, wherein the pairing table comprises the pairing relation between the network camera and the network video recorder; for example, the system comprises 3 network video recorders and 2 network video cameras, which are respectively marked as A1-A3 and B1-B2, the network video recorder A2 is a host, the number of idle channels of the network video recorder A1 is 5, the number of idle channels of the network video recorder A2 is 6, and the number of idle channels of the network video recorder A3 is 4, so that the host can establish the pairing relationship between the network video camera B1 and the network video recorder A2 and the pairing relationship between the network video camera B2 and the network video recorder A1 to form a pairing table.
Step 24: and sending the allocation table to the slave machine by using the host machine so that the network hard disk video recorder adds the corresponding network camera.
After the master generates the pairing table, the master can send the pairing table to the slave so that the slave and the master can add corresponding network cameras by using the pairing table; for example, the pairing table includes a plurality of pieces of pairing information, and assuming that a certain piece of pairing information is that the second channel of the network hard disk recorder C is paired with the network camera D, after receiving the pairing table, the network hard disk recorder C finds information in the pairing table that matches the second channel of the network hard disk recorder C by using its own name as an index value, and then adds the network camera D to its own second channel.
According to the method for automatically adding the network cameras, one network camera can be selected from all network hard disk video recorders to serve as a host, then the host collects information of all slave machines and the network cameras, the host can generate a pairing relation between the network cameras and the network hard disk video recorders by utilizing the collected information to form a pairing table, and the established pairing table is issued to the slave machines, so that the slave machines and the host machine can add corresponding network cameras according to the pairing table, and the network cameras can be automatically added by the multiple network hard disk video recorders; because the resource can be distributed by a certain network video recorder, the resource coordination among a plurality of network video recorders can be solved, one network video camera can only be added by one network video recorder, and certain network video cameras cannot be omitted, thereby being beneficial to improving the stability of the system.
Referring to fig. 3, fig. 3 is a schematic flowchart of another embodiment of a method for automatically adding a network camera according to the present application, where the method is applied to a device access system in the above embodiment, the device access system includes a network camera and a plurality of network hard disk recorders, and the method includes:
step 301: initializing all network hard disk video recorders to enable the state of the network hard disk video recorders to be a first state.
The initial state of all network hard disk video recorders is the first state, and a user can manually operate a switch on the network hard disk video recorder to generate an automatic adding instruction to initiate a pairing process.
Step 302: and taking the network video recorder which receives the automatic adding instruction as election initiating equipment, and setting the state of the election initiating equipment to be a second state.
The network hard disk recorder initiating the pairing process may be recorded as an election initiating device, which may set its own state to the second state.
Step 303: and broadcasting the search packet within the preset time by using the election initiating equipment, so that the network camera and the network hard disk video recorder send response information to the election initiating equipment after receiving the search packet.
A time window period (namely preset time) can be set, and the network video recorder in the second state can periodically broadcast/multicast a search packet for searching within the preset time to acquire all equipment information in the local area network where the network video recorder is located; specifically, if a network hard disk video recorder in a second state exists in the system, the network hard disk video recorder is election initiating equipment and is a host; if the system has two or more network hard disk recorders in the second state, the network hard disk recorders in the second state are arranged besides the election initiating device.
Further, the response information comprises equipment attribute information and resource capability information, the equipment attribute information comprises an equipment address, an equipment type or a serial number of equipment, the equipment address comprises an address of the network camera and an address of the network hard disk video recorder, the equipment type comprises the network camera, the network hard disk video recorder or a ball machine, and the serial number of the equipment comprises the serial number of the network camera and the serial number of the network hard disk video recorder; the resource capacity information comprises first resource capacity information corresponding to the slave and second resource capacity information corresponding to the network camera, the first resource capacity information comprises a decoding resolution capacity set, a support path number corresponding to the decoding resolution capacity set, a maximum access bandwidth, a maximum access path number or added network camera information, the second resource capacity information comprises a current resolution, a current code stream, a resolution capacity set and a code stream range, the resolution capacity set comprises at least one resolution, and the code stream range comprises at least one code stream value.
After receiving the search packet, the network video recorder in the first state changes the state of the network video recorder from the first state to a third state, and sends a response message to the election initiating device; after receiving the search packet, the network hard disk recorder in the second state determines whether to send a response message to the election initiating device based on the sequence number of the network hard disk recorder and the sequence number of the election initiating device, and a specific scheme will be described below.
Step 304: and recording the network hard disk video recorder in the second state as a candidate host, and selecting the host based on the number of the candidate hosts and the serial number of the candidate hosts.
In order to select a host in the case of two or more candidate hosts, the steps shown in fig. 4 may be adopted, which specifically include:
step 3041: and judging whether the number of the candidate hosts is greater than a preset number.
In order to select one network hard disk video recorder from all network hard disk video recorders as a host, the preset number can be 1, that is, whether the number of candidate hosts is greater than 1 is judged.
Step 3042: and if the number of the candidate hosts is larger than the preset number, selecting the candidate host with the minimum serial number from all the candidate hosts as the host.
The candidate host that receives the search packet may be referred to as a current candidate host, and the current candidate host may determine whether the serial number of the current candidate host is smaller than the serial number of the candidate host (referred to as a sender) that broadcasts the search packet; if the serial number of the current candidate host is smaller than that of the sender, modifying the state of the current candidate host into a third state, and stopping broadcasting the search packet; if the serial number of the current candidate host is greater than or equal to the serial number of the sender, the current candidate host continues to broadcast the search packet; and repeating the steps until the number of the candidate hosts is the preset number. When the network hard disk video recorder in the second state is detected to exist, comparing the serial numbers, modifying the state of the network hard disk video recorder with the smaller serial number into a third state, and stopping broadcasting/multicasting the search packet within the preset time; and the network hard disk video recorder with the larger serial number continues to broadcast/multicast the search packet to search and receive response information until only one network hard disk video recorder with the second state exists in the local area network, the searched equipment state is in the third state, the network hard disk video recorder in the second state is recorded as a host, and the network hard disk video recorder in the third state is recorded as a slave.
It is to be understood that the candidate host with the largest sequence number in all candidate hosts may be selected as the host, or the candidate host with the largest remaining idle channels in all candidate hosts may be selected as the host, or the host may be selected according to other reasonable rules.
Step 3043: and if the number of the candidate hosts is less than or equal to the preset number, taking the election initiating device as the host.
If the number of the current candidate hosts is only one, the fact that only one network hard disk video recorder in the second state exists in the system is indicated, and the network hard disk video recorder serves as the host at the moment.
The pairing relationship and the adding strategy can be formulated according to the equipment system resources and the capabilities of the network video recorder (including the host and the slave) and the network video camera, and the formulation principle of the pairing relationship is as follows: 1) one network camera can only be added by one network hard disk video recorder, and can only be added once and cannot be repeated; 2) the network video recorder is preferentially allocated to the network video recorder with the resolution and the code stream size matched with the network video recorder, so that after the network video recorder is accessed, the network video recorder can normally display the video matched with the resolution of the network video recorder, and the code stream size does not exceed the maximum access bandwidth of the network video recorder; 3) if the current resolution or the current code stream size of the network camera cannot be matched with the access performance and the decoding performance of the network hard disk video recorder, switching and adjusting are carried out according to the resolution capability set and the code stream range of the network camera, and the performance matching of the two is achieved; 4) when the number of accessible paths of all the network video recorders is inconsistent with the total number of the network cameras, recording the information of idle accessible channels or unassigned network cameras of the network video recorders; specific schemes will be described below.
Step 305: and judging whether the current resolution of the current network camera is contained in the decoding resolution capability set of the current network hard disk video recorder.
Whether the current resolution of the current network camera is the same as one value in the decoding resolution capability set of the current network hard disk video recorder or not can be judged.
Step 306: and if the current resolution of the current network camera is contained in the decoding resolution capability set of the current network video recorder, establishing the pairing relationship between the current network camera and the current network video recorder, and storing the pairing relationship in a pairing table.
If the decoding resolution capability set of the current network video recorder comprises the current resolution of the current network video recorder, the current resolution of the current network video recorder is the same as the decoding capability of the current network video recorder, and at the moment, the host establishes the pairing relationship between the current network video recorder and stores the pairing relationship.
Further, whether a pairing relation between the current network camera and the current network hard disk video recorder is established or not can be determined according to the number of the support paths of the network cameras; for example, assuming that the network video recorders are denoted by H1 and H2, and the number of the supported paths thereof is 16 and 8, respectively, when pairing is performed, the network video cameras H1 and 16 network video cameras may be paired, and the network video cameras H2 and 8 network video cameras may be paired, that is, the network video cameras H1 and H2 are allocated according to the ratio of the number of the supported paths.
Step 307: and if the current resolution of the current network video camera is not contained in the decoding resolution capability set of the current network video recorder, selecting other network video recorders as the current network video recorder.
And if the decoding resolution capability set of the current network hard disk video recorder does not contain the current resolution of the current network camera, selecting other network hard disk video recorders to perform matching judgment, namely selecting other network hard disk video recorders as the current network hard disk video recorder, and then returning to execute the step 305 until all network hard disk videos are traversed or the decoding resolution capability set of the current network hard disk video recorder contains the current resolution of the current network camera.
If the decoding resolution capability sets of all the network hard disk video recorders are found to not contain the current resolution of the current network camera after traversing all the network hard disk video recorders, namely when the current resolution of the current network camera is different from the resolution in the decoding resolution capability sets of all the network hard disk video recorders, the current resolution can be adjusted based on the resolution capability set of the current network camera.
Further, the decoding resolution capability set comprises the maximum decoding resolution, and whether the network hard disk video recorder with an idle channel exists is judged; if the network hard disk video recorder with the idle channel exists, recording the network hard disk video recorder with the idle channel as a network hard disk video recorder to be selected, selecting the network hard disk video recorder to be selected with the smallest difference value between the maximum decoding resolution and the current resolution in all the network hard disk video recorders to be selected as the network hard disk video recorder matched with the current network camera, recording the maximum decoding resolution of the network hard disk video recorder matched with the current network camera as a preset resolution, adjusting the current resolution to the preset resolution, and generating resource adjustment information.
For example, the resolution capability set includes 3 resolutions: {480P, 720P, 1080P }, the stream range includes 2 stream sizes: {512Kbps, 1024Kbps }, assuming that the current set of decoding resolution of the network video recorder is 1080P, the current maximum access bandwidth of the network camera is 720Kbps, the current resolution is 1080P, and the current code stream is 1024Kbps, the host can adjust the current resolution of the current network camera to 720P to generate resource adjustment information.
In an embodiment, when selecting a network hard disk recorder paired with a current network camera, a resolution matching policy and a code stream adjustment policy may be adopted as follows:
1) resolution matching strategy
a. Performing hierarchical division according to the maximum decoding resolutions of all the network hard disk recorders, and dividing all the network hard disk recorders into at least one group, for example, as shown in fig. 5, dividing all the network hard disk recorders into an X group and a Z group, wherein the X group comprises { NVR1, NVR1}, the maximum decoding resolution of the X group is 4K, the Z group comprises { NVR2, NVR4}, and the maximum decoding resolution of the Z group is 1080P; it is to be understood that there may be one or more packets depending on the maximum decoding capability, and that the packets may be grouped according to the needs of a particular application.
b. All the webcams are divided into a plurality of groups according to the maximum decodable resolution of the webcam, for example, as shown in fig. 5, all the webcams are divided into three groups with the boundaries of 4K and 1080P: group a, group B and group C.
c. Preferentially processing the packets with the lowest resolution, taking fig. 5 as an example, the network cameras in the group C are allocated to the network hard disk recorders in the group Z, and if the number of all the network cameras in the group C is more than the sum of the channels of all the network hard disk recorders in the group Z, the network cameras in the group C are added to the group X; if the number of all the network cameras in the group C is smaller than the sum of the channels of all the network hard disk video recorders in the group Z, recording the information of the network hard disk video recorders with idle channels in the group Z, and when the number of the channels in the group X is not enough to be used by the network cameras in the group A or the group B, using the idle channels in the group Z as the paired equipment after the resolution of the network cameras in the group A or the group B is reduced.
d. C, sequentially distributing the network hard disk video recorders upwards according to the sequence of the maximum decodable resolution, taking fig. 5 as an example, for the network hard disk video recorders of the X group, firstly adding redundant network cameras of the C group which are not added by the Z group and network cameras of the B group, if the channels of the network hard disk video recorders of the X group have residues, reducing the current resolution of the network cameras of the A group to 4K, and establishing a pairing relation with the residual idle channels of the network hard disk video recorders of the X group; if the network video cameras in the group A are not added by the network hard disk video recorder, whether the network hard disk video recorder with the maximum decodable resolution higher than that of the group X still exists is firstly confirmed, if yes, distribution is carried out according to the step c, if no network hard disk video recorder with the higher decoding specification exists, whether a residual idle channel exists in the group Z is downwards confirmed, and if yes, the current resolution of the network video cameras in the group A is reduced to 1080P to be added into the group Z.
In summary, the current resolutions of the network cameras are allocated from bottom to top, the network cameras that are added out determine whether there are any remaining free channels according to the top to bottom order, and if so, the current resolutions are reduced for allocation.
2) Code stream adjustment strategy
Acquiring the sum of the current code streams of all the network cameras and recording the sum as the sum of the code streams; then judging whether the sum of the code streams is larger than the sum of the maximum access bandwidths of all the network video recorders or not; and if the sum of the code streams is larger than the sum of the maximum access bandwidths of all the network video recorders, adjusting the current code stream of each network video recorder.
Further, the product of the sum of the current code stream of the current network camera and the maximum access bandwidth can be calculated and recorded as a first product; calculating the product of the current total bandwidth and a preset redundancy coefficient, recording the product as a first product, wherein the preset redundancy coefficient is used for ensuring the stability of the system and can be set according to an empirical value; judging whether the ratio of the first product to the first product is larger than the minimum value of the code stream range of the current network camera; if the ratio of the first product to the first product is larger than the minimum value of the code stream range of the current network camera, taking the minimum value of the code stream range of the current network camera as a preset code stream, and adding the preset code stream into the resource adjustment information; and if the ratio of the first product to the first product is smaller than or equal to the minimum value of the code stream range of the current network camera, taking the ratio of the first product to the first product as a preset code stream, and adding the preset code stream into the resource adjustment information.
In another specific embodiment, the encoding configuration parameters include a current code stream and a current resolution, and the encoding information includes a maximum access path number and a maximum access bandwidth; whether the network hard disk video recorder with the same encoding configuration parameters as the current network video recorder exists in the encoding information of all the network hard disk video recorders can be judged; if the coding information of all the network video recorders contains the network video recorder with the same coding configuration parameters as the current network camera, selecting the network video recorder with the most idle channels, the minimum serial number or the maximum serial number as the network video recorder matched with the current network camera, and establishing the pairing relation between the current network camera and the network video recorder; if the network hard disk video recorders which are the same as the encoding configuration parameters of the current network camera do not exist in the encoding information of all the network hard disk video recorders, determining the corresponding network hard disk video recorders to be matched currently based on the resolution capability set and the code stream range of the current network camera, selecting the network hard disk video recorder which has the smallest difference value with the encoding configuration parameters of the current network camera and is within the capability range of the network hard disk video recorder as the network hard disk video recorder matched with the current network camera, namely, taking the resolution which is smaller than or equal to the maximum decoding resolution of the current network hard disk video recorder in the resolution capability set of the current network camera and has the smallest difference value with the maximum decoding resolution of the current network hard disk video recorder as the preset resolution, and generating resource adjustment; and taking a code stream which is smaller than or equal to the maximum access bandwidth of the current network video recorder and has the minimum difference value with the maximum access bandwidth of the current network video recorder in the code stream range of the current network video camera as a preset code stream, and adding the preset code stream into resource adjustment information, wherein the resource adjustment information comprises the adjustment of the current resolution of the current network video camera to a preset resolution and/or the adjustment of the current code stream of the current network video camera to the preset code stream.
Step 308: and the host sends the pairing table to the network video recorder, so that the network video recorder executes an automatic adding task based on the pairing table to complete the addition of the corresponding network camera.
After the master generates the pairing table, the master can transmit the pairing table to the slave so as to enable the master and the slave to add the network camera matched with the master and the slave by using the pairing table; specifically, the network hard disk video recorder comprises a plurality of channels to be connected with the network video camera; the host can judge whether the sum of the maximum access paths of all the network video recorders is the same as the number of all the network cameras; if the sum of the maximum access ways of all the network hard disk video recorders is different from the number of all the network cameras, it is indicated that at least one network hard disk video recorder has a remaining idle channel, or at least one network camera cannot be added by the network hard disk video recorder.
Step 309: when the resource adjustment information exists, the host sends the resource adjustment information to the network video recorder corresponding to the resource adjustment information, so that the network video recorder corresponding to the resource adjustment information adjusts the coding configuration parameters of the paired network video cameras.
If the host computer adjusts the encoding configuration parameters of the network cameras, namely resource adjustment information is generated, the host computer or the slave computer can adjust the current resolution and the current code stream of the network cameras matched with the host computer or the slave computer according to whether the resource adjustment information is carried.
Step 310: after the automatic adding task is completed, the host and the slave machine send the adding adjustment information to the host; and the master machine counts the adding adjustment information sent by all the slave machines to generate a statistical table.
The adding adjustment information comprises the state of the added network camera and adjustment record information, the adjustment record information comprises record information generated by adjusting the current resolution and the current code stream of the network camera, namely after the host and the slave complete the automatic adding task, the online state of the added network camera and the record of the resolution and code stream adjustment corresponding to the online state are returned to the host.
The host machine combines the adding adjustment information reported by the slave machine and the adding adjustment information generated by the host machine to generate a statistical table, and can output the statistical table for a user to look up, wherein the statistical table comprises the information of the network cameras added by each network hard disk video recorder, the information of the rest idle channels or the unallocated network cameras of all the network hard disk video recorders, and the information of the network cameras comprises the addresses of the network cameras, the serial numbers of the network cameras, the state information of successful/failed adding or the adjustment record information. After the statistical table is generated, the host and the slave modify the state of the host and the slave into the first state, namely, restore to the initial state.
In the embodiment, the search packet is periodically broadcast/multicast by setting preset time, the equipment in the local area network where the search packet is located is checked and the state of the equipment is confirmed, and when a plurality of network hard disk video recorders in a second state exist in the local area network, the conflict is solved by comparing the serial numbers, so that only one host computer exists in the local area network; in the whole process, the deployment of the whole set of monitoring system can be completed only by initiating an automatic adding instruction on one network hard disk video recorder, namely, the addition of all network hard disk video recorders and network cameras in the local area network where the network hard disk video recorder is located can be initiated on one network hard disk video recorder; the resources can be automatically matched, and under the condition that the equipment performance and the system resources between the network video recorder and the network camera cannot be matched, the coding configuration parameters of the network camera can be adjusted, so that the whole monitoring system can stably run, and the original manual calculation and distribution of resource distribution and system optimization are changed into automatic matching according to the equipment resources and the performance; and a log report is formed by adjusting the coding configuration parameters of the automatic adding task and the network camera, so that the later-stage checking and operation and maintenance are facilitated.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an embodiment of a computer-readable storage medium 60 provided in the present application, where the computer-readable storage medium 61 is used for storing a computer program 61, and when the computer program 61 is executed by a processor, the computer program is used for implementing the method for automatically adding a webcam in the foregoing embodiment.
The computer-readable storage medium 60 may be a server, a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various media capable of storing program codes.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of modules or units is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings, or which are directly or indirectly applied to other related technical fields, are intended to be included within the scope of the present application.

Claims (17)

1. A method for automatically adding a network camera is characterized by being applied to a device access system, wherein the device access system comprises the network camera and a plurality of network video recorders, and the method comprises the following steps:
selecting one network hard disk video recorder from the plurality of network hard disk video recorders to be set as a host, and setting other network hard disk video recorders as slaves;
acquiring response information from the network camera and the slave machine by using the host machine;
generating a pairing table by the host computer based on the response information, wherein the pairing table comprises the pairing relation between the network camera and the network video recorder;
and issuing the pairing table to the slave machine by using the host machine so that the network video recorder adds the corresponding network camera.
2. The method for automatically adding network cameras as claimed in claim 1, wherein the step of selecting one network hard disk video recorder from the plurality of network hard disk video recorders as a master and other network hard disk video recorders as slaves comprises:
initializing all the network hard disk video recorders to enable the state of the network hard disk video recorders to be a first state;
taking the network video recorder receiving the automatic adding instruction as election initiating equipment;
setting the state of the election initiating device to a second state;
broadcasting a search packet within a preset time by using the election initiating equipment so that the network camera and the network video recorder send the response information to the election initiating equipment after receiving the search packet;
recording the network hard disk video recorder in the second state as a candidate host, and selecting the host based on the number of the candidate hosts and the serial number of the candidate hosts.
3. The method according to claim 2, wherein the step of selecting the host based on the number of the candidate hosts and the serial number of the candidate host comprises:
judging whether the number of the candidate hosts is larger than a preset number or not;
if so, selecting the candidate host with the minimum serial number from all the candidate hosts as the host;
and if not, taking the election initiating device as the host.
4. The method according to claim 3, wherein the step of selecting the candidate host with the smallest serial number from all the candidate hosts as the host comprises:
recording the candidate host which receives the search packet as a current candidate host;
the current candidate host judges whether the serial number of the current candidate host is smaller than the serial number of the candidate host broadcasting the search packet;
if so, modifying the state of the current candidate host to a third state, and stopping broadcasting the search packet;
if not, continuing to broadcast the search packet;
and repeating the steps until the number of the candidate hosts is the preset number.
5. The method of claim 2, wherein the step of sending the response message to the election initiating device after the network hard disk recorder receives the search packet comprises:
and after receiving the search packet, the network video recorder in the first state modifies the first state into a third state and sends the response message to the election initiating device.
6. The method of automatically adding a network camera according to claim 1,
the response information includes device attribute information and resource capability information, the device attribute information includes a device address, a device type or a device serial number, the resource capability information includes first resource capability information corresponding to the slave and second resource capability information corresponding to the network camera, the first resource capability information includes a decoding resolution capability set, a number of support paths corresponding to the decoding resolution capability set, a maximum access bandwidth, a maximum access path number or added network camera information, and the second resource capability information includes a current resolution, a current code stream, a resolution capability set and a code stream range.
7. The method of claim 6, wherein the step of generating a pairing table based on the response information by the host computer comprises:
judging whether the current resolution of the current network camera is contained in the decoding resolution capability set of the current network video recorder;
if so, establishing a pairing relationship between the current network camera and the current network hard disk video recorder, and storing the pairing relationship in the pairing table;
if not, selecting other network hard disk video recorders as the current network hard disk video recorder, and returning to the step of judging whether the current resolution of the current network camera is contained in the decoding resolution capability set of the current network hard disk video recorder or not until all the network hard disk videos are traversed or the current resolution of the current network camera is contained in the decoding resolution capability set of the current network hard disk video recorder.
8. The method of automatically adding a web camera according to claim 7, further comprising:
and determining whether to establish a pairing relationship between the current network camera and the current network hard disk video recorder according to the number of the support paths of the network cameras.
9. The method of automatically adding a web camera according to claim 7, further comprising:
and when the decoding resolution capability sets of all the network hard disk video recorders do not contain the current resolution of the current network camera, adjusting the current resolution based on the resolution capability set of the current network camera.
10. The method of claim 9, wherein the decoding resolution capability set comprises a maximum decoding resolution, and wherein adjusting the current resolution based on the resolution capability set of the current webcam comprises:
judging whether a network hard disk video recorder with an idle channel exists or not;
if so, recording the network hard disk video recorder with the idle channel as a network hard disk video recorder to be selected, selecting the network hard disk video recorder to be selected with the smallest difference value between the maximum decoding resolution and the current resolution in all the network hard disk video recorders to be selected as the network hard disk video recorder matched with the current network camera, recording the maximum decoding resolution of the network hard disk video recorder matched with the current network camera as a preset resolution, adjusting the current resolution to the preset resolution, and generating resource adjustment information.
11. The method of automatically adding a web camera according to claim 10, further comprising:
acquiring the sum of the current code streams of all the network cameras, and recording the sum as the sum of the code streams;
judging whether the sum of the code streams is larger than the sum of the maximum access bandwidths of all the network video recorders or not;
and if so, adjusting the current code stream of each network camera.
12. The method according to claim 11, wherein the step of adjusting the current code stream of each of the webcams comprises:
calculating the product of the current code stream of the current network camera and the sum of the maximum access bandwidth, and recording the product as a first product;
calculating the product of the current total bandwidth and a preset redundancy coefficient, and recording the product as a first product;
judging whether the ratio of the first product to the first product is larger than the minimum value of the code stream range of the current network camera;
if so, taking the minimum value of the code stream range of the current network camera as a preset code stream, and adding the preset code stream into the resource adjustment information;
if not, taking the ratio of the first product to the first product as the preset code stream, and adding the preset code stream to the resource adjustment information;
the resource adjustment information comprises adjusting the current resolution of the current network camera to the preset resolution and/or adjusting the current code stream of the current network camera to the preset code stream.
13. The method of automatically adding a web camera according to claim 10, further comprising:
the host sends the pairing table to the network video recorder so that the network video recorder executes an automatic adding task based on the pairing table to complete adding of the corresponding network camera;
and when the resource adjusting information exists, the host sends the resource adjusting information to the network video recorder corresponding to the resource adjusting information, so that the network video recorder corresponding to the resource adjusting information adjusts the coding configuration parameters of the paired network video cameras.
14. The method of automatically adding a network camera according to claim 1, wherein the network hard disk recorder includes a plurality of channels to connect with the network camera, the method further comprising:
the host judges whether the sum of the maximum access paths of all the network video recorders is the same as the number of all the network cameras;
if not, the host records the number of the remaining idle channels of the network video recorder or the information of the network video cameras which are not allocated.
15. The method of automatically adding a web camera according to claim 14, further comprising:
after the automatic adding task is completed, the host and the slave machine send adding adjustment information to the host; adding adjustment information into the network camera, wherein the added adjustment information comprises the state of the added network camera and adjustment record information, and the adjustment record information comprises record information generated by adjusting the current resolution and the current code stream of the network camera;
the master machine counts the adding adjustment information sent by all the slave machines to generate a statistical table; the statistical table comprises the information of the network cameras added by each network video recorder, the information of the rest idle channels or the unallocated network cameras of all the network video recorders, and the information of the network cameras comprises the addresses of the network cameras, the serial numbers of the network cameras, the state information of successful/failed addition or the adjustment record information;
and after the statistical table is generated, the host and the slave modify the states of the host and the slave into a first state.
16. An equipment access system is characterized by comprising a network camera and a plurality of network hard disk video recorders, wherein the network hard disk video recorders are used for selecting one network hard disk video recorder from the plurality of network hard disk video recorders to be set as a host, and other network hard disk video recorders are set as slaves; the master machine is used for acquiring response information from the slave machine and the network camera; generating a pairing table based on the response information, wherein the pairing table comprises the pairing relation between the network camera and the network hard disk video recorder; and issuing the pairing table to the slave machine so that the network hard disk video recorder adds the corresponding network camera.
17. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, is configured to implement the method of automatically adding a webcam according to any one of claims 1 to 15.
CN202110068424.1A 2021-01-19 2021-01-19 Method, system and storage medium for automatically adding network camera Active CN112911226B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110068424.1A CN112911226B (en) 2021-01-19 2021-01-19 Method, system and storage medium for automatically adding network camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110068424.1A CN112911226B (en) 2021-01-19 2021-01-19 Method, system and storage medium for automatically adding network camera

Publications (2)

Publication Number Publication Date
CN112911226A true CN112911226A (en) 2021-06-04
CN112911226B CN112911226B (en) 2023-04-25

Family

ID=76115490

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110068424.1A Active CN112911226B (en) 2021-01-19 2021-01-19 Method, system and storage medium for automatically adding network camera

Country Status (1)

Country Link
CN (1) CN112911226B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102882989A (en) * 2012-09-05 2013-01-16 浙江宇视科技有限公司 Method and device for distributing internet protocol (IP) address to multi-network video recorder (NVR) by monitoring network
CN103260011A (en) * 2013-05-16 2013-08-21 杭州巨峰科技有限公司 System and method for achieving monitoring of more paths by utilization of net-harddisk video recorder
EP2819407A1 (en) * 2013-06-27 2014-12-31 Idis Co., Ltd. System for automatic connection between NVR and IP camera
CN104506807A (en) * 2014-12-24 2015-04-08 浙江宇视科技有限公司 Equipment automatic configuration method in wide area network video monitoring system
CN105959644A (en) * 2016-06-21 2016-09-21 浙江宇视科技有限公司 Method and device for configuration of video monitoring equipment
CN106231225A (en) * 2016-09-14 2016-12-14 深圳市泛海三江科技发展有限公司 A kind of network hard disk video recorder data processing method and system
CN106603985A (en) * 2016-12-27 2017-04-26 天津天地伟业信息系统集成有限公司 N+M hot standby method for embedded network hard disk video recorder
CN107018360A (en) * 2017-03-24 2017-08-04 浙江大华技术股份有限公司 A kind of IPC adding method, apparatus and system
CN107295315A (en) * 2017-08-15 2017-10-24 深圳市天视通电子科技有限公司 A kind of Network Personal Video Recorder system and its implementation
CN108600675A (en) * 2018-05-24 2018-09-28 普联技术有限公司 Channel way extended method, equipment, Network Personal Video Recorder and storage medium
CN108683701A (en) * 2018-04-03 2018-10-19 浙江大华技术股份有限公司 A kind of connection method and rear end equipment, IPC
CN110213549A (en) * 2019-07-03 2019-09-06 成都汇纳智能科技有限公司 A kind of plug-flow method and system based on libRTMP
CN111162926A (en) * 2018-11-08 2020-05-15 浙江宇视科技有限公司 User demand-oriented equipment management method and device

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102882989A (en) * 2012-09-05 2013-01-16 浙江宇视科技有限公司 Method and device for distributing internet protocol (IP) address to multi-network video recorder (NVR) by monitoring network
CN103260011A (en) * 2013-05-16 2013-08-21 杭州巨峰科技有限公司 System and method for achieving monitoring of more paths by utilization of net-harddisk video recorder
EP2819407A1 (en) * 2013-06-27 2014-12-31 Idis Co., Ltd. System for automatic connection between NVR and IP camera
CN104506807A (en) * 2014-12-24 2015-04-08 浙江宇视科技有限公司 Equipment automatic configuration method in wide area network video monitoring system
CN105959644A (en) * 2016-06-21 2016-09-21 浙江宇视科技有限公司 Method and device for configuration of video monitoring equipment
CN106231225A (en) * 2016-09-14 2016-12-14 深圳市泛海三江科技发展有限公司 A kind of network hard disk video recorder data processing method and system
CN106603985A (en) * 2016-12-27 2017-04-26 天津天地伟业信息系统集成有限公司 N+M hot standby method for embedded network hard disk video recorder
CN107018360A (en) * 2017-03-24 2017-08-04 浙江大华技术股份有限公司 A kind of IPC adding method, apparatus and system
CN107295315A (en) * 2017-08-15 2017-10-24 深圳市天视通电子科技有限公司 A kind of Network Personal Video Recorder system and its implementation
CN108683701A (en) * 2018-04-03 2018-10-19 浙江大华技术股份有限公司 A kind of connection method and rear end equipment, IPC
CN108600675A (en) * 2018-05-24 2018-09-28 普联技术有限公司 Channel way extended method, equipment, Network Personal Video Recorder and storage medium
CN111162926A (en) * 2018-11-08 2020-05-15 浙江宇视科技有限公司 User demand-oriented equipment management method and device
CN110213549A (en) * 2019-07-03 2019-09-06 成都汇纳智能科技有限公司 A kind of plug-flow method and system based on libRTMP

Also Published As

Publication number Publication date
CN112911226B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
US9226032B2 (en) System for managing media content for a personal television channel
CN1767636B (en) Content distribution method, program, and information processing apparatus
CA2883262C (en) Situation-dependent dynamic bit rate encoding and distribution of content
JP5295353B2 (en) IPTV network having a D server controller, a VoD server controller, and a policy server implementing a diagnostic tool
US20040010588A1 (en) Serving out video over a network of video servers
US8427943B2 (en) Bandwidth-aware multicast load balancing on a multi-interface host
CN109672856B (en) Resource synchronization method and device
US20140165119A1 (en) Offline download method, multimedia file download method and system thereof
US20090240811A1 (en) Resource management method, system and network equipment
EP3172864A1 (en) Management of heterogeneous client device groups
US8365007B2 (en) System for controlling the state of a switched digital video system and method therefor
WO2011026370A1 (en) Method, device for running internet protocol television service system, and internet protocol television service system
EP3507951A1 (en) Bandwidth management in a non-blocking network fabric
CN109951723B (en) Method, device and storage medium for adjusting root node in peer-to-peer network live broadcast system
CN113489601B (en) Anti-destruction method and device based on autonomous cloud network architecture of video networking
CN114189705A (en) Live broadcast card pause processing method and system
US20090100188A1 (en) Method and system for cluster-wide predictive and selective caching in scalable iptv systems
CN112911226B (en) Method, system and storage medium for automatically adding network camera
CN111131788B (en) Monitoring resource state detection method and device and computer readable storage medium
CN110557273A (en) Terminal state warning method and device
US8036141B2 (en) Apparatus and method for managing a network
CN109787870B (en) Access management method, device, system, initial and target access equipment
CN105892964A (en) Block configuration method, block display method, server, terminal equipment and communication system
EP4106334A1 (en) Service monitoring method, apparatus and system
CN110830281B (en) Hot standby method and system based on mesh network structure

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant