CN110365936A - Code stream acquisition methods, apparatus and system - Google Patents

Code stream acquisition methods, apparatus and system Download PDF

Info

Publication number
CN110365936A
CN110365936A CN201810321682.4A CN201810321682A CN110365936A CN 110365936 A CN110365936 A CN 110365936A CN 201810321682 A CN201810321682 A CN 201810321682A CN 110365936 A CN110365936 A CN 110365936A
Authority
CN
China
Prior art keywords
node
monitoring
working
video
target 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
CN201810321682.4A
Other languages
Chinese (zh)
Other versions
CN110365936B (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Hangzhou Hikvision System Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201810321682.4A priority Critical patent/CN110365936B/en
Publication of CN110365936A publication Critical patent/CN110365936A/en
Application granted granted Critical
Publication of CN110365936B publication Critical patent/CN110365936B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/44227Monitoring of local network, e.g. connection or bandwidth variations; Detecting new devices in the local network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/4425Monitoring of client processing errors or hardware failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/647Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
    • H04N21/64723Monitoring of network processes or resources, e.g. monitoring of network load
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Closed-Circuit Television Systems (AREA)

Abstract

The invention discloses a kind of code stream acquisition methods, apparatus and system, belong to technical field of video monitoring.This method comprises: determining that the first working node is slave node, and after the corresponding target host node of determining first working node, the target video monitoring node group for needing to obtain video flowing with target host node, which is established, to be communicated to connect;Monitoring objective host node;When monitoring the failure of target host node in the first monitoring duration, video flowing is obtained from target video monitoring node group by communication connection, the first monitoring duration is less than management node and is used for the second monitoring duration whether monitoring objective host node breaks down.The present invention is in the first working node when detecting the failure of target host node, video flowing is obtained from target video monitoring node group by communication connection, a large amount of identical redundant data can be stored by effectively avoiding in video frequency monitoring system, and is avoided slave node and increased additional network overhead.

Description

Code stream acquisition methods, apparatus and system
Technical field
The present invention relates to technical field of video monitoring, in particular to a kind of code stream acquisition methods, apparatus and system.
Background technique
Video frequency monitoring system is important component in security system, can be realized the real time monitoring to multiple regions.It should Video frequency monitoring system may include: management node, working node and video surveillance node, which refers to that front end is taken the photograph As head or web camera etc. have the equipment of video monitoring function.The management node can be issued to working node takes stream to appoint Business, this takes stream task to be used to indicate the working node and obtains video flowing from video surveillance node, which is video surveillance Node is encoded collected video data.
Under normal conditions, in order to avoid the communication connection of the working node due to caused by suspension or power-off etc. is extremely caused Loss of data, need to be arranged spare working node, which is also required to obtain video from video surveillance node Stream, at this point, identical video flowing is stored in working node and spare working node, therefore, current video frequency monitoring system In would generally store a large amount of identical redundant data, also, the increase network overhead that spare working node can be additional.
Summary of the invention
This application provides a kind of code stream acquisition methods, apparatus and system, can solve existing spare working node meeting Additional increase network overhead problem.The technical solution is as follows:
In a first aspect, a kind of code stream acquisition methods are provided, applied to the first working node in video frequency monitoring system, institute Stating video frequency monitoring system includes: management node, multiple working nodes and at least one video surveillance node group, the multiple work Node includes first working node, which comprises
It is determining that first working node is slave node, and is determining the corresponding target host node of first working node Afterwards, the target video monitoring node group for needing to obtain video flowing with the target host node establishes communication connection;
Monitor the target host node;
When monitoring that the target host node breaks down in the first monitoring duration, communicated to connect by described from institute It states target video monitoring node group and obtains video flowing, the first monitoring duration is less than the management node for monitoring the mesh The the second monitoring duration whether mark host node breaks down.
Optionally, it is communicated to connect after target video monitoring node group acquisition video flowing described by described, The method also includes:
It is sent out when not receiving the management node in preset duration after monitoring that the target host node breaks down When the switching command sent, stop obtaining video flowing from the target video monitoring node group by the communication connection, it is described pre- If the duration that duration is greater than or equal to the second monitoring duration and the first monitoring duration is poor, the switching command is described What management node generated after monitoring that the target host node breaks down in the second monitoring duration, it is used to indicate described First working node replaces the target host node to obtain video flowing;
It is sent when receiving the management node in preset duration after monitoring that the target host node breaks down Switching command when, keep by it is described communication connection from the target video monitoring node group acquisition video flowing.
Optionally, it is established in the target video monitoring node group for needing to obtain video flowing with the target host node logical Before letter connection, the method also includes:
The instruction information that the management node is sent is received, the instruction information is for identifying in the video frequency monitoring system Host node, slave node and video surveillance node group corresponding relationship;
It determines that first working node is slave node based on the instruction information, and determines first working node pair The target host node answered.
Optionally, the multiple working node is sequentially connected from head to tail to form communication closed loop, and the instruction information includes chained list And mapping table, the chained list record have the mark and distributing order of each working node in the communication closed loop, institute Stating mapping table record has the mark of main working node and the corresponding relationship of video surveillance node group,
It is described to determine that first working node is slave node based on the instruction information, and determine the first work section The corresponding target host node of point, comprising:
The mark of the second working node in the mark inquiry chained list based on first working node, described second Working node is the working node of designated position that is adjacent with first working node and being located at first working node, institute State the position before or after designated position is first working node;
Mark based on second working node inquires the mapping table;
When record has the mark of second working node in the mapping table, second working node is determined For the target host node, and first working node is slave node.
Optionally, it is established in the target video monitoring node group for needing to obtain video flowing with the target host node logical Before letter connection, the method also includes:
Inquired in the mapping table video surveillance node group corresponding to the mark of second working node with Obtain the target video monitoring node group.
Optionally, the method also includes:
Continue to monitor the target host node in the preset duration after monitoring that the target host node breaks down;
The management section is not received in the preset duration when after monitoring that the target host node breaks down When the switching command that point is sent, stop obtaining video flowing, packet from the target video monitoring node group by the communication connection It includes:
It is sent out when not receiving the management node in preset duration after monitoring that the target host node breaks down The switching command sent, and when monitoring that the target host node restores normal in the preset duration, stopping passes through the communication Connection obtains video flowing from the target video monitoring node group;
The management node is received in the preset duration when after monitoring that the target host node breaks down When the switching command of transmission, keep obtaining video flowing from the target video monitoring node group by the communication connection, comprising:
It is sent when receiving the management node in preset duration after monitoring that the target host node breaks down Switching command, and monitored in the preset duration target host node still failure when, holding pass through the communication link It connects from the target video monitoring node group and obtains video flowing.
Optionally, the method also includes:
After monitoring that the target host node breaks down in the first monitoring duration, communicated with the foundation of third working node Connection, to form new communication closed loop, the third working node is adjacent with second working node and is located at described the The working node of the designated position of two working nodes;
Mark based on the third working node inquires the mapping table;
When record has the mark of the third working node in the mapping table, the third working node is determined For the new target host node of first working node, and first working node is slave node.
Optionally, it is described first monitoring duration be less than it is preset allow video data loss thresholding duration, described second It monitors duration and is greater than preset network fluctuation duration, the preset network fluctuation duration is greater than the preset permission video counts According to the thresholding duration of loss.
Second aspect provides a kind of code stream acquisition device, applied to the first working node in video frequency monitoring system, institute Stating video frequency monitoring system includes: management node, multiple working nodes and at least one video surveillance node group, the multiple work Node includes first working node, and described device includes:
Module is established in first communication connection, for determining that first working node is slave node, and determines described the After the corresponding target host node of one working node, need to obtain the target video monitoring node of video flowing with the target host node Group establishes communication connection;
First monitoring modular, for monitoring the target host node;
First obtains module, for leading to when monitoring that the target host node breaks down in the first monitoring duration It crosses the communication connection and obtains video flowing from the target video monitoring node group, the first monitoring duration is less than the management Node is used to monitor the second monitoring duration whether the target host node breaks down.
Optionally, described device further include:
Stop obtaining module, for not receiving when in preset duration after monitoring that the target host node breaks down When the switching command sent to the management node, stop obtaining by described communicate to connect from the target video monitoring node group Video flowing is taken, the duration that the preset duration is greater than or equal to the second monitoring duration and the first monitoring duration is poor, institute It is raw after the management node monitors that the target host node breaks down in the second monitoring duration for stating switching command At, first working node, which is used to indicate, instead of the target host node obtains video flowing;
Second obtains module, for receiving when in preset duration after monitoring that the target host node breaks down When the switching command that the management node is sent, keep obtaining by the communication connection from the target video monitoring node group Video flowing.
Optionally, described device further include:
Receiving module, the instruction information sent for receiving the management node, the instruction information are described for identifying The corresponding relationship of host node, slave node and video surveillance node group in video frequency monitoring system;
First determining module for determining that first working node is slave node based on the instruction information, and determines The corresponding target host node of first working node.
Optionally, the multiple working node is sequentially connected from head to tail to form communication closed loop, and the instruction information includes chained list And mapping table, the chained list record have the mark and distributing order of each working node in the communication closed loop, institute Stating mapping table record has the mark of main working node and the corresponding relationship of video surveillance node group,
First determining module, is also used to:
The mark of the second working node in the mark inquiry chained list based on first working node, described second Working node is the working node of designated position that is adjacent with first working node and being located at first working node, institute State the position before or after designated position is first working node;
Mark based on second working node inquires the mapping table;
When record has the mark of second working node in the mapping table, second working node is determined For the target host node, and first working node is slave node.
Optionally, described device further include:
First enquiry module, for being inquired in the mapping table corresponding to the mark of second working node Video surveillance node group is to obtain the target video monitoring node group.
Optionally, described device further include:
Second monitoring modular, for continuing to monitor in the preset duration after monitoring that the target host node breaks down The target host node;
The stopping obtains module, is also used to:
It is sent out when not receiving the management node in preset duration after monitoring that the target host node breaks down The switching command sent, and when monitoring that the target host node restores normal in the preset duration, stopping passes through the communication Connection obtains video flowing from the target video monitoring node group;
Described second obtains module, is also used to:
It is sent when receiving the management node in preset duration after monitoring that the target host node breaks down Switching command, and monitored in the preset duration target host node still failure when, holding pass through the communication link It connects from the target video monitoring node group and obtains video flowing.
Optionally, described device further include:
Module is established in second communication connection, after monitoring that the target host node breaks down in the first monitoring duration, It establishes and communicates to connect with third working node, to form new communication closed loop, the third working node is and second work Make node it is adjacent and be located at second working node designated position working node;
Second enquiry module inquires the mapping table for the mark based on the third working node;
Second determining module, for when in the mapping table record have the mark of the third working node when, really The fixed third working node is the new target host node of first working node, and first working node is standby section Point.
Optionally, it is described first monitoring duration be less than it is preset allow video data loss thresholding duration, described second It monitors duration and is greater than preset network fluctuation duration, the preset network fluctuation duration is greater than the preset permission video counts According to the thresholding duration of loss.
The third aspect provides a kind of video frequency monitoring system, comprising: management node, multiple working nodes and at least one Video surveillance node group, the multiple working node include the first working node, and first working node includes claim Code stream acquisition device described in first aspect.
Optionally, the management node is used to send instruction information to each working node, and the instruction information is for marking Know the corresponding relationship of host node in the video frequency monitoring system, slave node and video surveillance node group;
After the management node is also used to monitor that the target host node breaks down in the second monitoring duration, Switching command is generated, the switching command is used to indicate first working node and obtains video instead of the target host node Stream.
Technical solution provided in an embodiment of the present invention has the benefit that
Code stream acquisition methods provided in an embodiment of the present invention, apparatus and system determine that it is standby section in the first working node Point, and after the corresponding target host node of determining first working node, the first working node and the target host node need to obtain view The target video monitoring node group of frequency stream establishes communication connection, which is detecting the failure of target host node When, video flowing is obtained from target video monitoring node group by communication connection, effectively avoiding in video frequency monitoring system can deposit A large amount of identical redundant data is stored up, and avoids slave node and increases additional network overhead.Also, due to the first working node The the first monitoring duration whether to break down for monitoring objective host node is smaller, and management node is for monitoring objective host node Second monitoring duration of no failure is larger, therefore effectively prevents video frequency monitoring system and showing for video data loss occur As, while can be improved the stability of video frequency monitoring system.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is the structural representation of video frequency monitoring system involved in a kind of code stream acquisition methods provided in an embodiment of the present invention Figure;
Fig. 2 is a kind of flow chart of code stream acquisition methods provided in an embodiment of the present invention;
Fig. 3 is the flow chart of another code stream acquisition methods provided in an embodiment of the present invention;
Fig. 4 A is a kind of structural schematic diagram of video frequency monitoring system provided in an embodiment of the present invention;
Fig. 4 B is that a kind of connection of working node in addition to the target host node of failure provided in an embodiment of the present invention is closed It is schematic diagram;
Fig. 5 is the structural schematic diagram of another video frequency monitoring system provided in an embodiment of the present invention;
Fig. 6 is that the connection of another working node in addition to the target host node of failure provided in an embodiment of the present invention is closed It is schematic diagram;
Fig. 7 A is a kind of block diagram of code stream acquisition device provided in an embodiment of the present invention;
Fig. 7 B is the block diagram of another code stream acquisition device provided in an embodiment of the present invention;
Fig. 7 C is the block diagram of another code stream acquisition device provided in an embodiment of the present invention;
Fig. 7 D is the block diagram of another code stream acquisition device provided in an embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
Referring to FIG. 1, Fig. 1 is video frequency monitoring system involved in a kind of code stream acquisition methods provided in an embodiment of the present invention Structural schematic diagram, the video frequency monitoring system 10 may include: management node 101, multiple working nodes 102 and at least one view Frequency monitoring node group 103.
The management node 101 can be a server, the server cluster perhaps consisted of several servers or It is a cloud computing service center.Working node 102 can be a server, or the service consisted of several servers Device cluster or a cloud computing service center.Video surveillance node group 103 is made of at least one monitoring video camera Video camera set, each available video information of monitor camera, and the video information that will acquire is encoded to obtain video Stream, the video stream that each monitor camera can obtain coding is to a working node.
Management node 101 and the foundation of each working node 102 have a communication connection, working node 102 and need to obtain video The video monitoring node group 103 of stream establishes communication connection.It should be noted that so-called communication connection in the embodiment of the present invention, It can be the communication connection by cable network or wireless network foundation.
The embodiment of the invention provides a kind of code stream acquisition methods, referring to FIG. 2, Fig. 2 is provided in an embodiment of the present invention A kind of flow chart of code stream acquisition methods, this method are applied to the first working node in video frequency monitoring system, the video surveillance System can be video frequency monitoring system shown in fig. 1, which is the job section in multiple working nodes 102 Point, this method may include:
Step 201 is determining that the first working node is slave node, and is determining the corresponding target host node of the first working node Afterwards, the target video monitoring node group for needing to obtain video flowing with target host node establishes communication connection.
Step 202, monitoring objective host node.
Step 203, when monitoring that target host node breaks down in the first monitoring duration, by communication connection from mesh It marks video surveillance node group and obtains video flowing.The first monitoring duration is less than whether management node goes out for monitoring objective host node Second monitoring duration of existing failure.
In conclusion code stream acquisition methods provided in an embodiment of the present invention, determine that it is slave node in the first working node, And after determining the corresponding target host node of the first working node, the first working node and the target host node need to obtain video flowing Target video monitoring node group establish communication connection, first working node detect target host node break down when, Video flowing is obtained from target video monitoring node group by communication connection, effectively avoiding can store greatly in video frequency monitoring system The identical redundant data of amount, and avoid slave node and increase additional network overhead.
In embodiments of the present invention, management node can manage each working node, so that each working node is as view Host node and/or slave node in frequency monitoring system, wherein the host node is used to obtain from corresponding video monitoring node group and regard Frequency flows.When a working node is as host node in video frequency monitoring system, there is also another in the video frequency monitoring system Working node can break down as slave node corresponding with the host node, the slave node monitoring corresponding host node When, video data is obtained from the corresponding video surveillance node group of the host node.
Exemplary, when the first working node, which is managed node, is determined as slave node, determining in first working node should After the corresponding target host node of first working node, the first working node, which needs to establish with target host node, to be communicated to connect, and is needed Will corresponding with target host node target video monitoring node group establish communication connection, for example, first working node can be to The target video monitoring node group sends communication connection and establishes request, receives target video monitoring in first working node Node group send communication connection establish response after, first working node can be realized with the target video monitoring node group it Between establish communication connection.If the first working node is when monitoring that target host node breaks down, the first working node can lead to It crosses communication connection and directly obtains video flowing from target video monitoring node group.Under normal conditions, the first working node and management save Whether point can detect target host node and break down, and the first working node needs the first monitoring duration to determine target master Node breaks down, and management node needs the second monitoring duration to determine that target host node breaks down.
In the related art, when management node monitors that target host node breaks down, management node can control it His working node obtains video flowing from target monitoring video node group corresponding with the target host node, if the second monitoring duration Smaller, target host node temporary fault may occur due to network fluctuation, at this point, target host node is not really to occur Failure, when target host node restores normal, management node needs to control target host node from target monitoring video node again Group obtains video flowing, and management node is caused to need management work node repeatedly, so cause the stability of video prison system compared with Difference;If the second monitoring duration is larger, management node, which takes a long time, can just perceive the failure of target host node, this When, video frequency monitoring system is it is possible that the phenomenon that video data loss.
And in embodiments of the present invention, the first monitoring duration usually needs to be less than the preset door for allowing video data loss Limit, the second monitoring duration usually require to be greater than preset network fluctuation duration, which is much larger than The preset thresholding duration for allowing video data loss, it is generally the case that when the preset network fluctuation a length of second rank when It is long, when preset thresholding for allowing video data loss a length of other duration of Millisecond, for example, the first monitoring duration need it is small In 50 milliseconds, the second monitoring duration needs to be greater than 5 seconds.Monitor that target host node breaks down in duration when monitoring first When, the first working node can obtain video flowing from target video monitoring node group by communication connection, effectively avoid view There is the phenomenon that video data loss in frequency monitoring system, and avoiding target host node may be temporary due to network fluctuation appearance After property failure, the phenomenon that management node is repeatedly managed working node, and then improve the stability of video frequency monitoring system.
In the embodiment of the present invention, management node manages multiple working nodes in video frequency monitoring system, the embodiment of the present invention with It is illustrated for first working node, the workflow of other working nodes can refer to first working node, please refer to Fig. 3, Fig. 3 are the flow charts of another code stream acquisition methods provided in an embodiment of the present invention, can be applied to video shown in fig. 1 Monitoring system, as shown in figure 3, this method may include:
Step 301, management node send instruction information to multiple working nodes of management.
In embodiments of the present invention, all working node that management node can be managed to it is in the form of broadcast or multicast Instruction information is sent, so that each working node can receive instruction information, the instruction information is for identifying video surveillance The corresponding relationship of host node, slave node and video surveillance node group in system.Since each working node can be by pipe Reason node is determined as host node and/or slave node, and therefore, a part (or whole) working node in the video frequency monitoring system can Using as host node, and video flowing, each main section in the video frequency monitoring system can be obtained from corresponding video surveillance node group Point is corresponding with a slave node, after which can break down monitoring host node, from the corresponding view of the host node Frequency monitoring node group obtains video flowing.
Following embodiment is to be managed node with the first working node to be determined as slave node, and target host node is managed node It is determined as being schematically illustrated for host node corresponding with the first working node.
Step 302, the first working node determine that first working node is slave node based on instruction information, and determine this The corresponding target host node of one working node.
In practical application, the first working node is determining that first working node is slave node based on instruction information, and really It, being capable of the main section of monitoring objective for the ease of subsequent first working node after the fixed corresponding target host node of first working node Point needs to guarantee to establish communication connection between the first working node and target host node.
In embodiments of the present invention, before management node sends instruction information, if each work in video frequency monitoring system Make node and do not pre-establish communication connection, for each working node after the instruction information for receiving management node transmission, being based on should It indicates that information and other working nodes are established and communicated to connect, is built between the first working node and target host node to ensure that Communication connection is stood;If each working node in video frequency monitoring system pre-establishes communication connection according to preset sequence, pipe It is preset suitable according to this for managing node corresponding relationship of host node and slave node into the instruction information that each working node is sent What sequence determined, so that the first working node of guarantee and target host node are respectively to establish to have communication connection in multiple working nodes Two working nodes.Each working node in video frequency monitoring system according to whether being pre-established with communication connection, performed by Code stream acquisition methods it is different, the embodiment of the present invention can be schematically illustrated by following two for realization mode:
If each working node does not pre-establish communication connection, Fig. 4 A, Fig. 4 A can be please referred in realization mode at the first It is a kind of structural schematic diagram of video frequency monitoring system provided in an embodiment of the present invention, multiple work sections in the video frequency monitoring system Point may include: working node A1, working node B1 and working node C1, send in management node O to each working node Before indicating information, communication connection is not set up between working node A1, working node B1 and working node C1.In management node It, can be with base between working node A1, working node B1 and working node C1 after the instruction information that O is sent to each working node It establishes and communicates to connect in the instruction information, for example, host node, slave node and the video surveillance node group of instruction information record Corresponding relationship are as follows: working node A1 be host node, working node A1 is corresponding with video surveillance node group a, A1 pairs of working node The slave node answered is working node B1;Working node B1 is host node, and working node B1 is corresponding with video surveillance node group b, work Making the corresponding slave node of node B1 is working node C1.At this point, communication connection is established between working node A1 and working node B1, Communication connection is established between working node B1 and working node C1.In practical application, in the instruction information that management node is sent The corresponding relationship of host node, slave node and video surveillance node group is recorded in corresponding relationship list, and each working node exists It after receiving instruction information, needs to inquire corresponding relationship list, may thereby determine that out it for host node or slave node.
In second of achievable mode, if each working node pre-establishes communication connection, as shown in figure 5, Fig. 5 is this The structural schematic diagram for another video frequency monitoring system that inventive embodiments provide, multiple working nodes in the video frequency monitoring system It is sequentially connected from head to tail to form communication closed loop, at this point, the instruction information that management node O is sent may include chained list and corresponding relationship Table.Chained list record has the mark and distributing order of each working node in communication closed loop, for example, the work of chained list record Make node identification are as follows: working node A2, working node B2, working node C2 and working node D2, the work section of chained list record The distributing order of point are as follows: working node A2, working node B2, working node C2, working node D2 and working node A2 are successively followed Ring sequence.Mapping table record has the mark of main working node and the corresponding relationship of video surveillance node group, for example, it is assumed that Working node A2, working node B2 and working node C2 are main working node, the mark and video surveillance section of the main working node The corresponding relationship of point group can be with reference table 1.
Table 1
Working node A2 Video surveillance node group a
Working node B2 Video surveillance node group b
Working node C2 Video surveillance node group c
According to table 1, working node A2 is corresponding with video surveillance node group a, and working node A2 can be supervised from video It controls node group a and obtains video flowing;Working node B2 is corresponding with video surveillance node group b, and working node B2 can be supervised from video It controls node group b and obtains video flowing;Working node C2 is corresponding with video surveillance node group c, and working node C2 can be supervised from video It controls node group c and obtains video flowing.
In mode achievable for second, above-mentioned steps 302 may include following several sub-steps:
Sub-step 3021, the first working node are based on the second working node in the mark inquiry linked list of the first working node Mark.Second working node is the work section of designated position that is adjacent with the first working node and being located at the first working node Point, the designated position are the position before or after the first working node.
For example, working node B2 is receiving management section as shown in fig. 5, it is assumed that the first working node is working node B2 After the instruction information that point is sent, working node B2 inquires the work adjacent with working node B2 based on the chained list in instruction information Make node are as follows: working node A2 or working node C2.If designated position is the position before the first working node, the working node B2 can determine that working node A2 is the second working node;If designated position is the position after the first working node, the work Making node B2 can determine that working node C2 is the second working node.
Sub-step 3022, the first working node inquire mapping table based on the mark of the second working node.
Exemplary, the mark based on the second working node inquires mapping table, when there are second in corresponding relationship list When the mark of working node, sub-step 3022 is executed;When the mark of the second working node is not present in corresponding relationship list, knot Beam movement.
Sub-step 3023, when in mapping table record have the mark of the second working node when, the first working node determine Second working node is target host node, and the first working node is slave node.
For example, it is assumed that the second working node that first working node is inquired in sub-step 3021 is working node A2, the middle record of corresponding relationship list (such as table 1) has the work of the second working node to identify, at this point it is possible to determine work section Point A2 is target host node, and working node B1 is slave node.
It should be noted that each working node in video frequency monitoring system can be used as host node and/or slave node, For example, working node B2 is work as shown in fig. 5, it is assumed that working node A2, working node B2 and working node C2 are host node The slave node of node A2, working node C2 are the slave node of working node B2, and working node D2 is the slave node of working node C2, Working node B2 and working node C2, which both can be used as host node, can also be used as slave node, and working node D2 is only used as standby section Point, working node A2 are only used as host node.
It should also be noted that, since each working node in second of achievable mode in video frequency monitoring system is preparatory Establish communication connection, each working node receive management node transmission instruction information after, host node no longer need to it is corresponding Slave node establish communication connection, therefore the video frequency monitoring system in second of achievable mode can the side of realization relative to the first The response speed of video frequency monitoring system in formula is very fast.
The target video monitoring node that step 303, the first working node and target host node need to obtain video flowing is set up Vertical communication connection.
For it is above-mentioned the first can realize mode, as shown in Figure 4 A, after having executed above-mentioned steps 302, working node B1 It needs to establish with video surveillance node group a and communicate to connect, working node C1 needs to establish communication link with video surveillance node group b It connects.
Mode achievable for above-mentioned second, as shown in figure 5, after having executed above-mentioned steps 302, if the first working node It determines that it is standby working node, and is the second working node, the first work for the corresponding target host node of working node with this Node also needs to inquire video surveillance node group corresponding to the mark of the second working node in corresponding relation list, this is looked into Asking obtained video surveillance node group is to need to obtain the target video monitoring node group of video flowing with target host node, this When, the first working node can be established with video surveillance node group and be communicated to connect, and then monitor the main section of target convenient for subsequent When point failure, video flowing directly can be obtained from target monitoring node group.For example, as shown in figure 5, when the first working node is work Make node B2, when the second working node is working node A2, working node B2 inquiry table 1 is available: working node A2 and view Frequency monitoring node group a is corresponding, communicates to connect at this point, working node B2 needs to establish with video surveillance node group a, similarly can be with Obtain: when the first working node is working node C2, and the second working node is working node B2, working node C2 needs and view Frequency monitoring node group b establishes communication connection;When the first working node is working node D2, the second working node is working node C2 When, working node D2, which needs to establish with video surveillance node group c, to be communicated to connect.
Step 304, the first working node monitoring objective host node.
In practical application, establishing between the first working node and target host node has communication connection, first working node Can monitoring objective host node whether break down, when the first working node monitor target host node break down when, execute Step 305;When the first working node monitors that target host node is without failure, step 304 is repeated.
Exemplary, the first working node periodically can send heartbeat packet to target host node, and target host node is connecing After the heartbeat packet for receiving the transmission of the first working node, heartbeat feedback packet can be generated based on the heartbeat packet, and the heartbeat is fed back Packet is sent to the first working node, and heartbeat feedback packet is for indicating the communication connection of target host node to the first working node just Often.If the first working node does not receive the heartbeat feedback packet of target host node transmission, the first work in the first monitoring duration Node determines that target host node breaks down, and executes step 305;If the first working node receives mesh in the first monitoring duration After marking the heartbeat feedback packet that host node is sent, the first working node determines that target host node is without failure, repeats step 304。
Step 305, when the first working node first monitoring duration in monitor target host node break down when, pass through Communication connection obtains video flowing from target video monitoring node group.
In embodiments of the present invention, after executing the step 303, the first working node is set up with target monitoring node Communication connection has been stood, after the first working node monitors that target host node breaks down in the first monitoring duration, the first work Node can obtain video flowing from target monitoring node group by communication connection.It should be noted that the first working node and mesh Mark after video surveillance node group establishes communication connection, the first working node also need reserved remaining central processing unit (English: Central Processing Unit;Referred to as: CPU) nucleus number and free memory, so that monitoring target in the first working node After host node breaks down, the first working node can obtain video flowing from target video monitoring node group.
It should be noted that in step 303, establishing communication link in the first working node and target video monitoring node group After connecing, there is no data exchanges between the first working node and target video monitoring node group, monitor in the first working node After target host node breaks down, there are data exchanges between the first working node and target video monitoring node group, to have Avoiding for effect can store a large amount of identical redundant data in video frequency monitoring system, and avoid slave node and increase additional net Network expense.
In practical application, if the target host node be both host node corresponding with the first working node and and another The corresponding slave node of host node monitors another host node without slave node, in turn after target host node failure It may result in the video data loss in video frequency monitoring system.
In order to avoid the video data loss in video frequency monitoring system, mode can be realized for the first, in the first work After node monitors target host node failure, the first working node will also send to management node and be used to indicate the event of target host node The instruction of barrier is sent after the slave node that management node determines that the destination node is another host node to the first working node Be used to indicate as slave node corresponding with another host node instruct, at this point, first working node and another Host node establishes communication connection, and video surveillance node group corresponding with another host node establishes communication connection.For example, such as Shown in Fig. 4 A, it is assumed that the first working node is working node C1, and target host node is working node B1, is monitored in working node C1 After breaking down to working node B1, working node C1, which needs to send to management node O, is used to indicate working node B1 appearance The instruction of failure, after the slave node that management node O determines that working node B1 is working node A1, management node O is to work Make node C1 and sends the slave node instruction for being used to indicate working node C1 as working node A1, at this point, as shown in Figure 4 B, work Node C1 and working node A1, which is established, to be communicated to connect, and is established and communicated to connect with video surveillance node group a.
Mode achievable for above-mentioned second, the first working node monitor target host node in the first monitoring duration After failure, it is also necessary to it establishes and communicates to connect with third working node, to form new communication closed loop, the third working node For the working node of designated position that is adjacent with the second working node (that is to say target host node) and being located at the second working node; First working node inquires mapping table based on the mark of third working node;When record has third work in mapping table When the mark of node, the first working node determines that the third working node is the main section of new target of first working node Point, and the first working node is slave node.For example, as described in Figure 5, it is assumed that the first working node is working node C2, the second work Making node is working node B2, and when working node C2 monitors that working node B2 breaks down, working node C2 can be from Video surveillance node group b obtains video flowing, and working node C2, which also needs to establish with working node A2, to be communicated to connect, so as to shape The communication closed loop of Cheng Xin, for example, the new communication closed loop can refer to Fig. 6, working node A2 is third working node, right Answer that working node A2 is had recorded in relation table is corresponding with video surveillance node group a, at this point, working node C2 determines working node A2 For new target host node, and determine it for slave node corresponding with working node C2.In second of achievable mode, After target host node breaks down, the first working node can directly monitoring objective host node be made without reporting to management node Corresponding host node when for slave node, therefore the interactive process between working node and management node is effectively simplified, into one The response speed for improving video frequency monitoring system of step.
Step 306, the first working node judge whether connect in preset duration after monitoring that target host node breaks down Receive the switching command of management node transmission.
It is exemplary, when the first working node does not receive in preset duration after monitoring that target host node breaks down When the switching command that management node is sent, step 307 is executed;When the first working node is monitoring the failure of target host node When receiving the switching command of management node transmission in preset duration afterwards, step 308 is executed.
In embodiments of the present invention, the management node in video frequency monitoring system can monitor its management working node whether Break down, thus management node can monitoring objective host node whether break down, monitor the main section of target in management node After point breaks down, which can send switching command to the first working node.Under normal conditions, the first monitoring duration Management node is needed to be less than for the second monitoring duration whether monitoring objective host node breaks down, so that video frequency monitoring system High stability.In embodiments of the present invention, which is greater than or equal to the second monitoring duration and the first monitoring duration Time difference, the switching command be management node second monitoring duration in monitor target host node break down after generate , which is used to indicate the first working node and obtains video flowing from target monitoring node group instead of target host node.
Step 307, when the first working node monitor the target host node break down after preset duration in not When receiving the switching command that the management node is sent, stop communicating to connect by described from the target video monitoring node Group obtains video flowing.
In embodiments of the present invention, target host node may be since temporary fault occurs in network fluctuation, due to first The first monitoring duration that working node monitoring objective host node breaks down is less than management node monitoring objective host node and event occurs Second monitoring duration of barrier, therefore the first working node temporary can obtain video flowing from target monitoring node group, in mesh After marking host node recovery normally, target host node can obtain video flowing from target monitoring node group again, at this point, management node can It can will not monitor that target host node breaks down, and then switching command will not be generated, the first working node will not be default The switching command of management node transmission is received in duration, the first working node stops obtaining video from target monitoring node group Stream.It follows that when the first monitoring duration is less than the second monitoring duration, it can be to avoid since target host node be due to network wave It is dynamic there is temporary fault after, management node repeatedly management objectives host node the phenomenon that, and then effectively increase video surveillance system The stability of system.
Step 308, when preset duration of first working node after monitoring that the target host node breaks down it is inscribed When receiving the switching command that the management node is sent, keep communicating to connect by described from the target video monitoring node group Obtain video flowing.
In embodiments of the present invention, after the first working node monitors target host node failure, if management node is also supervised Target host node failure is measured, then management node can generate switching command, and the switching command is sent to the first work section Point, at this point, keeping regarding from target after the first working node can receive the switching command that management node is sent in preset duration Frequency monitoring node group obtains video flowing.
It should be noted that the embodiment of the present invention be with the first working node monitor target host node break down after Preset duration in whether receive the switching command of management node transmission, to determine the need for using the first working node generation Video flowing is obtained from target monitoring node group for target host node.In practical application, it is to improve in video frequency monitoring system The no accuracy for needing to replace target host node using the first working node, the first working node can monitor the main section of target Point break down after preset duration in continue monitoring objective host node, if usually the first working node in preset duration again After the heartbeat feedback packet for receiving the transmission of target host node, the first working node can determine that it restores just in preset duration Often;After if the first working node does not receive the heartbeat feedback packet of target host node transmission in preset duration, the first work section Point can determine its still failure in preset duration.By judging whether monitoring objective host node restores in preset duration Normally, and in the switching command for judging whether to receive management node transmission in preset duration, to determine the need for adopting Main working node is replaced to obtain video flowing from target monitoring node group with the first working node, at this point, there are following four situations:
The first situation, when the first working node does not connect in preset duration after monitoring that target host node breaks down When receiving the switching command of management node transmission, and monitoring that target host node restores normal in preset duration, the first work Node stops obtaining video flowing from target monitoring video node group by communication connection, at this point, the first work in video frequency monitoring system Make node to be not necessarily to replace main working node.
Second situation, when the first working node receives in preset duration after monitoring that target host node breaks down The switching command sent to management node, and monitor in preset duration target host node still failure when, the first work section Point keeps obtaining video flowing from target monitoring video node group by communication connection, at this point, the first work in video frequency monitoring system Node needs to replace main working node.
The third situation, when the first working node does not connect in preset duration after monitoring that target host node breaks down Receive the switching command of management node transmission, and monitor in preset duration target host node still failure when, the first work Node sends a warning message to management node, stops carrying out video flowing acquisition receiving being used to indicate for management node transmission After halt instruction, stop obtaining video flowing from target video monitoring node group by communication connection, at this point, in video frequency monitoring system First working node is not necessarily to replace main working node.
4th kind of situation, when the first working node receives in preset duration after monitoring that target host node breaks down The switching command sent to management node, and when monitoring that in preset duration, target host node restores normal, the first work section Point keeps obtaining video flowing from target monitoring video node group by communication connection, at this point, the first work in video frequency monitoring system Node needs to replace main working node.
In practical application, management node can also periodically manage again video frequency monitoring system according to load-balancing algorithm In normal working node so that load (that is, remaining CPU core number and free memory) the substantially phase of each working node Together, target host node is substituted after target monitoring node group acquisition video flowing so as to avoid in the first working node, this first The load excessive (that is, remaining CPU core number is smaller and free memory is smaller) of working node, and other working nodes is negative Carry it is smaller, and the problem of reduce the stability of video frequency monitoring system.
It should be noted that the sequencing for the method and step that code stream provided in an embodiment of the present invention obtains can be fitted Work as adjustment, step according to circumstances can also accordingly be increased and decreased, and anyone skilled in the art takes off in the present invention In the technical scope of dew, the method that can readily occur in variation be should be covered by the protection scope of the present invention, therefore no longer superfluous It states.
In conclusion code stream acquisition methods provided in an embodiment of the present invention, determine that it is slave node in the first working node, And after determining the corresponding target host node of the first working node, the first working node and the target host node need to obtain video flowing Target video monitoring node group establish communication connection, first working node detect target host node break down when, Video flowing is obtained from target video monitoring node group by communication connection, effectively avoiding can store greatly in video frequency monitoring system The identical redundant data of amount, and avoid slave node and increase additional network overhead.Also, since the first working node is used for The the first monitoring duration whether monitoring objective host node breaks down is smaller, and whether management node goes out for monitoring objective host node Second monitoring duration of existing failure is larger, therefore effectively prevents video frequency monitoring system and the phenomenon that video data loss occur, together When can be improved the stability of video frequency monitoring system.
The embodiment of the invention also provides a kind of code stream acquisition device, applied to the first work section in video frequency monitoring system Point, the video frequency monitoring system include: management node, multiple working nodes and at least one video surveillance node group, multiple work Node includes the first working node, and as shown in Figure 7 A, Fig. 7 A is a kind of code stream acquisition device 700 provided in an embodiment of the present invention Block diagram, the code stream acquisition device 700 may include:
Module 701 is established in first communication connection, for determining that the first working node is slave node, and determines the first work After the corresponding target host node of node, the target video monitoring node group foundation for needing to obtain video flowing with target host node is communicated Connection.
First monitoring modular 702 is used for monitoring objective host node.
First obtains module 703, for passing through when monitoring that target host node breaks down in the first monitoring duration Communication connection obtains video flowing from target video monitoring node group, and the first monitoring duration is less than management node and is used for monitoring objective master The the second monitoring duration whether node breaks down.
In conclusion code stream acquisition device provided in an embodiment of the present invention, determines that it is slave node in the first working node, And after determining the corresponding target host node of the first working node, the first working node and the target host node need to obtain video flowing Target video monitoring node group establish communication connection, first working node detect target host node break down when, Video flowing is obtained from target video monitoring node group by communication connection, effectively avoiding can store greatly in video frequency monitoring system The identical redundant data of amount, and avoid slave node and increase additional network overhead.
Optionally, Fig. 7 B is please referred to, Fig. 7 B is the frame of another code stream acquisition device 700 provided in an embodiment of the present invention Figure, the code stream acquisition device 700 can also include:
Stop obtaining module 704, for not receiving when in preset duration after monitoring that target host node breaks down To management node send switching command when, stop by communication connection from target video monitoring node group obtain video flowing, in advance If the duration that duration is greater than or equal to the second monitoring duration and the first monitoring duration is poor, switching command is management node in the second prison It surveys in duration and monitors to generate after target host node breaks down, be used to indicate the first working node and obtained instead of target host node Take video flowing.
Second obtains module 705, for receiving when in preset duration after monitoring that target host node breaks down When the switching command that management node is sent, keep obtaining video flowing from target video monitoring node group by communication connection.
Optionally, Fig. 7 C is please referred to, Fig. 7 C is the frame of another code stream acquisition device 700 provided in an embodiment of the present invention Figure, the code stream acquisition device 700 can also include:
Receiving module 706, for receiving the instruction information of management node transmission, instruction information is for identifying video surveillance system The corresponding relationship of host node, slave node and video surveillance node group in system.
First determining module 707 for determining that the first working node is slave node based on instruction information, and determines the first work Make the corresponding target host node of node.
Optionally, multiple working nodes are sequentially connected from head to tail to form communication closed loop, and instruction information includes chained list and corresponding pass It is table, chained list record has the mark and distributing order of each working node in communication closed loop, and mapping table record has master The mark of working node and the corresponding relationship of video surveillance node group, as seen in figure 7 c, the first determining module 707 is also used to: base The mark of the second working node in the mark inquiry linked list of the first working node, the second working node are to save with the first work Point is adjacent and is located at the working node of the designated position of the first working node, before or after designated position is the first working node Position;Mark based on the second working node inquires mapping table;When record has the second working node in mapping table Mark when, determine the second working node be target host node, and the first working node be slave node.
Optionally, as seen in figure 7 c, which can also include:
First enquiry module 708, for inquiring video corresponding to the mark of the second working node in mapping table Monitoring node group is to obtain target video monitoring node group.
Optionally, which can also include: the second monitoring modular, for monitoring that target host node goes out Continue monitoring objective host node in preset duration after existing failure.
As shown in Figure 7 B, stop obtaining module 704, be also used to:
When the switching for not receiving management node transmission in preset duration after monitoring that target host node breaks down When instructing, and monitoring that target host node restores normal in preset duration, stop saving by communication connection from target video monitoring Point group obtains video flowing;
Second obtains module 705, is also used to:
When the switching for receiving management node transmission in preset duration after monitoring that target host node breaks down refers to Enable, and monitored in preset duration target host node still failure when, keep through communication connection from target video monitoring node Group obtains video flowing.
Optionally, as illustrated in fig. 7d, Fig. 7 D is the frame of another code stream acquisition device 700 provided in an embodiment of the present invention Figure, the code stream acquisition device 700 can also include:
Module 709 is established in second communication connection, after monitoring that target host node breaks down in the first monitoring duration, with Third working node establishes communication connection, and to form new communication closed loop, third working node is adjacent with the second working node And it is located at the working node of the designated position of the second working node.
Second enquiry module 710 inquires mapping table for the mark based on third working node.
Second determining module 711, for determining third when record has the mark of third working node in mapping table Working node is the new target host node of the first working node, and the first working node is slave node.
In conclusion code stream acquisition device provided in an embodiment of the present invention, determines that it is slave node in the first working node, And after determining the corresponding target host node of the first working node, the first working node and the target host node need to obtain video flowing Target video monitoring node group establish communication connection, first working node detect target host node break down when, Video flowing is obtained from target video monitoring node group by communication connection, effectively avoiding can store greatly in video frequency monitoring system The identical redundant data of amount, and avoid slave node and increase additional network overhead.Also, since the first working node is used for The the first monitoring duration whether monitoring objective host node breaks down is smaller, and whether management node goes out for monitoring objective host node Second monitoring duration of existing failure is larger, therefore effectively prevents video frequency monitoring system and the phenomenon that video data loss occur, together When can be improved the stability of video frequency monitoring system.
The embodiment of the invention also provides a kind of video frequency monitoring system, the video frequency monitoring system may include: management node, Multiple working nodes and at least one video surveillance node group, multiple working nodes include the first working node, first work Node includes any code stream acquisition device 700 of Fig. 7 A to Fig. 7 D.The video frequency monitoring system can be Fig. 1, Fig. 4 A or Fig. 5 The video frequency monitoring system shown.
Optionally, management node is used to send instruction information to each working node, and instruction information is for identifying video prison The corresponding relationship of host node, slave node and video surveillance node group in examining system.
After management node is also used to monitor that target host node breaks down in the second monitoring duration, generates switching and refer to It enables, switching command is used to indicate the first working node and obtains video flowing instead of target host node.
In conclusion code stream provided in an embodiment of the present invention obtains system, slave node is determined that it is in the first working node, And after determining the corresponding target host node of the first working node, the first working node and the target host node need to obtain video flowing Target video monitoring node group establish communication connection, first working node detect target host node break down when, Video flowing is obtained from target video monitoring node group by communication connection, effectively avoiding can store greatly in video frequency monitoring system The identical redundant data of amount, and avoid slave node and increase additional network overhead.Also, since the first working node is used for The the first monitoring duration whether monitoring objective host node breaks down is smaller, and whether management node goes out for monitoring objective host node Second monitoring duration of existing failure is larger, therefore effectively prevents video frequency monitoring system and the phenomenon that video data loss occur, together When can be improved the stability of video frequency monitoring system.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
The embodiment of the invention also provides a kind of computer equipments, including processor and memory, wherein memory is used In storage computer program;Processor realizes that the code stream shown in Fig. 2 or Fig. 3 obtains for executing the program stored on memory Take method.
The embodiment of the invention also provides a kind of storage medium, which is stored with computer program, when the storage When program in medium is executed by processor, it is able to carry out the code stream acquisition methods shown in Fig. 2 or Fig. 3.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.

Claims (18)

1. a kind of code stream acquisition methods, which is characterized in that applied to the first working node in video frequency monitoring system, the video Monitoring system includes: management node, multiple working nodes and at least one video surveillance node group, the multiple working node packet Include first working node, which comprises
Determining that first working node is slave node, and after the corresponding target host node of determining first working node, The target video monitoring node group for needing to obtain video flowing with the target host node, which is established, to be communicated to connect;
Monitor the target host node;
When monitoring that the target host node breaks down in the first monitoring duration, communicated to connect by described from the mesh It marks video surveillance node group and obtains video flowing, the first monitoring duration is less than the management node for monitoring the target master The the second monitoring duration whether node breaks down.
2. the method according to claim 1, wherein being communicated to connect by described from the target video described After monitoring node group obtains video flowing, the method also includes:
When not receiving what the management node was sent in preset duration after monitoring that the target host node breaks down When switching command, stop obtaining video flowing from the target video monitoring node group by the communication connection, when described default The long duration for being greater than or equal to the second monitoring duration and the first monitoring duration is poor, and the switching command is the management What node generated after monitoring that the target host node breaks down in the second monitoring duration, it is used to indicate described first Working node replaces the target host node to obtain video flowing;
When receive that the management node sends in preset duration after monitoring that the target host node breaks down cuts When changing instruction, keep obtaining video flowing from the target video monitoring node group by the communication connection.
3. the method according to claim 1, wherein needing to obtain video flowing with the target host node described Target video monitoring node group establish communication connection before, the method also includes:
The instruction information that the management node is sent is received, the instruction information is used to identify the master in the video frequency monitoring system The corresponding relationship of node, slave node and video surveillance node group;
It determines that first working node is slave node based on the instruction information, and determines that first working node is corresponding Target host node.
4. according to the method described in claim 3, it is characterized in that, the multiple working node is sequentially connected from head to tail to form communication Closed loop, the instruction information include chained list and mapping table, and the chained list record has each work in the communication closed loop The mark and distributing order of node, the mapping table record have the mark of main working node and video surveillance node group Corresponding relationship,
It is described to determine that first working node is slave node based on the instruction information, and determine first working node pair The target host node answered, comprising:
Mark based on first working node inquires the mark of the second working node in the chained list, second work Node is the working node of designated position that is adjacent with first working node and being located at first working node, the finger Positioning is set to the position before or after first working node;
Mark based on second working node inquires the mapping table;
When record has the mark of second working node in the mapping table, determine second working node for institute Target host node is stated, and first working node is slave node.
5. according to the method described in claim 4, it is characterized in that,
Before the target video monitoring node group for needing to obtain video flowing with the target host node establishes communication connection, The method also includes:
Video surveillance node group corresponding to the mark of second working node is inquired in the mapping table to obtain The target video monitoring node group.
6. according to the method described in claim 2, it is characterized in that, the method also includes:
Continue to monitor the target host node in the preset duration after monitoring that the target host node breaks down;
The management node hair is not received in the preset duration when after monitoring that the target host node breaks down When the switching command sent, stop obtaining video flowing from the target video monitoring node group by the communication connection, comprising:
When not receiving what the management node was sent in preset duration after monitoring that the target host node breaks down Switching command, and when monitoring that the target host node restores normal in the preset duration, stopping passes through the communication connection Video flowing is obtained from the target video monitoring node group;
The management node is received in the preset duration when after monitoring that the target host node breaks down to send Switching command when, keep by it is described communication connection from the target video monitoring node group acquisition video flowing, comprising:
When receive that the management node sends in preset duration after monitoring that the target host node breaks down cuts Change instruction, and monitored in the preset duration target host node still failure when, keep by it is described communication connection from The target video monitoring node group obtains video flowing.
7. according to the method described in claim 4, it is characterized in that, the method also includes:
After monitoring that the target host node breaks down in the first monitoring duration, communication link is established with third working node It connects, to form new communication closed loop, the third working node is adjacent with second working node and is located at described second The working node of the designated position of working node;
Mark based on the third working node inquires the mapping table;
When record has the mark of the third working node in the mapping table, determine the third working node for institute The new target host node of the first working node is stated, and first working node is slave node.
8. method according to any one of claims 1 to 7, which is characterized in that
The first monitoring duration is less than the preset thresholding duration for allowing video data loss, and the second monitoring duration is greater than Preset network fluctuation duration, the preset network fluctuation duration are greater than the preset thresholding for allowing video data loss Duration.
9. a kind of code stream acquisition device, which is characterized in that applied to the first working node in video frequency monitoring system, the video Monitoring system includes: management node, multiple working nodes and at least one video surveillance node group, the multiple working node packet First working node is included, described device includes:
Module is established in first communication connection, for determining that first working node is slave node, and determines first work After making the corresponding target host node of node, the target video monitoring node for needing to obtain video flowing with the target host node is set up Vertical communication connection;
First monitoring modular, for monitoring the target host node;
First obtains module, for passing through institute when monitoring that the target host node breaks down in the first monitoring duration It states communication connection and obtains video flowing from the target video monitoring node group, the first monitoring duration is less than the management node The the second monitoring duration whether to break down for monitoring the target host node.
10. device according to claim 9, which is characterized in that described device further include:
Stop obtain module, for when monitor the target host node failure after preset duration in do not receive institute When stating the switching command of management node transmission, stop obtaining view from the target video monitoring node group by the communication connection Frequency flows, and the duration that the preset duration is greater than or equal to the second monitoring duration and the first monitoring duration is poor, described to cut It changes after the instruction management node monitors that the target host node breaks down in the second monitoring duration and generates, It is used to indicate first working node and obtains video flowing instead of the target host node;
Second obtains module, for described when receiving in preset duration after monitoring that the target host node breaks down When the switching command that management node is sent, keep obtaining video from the target video monitoring node group by the communication connection Stream.
11. device according to claim 9, which is characterized in that described device further include:
Receiving module, the instruction information sent for receiving the management node, the instruction information is for identifying the video The corresponding relationship of host node, slave node and video surveillance node group in monitoring system;
First determining module, for determining that first working node is slave node based on the instruction information, and described in determination The corresponding target host node of first working node.
12. device according to claim 11, which is characterized in that the multiple working node is sequentially connected from head to tail to form logical Believe that closed loop, the instruction information include chained list and mapping table, the chained list record has each work in the communication closed loop Make the mark and distributing order of node, the mapping table record has the mark and video surveillance node group of main working node Corresponding relationship,
First determining module, is also used to:
Mark based on first working node inquires the mark of the second working node in the chained list, second work Node is the working node of designated position that is adjacent with first working node and being located at first working node, the finger Positioning is set to the position before or after first working node;
Mark based on second working node inquires the mapping table;
When record has the mark of second working node in the mapping table, determine second working node for institute Target host node is stated, and first working node is slave node.
13. device according to claim 12, which is characterized in that described device further include:
First enquiry module, for inquiring video corresponding to the mark of second working node in the mapping table Monitoring node group is to obtain the target video monitoring node group.
14. device according to claim 10, which is characterized in that described device further include:
Second monitoring modular, for continuing described in monitoring in the preset duration after monitoring that the target host node breaks down Target host node;
The stopping obtains module, is also used to:
When not receiving what the management node was sent in preset duration after monitoring that the target host node breaks down Switching command, and when monitoring that the target host node restores normal in the preset duration, stopping passes through the communication connection Video flowing is obtained from the target video monitoring node group;
Described second obtains module, is also used to:
When receive that the management node sends in preset duration after monitoring that the target host node breaks down cuts Change instruction, and monitored in the preset duration target host node still failure when, keep by it is described communication connection from The target video monitoring node group obtains video flowing.
15. device according to claim 12, which is characterized in that described device further include:
Module is established in second communication connection, after monitoring that the target host node breaks down in the first monitoring duration, with the Three working nodes establish communication connection, and to form new communication closed loop, the third working node is to save with second work Point is adjacent and is located at the working node of the designated position of second working node;
Second enquiry module inquires the mapping table for the mark based on the third working node;
Second determining module, for determining institute when record has the mark of the third working node in the mapping table The new target host node that third working node is first working node is stated, and first working node is slave node.
16. according to any device of claim 9 to 15, it is characterised in that
The first monitoring duration is less than the preset thresholding duration for allowing video data loss, and the second monitoring duration is greater than Preset network fluctuation duration, the preset network fluctuation duration are greater than the preset thresholding for allowing video data loss Duration.
17. a kind of video frequency monitoring system characterized by comprising management node, multiple working nodes and at least one video prison Node group is surveyed, the multiple working node includes the first working node, and first working node includes claim 9 to 16 times Code stream acquisition device described in one.
18. system according to claim 17, which is characterized in that
The management node is used to send instruction information to each working node, and the instruction information is for identifying the video prison The corresponding relationship of host node, slave node and video surveillance node group in examining system;
After the management node is also used to monitor that the target host node breaks down in the second monitoring duration, generate Switching command, the switching command are used to indicate first working node and obtain video flowing instead of the target host node.
CN201810321682.4A 2018-04-11 2018-04-11 Code stream obtaining method, device and system Active CN110365936B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810321682.4A CN110365936B (en) 2018-04-11 2018-04-11 Code stream obtaining method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810321682.4A CN110365936B (en) 2018-04-11 2018-04-11 Code stream obtaining method, device and system

Publications (2)

Publication Number Publication Date
CN110365936A true CN110365936A (en) 2019-10-22
CN110365936B CN110365936B (en) 2021-03-16

Family

ID=68214288

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810321682.4A Active CN110365936B (en) 2018-04-11 2018-04-11 Code stream obtaining method, device and system

Country Status (1)

Country Link
CN (1) CN110365936B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116993887A (en) * 2023-09-27 2023-11-03 湖南马栏山视频先进技术研究院有限公司 Response method and system for video rendering abnormality

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101635656A (en) * 2008-07-26 2010-01-27 华为技术有限公司 Fault detection method in layered ordered address packet network, system and equipment
CN104994350A (en) * 2015-07-07 2015-10-21 小米科技有限责任公司 Information inquiry method and device
US20150364037A1 (en) * 2014-06-12 2015-12-17 Lg Electronics Inc. Mobile terminal and control system
CN106331642A (en) * 2016-08-31 2017-01-11 浙江大华技术股份有限公司 Method and device for processing data in video cloud system
CN106656682A (en) * 2017-02-27 2017-05-10 网宿科技股份有限公司 Method, system and device for detecting cluster heartbeat

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101635656A (en) * 2008-07-26 2010-01-27 华为技术有限公司 Fault detection method in layered ordered address packet network, system and equipment
US20150364037A1 (en) * 2014-06-12 2015-12-17 Lg Electronics Inc. Mobile terminal and control system
CN104994350A (en) * 2015-07-07 2015-10-21 小米科技有限责任公司 Information inquiry method and device
CN106331642A (en) * 2016-08-31 2017-01-11 浙江大华技术股份有限公司 Method and device for processing data in video cloud system
CN106656682A (en) * 2017-02-27 2017-05-10 网宿科技股份有限公司 Method, system and device for detecting cluster heartbeat

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116993887A (en) * 2023-09-27 2023-11-03 湖南马栏山视频先进技术研究院有限公司 Response method and system for video rendering abnormality
CN116993887B (en) * 2023-09-27 2023-12-22 湖南马栏山视频先进技术研究院有限公司 Response method and system for video rendering abnormality

Also Published As

Publication number Publication date
CN110365936B (en) 2021-03-16

Similar Documents

Publication Publication Date Title
CN112073265B (en) Internet of things monitoring method and system based on distributed edge computing
DE102004052270B4 (en) Processing device management system
CN109274557B (en) Intelligent CMDB management and cloud host monitoring method in cloud environment
CN109412870B (en) Alarm monitoring method and platform, server and storage medium
US20180176154A1 (en) Method and system for managing workloads in a cluster
US8634330B2 (en) Inter-cluster communications technique for event and health status communications
JP3813776B2 (en) Network distributed management system
CN109960634B (en) Application program monitoring method, device and system
DE102015119643A1 (en) Methods and apparatus for providing redundancy in a process control system
WO2012072344A1 (en) Endpoint-to-endpoint communications status monitoring
US20060230309A1 (en) System for remote fault management in a wireless network
CN103368768A (en) Automatically scaled network overlay with heuristic monitoring in hybrid cloud environment
CN110069210B (en) Storage system, and method and device for allocating storage resources
CN107276839B (en) Self-monitoring method and system of cloud platform
CN105900068B (en) The systems, devices and methods of path management
WO2014202026A1 (en) Method and system for virtual network mapping protection and computer storage medium
CN105580316A (en) Apparatus and method for monitoring network performance
CN107682411A (en) A kind of extensive SDN controllers cluster and network system
CN105429799A (en) Server backup method and device
CN103262046A (en) Server management apparatus, server management method, and program
CN105493448A (en) Network element status identification based on service
CN110545197B (en) Node state monitoring method and device
CN110365936A (en) Code stream acquisition methods, apparatus and system
CN110290163A (en) A kind of data processing method and device
US8719400B2 (en) Flexible delegation of management function for self-managing resources

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