Video transmission system sharing intelligent nodeTechnical Field
The invention relates to the technical field of video transmission, in particular to a video transmission system for sharing intelligent nodes.
Background
When the traditional camera needs to be remotely accessed, the video source is accessed in an RTSP direct connection mode, the camera is remotely accessed through a P2P technology, or the video sharing access is realized in an RTMP stream pushing mode. However, this mode has obvious disadvantages, and depends on the stability of the push streaming server, and if the push streaming server has a problem, the video will be interrupted, and the video access service cannot be provided for the user well. In addition, in the conventional P2P technology, a continuous connection is established between the video device and the P2P server, which causes unnecessary waste of network resources.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a video transmission system sharing intelligent nodes, wherein a server can automatically adjust a node distribution strategy, so that videos of video acquisition equipment can share resources of all intelligent nodes in the Internet of things, load balancing distribution is carried out, excessive access pressure borne by a single intelligent node is avoided, and the stability of accessing the videos by a user is ensured.
In order to solve the technical problems, the technical scheme of the invention is as follows: a video transmission system sharing intelligent nodes comprises a user interaction interface, a server, a plurality of intelligent nodes and a plurality of video source devices; the dynamic adjustment and allocation strategy process of the server to the intelligent nodes and the video acquisition equipment is as follows:
s1: the server judges whether the video source equipment requesting playing has an intelligent node in charge of pushing, if so, the server directly sends an instruction to the intelligent node, and if not, the server enters step S2;
s2: according to the online condition of the intelligent nodes, sending instructions to any online node, excluding the intelligent nodes with the pushing tasks, and only sending instructions to idle intelligent nodes;
s3: when the user does not interrupt the access request through the user interactive interface and the push flow of the intelligent node loses the response, reselecting the intelligent node according to the steps S1-S2;
s4: when the user access is terminated, the access request received by the server is interrupted, after the network delay or flash situation is eliminated, the server carries out overtime judgment according to the last request time, and for the overtime access request, the control instruction of the server to the intelligent node is interrupted, and the video access is finished.
Preferably, the step S1 further includes:
1) numbering a plurality of video source devices, and screening whether an intelligent node responsible for pushing a video exists in an online list of intelligent node devices;
2) if the video source pushing instruction exists, sending a video source pushing instruction to the intelligent node, and enabling the intelligent node to continue to push video information to the server;
3) and if not, the flow proceeds to step S2.
Preferably, the step S2 further includes:
1) screening the intelligent nodes which are not distributed with tasks according to the task attributes in the intelligent node online list to obtain an idle list;
2) randomly screening an idle intelligent node in the idle list;
3) and adding a video pushing task for the screened idle intelligent nodes, and associating the numbers of the video source equipment responsible for pushing.
Preferably, the step S3 further includes:
1) the user interaction interface can regularly initiate a video access request to the server;
2) and the server executes step S1 according to the received access request information, namely, screening whether the intelligent node responsible for the access request of the video source equipment is online or not, and if the intelligent node is not online, executing step S2.
The beneficial effects are that: the use condition of the intelligent nodes in the network is dynamically distributed by utilizing the distributivity characteristic of the intelligent nodes in the Internet of things, and the server can push the video information only when a user initiates an access request in a user interaction interface mode, so that no additional network resource is occupied when the access request is not needed. In addition, when a user initiates an access request, the server can automatically adjust a node allocation strategy, so that the video of the video acquisition equipment can share the resources of all intelligent nodes in the Internet of things, load balancing allocation is carried out, excessive access pressure borne by a single intelligent node is avoided, and the stability of the user for accessing the video is ensured.
Drawings
Fig. 1 is a structural view of the present embodiment.
Detailed Description
The following describes in detail a video transmission system for sharing an intelligent node according to an embodiment of the present invention.
Fig. 1 shows a video transmission system sharing an intelligent node according to this embodiment, which includes a user interaction interface, a server, a plurality of intelligent nodes, and a plurality of video source devices; the dynamic adjustment and allocation strategy process of the server to the intelligent nodes and the video acquisition equipment is as follows:
s1: numbering a plurality of video source devices, and screening whether an intelligent node responsible for pushing a video exists in an online list of intelligent node devices;
if the video source pushing instruction exists, sending a video source pushing instruction to the intelligent node, and enabling the intelligent node to continue to push video information to the server;
if not, the idle intelligent nodes are distributed;
s2: screening intelligent nodes which are not distributed with tasks according to task attributes in the intelligent node online list to obtain an idle list;
randomly screening an idle intelligent node in the idle list;
the screened idle intelligent nodes are added with video pushing tasks and are associated with video source equipment numbers which are responsible for pushing.
Through the steps S1-S2, when a user provides a video access request to the server, the server screens the intelligent nodes meeting the conditions according to the online list and the idle list, and the nodes provide real-time video images of video source equipment to the user.
S3: the user interactive interface can regularly initiate a video access request to the server (the process is executed by the bottom layer of the user interactive interface, and the user only needs to keep normal video access), when the user access request is not interrupted and the push flow of the intelligent node loses response, the server executes a step S1 according to the received access request information, namely whether the intelligent node which is responsible for the access request of the video source equipment is online is screened;
and if the video source equipment is not on line, re-executing the step 2, re-screening the intelligent nodes, updating the corresponding relation between the intelligent nodes and the serial numbers of the video source equipment in the online list of the intelligent node equipment, and continuously pushing the video source equipment information for the user through the idle intelligent nodes.
S4: when the user access is terminated, the access request received by the server is interrupted, after the network delay or flash situation is eliminated, the server carries out overtime judgment according to the last request time, and for the overtime access request, the control instruction of the server to the intelligent node is interrupted, and the video access is finished.
For steps S3 to S4, when the user is accessing the video source device, the intelligent node goes offline due to a failure or other reasons, and the server transfers the access request to another online intelligent node for further transmission according to the distribution policy.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.