CN111479137A - Method and device for providing line address, server and storage medium - Google Patents
Method and device for providing line address, server and storage medium Download PDFInfo
- Publication number
- CN111479137A CN111479137A CN202010299754.7A CN202010299754A CN111479137A CN 111479137 A CN111479137 A CN 111479137A CN 202010299754 A CN202010299754 A CN 202010299754A CN 111479137 A CN111479137 A CN 111479137A
- Authority
- CN
- China
- Prior art keywords
- line
- bandwidth
- target
- lines
- cdn
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 230000008859 change Effects 0.000 claims description 8
- 238000004891 communication Methods 0.000 claims description 8
- 230000000977 initiatory effect Effects 0.000 claims description 6
- 238000012545 processing Methods 0.000 claims description 6
- 102100032305 Bcl-2 homologous antagonist/killer Human genes 0.000 description 4
- 101000798320 Homo sapiens Bcl-2 homologous antagonist/killer Proteins 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000012163 sequencing technique Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/238—Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
- H04N21/2385—Channel allocation; Bandwidth allocation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/24—Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
- H04N21/2402—Monitoring of the downstream path of the transmission network, e.g. bandwidth available
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/25—Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
- H04N21/262—Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
- H04N21/26208—Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists the scheduling operation being performed under constraints
- H04N21/26216—Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists the scheduling operation being performed under constraints involving the channel capacity, e.g. network bandwidth
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Databases & Information Systems (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The disclosure provides a method and a device for providing a line address, a server and a storage medium, and belongs to the technical field of internet. The method comprises the following steps: acquiring bandwidth information of a plurality of CDN servers; when a line address acquisition request in a target live broadcast room is received, determining a plurality of effective lines from a plurality of target lines according to bandwidth information of a plurality of CDN servers and bandwidth thresholds of the plurality of target lines; the line addresses of a plurality of valid lines are provided to the user. According to the method and the device, a plurality of effective lines are determined by obtaining the broadband information of the CDN servers and according to the bandwidth information of the CDN servers and the bandwidth threshold values of the target lines. The effective line is determined according to the bandwidth information of the CDN server and the bandwidth thresholds of the target lines, so that the bandwidth occupation amount of the CDN server corresponding to the effective line can meet the threshold requirement, and the bandwidth use cost can be controlled.
Description
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a method and an apparatus for providing a line address, a server, and a storage medium.
Background
With the development of internet technology, live video is favored by more and more users. Many users can watch live videos on terminals such as mobile phones, tablet computers and notebook computers at any time and any place through a network.
Generally, after entering a live broadcast room, a user may send a line address acquisition request to a live broadcast platform, and after receiving the line address acquisition request, the live broadcast platform acquires a line address corresponding to each CDN (Content Delivery Network) server, and then provides the acquired line address to the user. And the user selects a line address from the live video stream, and acquires the live video stream from the corresponding CDN server based on the selected line address so as to watch the live video.
In order to control the bandwidth use cost, a bandwidth threshold value can be set for each line, and the occupation amount of the CDN server corresponding to each line is ensured to be within the set bandwidth threshold value. However, the related art provides the line address corresponding to each CDN server to the user, and when the bandwidth occupation amount of the CDN server corresponding to the line selected by the user exceeds the bandwidth threshold of the line, the bandwidth usage cost will exceed the preset cost amount. Therefore, a method for providing a line address is needed to control the cost of using bandwidth.
Disclosure of Invention
In order to solve the problems of the related art, embodiments of the present disclosure provide a method and an apparatus for providing a line address, a server, and a storage medium. The technical scheme is as follows:
in one aspect, a method for providing a line address is provided, where the method includes:
acquiring bandwidth information of a plurality of CDN servers;
when a line address acquisition request in a target live broadcast room is received, acquiring bandwidth thresholds of a plurality of target lines of the target live broadcast room;
determining a plurality of effective lines from the plurality of target lines according to the bandwidth information of the plurality of CDN servers and the bandwidth threshold values of the plurality of target lines;
providing the line addresses of the plurality of valid lines to a user.
In a possible implementation manner, the obtaining bandwidth information of a plurality of content delivery network CDN servers includes:
performing real-time communication with the CDN servers to acquire bandwidth information of the CDN servers; or,
and starting a timer, and communicating with the CDN servers every other first preset time to acquire the bandwidth information of the CDN servers.
In a possible implementation manner, the determining, according to the bandwidth information of the CDN servers and the bandwidth thresholds of the target lines, a plurality of valid lines from the target lines includes:
comparing the broadband threshold of each target line with the bandwidth occupation amount of the corresponding CDN server;
and when the bandwidth occupation amount of the CDN server corresponding to any target line is smaller than the bandwidth threshold of the target line, determining the target line as an effective line.
In one possible implementation, the method further includes:
when the bandwidth occupation amount of the CDN server corresponding to the target line is greater than or equal to the bandwidth threshold of the target line, determining the target line as an invalid line;
the line address of the invalid line is ignored when providing the line address to the user.
In one possible implementation, the providing the line addresses of the plurality of valid lines to the user includes:
and providing the line addresses corresponding to the effective lines for the user according to the sequence of the residual bandwidths of the CDN servers corresponding to the effective lines from large to small.
In one possible implementation, the method further includes:
and when the target lines are all invalid lines, sending prompt information to a user, wherein the prompt information is used for prompting the user to change the live broadcast room or initiating a line address acquisition request again after waiting for a second preset time.
In another aspect, an apparatus for providing a line address is provided, the apparatus including:
the acquisition module is used for acquiring bandwidth information of a plurality of CDN servers;
the acquisition module is used for acquiring bandwidth thresholds of a plurality of target lines in a target live broadcast room when receiving a line address acquisition request in the target live broadcast room;
a determining module, configured to determine, according to bandwidth information of the CDN servers and bandwidth thresholds of the target lines, a plurality of valid lines from the target lines;
a providing module for providing the line addresses of the plurality of valid lines to a user.
In a possible implementation manner, the obtaining module is configured to perform real-time communication with the CDN servers to obtain bandwidth information of the CDN servers; or,
the obtaining module is used for starting a timer and communicating with the CDN servers at intervals of a first preset time length so as to obtain bandwidth information of the CDN servers.
In a possible implementation manner, the determining module is configured to compare the bandwidth threshold of each target line with the remaining bandwidth of the corresponding CDN server; and when the bandwidth occupation amount of the CDN server corresponding to any target line is smaller than the bandwidth threshold of the target line, determining the target line as an effective line.
In one possible implementation, the apparatus further includes:
the determining module is configured to determine the target link as an invalid link when a bandwidth occupation amount of a CDN server corresponding to the target link is greater than or equal to a bandwidth threshold of the target link;
and the ignoring module is used for ignoring the line address of the invalid line when providing the line address for a user.
In a possible implementation manner, the providing module is configured to provide the line addresses corresponding to the multiple effective lines to the user according to a descending order of the remaining bandwidths of the CDN servers corresponding to the multiple effective lines.
In one possible implementation, the apparatus further includes:
and the sending module is used for sending prompt information to the user when the target lines are all invalid lines, wherein the prompt information is used for prompting the user to change the live broadcast room or initiating a line address acquisition request again after waiting for a second preset time.
In another aspect, a server is provided, where the server includes a processor and a memory, and the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the above method for providing a line address.
In another aspect, a computer-readable storage medium is provided, in which at least one program code is stored, and the at least one program code is loaded and executed by a processor to implement the above-mentioned line address providing method.
The technical scheme provided by the embodiment of the disclosure has the following beneficial effects:
the method comprises the steps of obtaining broadband information of CDN servers, and determining a plurality of effective lines according to the bandwidth information of a plurality of CDN servers and the bandwidth threshold values of a plurality of target lines. The effective line is determined according to the bandwidth information of the CDN server and the bandwidth thresholds of the target lines, so that the bandwidth occupation amount of the CDN server corresponding to the effective line can meet the threshold requirement, and the bandwidth use cost can be controlled.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is an implementation environment related to a method for providing a line address according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a method for providing a line address according to an embodiment of the disclosure;
fig. 3 is a flowchart of a method for providing a line address according to an embodiment of the disclosure;
fig. 4 is a schematic diagram of a process for providing a line address according to an embodiment of the disclosure;
fig. 5 is a schematic structural diagram of a device for providing a line address according to an embodiment of the present disclosure;
fig. 6 illustrates a server for provisioning of line addresses, according to an example embodiment.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure more apparent, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
Before the method provided by the embodiment of the disclosure is executed, the terms related to the disclosure are explained.
CDN: the intelligent virtual network is constructed on the basis of the existing network, and users can obtain required contents nearby by means of functional modules of load balancing, content distribution, scheduling and the like of a central platform by means of edge servers deployed in various places, so that network congestion is reduced, and the access response speed and hit rate of the users are improved.
Bandwidth: and (4) watching the live video by the user to the network bandwidth generated on the CDN server side.
A main line: a CDN server capable of providing live video streams to users.
A standby line: and providing the backup CDN for the main line to backup and simultaneously having the live video stream of the main line.
Referring to fig. 1, an implementation environment related to a method for providing a line address provided by an embodiment of the present disclosure is shown, where the implementation environment includes: a terminal 101, a server 102, and a server 103.
At least one live application is installed in the terminal 101, so that a user can watch live video. The terminal 101 may be a smartphone, a tablet computer, a notebook computer, or the like.
The server 102 is a background server of the live broadcast application, and the server 102 may be an individual server or a server cluster composed of a plurality of servers. The server 102 may receive a request sent by the terminal 101 and may also communicate with the server 103 to obtain bandwidth information of the server 103.
The server 103 is a CDN server, and the CDN server corresponds to a line through which data streams such as live video streams are transmitted, and can store the live video streams and send the live video streams to the terminal 101 through the corresponding line.
The terminal 101 and the server 102 may communicate through a wired network or a wireless network, the terminal 101 and the server 103 may communicate through a wired network or a wireless network, and the server 102 and the server 103 may communicate through a wired network or a wireless network.
The embodiment of the present disclosure provides a method for providing a line address, and referring to fig. 2, the method provided by the embodiment of the present disclosure includes:
201. and acquiring bandwidth information of a plurality of content delivery network CDN servers.
202. When a line address acquisition request in a target live broadcast room is received, bandwidth thresholds of a plurality of target lines in the target live broadcast room are acquired.
203. And determining a plurality of effective lines from the plurality of target lines according to the bandwidth information of the plurality of CDN servers and the bandwidth threshold values of the plurality of target lines.
204. The line addresses of a plurality of valid lines are provided to the user.
According to the method provided by the embodiment of the disclosure, a plurality of effective lines are determined by obtaining the broadband information of the CDN servers and according to the bandwidth information of a plurality of CDN servers and the bandwidth threshold values of a plurality of target lines. The effective line is determined according to the bandwidth information of the CDN server and the bandwidth thresholds of the target lines, so that the bandwidth occupation amount of the CDN server corresponding to the effective line can meet the threshold requirement, and the bandwidth use cost can be controlled.
In a possible implementation manner, obtaining bandwidth information of a plurality of content delivery network CDN servers includes:
the method comprises the steps of carrying out real-time communication with a plurality of CDN servers to obtain bandwidth information of the CDN servers; or,
and starting a timer, and communicating with the CDN servers every other first preset time to acquire the bandwidth information of the CDN servers.
In a possible implementation manner, determining a plurality of effective lines from a plurality of target lines according to bandwidth information of a plurality of CDN servers and bandwidth thresholds of the plurality of target lines includes:
comparing the broadband threshold of each target line with the bandwidth occupation amount of the corresponding CDN server;
and when the bandwidth occupation amount of the CDN server corresponding to any target line is smaller than the bandwidth threshold of the target line, determining the target line as an effective line.
In one possible implementation, the method further includes:
when the bandwidth occupation amount of a CDN server corresponding to the target line is greater than or equal to the bandwidth threshold of the target line, determining the target line as an invalid line;
when providing the line address to the user, the line address of the invalid line is ignored.
In one possible implementation, providing line addresses of a plurality of valid lines to a user includes:
and providing the line addresses corresponding to the effective lines for the user according to the sequence of the residual bandwidths of the CDN servers corresponding to the effective lines from large to small.
In one possible implementation, the method further includes:
and when the target lines are invalid lines, sending prompt information to the user, wherein the prompt information is used for prompting the user to change the live broadcast room or initiating a line address acquisition request again after waiting for a second preset time.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
The embodiment of the present disclosure provides a method for providing a line address, which takes the server 101 in fig. 1 as an example to execute the embodiment of the present disclosure. Referring to fig. 3, a method flow provided by the embodiment of the present disclosure includes:
301. the server obtains bandwidth information of a plurality of CDN servers.
The broadband information of the CDN server may include remaining bandwidth, bandwidth occupation amount, and the like of the CDN server.
When the server obtains the bandwidth information of a plurality of content delivery network CDN servers, the following method may be adopted:
in a possible implementation manner, the server may perform real-time communication with a plurality of CDN servers, and obtain bandwidth information of the plurality of CDN servers by performing communication with the plurality of CDN servers.
In another possible implementation manner, the server starts a timer, communicates with the plurality of CDN servers every a first preset time, and obtains bandwidth information of the plurality of CDN servers by communicating with the plurality of CDN servers. Wherein, the first preset time period may be 2 seconds, 3 seconds, and so on.
302. The server receives an address acquisition request in a target live broadcast room.
After the user enters the target live broadcast room, the user sends an address acquisition request to an http interface of the server to trigger the server to return the line address of the CDN server, so that the live broadcast video is watched based on the returned line address of the CDN server. The address obtaining request may include a target live broadcast room identifier, a user identifier, and the like.
303. When a line address acquisition request in a target live broadcast room is received, a server acquires bandwidth thresholds of a plurality of target lines in the target live broadcast room.
In the embodiment of the present disclosure, each live broadcast room is preset with a plurality of lines, and the lines set in each live broadcast room may be the same or different, but each line can send the live broadcast video stream in the live broadcast room to the user. In addition, to conserve bandwidth resources while ensuring normal live activity of the anchor at the live bays, each line of each live bay has a bandwidth threshold, which is the maximum bandwidth value on each line, which may be 20M, 30M, and so on. Generally, the bandwidth thresholds of the lines in the same live broadcast room may be the same or different; the bandwidth thresholds for the same line from different live bays may also be the same. For subsequent application, the server stores the line identifier corresponding to each live broadcast room and the broadband threshold value of each line.
When a line address acquisition request in a target live broadcast room is received, the server acquires a target line identifier corresponding to the target live broadcast room according to the target live broadcast room identifier, and acquires bandwidth thresholds of a plurality of target lines in the target live broadcast room according to the target line identifier corresponding to the target live broadcast room.
304. The server determines a plurality of effective lines from the plurality of target lines according to the bandwidth information of the plurality of CDN servers and the bandwidth threshold values of the plurality of target lines.
The effective line is a line capable of successfully sending the live video stream of the live broadcast room to the user.
When the server determines a plurality of effective lines from the plurality of target lines according to the bandwidth information of the plurality of CDN servers and the bandwidth thresholds of the plurality of target lines, the following method may be adopted:
3041. the server compares the bandwidth threshold for each target line to the bandwidth occupancy of the corresponding CDN server.
The server obtains the bandwidth occupation amount of the CDN service corresponding to each target line according to the line identifier of each target line, and compares the bandwidth occupation amount of the CDN server corresponding to each target line with the bandwidth threshold of the target line.
3042. And when the bandwidth occupation amount of the CDN server corresponding to any target line is smaller than the bandwidth threshold of the target line, the server determines the target line as an effective line.
For any target line, when the bandwidth occupation amount of the CDN server corresponding to the target line is smaller than the bandwidth threshold of the target line, the live video stream transmitted using the target line will not exceed the set bandwidth threshold, and the bandwidth usage cost will not increase, and at this time, the target line may be determined to be an effective line.
And processing each target line according to the method to obtain a plurality of effective lines.
In another possible implementation manner, for any target route, when the bandwidth occupation amount of the CDN server corresponding to the target route is greater than or equal to the bandwidth threshold of the target route, the server determines the target route as an invalid route. When providing the line address to the user, the server ignores the line address of the invalid line and provides the line addresses of other valid lines to the user.
It should be noted that the active line and the inactive line are not determined to be constant, but change in real time according to the number of users watching the live broadcast. For any line, if the current line is an effective line, as the number of users watching live broadcast by adopting the line increases, the bandwidth occupation amount of the CDN server corresponding to the line increases to be more than or equal to the bandwidth threshold of the line, after a new user joins in a live broadcast room, the bandwidth occupation amount of the CDN server of the line is compared with the bandwidth occupation amount of the corresponding CDN server, the bandwidth occupation amount of the CDN server of the line is more than or equal to the bandwidth threshold of the target line, and the line is determined to be an ineffective line. If the current line is an invalid line, the bandwidth occupation amount of the CDN server corresponding to the line is reduced along with the reduction of the number of users watching the live broadcast by adopting the line, after a new user joins in a live broadcast room, the bandwidth occupation amount of the CDN server corresponding to the line is compared with the bandwidth threshold value of the line, the bandwidth occupation amount of the CDN server of the line is more than or equal to the bandwidth threshold value of the line, and the line is determined to be an effective line.
305. The server provides the line addresses of a plurality of valid lines to the user.
When a plurality of valid lines are determined, the server may provide the line addresses of the plurality of valid lines to the user. When line addresses of a plurality of effective lines sent by the server are received, a user can select the line address of any effective line, and based on the line address of the selected effective line, live broadcast video streams of a target live broadcast room are obtained from the CDN server corresponding to the line address of the effective line, so that live broadcasts of the target live broadcast room are watched.
In a possible implementation manner, the server may also sequence the multiple effective lines in an order from large to small according to the remaining bandwidths of the CDN servers corresponding to the multiple effective lines, and provide line addresses corresponding to the multiple effective lines to the user according to a result of the sequencing. When line addresses of a plurality of effective lines are received, a user can select the line addresses positioned in the front according to the sequence of the line addresses and obtain the live video stream based on the selected line addresses. By sequencing the determined effective lines, the lines with better network environment and higher transmission speed can be preferentially provided for users, so that the transmission speed of the live video stream is improved, and the waiting time of the users is shortened.
In another possible implementation manner, when all the target lines are invalid lines, the server further sends a prompt message to the user, where the prompt message is used to prompt the user to change the live broadcast room, or to initiate a line address acquisition request again after waiting for a second preset time. Wherein, the second preset time period may be 1 minute, 2 minutes, and so on.
It should be noted that the method for providing the line address can be applied not only to live scenes but also to resource downloading scenes such as texts and pictures. In a resource downloading scene, the server may also communicate with the plurality of CDN servers in real time or at intervals of a first preset duration to obtain bandwidth information of the plurality of CDN servers. When the terminal needs to download the resource, the terminal can send a line address acquisition request to the server, the server receives the line address acquisition request sent by the terminal and acquires the bandwidth thresholds of the multiple lines corresponding to the resource, the bandwidth occupation amount of the CDN server corresponding to each line is compared with the bandwidth threshold of each line, the line with the bandwidth occupation amount smaller than the bandwidth threshold of the CDN server is determined to be an effective line, and the line address corresponding to the effective line is provided for a user.
The process of providing the line address provided by the embodiment of the present disclosure will be described below by taking fig. 4 as an example.
Referring to fig. 4, in a live scenario, the server starts a timer, and communicates with the CDN1 server and the CDN2 server every first preset time to obtain broadband information of the CDN1 server and the CDN2 server. When a user enters a live broadcast room, the user sends a line acquisition request to an http interface of a server, after the server receives the line acquisition request, the bandwidth thresholds of two lines owned by a main broadcast in the live broadcast room are acquired, the bandwidth threshold of one line is compared with the bandwidth occupation amount of a corresponding CDN1 server, and when the bandwidth occupation amount of the CDN1 server is smaller than the bandwidth threshold of the line, the line is determined to be an effective line. Next, the server compares the bandwidth threshold of another line with the bandwidth occupation amount of the corresponding CDN2 server, and when the bandwidth occupation amount of the CDN2 server is greater than or equal to the bandwidth threshold of the line, determines the line as an active line. And the server provides the determined line address of the effective line for the user, and the user acquires the live video stream based on the provided line address of the effective line so as to watch the live video.
According to the method provided by the embodiment of the disclosure, a plurality of effective lines are determined by obtaining the broadband information of the CDN servers and according to the bandwidth information of a plurality of CDN servers and the bandwidth threshold values of a plurality of target lines. The effective line is determined according to the bandwidth information of the CDN server and the bandwidth thresholds of the target lines, so that the bandwidth occupation amount of the CDN server corresponding to the effective line can meet the threshold requirement, and the bandwidth use cost can be controlled.
Referring to fig. 5, an embodiment of the present disclosure provides an apparatus for providing a line address, including:
an obtaining module 501, configured to obtain bandwidth information of multiple content delivery network CDN servers;
an obtaining module 501, configured to obtain bandwidth thresholds of multiple target lines in a target live broadcast room when receiving a line address obtaining request in the target live broadcast room;
a determining module 502, configured to determine a plurality of effective lines from the plurality of target lines according to bandwidth information of the plurality of CDN servers and bandwidth thresholds of the plurality of target lines;
a module 503 is provided for providing the line addresses of the plurality of valid lines to a user.
In a possible implementation manner, the obtaining module 501 is configured to perform real-time communication with multiple CDN servers to obtain bandwidth information of the multiple CDN servers; or,
the obtaining module 501 is configured to start a timer, and communicate with the multiple CDN servers every a first preset time to obtain bandwidth information of the multiple CDN servers.
In one possible implementation, the determining module 502 is configured to compare the bandwidth threshold of each target line with the remaining bandwidth of the corresponding CDN server; and when the bandwidth occupation amount of the CDN server corresponding to any target line is smaller than the bandwidth threshold of the target line, determining the target line as an effective line.
In one possible implementation, the apparatus further includes:
the determining module is used for determining the target line as an invalid line when the bandwidth occupation amount of the CDN server corresponding to the target line is greater than or equal to the bandwidth threshold of the target line;
and the ignoring module is used for ignoring the line address of the invalid line when providing the line address for the user.
In a possible implementation manner, the providing module 503 is configured to provide the line addresses corresponding to the multiple effective lines to the user according to a descending order of the remaining bandwidths of the CDN servers corresponding to the multiple effective lines.
In one possible implementation, the apparatus further includes:
and the sending module is used for sending prompt information to the user when the target lines are all invalid lines, wherein the prompt information is used for prompting the user to change the live broadcast room or initiating a line address acquisition request again after waiting for a second preset time.
To sum up, the device provided in the embodiment of the present disclosure determines a plurality of effective lines by obtaining the broadband information of the CDN servers and according to the bandwidth information of the plurality of CDN servers and the bandwidth thresholds of the plurality of target lines. The effective line is determined according to the bandwidth information of the CDN server and the bandwidth thresholds of the target lines, so that the bandwidth occupation amount of the CDN server corresponding to the effective line can meet the threshold requirement, and the bandwidth use cost can be controlled.
Fig. 6 illustrates a server for provisioning of line addresses, according to an example embodiment. Referring to fig. 6, server 600 includes a processing component 622 that further includes one or more processors and memory resources, represented by memory 632, for storing instructions, such as applications, that are executable by processing component 622. The application programs stored in memory 632 may include one or more modules that each correspond to a set of instructions. Further, the processing component 622 is configured to execute instructions to perform the functions performed by the server in the above-described method of providing a line address.
The server 600 may also include a power component 626 configured to perform power management of the server 600, a wired or wireless network interface 650 configured to connect the server 600 to a network, and an input/output (I/O) interface 658. The Server 600 may operate based on an operating system, such as Windows Server, stored in the memory 632TM,Mac OSXTM,UnixTM,LinuxTM,FreeBSDTMOr the like.
The server provided by the embodiment of the disclosure determines a plurality of effective lines by obtaining the broadband information of the CDN servers and according to the bandwidth information of the plurality of CDN servers and the bandwidth thresholds of the plurality of target lines. The effective line is determined according to the bandwidth information of the CDN server and the bandwidth thresholds of the target lines, so that the bandwidth occupation amount of the CDN server corresponding to the effective line can meet the threshold requirement, and the bandwidth use cost can be controlled.
The embodiment of the present disclosure provides a computer-readable storage medium, in which at least one program code is stored, and the at least one program code is loaded and executed by a processor, so as to implement the method for providing a line address described above.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present disclosure and is not intended to limit the present disclosure, so that any modification, equivalent replacement, or improvement made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.
Claims (14)
1. A method for providing a line address, the method comprising:
acquiring bandwidth information of a plurality of content delivery network CDN servers;
when a line address acquisition request in a target live broadcast room is received, acquiring bandwidth thresholds of a plurality of target lines of the target live broadcast room;
determining a plurality of effective lines from the plurality of target lines according to the bandwidth information of the plurality of CDN servers and the bandwidth threshold values of the plurality of target lines;
providing the line addresses of the plurality of valid lines to a user.
2. The method of claim 1, wherein obtaining bandwidth information of a plurality of Content Delivery Network (CDN) servers comprises:
performing real-time communication with the CDN servers to acquire bandwidth information of the CDN servers; or,
and starting a timer, and communicating with the CDN servers every other first preset time to acquire the bandwidth information of the CDN servers.
3. The method of claim 1, wherein the determining a plurality of valid links from the plurality of target links according to the bandwidth information of the plurality of CDN servers and the bandwidth thresholds of the plurality of target links comprises:
comparing the broadband threshold of each target line with the bandwidth occupation amount of the corresponding CDN server;
and when the bandwidth occupation amount of the CDN server corresponding to any target line is smaller than the bandwidth threshold of the target line, determining the target line as an effective line.
4. The method of claim 3, further comprising:
when the bandwidth occupation amount of the CDN server corresponding to the target line is greater than or equal to the bandwidth threshold of the target line, determining the target line as an invalid line;
the line address of the invalid line is ignored when providing the line address to the user.
5. The method of claim 3, wherein providing the line addresses of the plurality of valid lines to a user comprises:
and providing the line addresses corresponding to the effective lines for the user according to the sequence of the residual bandwidths of the CDN servers corresponding to the effective lines from large to small.
6. The method of claim 1, further comprising:
and when the target lines are all invalid lines, sending prompt information to a user, wherein the prompt information is used for prompting the user to change the live broadcast room or initiating a line address acquisition request again after waiting for a second preset time.
7. An apparatus for providing a line address, the apparatus comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring bandwidth information of a plurality of Content Delivery Network (CDN) servers;
the acquisition module is used for acquiring bandwidth thresholds of a plurality of target lines in a target live broadcast room when receiving a line address acquisition request in the target live broadcast room;
a determining module, configured to determine, according to bandwidth information of the CDN servers and bandwidth thresholds of the target lines, a plurality of valid lines from the target lines;
a providing module for providing the line addresses of the plurality of valid lines to a user.
8. The apparatus of claim 7, wherein the obtaining module is configured to perform real-time communication with the CDN servers to obtain bandwidth information of the CDN servers; or,
the obtaining module is used for starting a timer and communicating with the CDN servers at intervals of a first preset time length so as to obtain bandwidth information of the CDN servers.
9. The apparatus of claim 7, wherein the determining module is configured to compare a bandwidth threshold for each target line with a bandwidth footprint of a corresponding CDN server; and when the bandwidth occupation amount of the CDN server corresponding to any target line is smaller than the bandwidth threshold of the target line, determining the target line as an effective line.
10. The apparatus of claim 9, further comprising:
the determining module is configured to determine the target link as an invalid link when a bandwidth occupation amount of a CDN server corresponding to the target link is greater than or equal to a bandwidth threshold of the target link;
and the ignoring module is used for ignoring the line address of the invalid line when providing the line address for a user.
11. The apparatus of claim 9, wherein the providing module is configured to provide the line addresses corresponding to the multiple effective lines to the user according to a descending order of the remaining bandwidths of the CDN servers corresponding to the multiple effective lines.
12. The apparatus of claim 7, further comprising:
and the sending module is used for sending prompt information to the user when the target lines are all invalid lines, wherein the prompt information is used for prompting the user to change the live broadcast room or initiating a line address acquisition request again after waiting for a second preset time.
13. A server, characterized in that the server comprises a processor and a memory, in which at least one program code is stored, which is loaded and executed by the processor to implement the method of providing a line address according to any one of claims 1 to 6.
14. A computer-readable storage medium, having stored therein at least one program code, which is loaded and executed by a processor, to implement the line address providing method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010299754.7A CN111479137B (en) | 2020-04-16 | 2020-04-16 | Method and device for providing line address, server and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010299754.7A CN111479137B (en) | 2020-04-16 | 2020-04-16 | Method and device for providing line address, server and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111479137A true CN111479137A (en) | 2020-07-31 |
CN111479137B CN111479137B (en) | 2022-02-18 |
Family
ID=71753641
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010299754.7A Active CN111479137B (en) | 2020-04-16 | 2020-04-16 | Method and device for providing line address, server and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111479137B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113301628A (en) * | 2021-04-19 | 2021-08-24 | 深圳哇哇鱼网络科技有限公司 | Multi-line dynamic optimization method and system for terminal mobile network |
Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020091825A1 (en) * | 2000-08-17 | 2002-07-11 | Shuster Gary Stephen | Method and apparatus for improving bandwidth efficiency in a computer network |
CN102137006A (en) * | 2010-12-31 | 2011-07-27 | 华为技术有限公司 | Data transmission method and equipment in CDN (Content Delivery Network) |
CN103746933A (en) * | 2013-12-24 | 2014-04-23 | 乐视网信息技术(北京)股份有限公司 | Node distribution method and control center |
WO2015196494A1 (en) * | 2014-06-28 | 2015-12-30 | 华为技术有限公司 | Path calculation method and apparatus |
CN106130816A (en) * | 2016-06-24 | 2016-11-16 | 腾讯科技(深圳)有限公司 | A kind of content distributing network monitoring method, monitoring server and system |
CN106487910A (en) * | 2016-10-26 | 2017-03-08 | 苏州大学 | A kind of content distributing network creation method |
CN107171839A (en) * | 2017-05-19 | 2017-09-15 | 上海幻电信息科技有限公司 | A kind of bandwidth traffic cost control method |
CN107624231A (en) * | 2016-12-02 | 2018-01-23 | 深圳前海达闼云端智能科技有限公司 | Method, apparatus, server and the computer program product that data send, received |
CN107819741A (en) * | 2017-10-16 | 2018-03-20 | 山东师范大学 | Cloud video content distribution method and system based on priority |
US10097448B1 (en) * | 2014-12-18 | 2018-10-09 | Amazon Technologies, Inc. | Routing mode and point-of-presence selection service |
US20190007308A1 (en) * | 2017-06-30 | 2019-01-03 | Microsoft Technology Licensing, Llc | Distributed traffic management system for network link bandwidth control |
CN109167674A (en) * | 2018-07-24 | 2019-01-08 | 网宿科技股份有限公司 | Methods of marking, domain name system DNS dispatching method and the server of service node |
CN110139113A (en) * | 2019-04-30 | 2019-08-16 | 腾讯科技(深圳)有限公司 | The configured transmission distribution method and device of video resource |
CN110581801A (en) * | 2018-06-08 | 2019-12-17 | 阿里巴巴集团控股有限公司 | network adjusting method and device for content distribution network |
CN110896365A (en) * | 2019-12-20 | 2020-03-20 | 网宿科技股份有限公司 | Traffic scheduling method in network node, server and storage medium |
-
2020
- 2020-04-16 CN CN202010299754.7A patent/CN111479137B/en active Active
Patent Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020091825A1 (en) * | 2000-08-17 | 2002-07-11 | Shuster Gary Stephen | Method and apparatus for improving bandwidth efficiency in a computer network |
CN102137006A (en) * | 2010-12-31 | 2011-07-27 | 华为技术有限公司 | Data transmission method and equipment in CDN (Content Delivery Network) |
CN103746933A (en) * | 2013-12-24 | 2014-04-23 | 乐视网信息技术(北京)股份有限公司 | Node distribution method and control center |
WO2015196494A1 (en) * | 2014-06-28 | 2015-12-30 | 华为技术有限公司 | Path calculation method and apparatus |
US10097448B1 (en) * | 2014-12-18 | 2018-10-09 | Amazon Technologies, Inc. | Routing mode and point-of-presence selection service |
US20190044846A1 (en) * | 2014-12-18 | 2019-02-07 | Amazon Technologies, Inc. | Routing mode and point-of-presence selection service |
CN106130816A (en) * | 2016-06-24 | 2016-11-16 | 腾讯科技(深圳)有限公司 | A kind of content distributing network monitoring method, monitoring server and system |
CN106487910A (en) * | 2016-10-26 | 2017-03-08 | 苏州大学 | A kind of content distributing network creation method |
CN107624231A (en) * | 2016-12-02 | 2018-01-23 | 深圳前海达闼云端智能科技有限公司 | Method, apparatus, server and the computer program product that data send, received |
CN107171839A (en) * | 2017-05-19 | 2017-09-15 | 上海幻电信息科技有限公司 | A kind of bandwidth traffic cost control method |
US20190007308A1 (en) * | 2017-06-30 | 2019-01-03 | Microsoft Technology Licensing, Llc | Distributed traffic management system for network link bandwidth control |
CN107819741A (en) * | 2017-10-16 | 2018-03-20 | 山东师范大学 | Cloud video content distribution method and system based on priority |
CN110581801A (en) * | 2018-06-08 | 2019-12-17 | 阿里巴巴集团控股有限公司 | network adjusting method and device for content distribution network |
CN109167674A (en) * | 2018-07-24 | 2019-01-08 | 网宿科技股份有限公司 | Methods of marking, domain name system DNS dispatching method and the server of service node |
CN110139113A (en) * | 2019-04-30 | 2019-08-16 | 腾讯科技(深圳)有限公司 | The configured transmission distribution method and device of video resource |
CN110896365A (en) * | 2019-12-20 | 2020-03-20 | 网宿科技股份有限公司 | Traffic scheduling method in network node, server and storage medium |
Non-Patent Citations (2)
Title |
---|
M. ADLER ET AL.: "Algorithms for Optimizing Bandwidth Costs on the Internet", 《2006 1ST IEEE WORKSHOP ON HOT TOPICS IN WEB SYSTEMS AND TECHNOLOGIES》 * |
孙唯一: "CDN网络流量调度算法的研究", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑(月刊),2019年第08期》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113301628A (en) * | 2021-04-19 | 2021-08-24 | 深圳哇哇鱼网络科技有限公司 | Multi-line dynamic optimization method and system for terminal mobile network |
CN113301628B (en) * | 2021-04-19 | 2022-08-16 | 深圳哇哇鱼网络科技有限公司 | Multi-line dynamic optimization method and system for terminal mobile network |
Also Published As
Publication number | Publication date |
---|---|
CN111479137B (en) | 2022-02-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109152095B (en) | Wireless network connection method for terminal | |
CN105451087B (en) | Method for pushing, terminal, historic data server and the system of barrage information | |
CN105635180B (en) | Information push method and device | |
WO2021237433A1 (en) | Message pushing method and apparatus, and electronic device and computer-readable medium | |
CN108023953B (en) | High-availability implementation method and device for FTP service | |
WO2014183427A1 (en) | Method and apparatus for displaying webcast rooms | |
CN109246741B (en) | Wireless network connection method for terminal | |
CN106911487B (en) | Method and device for voice chat | |
CN110166791B (en) | Connection establishing method, device, equipment and storage medium | |
CN113811013B (en) | Cluster capacity dynamic adjustment method, device, storage medium and communication system | |
CN108683730B (en) | Resource scheduling method, service server, client terminal, network system and medium | |
CN102523422B (en) | Multi-party communication control system, multi-party communication system and multi-party communication processing method | |
CN108650667A (en) | Terminal scheduling method and apparatus | |
CN103731281A (en) | Frequency channel processing method and device | |
CN107908730B (en) | Method and device for downloading data | |
CN111541555A (en) | Group chat optimization method and related product | |
CN107332894B (en) | Live broadcast method, device and system, server and storage medium | |
CN111479137B (en) | Method and device for providing line address, server and storage medium | |
CN108616600B (en) | Resource scheduling method, client server, node device, network system, and medium | |
CN108933675B (en) | Conference resource allocation method, device and storage medium | |
CN110996114B (en) | Live broadcast scheduling method and device, electronic equipment and storage medium | |
CN109981778B (en) | Method, device, equipment and storage medium for realizing service of content distribution network | |
CN111726658B (en) | Multimedia data transmission method and device | |
CN115643417A (en) | Live streaming scheduling method and device | |
CN115396430A (en) | Cloud mobile phone management method and system |
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 |