Efficient and economical video stream distribution method and system

文档序号:196295 发布日期:2021-11-02 浏览:42次 中文

阅读说明:本技术 一种高效经济的视频流分发方法和系统 (Efficient and economical video stream distribution method and system ) 是由 张旭 彭伟国 曹仲昕 于 2021-07-28 设计创作,主要内容包括:本发明公开了一种高效经济的视频流分发方法和系统,所述系统包括视频流存储服务器、CDN组及自动扩展组;所述视频流存储服务器上的内容,分两路同时分别推送到CDN组和自动扩展组,所述CDN组可单独运行,当所述CDN组的网络流量使用量超过带宽上限或者超过设定的带宽比例时,所述自动扩展组在所述CDN组的基础上运行。本发明工作量减少、成本减少、可控性高、安全性高。(The invention discloses a high-efficiency and economic video stream distribution method and a system, wherein the system comprises a video stream storage server, a CDN group and an automatic expansion group; the content on the video stream storage server is simultaneously and respectively pushed to a CDN group and an automatic expansion group in two paths, the CDN group can operate independently, and when the network flow usage of the CDN group exceeds a bandwidth upper limit or a set bandwidth proportion, the automatic expansion group operates on the basis of the CDN group. The invention has the advantages of reduced workload, reduced cost, high controllability and high safety.)

1. An efficient and economical video stream distribution system is characterized by comprising a video stream storage server, a CDN group and an automatic expansion group; the content on the video stream storage server is simultaneously and respectively pushed to a CDN group and an automatic expansion group in two paths, the CDN group can operate independently, and when the network flow usage of the CDN group exceeds a bandwidth upper limit or a set bandwidth proportion, the automatic expansion group operates on the basis of the CDN group.

2. The efficient and economical video stream distribution system according to claim 1, wherein the CDN group comprises a springboard server and a plurality of CDN node servers, and the plurality of CDN node servers are respectively connected to the springboard server; the springboard server is used for receiving a request of a user for accessing a video stream, judging whether the network flow usage of the CDN group exceeds a bandwidth upper limit or a set bandwidth proportion, if the network flow usage of the CDN group does not exceed the bandwidth upper limit or the set bandwidth proportion, forwarding the user request to one of the CDN node servers, and enabling the user terminal to obtain video stream playing.

3. The efficient and economical video stream distribution system according to claim 2, wherein the automatic extension group comprises a transit server, a domain name forwarding server and a plurality of extension servers, and the plurality of extension servers are respectively connected between the transit server and the domain name forwarding server; the transit server is used for receiving video data of the video stream storage server; the plurality of extension servers are used for receiving the video streams on the transit server; the domain name forwarding server is used for receiving the request of the user for accessing the video stream forwarded by the springboard server, forwarding the access request to one of the plurality of extension servers, and the user terminal obtains video stream playing.

4. The efficient and economical video stream distribution system according to claim 3, wherein said transit server and said plurality of extension servers are transmitted through an intranet.

5. The efficient and economical video stream distribution system according to claim 3 or 4, wherein the plurality of extension servers are composed of a plurality of hot extension servers and cold extension servers, the plurality of hot extension servers and cold extension servers are respectively used for receiving hot video streams and cold video streams, the domain name forwarding server judges whether a user requests a hot video stream or a cold video stream according to a request of the user for accessing a video stream, and forwards an access request to the corresponding hot extension server or cold extension server, and the user terminal obtains video stream playing.

6. An efficient and economical video stream distribution method, characterized by comprising the steps of:

s1, receiving a request of a user for accessing the video stream;

s2, judging whether the network traffic usage of the CDN group exceeds the upper limit of the bandwidth or exceeds the set bandwidth proportion;

s31, if the judgment result is negative, forwarding the user request to a CDN node server in the CDN group, and acquiring video stream playing by the user terminal;

and S32, if the judgment result is yes, forwarding the user request to an expansion server in the automatic expansion group, and acquiring the video stream playing by the user terminal.

7. The distribution method according to claim 6, wherein the automatic expansion group in S32 includes a plurality of expansion servers including a plurality of hot expansion servers and cold expansion servers, and the hot expansion servers and the cold expansion servers are respectively configured to receive hot video streams and cold video streams; the S32 specifically includes: if the judgment result is yes, judging whether the user request is a hot video stream or a cold video stream according to the request of the user for accessing the video stream, correspondingly forwarding the user request to a hot expansion server or a cold expansion server by the domain name forwarding server, and acquiring the video stream play by the user terminal.

8. The distribution method according to claim 6 or 7, wherein the expansion triggering conditions within the automatic expansion group are: and judging whether the total network flow of the automatic expansion group exceeds the multiple of the bandwidth upper limit of a single expansion server, wherein the multiple is the number of the existing expansion servers, and if the judgment result is that the total network flow exceeds the multiple, expanding the next expansion server.

9. The distribution method according to claim 8, wherein the auto-expansion group employs mirror expansion: and copying data of all services and contents to be operated on a certain expansion server to form a mirror image, and directly starting the operation of the newly expanded expansion server in the automatic expansion group according to the mirror image template.

10. The distribution method according to claim 6 or 7, wherein the trigger condition for the reduction of the auto-expansion group is: and if the network flow of the expansion server begins to drop and reaches a value triggering reduction, reducing the expansion server expanded in the automatic expansion group.

Technical Field

The invention relates to the technical field of video transmission, in particular to a high-efficiency and economical video stream distribution method and system.

Background

With the acceleration of the construction of information high-speed network architecture, information acquired by people on the network is not only simple text, image and audio, but also more intuitive and richer new-generation media information. The variable bandwidth technology enables people to enjoy continuous video stream contents on line in an environment with a low bandwidth rate, so that the requirement of a user terminal for acquiring the video stream through a network is greatly increased, and higher requirements are provided for the video stream distribution technology.

In the transmission of real-time video stream, the network may have fluctuation, especially the transmission fluctuation between international networks, which easily causes the problems of video blocking, reconnection and the like, and seriously affects the viewing experience of users. The use of a CDN (Content Delivery Network) system and a GSLB (Global Server Load Balancing) is a common solution for video stream distribution.

The CDN system distributes the content of the source station to the node closest to the user, so that the user can obtain the required content nearby, the response speed and success rate of user access are improved, and the problem of access delay caused by distribution, bandwidth and server performance is solved.

Global load balancing is a scheduling system that is used as a core in a CDN system, and aims to direct a user's request to the nearest node within a range of multiple nodes. Therefore, the availability of the server is determined by judging the load of the server, including data such as CPU occupation and bandwidth occupation, and the link condition between the user and the server can be judged at the same time, and the server with the best link condition is selected, which is the main function of global load balancing.

However, CDN systems also have the following disadvantages:

1. the cost is high: the CDN system is also limited to a certain amount of users and data. Because the traffic of a single server bandwidth is limited, the number of concurrent users that can be supported is also limited. During peak periods, the bandwidth used by a single server exceeds the upper limit, and the quality of the transmitted video stream is problematic, so that the user experience is influenced. Therefore, a large number of CDN node servers need to be invested to meet the access request of the existing user, and the labor cost for investing to maintain the node servers is also high; during the peak period, the extra bandwidth and the server are not actually used by the user, which causes waste.

2. The workload is large: every time a CDN node server is added, the server needs to be deployed and installed in the early stage, the online operation is carried out after the test is normal, the number of nodes is more, and the workload is larger.

3. The safety is low: the more nodes of the CDN servers exposed in the external network, the greater the attack risk, the easier the hacker can break through layer by layer, and the most important core resources in the main server are destroyed

Disclosure of Invention

The invention mainly aims to provide a novel video stream distribution method and system, which can save cost, enable video distribution to be more efficient and have high safety.

In order to achieve the purpose, the invention adopts the technical scheme that:

an efficient and economic video stream distribution system comprises a video stream storage server, a CDN group and an automatic expansion group; the content on the video stream storage server is simultaneously and respectively pushed to a CDN group and an automatic expansion group in two paths, the CDN group can operate independently, and when the network flow usage of the CDN group exceeds a bandwidth upper limit or a set bandwidth proportion, the automatic expansion group operates on the basis of the CDN group.

The CDN group comprises a springboard server and a plurality of CDN node servers, and the plurality of CDN node servers are respectively connected with the springboard server; the springboard server is used for receiving a request of a user for accessing a video stream, judging whether the network flow usage of the CDN group exceeds a bandwidth upper limit or a set bandwidth proportion, if the network flow usage of the CDN group does not exceed the bandwidth upper limit or the set bandwidth proportion, forwarding the user request to one of the CDN node servers, and enabling the user terminal to obtain video stream playing.

The network traffic monitoring data for the CDN group may be provided by Zabbix.

The automatic extension group comprises a transfer server, a domain name forwarding server and a plurality of extension servers, wherein the extension servers are respectively connected between the transfer server and the domain name forwarding server; the transit server is used for receiving video data of the video stream storage server; the plurality of extension servers are used for receiving the video streams on the transit server; the domain name forwarding server is used for receiving the request of the user for accessing the video stream forwarded by the springboard server, forwarding the access request to one of the expansion servers, and the user terminal obtains the video stream playing.

More preferably, the plurality of extension servers include a plurality of hot extension servers and a plurality of cold extension servers, which are respectively used for receiving hot video streams and cold video streams, the domain name forwarding server determines whether a user request is a hot video stream or a cold video stream according to the request of the user for accessing the video streams, and forwards the access request to the corresponding hot extension server or cold extension server, so that the user terminal obtains the video stream playing.

The transit server can not be directly accessed by an external network user, and is transmitted with the hot and cold expansion servers through an internal network.

And the domain name address corresponding to the domain name forwarding server binds the plurality of extension server IPs, wherein the IPs are fixed values and are stored in an IP pool.

An efficient and economical video stream distribution method, characterized by comprising the steps of:

s1, receiving a request of a user for accessing the video stream;

s2, judging whether the network traffic usage of the CDN group exceeds the upper limit of the bandwidth or exceeds the set bandwidth proportion;

s31, if the judgment result is negative, forwarding the user request to a CDN node server in the CDN group, and acquiring video stream playing by the user terminal;

and S32, if the judgment result is yes, forwarding the user request to an expansion server in the automatic expansion group, and acquiring the video stream playing by the user terminal.

The plurality of expansion servers in S32 are composed of a plurality of hot expansion servers and cold expansion servers, and the plurality of hot expansion servers and cold expansion servers are respectively configured to receive hot video streams and cold video streams; the S32 specifically includes: if the judgment result is yes, judging whether the user request is a hot video stream or a cold video stream according to the request of the user for accessing the video stream, forwarding the request to a corresponding hot expansion server or a corresponding cold expansion server by the domain name forwarding server, and acquiring the video stream play by the user terminal.

The extension triggering conditions in the automatic extension group are as follows: and whether the total network flow of the automatic expansion group exceeds the multiple of the bandwidth upper limit of a single expansion server or not is judged, the multiple is the number of the existing expansion servers, and if the total network flow of the automatic expansion group exceeds the multiple, the next expansion server is expanded. Preferably, the upper bandwidth limits of the hot expansion server and the cold expansion server are set and expanded respectively.

For example, the upper limit of the bandwidth of a single hot expansion server is 5G, and if there are n hot expansion servers, the triggering conditions of the hot expansion group are as follows: when the total bandwidth of the hot expansion group server is less than 5(n +1) G and 5nG, triggering and expanding 1 hot expansion server, if the network flow is continuously increased to exceed 5(n +1) G, continuously expanding, and expanding step by step; the same applies to the cold door extension server.

The auto-expansion group may employ mirror expansion: and copying data of all services and contents to be operated on one of the expansion servers to form a mirror image, and directly starting the operation of the newly expanded expansion server in the automatic expansion group according to the mirror image template.

The reduction triggering conditions of the automatic expansion group are as follows: and if the network flow of the expansion server begins to drop and reaches a value triggering the reduction, reducing the expansion server expanded in the automatic expansion group.

Compared with the prior art, the invention has the following beneficial effects:

1. the workload is reduced: the method has the advantages that the method can be automatically expanded according to the bandwidth flow, the configuration and the installation in advance are not needed, only the mirror image is needed to be configured, and the server can be directly provided for a user to use after being expanded;

2. the cost is reduced: the bandwidth flow is automatically reduced, server resources are not wasted and maintenance cost is not occupied in idle time, and only a small number of servers are required to be maintained at ordinary times;

3. the controllability is high: the flow needing to be expanded can be adjusted and controlled at any time according to the actual bandwidth use condition;

4. the safety is high: the expanded server is not directly exposed in an external network, and the risk of being attacked after content splitting and domain name forwarding is reduced.

Drawings

FIG. 1 is a system framework diagram according to a first embodiment of the present invention;

FIG. 2 is a flow chart of a user accessing a CDN group;

FIG. 3 is a flow chart of a user accessing an auto-expansion group;

FIG. 4 is a flow chart of the expansion of an auto-expand group.

Detailed Description

In order to make the technical means, the creation characteristics, the achievement purposes and the effects of the invention easy to understand, the invention is further described with the specific embodiments.

The first embodiment is as follows:

the embodiment provides an efficient and economical video stream distribution system, and a system framework diagram is shown in fig. 1, and the system includes a CDN group and an automatic expansion group. The content on the video stream storage server is respectively pushed to a CDN node server in a CDN group and a transit server in an automatic expansion group in two paths, and the automatic expansion group needs to operate on the basis of the CDN group and cannot operate independently; and the CDN group can operate alone without triggering the automatic expansion group.

As shown in fig. 1 and fig. 2, the CDN group includes a jumper server and a plurality of CDN node servers respectively connected to the jumper server. The method comprises the steps that a request of a user for accessing a video stream is sent to a springboard server, the springboard server judges whether the network flow usage of the whole CDN group exceeds a bandwidth upper limit or a set bandwidth proportion, if not, the user request is forwarded to one of CDN node servers, and the user terminal obtains video stream playing.

The network traffic monitoring data of the CDN servers may be provided by Zabbix. Zabbix is open source system monitoring software under a Linux operating system, is an open source solution scheme for providing distributed system monitoring and network monitoring functions based on pages, and mainly comprises a Zabbix server side and a Zabbix client side. The Zabbix client needs to be installed on a target server to be monitored, and mainly collects hardware information or information related to an operating system, a CPU and the like. The method comprises the steps that the Zabbix client side is installed on the CDN server, network flow data of each CDN server can be collected, and the network flow data are displayed on a web page of the Zabbix server side.

Therefore, daily use can be guaranteed only by providing a small number of CDN servers.

Referring to fig. 1 and 3, the automatic extension group includes a transit server, a domain name forwarding server, and a plurality of extension servers, and the plurality of extension servers are respectively connected between the transit server and the domain name forwarding server. The plurality of expansion servers are divided into hot expansion servers and cold expansion servers, all the hot expansion servers form a hot expansion group, and all the cold expansion servers form a cold expansion group.

According to the access amount statistical data of the users, the hot expansion group and the cold expansion group divide the video stream content on the transit server into a hot video stream and a cold video stream. The transit server can not be accessed by the external network user directly, and the transit server and the hot and cold expansion servers use internal network transmission. The method comprises the steps that a request of a user for accessing a video stream is sent to a springboard server, the springboard server judges whether the network flow usage of the whole CDN group exceeds a bandwidth upper limit or a set bandwidth proportion, if the network flow usage exceeds the bandwidth upper limit or the set bandwidth proportion, the user request is forwarded to a domain name forwarding server, the domain name forwarding server judges whether the user accesses hot or cold content according to the user request, the access request is forwarded to a corresponding hot expansion server or cold expansion server which is nearest to the user, and the user terminal obtains video stream playing. In this embodiment, the conditions for triggering the auto expansion group by the springboard server are as follows: 2 servers with network bandwidth of 10G exist, the value of the network flow can be set to be 20G, and the triggering is carried out when the network flow exceeds 20G; or it may be set to a value of more than 80% of the total bandwidth fraction, the total network traffic value exceeds 16G trigger.

Specifically, the operation and maintenance personnel classify the programs into a hot program table and a cold program table by access amount statistics and ranking. The information in the table, which contains program names and unique identifiers, is stored in the database of each extension server in the auto-extension group. The user request contains the unique identification of the video stream, and the domain name address of the domain name forwarding server corresponds to a plurality of IPs for the extension server, and the IPs are fixed values and are stored in an IP pool. The domain name forwarding server can judge whether the user request is a hot program or a cold program through the unique identifier in the user request, forwards the user request to a corresponding hot expansion server or a cold expansion server which is closest to the user, and the user terminal obtains video stream playing.

The automatic expansion group can also be expanded in a group, wherein the hot expansion group and the cold expansion group are respectively expanded according to different trigger conditions without mutual influence.

As shown in fig. 4, the extension triggering conditions in the auto extension group are: and whether the total network flow of the automatic expansion group exceeds the multiple of the bandwidth upper limit of the single expansion server, wherein the multiple is the number of the existing expansion servers, and if the total network flow of the automatic expansion group exceeds the multiple, gradual expansion is started. Preferably, the hot gate expansion group and the cold gate expansion group are respectively expanded according to different trigger conditions without mutual influence. That is, it is determined whether the network traffic of the hot expansion server and/or the cold expansion server exceeds the multiple of the bandwidth upper limit of the single expansion server, where the multiple is the number of the existing expansion servers, and if the network traffic exceeds the bandwidth upper limit of the single expansion server, the network traffic is expanded to the next hot expansion server and/or the cold expansion server.

For example, the upper limit of the bandwidth of a single hot expansion server is 5G, and if there are n hot expansion servers, the triggering conditions of the hot expansion group are as follows: when the total bandwidth of the hot expansion group server is less than 5(n +1) G and 5nG, triggering and expanding 1 hot expansion server, if the network flow is continuously increased to exceed 5(n +1) G, continuously expanding, and expanding step by step; the same applies to the cold door extension server.

Number of extension servers: the hot expansion group is expanded more frequently, the upper limit of the expansion quantity can be set to be larger, the cold expansion group is generally expanded less, and the upper limit of the expansion quantity can be set to be smaller. And according to the actual flow condition, if the flow is continuously increased, the upper limit of the expansion quantity needs to be enlarged, otherwise, if the flow is not changed or reduced, the expansion quantity can be set to be 0, and the expansion is not carried out.

The auto-expansion group may also expand the server according to a mirror template: and copying data of all services and contents to be operated on the hot or cold expansion server to form a mirror image, and automatically expanding the newly expanded hot expansion server and cold expansion server in the group to directly start operation according to the mirror image template without manual configuration.

IP allocation: after a new hot and/or cold expansion server is started, the Zabbix monitors provided data to judge whether the new expansion server is started normally, and if the new expansion server is started normally, an external network IP cannot be allocated; if the starting is normal, the IP which is not associated with the server in the IP pool is associated with the new expansion server and bound to the domain name, the new expansion server is added into the load balance of the original CDN group, a user can access the new expansion server, the access pressure of the original expansion server is reduced, and finally the number of the servers in the expansion group is updated; when the access amount of the domain name forwarding server is reduced, the network flow reaches a value for triggering reduction, and the corresponding content server is reduced. One or more shutdown is selected from the expanded servers, and the parameters can be set according to actual conditions and are gradually reduced. The previously allocated extranet IP is recycled into the IP pool, and the next expansion can be continuously used. Meanwhile, the domain name removes the binding of the IP of the shut-down server, and the user cannot access the shut-down server. And finally, updating the number of the servers of the extended group.

And the domain name forwarding server counts the accessed flow and judges whether the servers of the hot expansion group or the cold expansion group need to be reduced or not according to the unique identifier requested by the user. The network flow value for triggering and reducing can be set according to the actual access condition, and the network flow values for triggering and reducing the hot expansion group and the cold expansion group can also be set with different values respectively.

And if the network flow of the hot expansion group begins to drop and reaches a value triggering reduction, reducing the hot expansion servers which are already expanded in the hot automatic expansion group. Similarly, if the network traffic of the cold door expansion group begins to drop and reaches a value that triggers the reduction, the cold door expansion servers that have been expanded in the cold door automatic expansion group are reduced. The conditions that trigger the reduction are the opposite of the conditions that trigger the expansion: and whether the total network flow of the automatic expansion group is smaller than the multiple of the bandwidth upper limit of the single expansion server, wherein the multiple is the number of the existing expansion servers, and if the total network flow of the automatic expansion group is smaller than the bandwidth upper limit of the single expansion server, the automatic expansion group starts to be gradually reduced.

Example two:

the embodiment provides an efficient and economic video stream distribution method, which comprises the following steps:

receiving a request of a user for accessing a video stream;

the springboard server judges whether the network traffic usage of the CDN group exceeds the upper limit of the bandwidth or exceeds a set bandwidth proportion;

if the judgment result is that the number of the CDN node servers exceeds the preset threshold value, the user request is forwarded to one of the CDN node servers of the CDN group;

the CDN node server sends the video stream to a user terminal;

if the judgment result is that the user request exceeds the preset threshold value, forwarding the user request to a domain name forwarding server;

the domain name forwarding server judges whether the content accessed by the user is hot or cold according to the user request, and forwards the access request to a corresponding hot expansion server or cold expansion server nearest to the user, and the user terminal acquires video stream playing.

The extension triggering conditions within the auto-extension group are: and whether the total network flow of the automatic expansion group exceeds the multiple of the bandwidth upper limit of a single expansion server or not is judged, the multiple is the number of the existing expansion servers, and if the total network flow of the automatic expansion group exceeds the multiple, the next expansion server is expanded.

The auto-expansion group may also expand the server according to a mirror template: and copying data of all services and contents to be operated on a certain expansion server to form a mirror image, and directly starting the operation of the newly expanded expansion server in the automatic expansion group according to the mirror image template.

The auto-expanding group may also be reduced, the conditions triggering the reduction being: and if the network flow of the expansion server begins to drop and reaches a value triggering the reduction, reducing the expansion server expanded in the automatic expansion group.

The foregoing shows and describes the general principles and broad features of the present invention and advantages thereof. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are described in the specification and illustrated only to illustrate the principle of the present invention, but that various changes and modifications may be made therein without departing from the spirit and scope of the present invention, which fall within the scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种视频内容分发方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类