The thin resource video binding strategy method of various video exchange routing mode
One, technical field
The present invention relates to the management method of video resource in to video monitoring system.
Two, background technology
Current, in the legacy network field of video monitoring, great majority are that client directly is connected with video source, and this mode has seriously limited user's number of monitor video, can't adapt to the demand of large-scale application.
For this reason, people bring into use Softswitch technology to solve this problem.The Softswitch technology of video flowing has solved the network bandwidth limitations of video source to a certain extent, allows more user to check same video flowing simultaneously.Definition VTDU video distribution and retransmission unit are realized the soft switch function of video flowing.VTDU mainly finishes the forwarding and the distribution of vision signal, avoids client directly to visit front-end camera, reduces network traffics.
1. transmit: video can be forwarded by streaming media server, and the access side needs only the access stream media server and informs the headend equipment that will visit, and streaming media server can be on behalf of getting video flowing and being transmitted to this access side.
2. distribution: one road video can be duplicated into multichannel by VTDU and give different access sides.The exchange of media layer is finished the central platform function of whole operation class video monitoring system, and it realizes the transmission and the storage of audio frequency and video under the control of Management Layer and management.The exchange of media layer is made up of CMU, VTDU, NRU and other relevant corollary equipments.Partly or entirely equipment is carried on the existing operator data network.Exchange of media layer equipment can be accepted the audio frequency and video transmission request of User Access Layer CU to the PU of User Access Layer request audio frequency and video, and with the collaborative transmission channel of setting up of User Access Layer.VTDU is responsible for request, reception and the distribution of audio frequency and video as the media processing units of central platform, realizes multi-stage cascade and distributed deployment.One road video can be duplicated into multichannel by VTDU and give different access sides.Each VTDU only accepts the administration of this territory CMU, can be other territory simultaneously the media interviews interface is provided.But still there are many deficiencies in this single video flowing soft switch mode for the carrier class network video monitoring, can't satisfy to different clients differentiated service is provided, according to the difference and the practical business time coverage condition of network environment, the application demand of different forwarding strategies is provided respectively.
Four, summary of the invention
The present invention seeks to: at the problems referred to above, the present invention proposes the method for the thin resource video binding strategy of various video exchange routing mode, solve that direct-connected mode can't expire the several user's real-time videos in road simultaneously and conventional flow routing forwarding mode is too single, cause the unreasonable and problem of the wasting of resources that occurs of resource allocation, this invention is the video binding strategy at carrier class operator.
Technical scheme of the present invention is the thin resource video binding strategy of various video exchange routing mode, the video that dynamic calculation is suitable when the user uses headend equipment (PU) and video distribution service device (VTDU) device resource is transmitted the distribution route, promptly carry out the multichannel forwarding of haplopia frequency by VTDU, thereby realize the reasonable transmission of video flowing, to realize following strategy:
1) binding of user (CU) and headend equipment (PU): the PU that sets appointment directly sends video flowing to CU;
2) binding of PU and video distribution service device (VTDU): set specific VTDU and only distribute from the video flowing of specifying PU;
3) binding of CU and VTDU: set specific VTDU and can only provide service, so that guarantee that this user has enough resources and realizes stable service for the client of appointment;
4) binding of CU and NRU: limit specific digital picture memory space network video recording server (NRU), only the client for appointment provides service, and obtaining independently with confidentiality, the assurance of strengthening Video Document, memory space, assurance have enough Internet resources;
5) binding of PU and NRU: can set specific NRU and only provide the video recording service for the PU of appointment.
In addition, consider the requirement of load balancing, guarantee making full use of and high reliability of Internet resources,
Linkage's video monitoring system platform provides the configuration interface of above-mentioned strategy, and the video that dynamic calculation is suitable when the user uses above device resource forwarding distribution route, to realize above-mentioned strategy.
By flexible and changeable video exchange routing policy, and transmitting by the multichannel that VTDU carries out the haplopia frequency, thereby realize the reasonable transmission of video flowing, reduce the bandwidth burden of backbone network to greatest extent, is to take the very little thin resources mode of Internet resources.
Central platform of the present invention (comprising CMU, VTDU, NRU) and support system (comprising AAA, ULS and NMS) and headend equipment unit PU, the equal access bearer IP network work of client user CU each several part.
The dynamic routing table of each device resource of platform management, routing policy is determined by the device parameter of appointment in the following table:
Table 1
Flow process is:
1.1 the user is by the request of browser submit applications video
Burrow 1.2 carry out udp, obtain user's the external net address and the technology of port penetrating through private network;
1.3 the web server is submitted in the application instruction
1.4 call remote scheduling EJB interface by servlet
1.5 carry out the Business Processing of video
1.6 scheduling EJB calculates optimum routing algorithm, sets up route
Get through routing operations 1.7 carry out, application and transmission of video.
Select the method for starting point flow process to be: to select to select in the routing table first video distribution service device (VTDU), the flow process of selection such as following:
Do beginning: 1, CU and VTDU bind? be then to enter 3 otherwise enter 2; 2, in all VTDU, search only? be then success, otherwise failure; 3, do you search only binding VTDU? be then success, otherwise enter 4; 4, do you search the only VTDU of binding? be then to fail, otherwise success;
Select optimum node flow process: only VTDU can not find when searching flow process again to do not bind select in the VTDU server only;
If PU does not have and any VTDU binds, only need in whole VTDU, select only.11, do you search the VTDU that video source is arranged? be then success, otherwise enter 12; 12, whether the VTDU load balanced? be then to enter 13, otherwise enter 14; 13, do you search the most idle VTDU? be then success, otherwise failure; 14, do you search the busiest VTDU? be then success, otherwise failure;
Terminal point is selected flow process, promptly select to select in the routing table first video distribution service device (VTDU), the flow process of selecting is: the video server (PU) of at first judging user applies has not and this VTDU directly binds, if user and certain VTDU bind, the distribution of the video flowing that its of this PU is all just need be distributed with this type of server.Bound a plurality of video distribution service devices simultaneously as PU, just need select only therein.
Selection has the source node flow process:
After having selected starting point and terminal point, if starting point and terminal point all do not have the needed video source of user, then need in all VTDU, select active node, preserved the port list of the video forwarding server of all PU videos at PU node listing Collection puColl, according to the load balancing principle, in one group of VTDU, search output the most idle source port arranged, and return known port; If in the node listing of this PU, there is not the associated video source, then need to carry out new video application to head end encoder, after applying for successfully, upgrade the data structure among the puColl, and in callColl, add the information of this time calling out, thereby if this time call out next time is not interrupted, when having different user to visit the image of this video point again, only need to carry out video and transmit, do not need to carry out the application of video to front end PU again by this VTDU.
The invention has the beneficial effects as follows:
● by judgement to the maximum video linking number of PU, the maximum decoding capability that rationally utilizes PU, the advantage that has fully kept traditional direct-connected mode, the video linking number that keeps one road PU is simultaneously transmitted video flowing for the video flowing forwarding server, can avoid direct-connected mode the amount of browsing real-time video simultaneously to be had the drawback of the upper limit, be subject to the decoding capability of PU, the ability that direct-connected mode single channel can be decoded simultaneously generally is no more than six road real-time videos, and the customer volume of browsing that this invention can make single channel have simultaneously fully reaches into hundred even thousands of.
● by to optimum video flowing forwarding server, active video flowing forwarding server, idle source video flowing forwarding server, it is single that the various video of searching and the selecting exchange routing mode of the most busy source video flowing forwarding server has avoided the conventional video circulation to send out server routing forwarding strategy, the irrational shortcoming of resource allocation.Conventional video circulation is sent out server routing forwarding strategy and is based under the situation that single forwarding server load capacity reaches peak value and selects other server, in the wasting of resources, because the too high load capacity of separate unit server, make the stability of video flowing and the decline that real-time device also has certain program, if based on small enterprise, insert PU quantity and be not under the too big situation, such as tens to top PU, this mode can be more stable operation, if but the quantity that PU inserts is thousands of and even when up to ten thousand, as carrier class operator, this mode just may be at short notice because of causing whole system to collapse feedback in huge service traffics very much.
● between each different territory, use cross-domain routing policy, can specify the specific video circulation to send out server as interface, in preferential inlet or the outlet of using this VTDU as video of when roaming, and reasonably use and control resource, make it the real telecom operation level requirement that reaches.
Four, description of drawings
This domain real time video of Fig. 1 is browsed and is elaborated,
Fig. 2 application video instructions is submitted to EJB and is carried out the route calculation flow chart
The structure of Fig. 3 routing table
The flow process that Fig. 4 selects
Fig. 5 VTDU searches flow process
The flow process that Fig. 6 selects
Fig. 7 seeks the searching structural representation that the most idle VTDU transmits
Five, embodiment
Below in conjunction with specific embodiment, further set forth the present invention.
Now browse being elaborated with this domain real time video, as Fig. 1:
1. process description
1.1 the user is by the request of browser submit applications video
Burrow 1.2 carry out udp, obtain user's external net address and port
1.3 the web server is submitted in the application instruction
1.4 call remote scheduling EJB interface by servlet
1.5 carry out the Business Processing of video
1.6 scheduling EJB calculates optimum routing algorithm, sets up route
Get through routing operations 1.7 carry out, application and transmission are looked
2. realization principle
Because user's pc is likely interior net address, because in public network IP address nowadays so nervous today, by become very common of Intranet visit Internet, so need the technology of penetrating through private network.Carry out the UDP operation that burrows by the third party, obtain user's external net address and port.Suppose that client A will talk with to client B, but A does not know the address of B, even knowing this dialogue of principle according to NAT can be rejected for the first time, because the NAT of clientB thinks that this is a request that send the outside of never crossing. this time, if A finds oneself not preserve the address of B, the conversation request that sends to B has in other words been failed, it can require the server end to allow B make a call to a hole to A, the session meaning of this B->A is that it makes NAT B think that the address of A is the address that can pass through, and A just can not refused by NAT B when B sends dialogue more like this.Realize the operation that burrows like this.
The application video instructions is submitted to EJB and is carried out route calculating, calculation flow chart such as Fig. 2, respectively according to whether wanting PU direct-connected, above a nearest video forwarding server of user, whether video flowing is arranged, just can judge whether to carry out the application again of this video, if have then only need this video forwarding server to transmit, so just can satisfy the demand that the multi-user checks same road user simultaneously, can guarantee to greatest extent like this, encoder has only one road video to mail to the video forwarding server, and forwarding server can be transmitted to its video flowing many arbitrarily terminal uses.
And then inquire about terminal point, and check whether it has video source above forwarding server, if any the needed video source of this user, then directly transmit, as do not have video source, and then need in all system forwards servers, search the server whether this video source is arranged, have and then utilize this server to transmit, as do not have to find then to carry out the application of video to head end encoder, make video flowing carry out video transmission by the order of the video distribution route that has generated.
The strategy such as the table 1 of local route:
3. describe in detail
3.1 data structure introduction
Make the storage that is used for carrying out data dispatching, the structure of routing table as shown in Figure 3,
Preserve the port list of the video forwarding server of all PU videos with PU node listing Collection puColl, each list cell is PuNode, and its data structure is:
String?subPuId,
Collection ports, // PortNode comprised
Collection?directCalls,
The all-calls of Collection totalCalls//pu
And the data structure of PortNode is:
PortInfo?portInfo;PortNode?parent;
Collection?directCalls;Collection?totalCalls;Collection?children;
The tabulation of using call list callColl to preserve all video calls, the node content of each call list is CallInfo, and comprised the specific object of each video application among the CallInfo, wherein comprised and this time called out the routing table information path that generates, each path node content is PortInfo, and structure is:
protected?int?portNo;
protected?String?objId;protected?String?objIp;
protected?String?srcObjId;protected?int?outPort;
The information of using vtduColl to preserve all video forwarding servers, each node comprise that this VTDU goes up all video reception ports tabulations, with and upstate, data structure is:
protected?String?vtduId;
protected?int?state=StateType.RESPONDING;
Protected Collection ports=null; // this VTDU goes up all video reception ports
The information of using nruColl to preserve all video forwarding servers, each node comprise that this VTDU goes up all video reception ports tabulations, the client port that is used to play tabulation, with and upstate, data structure is:
protected?String?nruId;
protected?int?state=StateType.RESPONDING;
Protected Collection portsRecv=null; // local reception the port list that is used to record a video
Protected Collection portsSend=null; // client port the tabulation that is used to play
3.2 process description
3.2.1 play the point selection flow process
Play the point selection flow process, promptly select to select first video distribution service device (VTDU) in the routing table, the flow process of selection as shown in Figure 4.Among Fig. 4,1, CU and VTDU binding? be then to enter 2 otherwise enter 3; 2, in all VTDU, search only? be then success, otherwise failure; 3, do you search only binding VTDU? be then success, otherwise enter 4; 4, do you search the only VTDU of binding? be then to fail, otherwise success;
Judge that at first the user has not and this video distribution service device is directly bound, if user and certain video distribution service device are bound, the distribution of the video flowing that they are all just need be distributed with this server.Bound a plurality of video distribution service devices simultaneously as the user, just need select onlyly therein, only VTDU searches flow process such as Fig. 5, can not find not select to binding in the VTDU server again;
If the user does not have and any VTDU binds, only need in whole VTDU, select only.
3.2.2 terminal point is selected flow process
Terminal point is selected flow process, promptly selects to select first video distribution service device (VTDU) in the routing table, and the flow process of selection as shown in Figure 6.
The video server (PU) of at first judging user applies has not and this VTDU directly binds, if the user binds with certain VTDU, the distribution of the video flowing that its of this PU is all just need be distributed with this type of server.Bound a plurality of video distribution service devices simultaneously as PU, just need select onlyly therein, only VTDU searches flow process such as Fig. 5, can not find again to do not bind select in the VTDU server only;
If PU does not have and any VTDU binds, only need in whole VTDU, select only.
3.2.3 select to have source node
After having selected starting point and terminal point, if starting point and terminal point all do not have the needed video source of user, then need in all VTDU, carry out active node, owing to preserved the port list of the video forwarding server of all PU videos at PU node listing Collection puColl, according to the load balancing principle, in one group of VTDU, search output the most idle source port arranged, and return known port.
If in the node listing of this PU, there is not the associated video source, then need to carry out new video application to head end encoder, after applying for successfully, upgrade the data structure among the puColl, and in callColl, add the information of this time calling out, thereby be not interrupted if this time call out next time, when having different user to visit the image of this video point again, only need to carry out video and transmit, do not need to carry out the application of video to front end PU again by this VTDU, thus the pressure of increase video server.
3.2.4 select optimum node
Have at the same time under the situation that a plurality of VTDU can select, need to select only node, the step of its selection is as follows:
At first needing to search has the VTDU of video source node, and the video source of the head end encoder that the user checked (PU) from then on VTDU is transmitted, and just has directly to return success; If not then judge whether to carry out load balancing, as needs, then seek the most idle VTDU and transmit, seek structural representation as
Fig. 7Seek the most idle VTDU and be divided into the notst busy two kinds of the notst busy and output of input, and algorithm is very similar, the selection of now just importing the notst busy VTDU is the integer value V that a maximum at first is set, travel through by equipment all qualified VTDU, compare according to the input video way of each equipment and current maximum integer, if the video of this equipment input number S is less than this integer V, then S is composed to V, all can similarly compare in the time of each traversal equipment, if the input number is greater than V, then continue next VTDU, traveled through up to all VTDU, the V of this moment is exactly in this group VTDU equipment, video input number is minimum, and this VTDU just imports the most idle.
As not needing to be responsible for equilibrium, then seek the busiest VTDU and transmit, structure chart and Fig. 7 are similar.