CN112422329B - Management method and device of streaming media server cluster and electronic equipment - Google Patents

Management method and device of streaming media server cluster and electronic equipment Download PDF

Info

Publication number
CN112422329B
CN112422329B CN202011227042.0A CN202011227042A CN112422329B CN 112422329 B CN112422329 B CN 112422329B CN 202011227042 A CN202011227042 A CN 202011227042A CN 112422329 B CN112422329 B CN 112422329B
Authority
CN
China
Prior art keywords
streaming media
media server
preset
server cluster
capacity reduction
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.)
Active
Application number
CN202011227042.0A
Other languages
Chinese (zh)
Other versions
CN112422329A (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 Miluoxing Technology Group Co ltd
Original Assignee
Hangzhou Miluoxing Technology Group 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 Miluoxing Technology Group Co ltd filed Critical Hangzhou Miluoxing Technology Group Co ltd
Priority to CN202011227042.0A priority Critical patent/CN112422329B/en
Publication of CN112422329A publication Critical patent/CN112422329A/en
Application granted granted Critical
Publication of CN112422329B publication Critical patent/CN112422329B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/0816Configuration setting characterised by the conditions triggering a change of settings the condition being an adaptation, e.g. in response to network events
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Automation & Control Theory (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a method, a device and electronic equipment for managing a streaming media server cluster, which relate to the technical field of computers and comprise the steps of obtaining the number of pushed streams of each streaming media server in the streaming media server cluster to be managed at the current moment and the number of connections of the streaming media server cluster to be managed at a plurality of moments in each preset time period in a preset historical period; then, whether the streaming media server cluster to be managed needs to be subjected to capacity reduction is autonomously determined according to the connection number; and if the capacity reduction is determined, determining a capacity reduction server according to the number of pushed streams at the current moment, a preset pushed stream number threshold value and a preset capacity reduction threshold value, and constructing an updated streaming media server cluster based on the rest streaming media servers. The method can realize the complete autonomous decision of the capacity reduction of the streaming media server cluster, the capacity reduction decision is more reasonable, and the technical problems that the autonomous decision cannot be realized and the decision error is easy to occur in the server cluster management method in the prior art are effectively solved.

Description

Management method and device of streaming media server cluster and electronic equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for managing a streaming media server cluster, and an electronic device.
Background
The server cluster is used for centralizing a plurality of servers to provide the same service for the outside, and the streaming media server has the main function of transmitting a video file to a client by a streaming protocol (RTP/RTSP, MMS, RTMP and the like) for a user to watch online; and real-time video streams can be received from video acquisition and compression software and then are live broadcast to the client side through a streaming protocol. When a streaming media server cluster provides streaming media services to the outside, if the cluster access pressure is reduced, in order to save system resources, the streaming media server cluster often needs to be reduced in capacity.
Disclosure of Invention
The invention aims to provide a management method and a device of a streaming media server cluster and electronic equipment, so as to solve the technical problems that the server cluster management method in the prior art cannot make a decision autonomously and is easy to make a decision incorrectly.
In a first aspect, the present invention provides a method for managing a streaming media server cluster, including: acquiring the number of pushed streams of each streaming media server in a streaming media server cluster to be managed at the current moment and the number of connections of the streaming media server cluster to be managed at a plurality of moments in each preset time period in a preset historical period; the starting time of the preset time period is the same as the current time, and the connection number represents the sum of the number of push streams and the number of pull streams; determining whether the current time is to reduce the capacity of the streaming media server cluster to be managed based on the connection number of the streaming media server cluster to be managed at a plurality of times in each preset time period in a preset historical period; and if the capacity reduction is determined, determining the capacity reduction server based on the number of pushed streams of each streaming media server at the current moment, the preset threshold of the number of pushed streams and the preset capacity reduction threshold, and constructing an updated streaming media server cluster based on the rest streaming media servers.
In an optional embodiment, determining whether to reduce the capacity of the to-be-managed streaming media server cluster at the current time based on the number of connections of the to-be-managed streaming media server cluster at a plurality of times within each preset time period in a preset history cycle includes: determining a connection number development trend of each preset time period in a preset history cycle based on the connection number of the streaming media server cluster to be managed at a plurality of moments in each preset time period in the preset history cycle; wherein the trend comprises any one of: ascending and descending; and determining whether to reduce the capacity of the streaming media server cluster to be managed at the current moment based on the connection number development trend of all preset time periods.
In an optional embodiment, determining whether to reduce the capacity of the streaming media server cluster to be managed at the current moment based on the connection number development trend of all preset time periods includes: if the number of preset time periods with the development trend of descending in the preset historical period reaches a preset threshold value, determining that the streaming media server cluster to be managed needs to be subjected to capacity reduction; and if the number of the preset time periods with the descending development trend in the preset historical period does not reach a preset threshold value, determining that the capacity reduction of the streaming media server cluster to be managed is not needed.
In an optional embodiment, determining a capacity reduction server based on the number of pushed streams of each streaming media server at the current time, a preset threshold of the number of pushed streams, and a preset capacity reduction threshold includes: comparing the push stream number of each streaming media server at the current moment with the preset push stream number threshold value, and determining a target streaming media server set based on the comparison result; the number of push streams of all the streaming media servers in the target streaming media server set is smaller than the preset number of push streams; judging whether the number of the streaming media servers in the target streaming media server set is larger than the preset capacity reduction threshold value or not; if so, randomly selecting a target number of streaming media servers from the target streaming media server set as capacity reduction servers; wherein the target number is equal to the preset capacity reduction threshold; and if not, taking all the streaming media servers in the target streaming media server set as capacity reduction servers.
In an alternative embodiment, the method further comprises: after the capacity reduction server is determined, when the number of pushed streams of the capacity reduction server is 0, the capacity reduction server is recycled.
In an alternative embodiment, the method further comprises: after the capacity reduction server is determined, if the to-be-managed streaming media server cluster receives a new connection request, the new connection request is distributed to the streaming media server in the updated streaming media server cluster.
In an alternative embodiment, the number of preset time periods within the preset history period is an odd number.
In a second aspect, the present invention provides a management apparatus for a streaming media server cluster, including: the system comprises an acquisition module, a processing module and a management module, wherein the acquisition module is used for acquiring the number of pushed streams of each streaming media server in a streaming media server cluster to be managed at the current moment and the number of connections of the streaming media server cluster to be managed at a plurality of moments in each preset time period in a preset history period; the starting time of the preset time period is the same as the current time, and the connection number represents the sum of the number of push streams and the number of pull streams; the first determining module is used for determining whether the current time is used for capacity reduction of the streaming media server cluster to be managed based on the connection number of the streaming media server cluster to be managed at a plurality of times in each preset time period in a preset historical period; and the second determining module is used for determining the capacity reduction server based on the number of pushed streams of each streaming media server at the current moment, the preset threshold of the number of pushed streams and the preset capacity reduction threshold if the capacity reduction is determined, and constructing an updated streaming media server cluster based on the rest streaming media servers.
In a third aspect, the present invention provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program operable on the processor, and the processor executes the computer program to implement the steps of the method according to any of the foregoing embodiments.
In a fourth aspect, the invention provides a computer readable medium having non-volatile program code executable by a processor, the program code causing the processor to perform the method of any of the preceding embodiments.
The method for managing the streaming media server cluster comprises the following steps: acquiring the number of pushed streams of each streaming media server in a streaming media server cluster to be managed at the current moment and the number of connections of the streaming media server cluster to be managed at a plurality of moments in each preset time period in a preset historical period; the starting time of the preset time period is the same as the current time, and the connection number represents the sum of the push flow number and the pull flow number; determining whether the current time is to carry out capacity reduction on the streaming media server cluster to be managed based on the connection number of the streaming media server cluster to be managed at a plurality of times in each preset time period in a preset historical period; and if the capacity reduction is determined, determining the capacity reduction server based on the number of pushed streams of each streaming media server at the current moment, the preset number of pushed streams threshold and the preset capacity reduction threshold, and constructing an updated streaming media server cluster based on the rest streaming media servers.
In the prior art, when a server cluster is subjected to capacity reduction, a worker often needs to select a recovered server according to experience, manual intervention is excessive, autonomous decision cannot be made, and decision errors are easy to occur. Compared with the prior art, the invention provides a management method of a streaming media server cluster, which comprises the steps of firstly obtaining the number of stream pushing of each streaming media server in the streaming media server cluster to be managed at the current moment and the number of connections of the streaming media server cluster to be managed at a plurality of moments in each preset time period in a preset historical period; then, whether the streaming media server cluster to be managed needs to be subjected to capacity reduction is autonomously determined according to the connection number; and if the capacity reduction is determined, determining a capacity reduction server according to the number of pushed streams at the current moment, a preset pushed stream number threshold value and a preset capacity reduction threshold value, and constructing an updated streaming media server cluster based on the rest streaming media servers. The method can realize the complete autonomous decision of the capacity reduction of the streaming media server cluster, the capacity reduction decision is more reasonable, and the technical problems that the autonomous decision cannot be realized and the decision error is easy to occur in the server cluster management method in the prior art are effectively solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a management method for a streaming media server cluster according to an embodiment of the present invention;
fig. 2 is a flowchart for determining whether to reduce the capacity of a streaming media server cluster to be managed at a current time based on the connection numbers of the streaming media server cluster to be managed at a plurality of times in each preset time period in a preset history cycle according to an embodiment of the present invention;
fig. 3 is a flowchart for determining a capacity reduction server based on the number of pushed streams of each streaming media server at the current time, a preset threshold of the number of pushed streams, and a preset threshold of the capacity reduction provided in the embodiment of the present invention;
fig. 4 is a functional block diagram of a management apparatus of a streaming media server cluster according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
In the prior art, when the access pressure of a streaming media server cluster is reduced, in order to reduce resource waste, the streaming media server cluster often needs to be reduced, that is, part of streaming media servers in the streaming media server cluster are recovered, so that the updated streaming media server cluster can not only ensure the access requirements of users, but also ensure reasonable resource allocation. In view of the above, embodiments of the present invention provide a method for managing a streaming media server cluster, so as to alleviate the technical problems mentioned above.
Example one
Fig. 1 is a flowchart of a method for managing a streaming media server cluster according to an embodiment of the present invention, and as shown in fig. 1, the method specifically includes the following steps:
step S102, acquiring the number of pushed streams of each streaming media server in the streaming media server cluster to be managed at the current moment and the number of connections of the streaming media server cluster to be managed at a plurality of moments in each preset time period in a preset historical period.
Specifically, in the embodiment of the present invention, each streaming media server in a streaming media server cluster is installed with one acquisition program, and all the acquisition programs are connected to a central server, and the acquisition program can acquire parameters such as the connection number of the streaming media server where the acquisition program is located and hardware data (CPU, memory, bandwidth, hard disk usage rate, etc.) in real time, where the connection number represents the sum of the push stream number and the pull stream number, the push stream number refers to the total number of anchor broadcasts on line, and the pull stream number refers to the total number of viewers on line.
When a streaming media server cluster to be managed is managed, the embodiment of the invention specifically studies how to reduce the capacity of the streaming media server cluster, and at the beginning of the operation of the method, a central server first acquires the number of pushed streams of each streaming media server in the streaming media server cluster to be managed at the current moment and the number of connections of the streaming media server cluster to be managed at a plurality of moments in each preset time period in a preset historical period, wherein the starting moment of the preset time period is the same moment as the current moment.
For convenience of understanding, in the following description, assume that the current time is 9:25am, the preset history period is 3 days, the preset time duration is 30 minutes (9:25am-9:55am), and the streaming server cluster includes 5 streaming servers, which are respectively: a1, a2, A3, a4, a 5.
To determine whether the streaming media server cluster needs to be scaled, on one hand, the number of streams pushed by the streaming media servers a1-a5 at the current time is (30, 60, 10, 5, 80), and on the other hand, the number of connections at several times within 9:25am-9:55am per day in the previous 3 days (yesterday, the previous day, the most previous day) of the streaming media server cluster to be managed a1-a5 is obtained, for example, the number of connections at 5 times of 9:29am, 9:34am, 9:40am, 9:50am, 9:55am are acquired, for example, yesterday shows that the number of connections at the 5 times is (6000, 9000, 10000, 150000, 17000), the number of connections at the 5 times of the day before is (8000, 9000, 11000, 130000, 13500), and the number of connections at the 5 times of the day before is (10000, 9000, 9500, 8000, 7000).
The embodiment of the invention does not specifically limit the duration of the preset history period and the duration of the preset time period, and the user can select the preset history period according to actual requirements, generally, the preset history period selects the days which are the closest to the current date.
Step S104, determining whether the current time carries out capacity reduction on the streaming media server cluster to be managed based on the connection number of the streaming media server cluster to be managed at a plurality of times in each preset time period in the preset historical period.
After the connection number at a plurality of times in each preset time period in the preset history period is obtained, the connection number in the historical preset time period is used as a reference to further determine whether to reduce the capacity of the streaming media server cluster, for example, whether to reduce the capacity of the streaming media server cluster at the current time may be determined by referring to the development trend of the connection number of the streaming media server cluster.
Step S106, if the capacity reduction is determined, the capacity reduction server is determined based on the number of pushed streams of each streaming media server at the current moment, the preset threshold value of the number of pushed streams and the preset capacity reduction threshold value, and an updated streaming media server cluster is constructed based on the remaining streaming media servers.
If the streaming media server cluster is determined to be subjected to capacity reduction, the capacity reduction server is determined according to the number of pushed streams of each streaming media server at the current moment, a preset threshold of the number of pushed streams and a preset threshold of the capacity reduction, the capacity reduction server refers to the streaming media server to be recovered, the capacity reduction server may be one or more, the preset threshold of the pushed streams is a threshold used for judging whether the number of pushed streams of the streaming media server is too low, the preset threshold of the capacity reduction is a limit used for limiting the number of the streaming media servers recovered at a time, after the capacity reduction server is determined, the remaining streaming media servers are integrated, and an updated streaming media server cluster is constructed.
In the prior art, when a streaming media server cluster is subjected to capacity reduction, staff often need to select a recycled streaming media server according to experience, so that too much manual intervention is required, autonomous decision cannot be made, and decision errors are prone to occur. Compared with the prior art, the invention provides a management method of a streaming media server cluster, which comprises the steps of firstly obtaining the number of pushed streams of each streaming media server in the streaming media server cluster to be managed at the current moment and the connection number of the streaming media server cluster to be managed at a plurality of moments in each preset time period in a preset historical period; then, whether the streaming media server cluster to be managed needs to be subjected to capacity reduction is autonomously determined according to the connection number; and if the capacity reduction is determined, determining a capacity reduction server according to the number of pushed streams at the current moment, a preset pushed stream number threshold value and a preset capacity reduction threshold value, and constructing an updated streaming media server cluster based on the rest streaming media servers. The method can realize the complete autonomous decision of the capacity reduction of the streaming media server cluster, the capacity reduction decision is more reasonable, and the technical problems that the autonomous decision cannot be realized and the decision error is easy to occur in the server cluster management method in the prior art are effectively solved.
The above briefly describes the management method of the streaming media server cluster provided in the embodiment of the present invention, and details how to determine whether to perform a capacity reduction on the streaming media server cluster to be managed at the current time are described below.
In an optional implementation manner, as shown in fig. 2, in the step S104, determining whether to reduce the capacity of the streaming media server cluster to be managed at the current time based on the number of connections of the streaming media server cluster to be managed at a plurality of times in each preset time period in the preset history cycle, specifically includes the following steps:
step S1041, determining a connection number development trend of each preset time period in the preset history period based on the connection numbers of the streaming media server cluster to be managed at a plurality of times in each preset time period in the preset history period.
Specifically, after the connection number of the streaming media server cluster to be managed at a plurality of moments in each preset time period in the preset history cycle is obtained, the connection number development trend of each preset time period in the preset history cycle is determined according to the connection numbers, wherein the development trend includes any one of the following trends: ascending and descending.
By using the above example, the connection numbers of 5 moments in the preset time period of yesterday are respectively (6000, 9000, 10000, 150000, 17000), the connection numbers of 5 moments in the preset time period of the previous day are respectively (8000, 9000, 11000, 130000, 13500), and the connection numbers of 5 moments in the preset time period of the previous day are respectively (10000, 9000, 9500, 8000, 7000), the connection number development trend of each preset time period is identified by using some existing algorithm models or other technical means, and according to the above data, the connection numbers in the preset time period of yesterday are in an ascending trend, the connection numbers in the preset time period of the previous day are also in an ascending trend, and the connection numbers in the preset time period of the previous day are in a descending trend.
Step S1042, determining whether to reduce the volume of the streaming media server cluster to be managed at the current time based on the connection number development trend of all the preset time periods.
After the development trend of the number of connections in each preset time period in the preset history period is determined, whether the streaming media server cluster needs to be reduced or not is determined according to the development trend.
In an optional implementation manner, in the step S1042, it is determined whether to reduce the capacity of the streaming media server cluster to be managed at the current time based on the connection number development trend of all preset time periods, where the method specifically includes the following steps:
and if the number of the preset time periods with the development trend of descending in the preset historical period reaches a preset threshold value, determining that the streaming media server cluster to be managed needs to be subjected to capacity reduction.
And if the number of the preset time periods with the descending development trend in the preset historical period does not reach the preset threshold value, determining that the capacity reduction of the streaming media server cluster to be managed is not needed.
In the example provided above, when the preset history period is 3 days, the number of connections for 2 days is in an upward trend, and the number of connections for 1 day is in a downward trend. If the preset threshold is set to be 2, the number of the preset time periods with the descending development trend in the preset historical period is not equal to the preset threshold, and the streaming media server cluster to be managed does not need to be subjected to capacity reduction; however, if the preset threshold is set to 1, the number of the preset time periods in which the development trend in the preset history period is decreased reaches the preset threshold, and the streaming media server cluster to be managed needs to be reduced. Optionally, the number of the preset time periods in the preset history period is an odd number, and if the odd number is N, the preset threshold value may be set to (N +1)/2, so that when the trend of the connection number is more than half of the descending trend, it may be determined that the streaming media server cluster needs to be reduced.
In the above, a detailed description is given to how to determine whether to perform a capacity reduction on the streaming media server cluster to be managed at the current time, and a description is given below of how to select a capacity reduction server after determining the capacity reduction.
In an optional implementation manner, as shown in fig. 3, in the step S106, determining a capacity reduction server based on the number of pushed streams of each streaming media server at the current time, a preset threshold of the number of pushed streams, and a preset capacity reduction threshold specifically includes the following steps:
step S1061, comparing the number of stream pushes of each streaming media server at the current time with a preset threshold of the number of stream pushes, and determining a target streaming media server set based on the comparison result.
Specifically, after it is determined that the streaming media server cluster needs to be subjected to capacity reduction, the number of pushed streams of each streaming media server at the current time is first compared with a preset pushed stream threshold, and a target streaming media server set is determined according to all comparison results, where the preset pushed stream threshold is described above as a threshold used for determining whether the number of pushed streams of the streaming media server is too low, and in the embodiment of the present invention, the number of pushed streams of all streaming media servers in the target streaming media server set is smaller than the preset pushed stream number.
By way of example above, the number of streams pushed by the streaming media servers at the current time point a1-a5 is (30, 60, 10, 5, 80), and if the preset threshold of the number of streams is 40, the number of streaming media servers in the target set of streaming media servers is 3.
Step S1062, determining whether the number of the streaming media servers in the target streaming media server set is greater than a preset capacity reduction threshold.
If yes, go to step S1063, and if no, go to step S1064.
Step S1063, randomly selecting a target number of streaming media servers from the target streaming media server set as capacity reduction servers, where the target number is equal to a preset capacity reduction threshold.
Step S1064, using all the streaming media servers in the target streaming media server set as the capacity reduction servers.
In order to avoid that the number of the single recovery servers affects parameters such as server response time too much, a preset capacity reduction threshold is introduced when the capacity reduction number is determined, which has been described above, where the preset capacity reduction threshold is a limit value used for limiting the number of the single recovery streaming media servers, and if the preset capacity reduction threshold is 2, it is described that the single capacity reduction allows recovery of 2 streaming media servers at most, in the above example, the number of the streaming media servers in the target streaming media server set is 3, that is, the number of the streaming media servers to be recovered is proposed to be 3, but since 3>2 (the preset capacity reduction threshold), it is determined that the capacity reduction operation at the current time can only recover 2 streaming media servers, and 2 streaming media servers can be randomly selected from the target streaming media server set as the capacity reduction servers; if the preset capacity reduction threshold value is 4, it indicates that the single capacity reduction allows to recover 4 streaming media servers at most, and since 4>3, all the streaming media servers in the target streaming media server set can be used as capacity reduction servers to be recovered.
After determining that the streaming media server cluster to be managed is subjected to capacity reduction and selecting a capacity reduction server, in order to ensure that the capacity reduction operation does not affect the user experience, in an optional implementation manner, the method further includes the following steps:
and after the capacity reduction server is determined, when the number of pushed streams of the capacity reduction server is 0, the capacity reduction server is recovered, and after the capacity reduction server is determined, if the streaming media server cluster to be managed receives a new connection request, the new connection request is distributed to the streaming media server in the updated streaming media server cluster.
That is, even though it is determined at the current moment that the a4 streaming server is to be reclaimed, it is necessary to wait until all the online anchor of the a4 server is offline (the number of push streams is 0) before the operation of the streaming server reclamation is performed, and if it is determined that a4 is to be reclaimed, the streaming server cluster distributes a new anchor connection request to the remaining streaming servers after receiving the new connection request by the central server.
By using the scheme provided by the embodiment of the invention, the complete autonomous decision of the capacity reduction of the streaming media server cluster can be realized by acquiring the push stream number of each streaming media server in the streaming media server cluster to be managed at the current moment and the connection number of the cluster at a plurality of moments in each preset time period in the preset historical period and processing the data, so that the capacity reduction decision is more reasonable and intelligent without manual intervention, and the technical problems that the autonomous decision cannot be made and the decision error is easy to occur in the server cluster management method in the prior art are effectively solved. The embodiment of the invention mainly describes a management method of a streaming media server cluster, and the method is also suitable for the management of server clusters with state connection and the management of server clusters with state distribution.
Example two
The embodiment of the present invention further provides a management device for a streaming media server cluster, where the management device for a streaming media server cluster is mainly used to execute the management method for a streaming media server cluster provided in the first embodiment of the present invention, and the following describes the management device for a streaming media server cluster provided in the embodiment of the present invention in detail.
Fig. 4 is a functional block diagram of a management apparatus for a streaming media server cluster according to an embodiment of the present invention, and as shown in fig. 4, the apparatus mainly includes: an obtaining module 10, a first determining module 20, a second determining module 30, wherein:
the acquiring module 10 is configured to acquire a number of stream pushing of each streaming media server in the streaming media server cluster to be managed at a current time, and a number of connections of the streaming media server cluster to be managed at a plurality of times within each preset time period within a preset history period; the starting time of the preset time period is the same as the current time, and the connection number represents the sum of the push flow number and the pull flow number.
The first determining module 20 is configured to determine whether to reduce the capacity of the streaming media server cluster to be managed at the current time based on the number of connections of the streaming media server cluster to be managed at several times in each preset time period in the preset history cycle.
If the capacity reduction is determined, the second determining module 30 determines a capacity reduction server based on the number of pushed streams of each streaming media server at the current time, the preset threshold of the number of pushed streams and the preset capacity reduction threshold, and constructs an updated streaming media server cluster based on the remaining streaming media servers.
In the prior art, when a streaming media server cluster is subjected to capacity reduction, staff often need to select a recycled streaming media server according to experience, so that too much manual intervention is required, autonomous decision cannot be made, and decision errors are prone to occur. Compared with the prior art, the invention provides a management device of a streaming media server cluster, which comprises the steps of firstly obtaining the number of stream pushing of each streaming media server in the streaming media server cluster to be managed at the current moment and the number of connections of the streaming media server cluster to be managed at a plurality of moments in each preset time period in a preset historical period; then, whether the streaming media server cluster to be managed needs to be subjected to capacity reduction is autonomously determined according to the connection number; and if the capacity reduction is determined, determining a capacity reduction server according to the number of pushed streams at the current moment, a preset pushed stream number threshold value and a preset capacity reduction threshold value, and constructing an updated streaming media server cluster based on the rest streaming media servers. The device of the invention can realize the complete autonomous decision of the capacity reduction of the streaming media server cluster, the capacity reduction decision is more reasonable, and the technical problems that the autonomous decision cannot be made and the decision error is easy to occur in the server cluster management method in the prior art are effectively solved.
Optionally, the first determining module 20 includes:
the first determining unit is used for determining the connection number development trend of each preset time period in the preset history period based on the connection numbers of the streaming media server cluster to be managed at a plurality of moments in each preset time period in the preset history period; wherein, the development trend comprises any one of the following: ascending and descending.
And the second determining unit is used for determining whether the streaming media server cluster to be managed is subjected to capacity reduction at the current moment based on the connection number development trend of all the preset time periods.
Optionally, the second determining unit is specifically configured to:
and if the number of the preset time periods with the development trend of descending in the preset historical period reaches a preset threshold value, determining that the streaming media server cluster to be managed needs to be subjected to capacity reduction.
And if the number of the preset time periods with the descending development trend in the preset historical period does not reach the preset threshold value, determining that the capacity reduction of the streaming media server cluster to be managed is not needed.
Optionally, the second determining module is specifically configured to:
comparing the push stream number of each streaming media server at the current moment with a preset push stream number threshold value, and determining a target streaming media server set based on the comparison result; and the number of the push streams of all the streaming media servers in the target streaming media server set is less than the preset number of the push streams.
And judging whether the number of the streaming media servers in the target streaming media server set is larger than a preset capacity reduction threshold value or not.
If yes, randomly selecting a target number of streaming media servers from the target streaming media server set as capacity reduction servers; wherein the target number is equal to a preset capacity reduction threshold.
And if not, taking all the streaming media servers in the target streaming media server set as capacity reduction servers.
Optionally, the apparatus further comprises:
and the recovery module is used for recovering the capacity server when the number of pushed streams of the capacity server is 0 after the capacity server is determined.
Optionally, the apparatus further comprises:
and the distribution module is used for distributing the new connection request to the streaming media server in the updated streaming media server cluster if the streaming media server cluster to be managed receives the new connection request after the capacity reduction server is determined.
Optionally, the number of preset time periods in the preset history cycle is an odd number.
EXAMPLE III
Referring to fig. 5, an embodiment of the present invention provides an electronic device, including: a processor 60, a memory 61, a bus 62 and a communication interface 63, wherein the processor 60, the communication interface 63 and the memory 61 are connected through the bus 62; the processor 60 is arranged to execute executable modules, such as computer programs, stored in the memory 61.
The memory 61 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 63 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used.
The bus 62 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 5, but this does not indicate only one bus or one type of bus.
The memory 61 is used for storing a program, the processor 60 executes the program after receiving an execution instruction, and the method executed by the apparatus defined by the flow process disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 60, or implemented by the processor 60.
The processor 60 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 60. The Processor 60 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory 61, and the processor 60 reads the information in the memory 61 and, in combination with its hardware, performs the steps of the above method.
The management method and apparatus for a streaming media server cluster and the computer program product of an electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing a non-volatile program code executable by a processor, where instructions included in the program code may be used to execute the method described in the foregoing method embodiments, and specific implementation may refer to the method embodiments, and will not be described herein again.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings or the orientations or positional relationships that the products of the present invention are conventionally placed in use, and are only used for convenience in describing the present invention and simplifying the description, but do not indicate or imply that the devices or elements referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
Furthermore, the terms "horizontal", "vertical", "overhang" and the like do not imply that the components are required to be absolutely horizontal or overhang, but may be slightly inclined. For example, "horizontal" merely means that the direction is more horizontal than "vertical" and does not mean that the structure must be perfectly horizontal, but may be slightly inclined.
In the description of the present invention, it should also be noted that, unless otherwise explicitly specified or limited, the terms "disposed," "mounted," "connected," and "connected" are to be construed broadly and may, for example, be fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and these modifications or substitutions do not depart from the spirit of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A management method for a streaming media server cluster is characterized by comprising the following steps:
acquiring the number of pushed streams of each streaming media server in a streaming media server cluster to be managed at the current moment, and acquiring the number of connections of the streaming media server cluster to be managed at a plurality of moments in each preset time period in a preset historical period; the starting time of the preset time period is the same as the current time, and the connection number represents the sum of the number of push streams and the number of pull streams;
determining whether the current time is to reduce the capacity of the streaming media server cluster to be managed based on the connection number of the streaming media server cluster to be managed at a plurality of times in each preset time period in a preset historical period;
if the capacity reduction is determined, determining a capacity reduction server based on the number of pushed streams of each streaming media server at the current moment, a preset number of pushed streams threshold and a preset capacity reduction threshold, and constructing an updated streaming media server cluster based on the remaining streaming media servers; the preset push flow number threshold is a threshold used for judging whether the push flow number of the streaming media server is too low or not; the preset capacity reduction threshold is a limit value used for limiting the number of the single recovery streaming media servers.
2. The method according to claim 1, wherein determining whether to scale down the streaming media server cluster to be managed at the current time based on the number of connections of the streaming media server cluster to be managed at several times in each preset time period in a preset history cycle includes:
determining a connection number development trend of each preset time period in a preset history cycle based on the connection number of the streaming media server cluster to be managed at a plurality of moments in each preset time period in the preset history cycle; wherein the trend comprises any one of: ascending and descending;
and determining whether to reduce the capacity of the streaming media server cluster to be managed at the current moment based on the connection number development trend of all preset time periods.
3. The method according to claim 2, wherein determining whether to reduce the capacity of the streaming media server cluster to be managed at the current moment based on the connection number development trend of all preset time periods comprises:
if the number of preset time periods with the development trend of descending in the preset historical period reaches a preset threshold value, determining that the streaming media server cluster to be managed needs to be subjected to capacity reduction;
and if the number of the preset time periods with the descending development trend in the preset historical period does not reach a preset threshold value, determining that the capacity reduction of the streaming media server cluster to be managed is not needed.
4. The method of claim 1, wherein determining the capacity reduction server based on the number of pushed streams of each streaming media server at the current time, a preset threshold of the number of pushed streams and a preset capacity reduction threshold comprises:
comparing the push stream number of each streaming media server at the current moment with the preset push stream number threshold value, and determining a target streaming media server set based on the comparison result; the number of push streams of all the streaming media servers in the target streaming media server set is smaller than the preset number of push streams;
judging whether the number of the streaming media servers in the target streaming media server set is larger than the preset capacity reduction threshold value or not;
if so, randomly selecting a target number of streaming media servers from the target streaming media server set as capacity reduction servers; wherein the target number is equal to the preset capacity reduction threshold;
and if not, taking all the streaming media servers in the target streaming media server set as capacity reduction servers.
5. The method of claim 1, further comprising:
after the capacity reduction server is determined, when the number of pushed streams of the capacity reduction server is 0, the capacity reduction server is recycled.
6. The method of claim 1, further comprising:
after the capacity reduction server is determined, if the to-be-managed streaming media server cluster receives a new connection request, the new connection request is distributed to the streaming media server in the updated streaming media server cluster.
7. The method of claim 1, wherein the number of preset time periods within the preset history period is an odd number.
8. A management apparatus for a streaming media server cluster, comprising:
the system comprises an acquisition module, a processing module and a management module, wherein the acquisition module is used for acquiring the number of pushed streams of each streaming media server in a streaming media server cluster to be managed at the current moment and acquiring the number of connections of the streaming media server cluster to be managed at a plurality of moments in each preset time period in a preset history period; the starting time of the preset time period is the same as the current time, and the connection number represents the sum of the number of push streams and the number of pull streams;
the first determining module is used for determining whether the current time is used for capacity reduction of the streaming media server cluster to be managed based on the connection number of the streaming media server cluster to be managed at a plurality of times in each preset time period in a preset historical period;
the second determining module is used for determining a capacity reduction server based on the number of pushed streams of each streaming media server at the current moment, a preset pushed stream threshold value and a preset capacity reduction threshold value if capacity reduction is determined, and constructing an updated streaming media server cluster based on the rest streaming media servers; the preset push flow number threshold is a threshold used for judging whether the push flow number of the streaming media server is too low or not; the preset capacity reduction threshold is a limit value used for limiting the number of the streaming media servers recovered in a single time.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method of any of claims 1 to 7 when executing the computer program.
10. A computer-readable medium having non-volatile program code executable by a processor, the program code causing the processor to perform the method of any of claims 1 to 7.
CN202011227042.0A 2020-11-05 2020-11-05 Management method and device of streaming media server cluster and electronic equipment Active CN112422329B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011227042.0A CN112422329B (en) 2020-11-05 2020-11-05 Management method and device of streaming media server cluster and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011227042.0A CN112422329B (en) 2020-11-05 2020-11-05 Management method and device of streaming media server cluster and electronic equipment

Publications (2)

Publication Number Publication Date
CN112422329A CN112422329A (en) 2021-02-26
CN112422329B true CN112422329B (en) 2022-08-05

Family

ID=74827693

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011227042.0A Active CN112422329B (en) 2020-11-05 2020-11-05 Management method and device of streaming media server cluster and electronic equipment

Country Status (1)

Country Link
CN (1) CN112422329B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106470219A (en) * 2015-08-17 2017-03-01 阿里巴巴集团控股有限公司 The dilatation of computer cluster and capacity reduction method and equipment
CN107608781A (en) * 2016-07-11 2018-01-19 华为软件技术有限公司 A kind of load predicting method, device and network element
CN107977252A (en) * 2016-10-21 2018-05-01 中兴通讯股份有限公司 A kind of capacity reduction method, device and the cloud platform of cloud platform business
CN108234231A (en) * 2016-12-22 2018-06-29 阿里巴巴集团控股有限公司 The method, apparatus and electronic equipment of elastic telescopic arrangement in cloud computing environment
CN111225004A (en) * 2018-11-23 2020-06-02 中移(杭州)信息技术有限公司 Method and device for expanding server cluster and readable medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107104820B (en) * 2017-03-23 2020-02-07 国网江苏省电力公司信息通信分公司 Dynamic capacity-expansion daily operation and maintenance method based on F5 server node
US10708642B1 (en) * 2018-12-13 2020-07-07 Sling Media Pvt Ltd Systems, methods, and devices for optimizing streaming bitrate based on variations in processor load

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106470219A (en) * 2015-08-17 2017-03-01 阿里巴巴集团控股有限公司 The dilatation of computer cluster and capacity reduction method and equipment
CN107608781A (en) * 2016-07-11 2018-01-19 华为软件技术有限公司 A kind of load predicting method, device and network element
CN107977252A (en) * 2016-10-21 2018-05-01 中兴通讯股份有限公司 A kind of capacity reduction method, device and the cloud platform of cloud platform business
CN108234231A (en) * 2016-12-22 2018-06-29 阿里巴巴集团控股有限公司 The method, apparatus and electronic equipment of elastic telescopic arrangement in cloud computing environment
CN111225004A (en) * 2018-11-23 2020-06-02 中移(杭州)信息技术有限公司 Method and device for expanding server cluster and readable medium

Also Published As

Publication number Publication date
CN112422329A (en) 2021-02-26

Similar Documents

Publication Publication Date Title
CN111061560B (en) Cloud rendering resource scheduling method and device, electronic equipment and storage medium
US10924577B2 (en) Fractional pre-delivery of content to user devices for uninterrupted playback
CN110673948B (en) Cloud game resource scheduling method, server and storage medium
CN110839069B (en) Node data deployment method, node data deployment system and medium
CN108712422B (en) Method and device for creating transcoding task
CN111258746B (en) Resource allocation method and service equipment
CN105656810B (en) Method and device for updating application program
CN103916679A (en) Method, equipment and system for providing video information
WO2014187220A1 (en) Electronic device, storage medium and file transferrting method
CN110944220B (en) Video screen projection playing method, device, equipment and system
CN101909048A (en) Centralized trans-coding treatment method and device
JPWO2016125415A1 (en) Experience quality optimization system, experience quality optimization device, recommendation request device, experience quality optimization method, recommendation request method and program
WO2014187219A1 (en) Electronic device, storage medium and file transferrting method
CN111104145B (en) Out-of-band updating method and system for Expander
CN112422977A (en) Distribution method and distribution device for audio and video transcoding tasks
WO2021196559A1 (en) Video processing system
JP7356581B2 (en) Information processing methods, devices, equipment and computer readable storage media
CN112422329B (en) Management method and device of streaming media server cluster and electronic equipment
CN102333280B (en) A kind of method, system and the Service Process Server of business cipher key renewal
CN111538572A (en) Task processing method, device, scheduling server and medium
CN111309442B (en) Method, device, system, medium and equipment for adjusting number of micro-service containers
CN116382892B (en) Load balancing method and device based on multi-cloud fusion and cloud service
CN110996114B (en) Live broadcast scheduling method and device, electronic equipment and storage medium
CN110062003B (en) Video data transmitting method, video data transmitting device, electronic equipment and storage medium
US20240040402A1 (en) Selection and optimization of prediction algorithms for 3gpp network data analytics function (nwdaf)

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