Movatterモバイル変換


[0]ホーム

URL:


CN111787340A - Network live broadcast system and method - Google Patents

Network live broadcast system and method
Download PDF

Info

Publication number
CN111787340A
CN111787340ACN202010449187.9ACN202010449187ACN111787340ACN 111787340 ACN111787340 ACN 111787340ACN 202010449187 ACN202010449187 ACN 202010449187ACN 111787340 ACN111787340 ACN 111787340A
Authority
CN
China
Prior art keywords
file
video file
live broadcast
server
client
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.)
Pending
Application number
CN202010449187.9A
Other languages
Chinese (zh)
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.)
Tianjin Chezhijia Data Information Technology Co ltd
Original Assignee
Tianjin Chezhijia Data Information Technology 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 Tianjin Chezhijia Data Information Technology Co ltdfiledCriticalTianjin Chezhijia Data Information Technology Co ltd
Priority to CN202010449187.9ApriorityCriticalpatent/CN111787340A/en
Publication of CN111787340ApublicationCriticalpatent/CN111787340A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

The invention discloses a network live broadcast system and a method, wherein the network live broadcast method is suitable for running in the network live broadcast system and comprises the following steps: the method comprises the steps that a proxy server obtains a first configuration file of live broadcast and obtains a first video file based on the first configuration file; the network server acquires a first configuration file from the proxy server and acquires a first video file based on the first configuration file; processing the first video file to obtain a second video file, storing the second video file in a file server, and generating a second configuration file of the second video file; the network server receives a live broadcast acquisition request from the client and issues a second configuration file to the client; and the file server sends a second video file corresponding to the second configuration file to the client. The invention also discloses a computing device and a computer readable storage medium.

Description

Network live broadcast system and method
Technical Field
The invention relates to the field of live broadcast services, in particular to a network live broadcast system and a network live broadcast method.
Background
With the development of social life and communication technology, more and more live videos appear, and users can watch live videos on a plurality of websites. When the webpage of the website presents the live content, if a user wants to watch live broadcast and browse other contents of the webpage at the same time, or manually trigger, the live broadcast content can be played in a small window. The live broadcast video content played by the small window is the same as the live broadcast content in the video broadcast frame embedded in the page originally, and the live broadcast is played in a small window mode at a preset position of the webpage only in different modes, so that a user can adjust the position of the small window.
In the small window playing used in the prior art, the played video has the same size and code rate as the video file played by the video playing frame embedded in the page originally. However, when the small window is played, the size of the small window is much smaller than that of the video playing frame, so that any improvement on watching cannot be brought by adopting video files with the same size and code rate, the definition is not helped, network resources are wasted, and the watching cost is also improved.
For this reason, a new webcast system and method are needed.
Disclosure of Invention
To this end, the present invention provides a live webcasting system and method in an attempt to solve, or at least alleviate, the problems identified above.
According to an aspect of the present invention, there is provided a network live broadcast system, the system being connected to one or more clients in communication, including: the proxy server is suitable for acquiring a first configuration file of a live first video file and acquiring the first video file based on the first configuration file; a network server, communicatively coupled to the proxy server, adapted to: acquiring a first configuration file from a proxy server, and acquiring a first video file from the proxy server based on the first configuration file; processing the first video file to obtain a second video file, storing the second video file in a file server, and generating a second configuration file of the second video file; responding to a live broadcast acquisition request from the client, and issuing a second configuration file to the client; and the file server is in communication connection with the network server and is suitable for storing the second video file so that the client can obtain the second video file according to the second configuration file.
Optionally, in the system according to the invention, the network server is further adapted to: regularly traversing a preset live broadcast list, and determining a live broadcast room in a live broadcast state in the live broadcast list; and judging whether the live broadcast room needs to be played in a small window, if so, acquiring a corresponding first configuration file from the proxy server, wherein the small window playing refers to playing the live broadcast in a small window mode at a preset position of a webpage.
Optionally, in the system according to the present invention, the system further comprises a database, communicatively connected to the network server, adapted to store an address of the first video file; the network server comprises a cache module, a storage module and a display module, wherein the cache module is suitable for storing the address of the first video file; the network server is further adapted to: if the first video file is still failed to be acquired again according to the preset times or the second video file is still failed to be stored again according to the preset times, the address of the first video file is stored in the database and the cache module; according to the received live broadcast acquisition request of the client, the address of the first video file is sent to the client from the cache module; and when the address is not stored in the cache module, sending the address of the first video file from the database to the client, and storing the address in the cache module.
Optionally, in the system according to the present invention, the database and cache module is further adapted to store a second configuration file, and the web server is further adapted to: and storing the second configuration file to a database and a cache module.
Optionally, in the system according to the invention, the network server is further adapted to: judging whether the live broadcast acquisition request is legal or not; if the live broadcast acquisition request is legal, judging whether a live broadcast room corresponding to the live broadcast acquisition request is in a live broadcast state; if the live broadcast room is in live broadcast, judging whether a second configuration file is generated according to a second video file; and if the second configuration file is not generated, sending the identification information to the client.
Optionally, in the system according to the invention, the network server is further adapted to: if the second configuration file is judged to be generated, the second configuration file is sent to the client from the cache module; and when the second configuration file is not stored in the cache module, sending the second configuration file from the database to the client, and storing the second configuration file in the cache module.
Optionally, in the system according to the invention, the network server is further adapted to: judging whether the live broadcast acquisition request conforms to a preset acquisition frequency or not; if the preset acquisition frequency is met, continuously judging whether the live broadcast acquisition request comprises a preset identifier; and if the preset identification is included, judging that the live broadcast acquisition request is legal, otherwise, judging that the live broadcast acquisition request is illegal.
Optionally, in the system according to the present invention, the database and cache module is further adapted to store a first configuration file, and the web server is further adapted to: storing the first video file into a file server, and storing the first configuration file in a database and a cache module; receiving a request for acquiring the video-on-demand from the client, and issuing the first configuration file to the client from the cache module; when the cache module does not store the first configuration file, the first configuration file is sent to the client from the database and stored in the cache module; the file server is further adapted to store the first video file so that the client obtains the first video file according to the second configuration file.
Optionally, in the system according to the present invention, one or several edge servers are further included, and are connected in communication with the file server; the file server is further adapted to send the first video file or the second video file to an edge server adjacent to the client; the edge server is adapted to send the first video file or the second video file to the client.
Optionally, in the system according to the invention, the proxy server is a distributed proxy server.
Optionally, in the system according to the present invention, the first video file acquired by the proxy server is a live video file provided by a third party.
According to another aspect of the present invention, there is provided a live webcasting method adapted to be executed in a live webcasting system, the method including: the method comprises the steps that a proxy server obtains a first configuration file of live broadcast and obtains a first video file based on the first configuration file; the network server acquires a first configuration file from the proxy server and acquires a first video file based on the first configuration file; the network server processes the first video file to obtain a second video file, stores the second video file in the file server, and generates a second configuration file of the second video file; the network server receives a live broadcast acquisition request from the client and issues a second configuration file to the client; and the file server sends a second video file corresponding to the second configuration file to the client.
Optionally, in the method according to the present invention, the obtaining, by the network server, the first configuration file from the proxy server includes: regularly traversing a preset live broadcast list, and determining a live broadcast room in a live broadcast state in the live broadcast list; and judging whether the live broadcast room needs to be played in a small window, if so, acquiring a corresponding first configuration file from the proxy server, wherein the small window playing refers to playing the live broadcast in a small window mode at a preset position of a webpage.
Optionally, in the method according to the present invention, the processing the first video file to obtain a second video file, and storing the second video file in a file server includes: converting the first video file with high code rate into a second video file with low code rate; storing the second video file in a file server; and if the storage fails, performing the storage again according to the preset times.
Optionally, in the method according to the present invention, further comprising: if the first video file is still failed to be acquired again according to the preset times or the second video file is still failed to be stored again according to the preset times, the address of the first video file is stored in the database and the cache module; according to a received live broadcast acquisition request of a client, sending an address of a first video file to the client from a cache module; and when the address is not stored in the cache module, sending the address of the first video file from the database to the client, and storing the address in the cache module.
Optionally, in the method according to the present invention, further comprising: and storing the second configuration file to a database and a cache module.
Optionally, in the method according to the present invention, receiving a live broadcast obtaining request from a client and issuing a second configuration file to the client includes: judging whether the live broadcast acquisition request is legal or not; if the live broadcast acquisition request is legal, judging whether a live broadcast room corresponding to the live broadcast acquisition request is in a live broadcast state; if the live broadcast room is in live broadcast, judging whether a second configuration file is generated according to a second video file; and if the second configuration file is not generated, sending the identification information to the client.
Optionally, in the method according to the present invention, further comprising the step of: if the second configuration file is judged to be generated, the second configuration file is sent to the client from the cache module; and when the second configuration file is not stored in the cache module, sending the second configuration file from the database to the client, and storing the second configuration file in the cache module.
Optionally, in the method according to the present invention, determining whether the live broadcast acquisition request is legal includes: judging whether the live broadcast acquisition request conforms to a preset acquisition frequency or not; if the preset acquisition frequency is met, continuously judging whether the live broadcast acquisition request comprises a preset identifier; and if the preset identification is included, judging that the live broadcast acquisition request is legal, otherwise, judging that the live broadcast acquisition request is illegal.
Optionally, in the method according to the present invention, further comprising the step of: the network server stores the first video file into a file server and stores the first configuration file in a database and a cache module; receiving a request for acquiring the video-on-demand from the client, and issuing the first configuration file to the client from the cache module; when the cache module does not store the first configuration file, the first configuration file is sent to the client from the database and stored in the cache module; and the file server sends the first video file corresponding to the first configuration file to the client.
Optionally, in the method according to the present invention, the file server sending the first video file or the second video file to the client includes the steps of: sending the first video file or the second video file to an edge server adjacent to the client; and the edge server sends the first video file or the second video file to the client.
Optionally, in the method according to the invention, the proxy server is a distributed proxy server.
Optionally, in the method according to the present invention, the first video file acquired by the proxy server is a live video file provided by a third party.
According to yet another aspect of the present invention, there is provided a computing device comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for performing any of the methods of a webcasting method according to the present invention.
According to a further aspect of the present invention there is provided a computer readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a computing device, cause the computing device to perform any of a network live method according to the present invention.
In the invention, a network server acquires a first configuration file from a proxy server and acquires a first video file based on the first configuration file; processing the first video file to obtain a second video file, storing the second video file in a file server, and generating a second configuration file of the second video file; and receiving a live broadcast acquisition request from the client and issuing a second configuration file to the client, and sending a second video file corresponding to the second configuration file to the client by the file server. Therefore, the method can convert the first video with high code rate into the second video file with low code rate, is convenient for transmission in a network, reduces the size and code rate of the live video file under the condition of not influencing the definition of the live video played in a small window, saves network transmission resources and reduces corresponding expenses.
Secondly, under the condition that a second video file with low code rate cannot be sent to the client, namely when the first video file is failed to be acquired or the second video file is failed to be uploaded, the address of the first video file is directly stored in the database and the cache module, when the client needs to acquire live broadcast video resources, the live broadcast address is directly provided for the client, the client directly acquires the live broadcast video file through the live broadcast address, and when the video file is subjected to code rate conversion, the continuous and uninterrupted live broadcast service is ensured.
And storing a second configuration file of the second video file in the database and the cache module, and directly sending the second configuration file to the client from the cache module when a live broadcast acquisition request from the client is acquired, so that the speed of acquiring live broadcast video resources by the client is improved.
Meanwhile, the proxy server acquires a first configuration file and a first video file, the file server stores a second video file converted from the first video file, and the second video file is provided for the client. The file server conducts live broadcast drainage when the client side obtains the second video file according to the second configuration file, and issues the second video file with low code rate to the client side by using the bandwidth flow inside a company, so that the situation that the client side directly obtains video resources from a third party is reduced, and the consumption of flow resources is reduced.
And further, after the live broadcast is finished, the file server stores the complete live broadcast video, namely the live broadcast file and the live broadcast video file with a larger code rate, and stores the first configuration file in a database and a cache. Therefore, after the live broadcast is finished, the complete video-on-demand service is provided for the client, meanwhile, the video-on-demand service has the same video definition as the original video, the situation that a complete live broadcast video file is directly obtained from a third party is avoided, the flow resource consumption is reduced, the live broadcast video file is directly obtained from the file server, and the obtaining of the live broadcast video file is quicker than the obtaining of the live broadcast video file from the third party.
And finally, when the second video file or the first video file is sent to the client, the corresponding live video file is sent to the edge server which is closer to the video live broadcast service, and then the live video file is distributed to the client through the edge server, so that the speed of sending the live video file to the client by the file server is improved.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
Fig. 1 shows a schematic diagram 100 of a webcast system according to an exemplary embodiment of the present invention;
FIG. 2 illustrates a block diagram of a computing device 200, according to an exemplary embodiment of the invention;
fig. 3 shows a flow diagram of awebcast method 300 according to an embodiment of the present invention;
FIG. 4a shows a schematic diagram of normal play of a live video, according to one embodiment of the invention; and
fig. 4b shows a schematic diagram of a widget playing a live video according to an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art. Like reference numerals generally refer to like parts or elements.
Fig. 1 shows a schematic diagram 100 of a webcast system according to an exemplary embodiment of the present invention. As shown in fig. 100, thewebcast system 100 includes aweb server 110, afile server 140, and adatabase 150.File server 140 anddatabase 150 are communicatively coupled toweb server 110. Thefile server 140 may be implemented as any server capable of storing multimedia files, and the present invention is not limited to the type of thefile server 140. Thefile server 140 stores the first video file and the second video file sent by thenetwork server 110, sends the first video file to theclients 171 to 17n according to the on-demand obtaining request sent by the clients according to the first configuration file, and sends the second video file to theclients 171 to 17n according to the live broadcast obtaining request sent by theclients 171 to 17n according to the second configuration file.
Thedatabase 150 may be implemented as a relational database, and the present invention is not limited to the type ofdatabase 150. Theweb server 110 also includes a caching module 111. According to an embodiment of the present invention, thedatabase 150 is a MySQL database, and the cache module 111 is a radis cache. Thedatabase 150 and the cache module 111 store the address of the first video file, the first configuration file and the second configuration file. Thedatabase 150 and the cache module 111 also issue the address of the first video file or the second configuration file to theclients 171 to 17n according to the live broadcast acquisition request sent by the client, and send the first configuration file to theclients 171 to 17n according to the on-demand acquisition request sent by the client.
Theweb server 110 is connected to theproxy servers 121 to 12n in communication. The proxy servers 121-12 n may be implemented as a plurality of distributed proxy servers as shown, and thenetwork server 110 is communicatively connected to the plurality of distributed proxy servers 121-12 n, respectively. The manner in which theweb server 110 is connected to the proxy servers 121-12 n is only exemplary, in a specific practical situation, theweb server 110 may be connected to a plurality of proxy servers, and the invention does not limit the number of proxy servers linked to theweb server 110. And each proxy server 121-12 n is connected to a corresponding third-party live resource server 131-13 n, as shown in the figure, theproxy server 121 is connected to the third-partylive resource server 131, the proxy server 122 is connected to the third-party live resource server 132, and theproxy server 12n is connected to the third-partylive resource server 13 n. The mode that the proxy servers 121-12 n are connected with the third-party live broadcast resource servers 131-13 n is to connect with geographically close third-party live broadcast resource servers, so that corresponding live broadcast resource files can be obtained nearby, and the efficiency of obtaining the live broadcast resource files is improved. The proxy servers 121-12 n obtain the live broadcast resource files of the linked third-party live broadcast resource servers 131-13 n, including a first configuration file and a first video file, first obtain the first configuration file, and obtain the first video file according to the first configuration file. The third-party live broadcast resource servers 131-13 n are servers for providing live broadcast resources for third parties, and can be servers provided by a plurality of third parties connected in service, and the third-party live broadcast resource servers 131-13 n can be live broadcast resource cloud servers or live broadcast resource file servers. The third-party live broadcast resource servers 131-13 n provide live broadcast resource files required by users, and send the first configuration files and the first video files to the proxy servers 121-12 n, so that the networklive broadcast system 100 further processes the first video files and sends the first video files to the clients 171-17 n.
Theweb server 110 is a web server, and processes request information sent by theclients 171 to 17n, and acquires and processes a first configuration file and a first video file from theproxy servers 121 to 12 n. Thenetwork server 110 acquires a first configuration file from the proxy servers 121-12 n, and acquires a first video file from the proxy servers 121-12 n based on the first configuration file; processing the first video file to obtain a second video file, storing the second video file in thefile server 140, and generating a second configuration file of the second video file; responding to the live broadcast acquisition request from the client 171-17 n, and issuing the second configuration file to the client 171-17 n.
The cache module 111, thefile server 140 and thedatabase 150 are in communication connection with the edge servers 161-16 n. The edge servers 161-16 n can be implemented as a plurality of distributed edge servers as shown, with the cache module 111, thefile server 140 and thedatabase 150 being communicatively coupled to the plurality of distributed edge servers 161-16 n, respectively. The manner in which the caching module 111, thefile server 140 and thedatabase 150 are connected to the distributed edge servers 161-16 n is only exemplary, in a specific practical situation, the caching module 111, thefile server 140 and thedatabase 150 may be connected to a plurality of edge servers, and the number of edge servers linked to the caching module 111, thefile server 140 and thedatabase 150 is not limited in the present invention. Also, each edge server 161-16 n is connected to a corresponding client 171-17 n, as shown, edge server 161 is connected toclient 171, andedge server 162 is connected toclient 172,edge server 16n is connected toclient 17 n. In addition, in a specific practical situation, each edge server 161-16 n can be connected to a plurality of clients, and the number of the clients linked by the edge servers 161-16 n is not limited by the present invention. In addition, the edge servers 161-16 n can be connected to different types of clients, the clients 171-17 n can be implemented as a computing device or a mobile terminal, and the types of the clients linked by the edge servers 161-16 n are not limited in the present invention.
According to an embodiment of the present invention, the edge servers 161 to 16n may be implemented as a server on the CDN content delivery network, and the cache module 111, thefile server 140 and thedatabase 150 transmit the corresponding content to theclients 171 to 17n through the CDN content delivery network. The edge servers 161-16 n form a CND content distribution network, so that the clients 171-17 n can conveniently obtain corresponding live and on-demand video content nearby.
Theweb server 110, thefile server 140, thedatabase 150, the proxy servers 121-12 n and the edge servers 161-16 n may all be embodied as a computing device. FIG. 2 illustrates a block diagram of a computing device 200, according to an exemplary embodiment of the invention. As shown in FIG. 2, in a basic configuration 202, a computing device 200 typically includes a system memory 206 and one or more processors 204. A memory bus 208 may be used for communication between the processor 204 and the system memory 206.
Depending on the desired configuration, the processor 204 may be any type of processing, including but not limited to: a microprocessor (μ P), a microcontroller (μ C), a Digital Signal Processor (DSP), or any combination thereof. The processor 204 may include one or more levels of cache, such as a level onecache 210 and a level two cache 212, aprocessor core 214, and registers 216.Example processor cores 214 may include Arithmetic Logic Units (ALUs), Floating Point Units (FPUs), digital signal processing cores (DSP cores), or any combination thereof. The example memory controller 218 may be used with the processor 204, or in some implementations the memory controller 218 may be an internal part of the processor 204.
Depending on the desired configuration, system memory 206 may be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. System memory 206 may include an operating system 220, one or more programs 222, and program data 224. In some implementations, the program 222 can be arranged to execute instructions on the operating system with the program data 224 by the one or more processors 204.
Computing device 200 may also include an interface bus 240 that facilitates communication from various interface devices (e.g., output devices 242, peripheral interfaces 244, and communication devices 246) to the basic configuration 202 via the bus/interface controller 230. The example output device 242 includes a graphics processing unit 248 and anaudio processing unit 250. They may be configured to facilitate communication with various external devices, such as a display or speakers, via one or more a/V ports 252. Example peripheral interfaces 244 can include aserial interface controller 254 and aparallel interface controller 256, which can be configured to facilitate communications with external devices such as input devices (e.g., keyboard, mouse, pen, voice input device, touch input device) or other peripherals (e.g., printer, scanner, etc.) via one or more I/O ports 258. An example communication device 246 may include a network controller 260, which may be arranged to facilitate communications with one or moreother computing devices 262 over a network communication link via one ormore communication ports 264.
A network communication link may be one example of a communication medium. Communication media may typically be embodied by computer readable instructions, data structures, program modules, and may include any information delivery media, such as carrier waves or other transport mechanisms, in a modulated data signal. A "modulated data signal" may be a signal that has one or more of its data set or its changes made in such a manner as to encode information in the signal. By way of non-limiting example, communication media may include wired media such as a wired network or private-wired network, and various wireless media such as acoustic, Radio Frequency (RF), microwave, Infrared (IR), or other wireless media. The term computer readable media as used herein may include both storage media and communication media.
In a computing device 200 according to the present invention, the application 222 includes program instructions for executing awebcast method 300, which may instruct the processor 204 to perform some steps of awebcast method 300 of the present invention running in thewebcast system 100, so that the portions of thewebcast system 100 provide webcast services to the clients 171-17 n by executing awebcast method 300 of the present invention.
Computing device 200 may be implemented as a server, e.g.,file server 140,database 150 server, application server, etc., which may be, for example, a Personal Digital Assistant (PDA), a wireless web-browsing device, an application-specific device, or a hybrid device that include any of the above functions. May be implemented as a personal computer including both desktop and notebook computer configurations, and in some embodiments, computing device 200 is configured to perform awebcast method 300.
Fig. 3 shows a flow diagram of awebcast method 300 according to an embodiment of the present invention. As shown in fig. 3, alive webcasting method 300 begins with step S310, where proxy servers 121-12 n obtain a first configuration file of live webcasting, and obtain a first video file based on the first configuration file. The third-partylive resource server 131, theproxy server 121, the edge server 161, and theclient 171 are taken as examples, and a description is further provided for alive webcast method 300 according to the present invention with reference to related steps.
The first video file acquired by theproxy server 121 is a live video file provided by a third party. The third-party livebroadcast resource server 131 obtains an original live broadcast video file from a live broadcast signal source through shooting, recording and other modes at a live broadcast service provider. The third partylive resource server 131 processes the original live video file in the background. The processing steps include: the video encoder encodes an original live video file, and the stream cutter performs slicing operation on the encoded original live video file to obtain a first video file and a first configuration file of the first video file. According to an embodiment of the present invention, the third-partyLive resource server 131 and theproxy server 121 transmit the Live video file through an HTTP Live Streaming (HLS) Streaming media network transport protocol. The first video file generated by the third-party livebroadcast resource server 131 is a plurality of TS media files obtained by slicing the original live broadcast video file, and the first configuration file is an M3U8 index file corresponding to the plurality of sliced TS media files.
Theproxy server 121 obtains a first configuration file with dynamic changes from the third-partylive resource server 131, and obtains first video files based on the first configuration file, that is, sequentially obtains the first video files according to the sequence of the first video files. According to an embodiment of the present invention, the video stream obtained by theproxy server 121 from the third-partylive resource server 131 includes 10 TS media files, which are 00.TS to 09.TS respectively. 00. ts-09. ts are first video files, and the first configuration file corresponding to the first video file is a.m3u8. a part of the m3u8 file is as follows:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:15
#EXT-X-MEDIA-SEQUENCE:00
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:11.800
news-00.ts?domain=hlslive-club.com.1.1
#EXTINF:10.120
news-01.ts?domain=hlslive-club.com.1.1
#EXTINF:11.952
news-02.ts?domain=hlslive-club.com.1.1
#EXTINF:12.640
news-03.ts?domain=hlslive-club.com.1.1
#EXTINF:11.160
news-04.ts?domain=hlslive-club.com.1.1
#EXTINF:11.751
news-05.ts?domain=hlslive-club.com.1.1
#EXTINF:2.040
news-06.ts?domain=hlslive-club.com.1.1
#EXTINF:12.640
news-07.ts?domain=hlslive-club.com.1.1
#EXTINF:11.160
news-08.ts?domain=hlslive-club.com.1.1
#EXTINF:11.751
news-09.ts?domain=hlslive-club.com.1.1
in the a.m3u8 file, EXTM3U plays a role in identification, and the file is named as an M3U8 file. The EXT-X-VERSION identifies the protocol VERSION, in which this value is 3, and the third VERSION of the HLS protocol is used. The EXT-X-TARGETDURATION is the maximum duration of all TS slice media files in the a.m3u8 file, the value in the file is 15, and the maximum duration of 00. TS-09. TS files is 15 seconds. The EXT-X-MEDIA-SEQUENCE is the starting SEQUENCE number of all TS slice MEDIA files in the a.m3u8 file, each TS slice MEDIA file has a unique SEQUENCE number, the SEQUENCE numbers between adjacent TS slice MEDIA files are added together and keep growing continuously, and the SEQUENCE numbers of the 10 TS slice MEDIA files are from 00 to 09. EXT-X-PLAYLIST-TYPE identifies the TYPE of a.m3u8 file, vod represents on demand. EXTINF is the actual duration of each TS slice media file, e.g., 00.TS has a duration of 11.800 seconds and 01.TS has a duration of 10.120 seconds. 00.TS, 01.TS, etc. is the filename of each TS slice media file. The domain-hlslice-club.com.1.1 is an address of each TS slice media file in the third-partylive resource server 131, and theproxy server 121 may obtain the corresponding TS slice media file through the address.
In the a.m3u8 file, 00. ts-09. ts files are sequentially arranged from 00.ts to 09.ts, and the sequential playing sequence from 00.ts to 09.ts is identified. After theproxy server 121 acquires the a.m3u8 file, when acquiring the TS media file according to the a.m3u8 file, the TS media file is sequentially acquired from 00.TS to 09.TS in the order of the a.m3u8 file.
After theproxy server 121 obtains the first configuration file and the first video file, the obtained files are temporarily stored to be provided to theweb server 110 for processing the first video file. The proxy servers 121-12 n are distributed proxy servers, each proxy server 121-12 n is geographically adjacent to a third-party live broadcast resource server in the area, each proxy server 121-12 n can be in communication connection with a plurality of third-party live broadcast resource servers of different types, and the type and the number of the third-party live broadcast resource servers linked with the proxy servers 121-12 n are not limited.
Subsequently, step S320 is executed, and theweb server 110 acquires the first profile from theproxy server 121, and acquires the first video file based on the first profile. The manner of acquiring the first configuration file and the first video file by theweb server 110 is the same as the manner of acquiring the first configuration file and the first video file by theproxy server 121 from the third-partylive resource server 131, and details are not repeated here. Theweb server 110 obtains a first configuration file and a first video file from the plurality ofproxy servers 121, and aggregates the files obtained by theproxy servers 121 for further processing. Theweb server 110 repeatedly acquires the first profile and the first video file according to a predetermined number of times when the acquisition of the first profile from theproxy server 121 fails and the acquisition of the first video file based on the first profile is acquired. According to an embodiment of the present invention, the predetermined number of times is set to three times, and the present invention does not limit the size of the predetermined number of times.
In this step, thenetwork server 110 regularly traverses the preset live list to determine the live room in the live state in the live list. And judging whether the live broadcast room needs to play the small window, and if so, acquiring a corresponding first configuration file from theproxy server 121. The preset live broadcast list and whether the live broadcast room in the set live broadcast list needs to be played in a small window or not can be configured in advance by thenetwork server 110 according to specific service conditions. Specifically, in the configuration process, the judgment is performed according to a live video streaming protocol established between thenetwork server 110 and the third-partylive resource server 131. According to an embodiment of the present invention, as determined with the third-partylive resource server 131, some live video streams are required to be used as a preset live list, and the live list includes four live rooms, namely "old-iron fast-to-go", "new-car-to-market", "amusement park" and "fellow-for-driver". The live broadcast drainage operation of the live broadcast room of the 'car fellow' needs to be carried out, and the live broadcast video content of the live broadcast room of the 'car fellow' needs to be played in a small window. The small window playing refers to playing the live broadcast in a small window form at a preset position of the webpage. When the live video content is played in a small window form, the size of the small window is smaller than the size of a page, and is also smaller than the size of a video player embedded in a webpage, and the proportion of the size of the small window relative to the size of the page in a viewport of a browser is small. Because the area of the small window is small, the requirements on resolution and code rate are not high, the live broadcast first video file of the live broadcast room of the car friend circle can be converted into the second video file with low code rate and small volume for playing. The position of the small window playing can be dragged by the user within the page range, and can also move downwards along with the scrolling browsing operation of the user on the page. The widget playback may be triggered manually by a user ofclient 171 or automatically by the web page based on the user's behavior on the web page. The manual trigger means that a user clicks a button on a page to trigger the button to play in a small window mode, and the invention does not limit the appearance and the typeface of the button. The automatic triggering refers to the operation behavior of a user, namely when the scrolling operation of the current page causes the embedded video frame to disappear in the viewport of the page, the small window playing of the live content is triggered. However, regardless of the manner in which the widget of the live video is triggered, theclient 171 sends a live acquisition request to theweb server 110.
Subsequently, step S330 is executed, where theweb server 110 processes the first video file to obtain a second video file, stores the second video file in thefile server 140, and generates a second configuration file of the second video file. Because the video stream which is being live broadcast is played in a small window in the webpage, the video stream played in the small window has small area and is less in occupation ratio with an embedded live broadcast frame and the whole page when being played, and therefore video files with large and high code rate are not needed. Therefore, the invention converts the first video file with high code rate into the second file with low code rate. The second video file is smaller than the first video file in code rate and smaller than the first video file in file volume, so that the flow for acquiring the video stream is saved, and the cost for acquiring the live broadcast content is reduced.
And after converting the first video file to obtain a second video file, storing the second video file in thefile server 140, so that theclient 171 obtains the second video file from thefile server 140. And when the second video file is stored in the first video file, if the storage fails, the second video file is stored again according to the preset times. According to an embodiment of the present invention, the predetermined number of times is set to three times, and the present invention does not limit the size of the predetermined number of times.
According to an embodiment of the present invention, if thenetwork server 110 fails to retrieve the first video file from theproxy server 121 for a predetermined number of times or fails to store the second video file for a predetermined number of times, the address of the first video file is stored in thedatabase 150 and the cache module 111. The situation that theclient 171 cannot watch live content due to failure in acquiring the first video file or storing the second video file is avoided, and the live broadcast service is guaranteed not to be suspended due to storage failure.
Thedatabase 150 and the cache module 111 store the address of the first video file when the acquisition or storage fails. And after receiving a live broadcast acquisition request from theclient 171, send the address of the first video file from the caching module 111 to theclient 171. The address is returned to theclient 171 directly from the cache module 111 faster than the address is returned to theclient 171 from thedatabase 150, which improves the response speed of the live broadcast acquisition request. When the address is not stored in the cache module 111, the address of the first video file is sent from thedatabase 150 to theclient 171, and the address is stored in the cache module 111, so that the situation that the first video file cannot be provided to theclient 171 when the address of the video is not cached in the cache module 111 in time is avoided. After receiving the address of the first video file, theclient 171 directly obtains the first video file through the address of the first video file, so as to ensure the stability and durability of the live broadcast service.
Theweb server 110 also generates a second configuration file of the second video file based on the converted second video file. The second configuration file is a live video playing index file of the second video file. According to an embodiment of the invention, the first video files 00. ts-09. ts files are converted to obtain s00.ts-s09.ts files, and the s00.ts-s09.ts live broadcast index file sa.m3u8 files of the s00.ts-s09.ts are generated based on the converted s00.ts-s09.ts files. The contents of the s00. ts-s09. ts files are the same as those of 00. ts-09. ts files, but the sizes and the code rates of the files are smaller than those of 00. ts-09. ts files, the format of the index file sa.m3u8 is the same as that of the index file a.m3u8 of the original first video file, and the contents are generated based on the s00. ts-s09. ts files.
The process of generating the second configuration file is to analyze the playing time of each file in the original first configuration file, and generate the second configuration file based on the newly generated second video file and the current address thereof, where the current address of the second video file is the address of the second video file stored in thefile server 140. According to an embodiment of the invention, the process of generating the sa.m3u8 file is to analyze the time length of each TS slice media file in the a.m3u8 file, wherein the time length of 00.TS is 11.800 seconds, and the time length of 01.TS is 10.120 seconds. 00.ts is the corresponding time length of the generated second video file s00.ts, which is 11.800 seconds, 01.ts is the corresponding time length of the generated second video file s01.ts, which is 10.120 seconds, and so on, and the corresponding time lengths of all the second video files s00.ts to s09.ts are obtained. The current address of the second video files s00. ts-s 09.ts is the address fileserver.1.1 stored in thefile server 140. Backfilling the corresponding duration of the s00.ts-s09.ts to the M3U8 index file, and combining the backfilled duration with the address fileserver.1.1 stored in thefile server 140 by the s00.ts-s09.ts to obtain a second configuration file. An example of the second configuration file is as follows:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:15
#EXT-X-MEDIA-SEQUENCE:00
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:11.800
news-s00.ts?domain=fileserver.1.1
#EXTINF:10.120
news-s01.ts?domain=fileserver.1.1
#EXTINF:11.952
news-s02.ts?domain=fileserver.1.1
#EXTINF:12.640
news-s03.ts?domain=fileserver.1.1
#EXTINF:11.160
news-s04.ts?domain=fileserver.1.1
#EXTINF:11.751
news-s05.ts?domain=fileserver.1.1
#EXTINF:2.040
news-06.ts?domain=fileserver.1.1
#EXTINF:12.640
news-s07.ts?domain=fileserver.1.1
#EXTINF:11.160
news-s08.ts?domain=fileserver.1.1
#EXTINF:11.751
news-s09.ts?domain=fileserver.1.1
web server 110 also sends the second configuration file todatabase 150 and storage module for storage for subsequent sending of the second configuration file toclient 171.
Subsequently, step S340 is executed, and theweb server 110 receives the live broadcast obtaining request from theclient 171 and issues the second configuration file to theclient 171. In this step,web server 110 determines whether the live acquisition request fromclient 171 is legitimate. The step of judging whether the live broadcast acquisition request is legal comprises the following steps: and judging whether the live broadcast acquisition request conforms to a preset acquisition frequency. Whether the preset frequency is compounded or not refers to whether the video is compounded or not, and when the video is compounded or not, the live broadcast acquisition request is carried out according to the time length of the TS media file. According to one embodiment of the invention, the corresponding time duration of s00. TS-s09. TS is set by the sa.m3u8 file to be below 15 seconds, but the time duration of each TS media file s00. TS-s09. TS is also above 10 seconds. Therefore, the frequency of sending live broadcast acquisition requests by theclient 171 to theweb server 110 should be 10 seconds to 15 seconds once. Theweb server 110 determines whether the live broadcast request of theclient 171 is within a predetermined frequency.
If the live broadcast acquisition request is too fast, the live broadcast acquisition request can be a malicious attack behavior, a large number ofclients 171 to 171n initiate requests thousands of times in a short time to disable theweb server 110, thefile server 140 and the like in the networklive broadcast system 100, and when encountering the live broadcast acquisition request, theweb server 110 regards the live broadcast acquisition request as an illegal attack behavior and does not perform related operations on the live broadcast acquisition request.
And if the preset acquisition frequency is met, continuously judging whether the live broadcast acquisition request comprises a preset identifier. And if the live broadcast acquisition request comprises the preset identification, judging that the live broadcast acquisition request is legal, otherwise, judging that the live broadcast acquisition request is illegal. The predetermined identifier is an identifier which is carried by a live broadcast acquisition request and can be authenticated when a live broadcast service is requested from an official website provided by a network server or an official APP on the mobile terminal. When accessing a live broadcast room from an official website provided by a web server or different versions of official APPs on mobile terminals of different systems for small window playing, theclient 171 sends a live broadcast acquisition request to theweb server 110, where the live broadcast acquisition request includes a predetermined identifier, so that theweb server 110 can authenticate the live broadcast acquisition request as a legal live broadcast acquisition request.
And if the received live broadcast acquisition request is legal, judging whether a live broadcast room corresponding to the live broadcast acquisition request is in a live broadcast state. And if the live broadcast room is in live broadcast, judging whether to generate a second configuration file according to the second video file. And if the second configuration file is not generated, sending identification information to theclient 171. According to an embodiment of the present invention, theclient 171 sends a live broadcast acquisition request for performing a small-window broadcast on a "car friend circle" live broadcast room to theweb server 110, theweb server 110 determines whether the "car friend circle" live broadcast room is live broadcast, if the "car friend circle" live broadcast room is not started, a status code that the live broadcast room is not started is sent to theclient 171, and theclient 171 analyzes the status code to prompt a user that the live broadcast room is not started currently. If the live broadcast room of the 'driver circle' is in live broadcast, whether a second configuration file sa.m3u8 is generated according to second video files s 00.ts-s 09.ts of the live broadcast room of the 'driver circle' is judged. Thenetwork server 110 searches for a corresponding second configuration file in thedatabase 150 and the cache module 111, and if the second configuration file sa.m3u8 is not stored in thedatabase 150 and the cache module 111, it is determined that the second configuration file of the second video files s00.ts to s09.ts is not generated. The corresponding first video files 00. ts-09. ts are directly sent to theclient 171 from the cache module 111 or thedatabase 150 at the address hlslice-com.1.1 in the third-partylive resource server 131, so that theclient 171 directly obtains the corresponding first video files according to the addresses 00. ts-09. ts, and the live broadcast service is guaranteed not to be interrupted.
If the webcast room determines that the second configuration file is generated, the second configuration file is sent to theclient 171 from the caching module 111; and when the second configuration file is not stored in the cache module 111, sending the second configuration file from thedatabase 150 to theclient 171, and storing the second configuration file in the cache module 111. The second configuration file is preferentially sent from the cache module 111 to theclient 171, so that a quick response can be made to the live broadcast acquisition request from theclient 171. Secondly, when the second configuration file is not stored in the cache module 111, the second configuration file is sent to theclient 171 from thedatabase 150, so that the service of the second video file and the second configuration file can be provided to theclient 171. When theclient 171 receives the second configuration file, thefile server 140 sends a live broadcast obtaining request to theweb server 110 according to the second configuration file, and sends the second video file to theclient 171. The method for theclient 171 to obtain the second video file from thefile server 140 according to the second configuration file is the same as the method for theproxy server 121 to obtain the first video file from the third-partylive resource server 131 according to the first configuration file, and thenetwork server 110 to obtain the first configuration file from theproxy server 121 according to the first configuration file.
According to an embodiment of the present invention, the process that theclient 171 obtains the second video file from thefile server 140 according to the second configuration file, and the process that thefile server 140 issues the second video file to theclient 171 specifically includes: theclient 171 requests the second video file according to the sequence of the second video files s00. TS-s 09.TS in the second configuration file sa.m3u8, and sends a live broadcast acquisition request to thenetwork server 110 as a preset frequency according to the playing time length of each TS media file in the second video file. Thefile server 140 issues the second video files s00. ts-s 09.ts to theclient 171 in sequence according to the sequence of the second video files s00. ts-s 09.ts in the second configuration file sa.m3u8, starting from the file s00.ts, and according to the live broadcast acquisition request of the user, until the file s09.ts is sent completely.
According to another embodiment of the present invention, since thewebcast system 100 transmits live video files, the live video files are in a process of changing due to their own characteristics. Therefore, the first video file generated by the third-partylive resource server 131 changes continuously, and the first configuration file corresponding to the first video file also changes continuously. And removing the first TS media file of the first video file list when the first configuration file is updated each time, and adding an updated TS media file at last. At the same time, the parameters of EXT-X-MEDIA-SEQUENCE in the first configuration file, M3U8 file, are changed, incremented by 1 each time the update M3U8 file changes the parameters, and are kept in an uninterrupted forward increment. According to one embodiment of the invention, when the third-partylive resource server 131 generates a new TS media file 10.TS, the a.m3u8 file is changed into a b.m3u8 file. The specific implementation manner is to delete the information of 00.ts file in the M3U8 file, the default 00.ts file has been played at theclient 171, and add the information of 10.ts file at the end of the list, including the actual duration, and the location of the 10.ts file in the third-partylive resource server 131. At the same time, the parameter of the label EXT-X-MEDIA-SEQUENCE is changed to add 1 and become 01, which means that when the M3U8 file is played, the file starts playing from the 01.ts file and ends at the 10.ts file. An example of an m3u8 file is as follows:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:15
#EXT-X-MEDIA-SEQUENCE:01
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:10.120
news-01.ts?domain=hlslive-club.com.1.1
#EXTINF:11.952
news-02.ts?domain=hlslive-club.com.1.1
#EXTINF:12.640
news-03.ts?domain=hlslive-club.com.1.1
#EXTINF:11.160
news-04.ts?domain=hlslive-club.com.1.1
#EXTINF:11.751
news-05.ts?domain=hlslive-club.com.1.1
#EXTINF:2.040
news-06.ts?domain=hlslive-club.com.1.1
#EXTINF:12.640
news-07.ts?domain=hlslive-club.com.1.1
#EXTINF:11.160
news-08.ts?domain=hlslive-club.com.1.1
#EXTINF:11.751
news-09.ts?domain=hlslive-club.com.1.1
#EXTINF:11.800
news-10.ts?domain=hlslive-club.com.1.1
the third partylive resource server 131 adds a new TS media file 10.TS, and modifies the a.m3u8 file to obtain a b.m3u8 file, and theproxy server 121 obtains a new M3U8 index file b.m3u8, and obtains a 10.TS media file according to the b.m3u8 file. Next, thewebcast system 100 repeatedly executes the steps S310 to S340 of thewebcast method 300 until the whole webcast is completed in the webcast room.
After the live broadcast room completes the whole live broadcast, thenetwork server 110 summarizes the first video file and the first configuration file of the live broadcast. The first video file is merged into a completed live video file and stored in thefile server 140. And when the first configuration file is processed, merging the first configuration file to obtain a final first configuration file. And adds an EXT-X-ENDLIST tag at the end of the first configuration file. EXT-X-ENDLIST is the end symbol of the a.m3u8 file, indicating that no media files are to be added to the M3U8 index file. According to an embodiment of the present invention, the finally generated first configuration file is final.m3u8, and a part of the file is as follows:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:15
#EXT-X-MEDIA-SEQUENCE:00
#EXT-X-PLAYLIST-TYPE:VOD
news-00.ts?domain=fileserver.1.1
#EXTINF:10.120
news-01.ts?domain=fileserver.1.1
#EXTINF:11.952
news-02.ts?domain=fileserver.1.1
#EXTINF:12.640
news-03.ts?domain=fileserver.1.1
#EXTINF:11.160
news-04.ts?domain=fileserver.1.1
#EXTINF:11.751
news-05.ts?domain=fileserver.1.1
#EXTINF:2.040
news-06.ts?domain=fileserver.1.1
#EXTINF:12.640
news-07.ts?domain=fileserver.1.1
#EXTINF:11.160
news-08.ts?domain=fileserver.1.1
#EXTINF:11.751
news-09.ts?domain=fileserver.1.1
#EXTINF:11.800
news-10.ts?domain=fileserver.1.1
#EXT-X-ENDLIST
the first video file from 00.TS to 10.TS is recorded in final.m3u8 in order, including the actual duration of each TS media file and the location of storage in thefile server 140.Web server 110 receives the on-demand fetch request fromclient 171 and provides the first video file in high definition toclient 171. Theweb server 110 stores the final first configuration file, final.m3u8, in thedatabase 150 and the cache module 111. And transmits the first configuration file to theclient 171 from the buffer module 111 when receiving the on-demand obtaining request from theclient 171. When the cache module 111 does not store the first configuration file, sending the first configuration file from thedatabase 150 to theclient 171, and storing the first configuration file in the cache module 111; andfile server 140 sends the first video file toclient 171 according to the first profile.
According to one embodiment of the invention, thefile server 140 sends the first video file or the second video file to the edge server 161 first when sending the first video file or the second video file to eachclient 171 requesting the live video. The edge servers 161 form a CDN content delivery network, and each edge server 161 is a node of the CDN content delivery network. The edge server 161 receives a second video file required by a geographicallynearby client 171, and forwards the received second video file to thecorresponding client 171, so that the forwarding efficiency of the video file can be improved, the speed of receiving the second video file by the client is increased, the smoothness is increased, and the viewing experience of a user at the client is improved.
According to an embodiment of the present invention, thefile server 140 sends the first video file and the second video file to theclient 171 using internal traffic, which is different from external traffic used by theclient 171 to directly obtain the first video file from the third-partylive resource server 131, and network resources are fully utilized to configure the live traffic, thereby reducing the cost of live broadcast. Thenetwork server 110 monitors the internal flow of thefile server 140 sending the first video file and the second video file to theclient 171 in real time, when the monitored internal flow exceeds a preset threshold value, thefile server 140 stops providing video resources to theclient 171 in time, and theclient 171 switches to obtain the first video file from the third-party livebroadcast resource server 131 in time, so that the situation that the internal flow exceeds the preset threshold value to cause excess cost is avoided, meanwhile, the situation that a user watches live broadcast is not influenced is ensured, and live broadcast blockage is avoided.
Thewebcast system 100 and thewebcast method 300 of the present invention are further described below in conjunction with fig. 4a and 4b, according to an embodiment of the present invention. In the description process, theproxy server 121, the third-partylive resource server 131, the edge server 161, and theclient 171 are taken as examples. Theproxy server 121 is theclosest proxy server 121 within a certain geographical range of the third-partylive resource server 131, and acquires the first configuration file and the first video file from the third-partylive resource server 131. Edge server 161 constitutes a CDN content delivery network, edge server 161 is a node of the CDN content delivery network that is geographically closest toclient 171, andclient 171 obtains the first video file and the second video file from edge server 161.
As shown in fig. 4a, fig. 4a is a schematic diagram illustrating normal play of a live video according to an embodiment of the present invention. The "car friends circle" live room in fig. 4a is in live state. After the third-party livebroadcast resource server 131 encodes the video stream of the live broadcast room of the 'fellow car', the video stream is segmented to obtain first video files 00. TS-09. TS, which are 10 TS media files, and a first configuration file a.m3u8 corresponding to the first video files. Theproxy server 121 obtains the first configuration file a.m3u8, and obtains the first video files 00. ts-09. ts according to the first configuration file. Theweb server 110 obtains the first configuration file and the first video file in the same manner. If the acquisition fails, the address of the first video file in the third-partylive resource server 131 is stored in thedatabase 150 and the cache module 111, so that theclient 171 acquires the first video file from the third-partylive resource server 131 directly through the address to watch live.
And if the acquisition is successful, the first video file is continuously processed, and the first video file with high code rate is processed to obtain second video files s00. ts-s09. ts with low code rate. The second video files s00. ts-s09. ts have the same content as the first video files, but the volume and the code rate are lower than those of the first video files. The method and the device ensure that the speed of live video is improved and the consumption of flow is reduced under the condition of not reducing the watching experience of a user when the small window is played. Theweb server 110 obtains the second video file and uploads the second video file to thefile server 140, so that the second video file is sent to theclient 171 from thefile server 140. If the uploading fails, the address of the first video file in the third-partylive resource server 131 is stored in thedatabase 150 and the cache module 111, so that theclient 171 directly obtains the first video file from the third-partylive resource server 131 through the address to watch live.
And further generating a second configuration file sa.m3u8 according to the obtained second video file. The second configuration file is sent todatabase 150 and cache module 111 for sending the second configuration file toclient 171. Thenetwork server 110 polls a preset live broadcast room list of 'old iron fast getting on a bus', 'new bus getting on the market', 'entertainment circle' and 'driver circle', and judges that the 'driver circle' live broadcast room is live broadcast and needs to be subjected to live broadcast drainage operation. Theclient 171 sends the live broadcast acquisition request to theweb server 110 according to a manual operation of the user on the page or automatically. Thenetwork server 110 receives the live broadcast acquisition request and plays the live broadcast video content of the live broadcast room of the 'driver circle' in a small window. Cache module 111 sends the second configuration file toclient 171, and second, when the second configuration file is not ready to be stored in cache module 111, the second configuration file is sent fromdatabase 150 toclient 171. Theclient 171 obtains the second video file from thefile server 140 according to the second profile.File server 140 previously sends the first video file or the second video file to edge server 161, and edge server 161 forwards the received second video file toclient 171. Fig. 4b shows a schematic diagram of a widget playing a live video according to an embodiment of the invention. The live broadcast content of the live broadcast room of the 'car friend circle' is played in a small window on the right side of the page.
When the live broadcast is in progress, the third-partylive resource server 131 generates a new second configuration file b.m3u8 and a second video file 10. ts. Theproxy server 121 obtains a new M3U8 index file b.m3u8, and obtains a 10.ts media file according to the b.m3u8 file. Then, thewebcast system 100 repeats the above steps until the live broadcasting of the live broadcasting room completes the whole live broadcasting. After the live broadcast room completes the whole live broadcast, thenetwork server 110 summarizes the first video file and the first configuration file of the live broadcast. Thenetwork server 110 merges the first video file into a complete live video file 00. ts-10. ts, stores the first video file in thefile server 140, collects the first configuration file to obtain final.m3u8, and stores the final.m3u8 in thedatabase 150 and the cache module 111. And when receiving the on-demand obtaining request from theclient 171, the first configuration file is sent to theclient 171 from the buffer module 111. When the cache module 111 does not store the first configuration file, sending the first configuration file from thedatabase 150 to theclient 171, and storing the first configuration file in the cache module 111; and thefile server 140 transmits the first video file to theclient 171 according to the first profile, providing the video on demand service. When the first video file is transmitted to theclient 171, thefile server 140 transmits the first video file or the second video file to the edge server 161 in advance, and the edge server 161 forwards the received second video file to theclient 171.
And further, theweb server 110 monitors the internal traffic of thefile server 140 sending the first video file or the second video file to theclient 171, so as to avoid the use of the content traffic exceeding a predetermined limit to generate additional cost. When the predetermined limit is reached, the transmission of the live resource from thefile server 140 to theclient 171 is stopped, and theclient 171 directly obtains the live resource from the third-partylive resource server 131 through the address of the first video file.
In the invention, a network server acquires a first configuration file from a proxy server and acquires a first video file based on the first configuration file; processing the first video file to obtain a second video file, storing the second video file in a file server, and generating a second configuration file of the second video file; and receiving a live broadcast acquisition request from the client and issuing a second configuration file to the client, and sending a second video file corresponding to the second configuration file to the client by the file server. Therefore, the method can convert the first video with high code rate into the second video file with low code rate, is convenient for transmission in a network, reduces the size and code rate of the live video file under the condition of not influencing the definition of the live video played in a small window, saves network transmission resources and reduces corresponding expenses.
Secondly, under the condition that a second video file with low code rate cannot be sent to the client, namely when the first video file is failed to be acquired or the second video file is failed to be uploaded, the address of the first video file is directly stored in the database and the cache module, when the client needs to acquire live broadcast video resources, the live broadcast address is directly provided for the client, the client directly acquires the live broadcast video file through the live broadcast address, and when the video file is subjected to code rate conversion, the continuous and uninterrupted live broadcast service is ensured.
And storing a second configuration file of the second video file in the database and the cache module, and directly sending the second configuration file to the client from the cache module when a live broadcast acquisition request from the client is acquired, so that the speed of acquiring live broadcast video resources by the client is improved.
Meanwhile, the proxy server acquires a first configuration file and a first video file, the file server stores a second video file converted from the first video file, and the second video file is provided for the client. The file server conducts live broadcast drainage when the client side obtains the second video file according to the second configuration file, and issues the second video file with low code rate to the client side by using the bandwidth flow inside a company, so that the situation that the client side directly obtains video resources from a third party is reduced, and the consumption of flow resources is reduced.
And further, after the live broadcast is finished, the file server stores the complete live broadcast video, namely the live broadcast file and the live broadcast video file with a larger code rate, and stores the first configuration file in a database and a cache. Therefore, after the live broadcast is finished, the complete video-on-demand service is provided for the client, meanwhile, the video-on-demand service has the same video definition as the original video, the situation that a complete live broadcast video file is directly obtained from a third party is avoided, the flow resource consumption is reduced, the live broadcast video file is directly obtained from the file server, and the obtaining of the live broadcast video file is quicker than the obtaining of the live broadcast video file from the third party.
And finally, when the second video file or the first video file is sent to the client, the corresponding live video file is sent to the edge server which is closer to the video live broadcast service, and then the live video file is distributed to the client through the edge server, so that the speed of sending the live video file to the client by the file server is improved.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
A8, the system as claimed in a6 or a7, wherein the web server is further adapted to:
judging whether the live broadcast acquisition request conforms to a preset acquisition frequency or not;
if the request accords with the preset acquisition frequency, continuously judging whether the live broadcast acquisition request comprises a preset identifier;
and if the live broadcast acquisition request comprises the preset identification, judging that the live broadcast acquisition request is legal, otherwise, judging that the live broadcast acquisition request is illegal.
A9, the system of A1, wherein the database and the caching module are further adapted to store a first profile, the web server is further adapted to:
storing the first video file into the file server, and storing the first configuration file in the database and the cache module;
receiving a video-on-demand obtaining request from the client and sending the first configuration file to the client from the cache module;
when the cache module does not store the first configuration file, sending the first configuration file from the database to the client, and storing the first configuration file in the cache module;
the file server is further adapted to store a first video file so that the client acquires the first video file according to the second configuration file.
The system of any one of A10, A1-A9, further comprising one or several edge servers in communication connection with the file server;
the file server is further adapted to send the first video file or the second video file to an edge server proximate to the client;
the edge server is adapted to send the first video file or the second video file to the client.
A11, the system of any one of A1-A10, wherein the proxy server is a distributed proxy server.
A12, the system according to any one of A1-A11, wherein the first video file obtained by the proxy server is a live video file provided by a third party.
B14, the method as in B13, wherein the web server obtaining a first profile from the proxy server comprises:
regularly traversing a preset live broadcast list, and determining a live broadcast room in a live broadcast state in the live broadcast list;
and judging whether the live broadcast room needs to be played in a small window, if so, acquiring a corresponding first configuration file from the proxy server, wherein the small window playing refers to playing the live broadcast in a small window form at a preset position of a webpage.
B15, the method according to B13 or B14, wherein the processing the first video file to obtain a second video file stored in a file server comprises:
converting the first video file with high bit rate into the second video file with low bit rate;
storing the second video file in the file server; and
and if the storage fails, the storage is carried out again according to the preset times.
The method of any one of B16, B13-B15, further comprising:
if the first video file is still failed to be acquired again according to the preset times or the second video file is still failed to be stored again according to the preset times, storing the address of the first video file into the database and the cache module;
according to a received live broadcast obtaining request of the client, sending the address of the first video file from the cache module to the client; and
and when the address is not stored in the cache module, sending the address of the first video file from the database to the client, and storing the address in the cache module.
The method of any one of B17, B13-B16, further comprising: storing the second configuration file to the database and the cache module.
B18, the method according to any one of B13-B17, wherein the receiving a live broadcast acquisition request from the client and issuing the second profile to the client includes:
judging whether the live broadcast acquisition request is legal or not;
if the live broadcast acquisition request is legal, judging whether a live broadcast room corresponding to the live broadcast acquisition request is in a live broadcast state;
if the live broadcast room is live broadcast, judging whether to generate the second configuration file according to the second video file;
and if the second configuration file is not generated, sending identification information to the client.
B19, the method as set forth in B18, further comprising the steps of:
if the second configuration file is judged to be generated, the second configuration file is sent to the client from the cache module; and
and when the second configuration file is not stored in the cache module, sending the second configuration file from the database to the client, and storing the second configuration file in the cache module.
B20, the method of claim B18 or B19, wherein the determining whether the live get request is legitimate includes:
judging whether the live broadcast acquisition request conforms to a preset acquisition frequency or not;
if the request accords with the preset acquisition frequency, continuously judging whether the live broadcast acquisition request comprises a preset identifier;
and if the live broadcast acquisition request comprises the preset identification, judging that the live broadcast acquisition request is legal, otherwise, judging that the live broadcast acquisition request is illegal.
B21, the method as set forth in B13, further comprising the steps of:
the network server stores the first video file into the file server and stores the first configuration file in the database and the cache module;
receiving a video-on-demand obtaining request from the client and sending the first configuration file to the client from the cache module;
when the cache module does not store the first configuration file, sending the first configuration file from the database to the client, and storing the first configuration file in the cache module; and
and the file server sends the first video file corresponding to the first configuration file to the client.
B22, the method as in any one of B13-B21, wherein the file server transmitting the first video file or the second video file to the client comprises the steps of:
sending the first video file or the second video file to an edge server proximate to the client; and
the edge server sends the first video file or the second video file to the client.
B23, the method according to any one of B13-B22, wherein the proxy server is a distributed proxy server.
B24, the method according to any one of B13-B23, wherein the first video file acquired by the proxy server is a live video file provided by a third party.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or groups of devices in the examples disclosed herein may be arranged in a device as described in this embodiment, or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. Modules or units or groups in embodiments may be combined into one module or unit or group and may furthermore be divided into sub-modules or sub-units or sub-groups. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as floppy diskettes, CD-ROMs, hard drives, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to execute the method for determining the apparatus shutdown state of the present invention according to instructions in the program code stored in the memory.
By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer-readable media includes both computer storage media and communication media. Computer storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of computer readable media.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed in an illustrative rather than a restrictive sense, and the scope of the present invention is defined by the appended claims.

Claims (10)

CN202010449187.9A2020-05-252020-05-25Network live broadcast system and methodPendingCN111787340A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202010449187.9ACN111787340A (en)2020-05-252020-05-25Network live broadcast system and method

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202010449187.9ACN111787340A (en)2020-05-252020-05-25Network live broadcast system and method

Publications (1)

Publication NumberPublication Date
CN111787340Atrue CN111787340A (en)2020-10-16

Family

ID=72753179

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202010449187.9APendingCN111787340A (en)2020-05-252020-05-25Network live broadcast system and method

Country Status (1)

CountryLink
CN (1)CN111787340A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112752115A (en)*2020-12-292021-05-04广州博冠信息科技有限公司Live broadcast data transmission method, device, equipment and medium
CN113766266A (en)*2021-09-102021-12-07阿波罗智联(北京)科技有限公司Audio and video processing method, device, equipment and storage medium
CN114760504A (en)*2022-04-182022-07-15北京金山云网络技术有限公司Live broadcast server testing method and device, storage medium and electronic equipment
CN114786050A (en)*2022-03-312022-07-22广州方硅信息技术有限公司Live broadcast room interaction method, device, medium and equipment based on sightseeing bus
CN114827675A (en)*2022-04-182022-07-29北京金山云网络技术有限公司Video data processing method and device for application program

Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1573690A (en)*2003-06-232005-02-02微软公司General dependency model for invalidating cache entries
CN103067484A (en)*2012-12-252013-04-24深圳市天维尔通讯技术有限公司Method and system upgrading application program automatically
CN103281568A (en)*2013-04-252013-09-04网宿科技股份有限公司Method and system for realizing direct playing of dynamic code rate by streaming media
CN103826137A (en)*2012-11-192014-05-28中国电信股份有限公司Video access method and system, and video agent of CDN server
CN106030542A (en)*2014-02-192016-10-12第三雷沃通讯有限责任公司 Proxy Failover and Load Clustering
CN109327733A (en)*2018-10-302019-02-12北京达佳互联信息技术有限公司Video broadcasting method, video play device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1573690A (en)*2003-06-232005-02-02微软公司General dependency model for invalidating cache entries
CN103826137A (en)*2012-11-192014-05-28中国电信股份有限公司Video access method and system, and video agent of CDN server
CN103067484A (en)*2012-12-252013-04-24深圳市天维尔通讯技术有限公司Method and system upgrading application program automatically
CN103281568A (en)*2013-04-252013-09-04网宿科技股份有限公司Method and system for realizing direct playing of dynamic code rate by streaming media
CN106030542A (en)*2014-02-192016-10-12第三雷沃通讯有限责任公司 Proxy Failover and Load Clustering
CN109327733A (en)*2018-10-302019-02-12北京达佳互联信息技术有限公司Video broadcasting method, video play device, electronic equipment and storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112752115A (en)*2020-12-292021-05-04广州博冠信息科技有限公司Live broadcast data transmission method, device, equipment and medium
CN112752115B (en)*2020-12-292023-09-08广州博冠信息科技有限公司Live broadcast data transmission method, device, equipment and medium
CN113766266A (en)*2021-09-102021-12-07阿波罗智联(北京)科技有限公司Audio and video processing method, device, equipment and storage medium
CN113766266B (en)*2021-09-102024-02-13阿波罗智联(北京)科技有限公司Audio and video processing method, device, equipment and storage medium
CN114786050A (en)*2022-03-312022-07-22广州方硅信息技术有限公司Live broadcast room interaction method, device, medium and equipment based on sightseeing bus
CN114786050B (en)*2022-03-312024-04-23广州方硅信息技术有限公司Live broadcasting room interaction method, device, medium and equipment based on sightseeing bus
CN114760504A (en)*2022-04-182022-07-15北京金山云网络技术有限公司Live broadcast server testing method and device, storage medium and electronic equipment
CN114827675A (en)*2022-04-182022-07-29北京金山云网络技术有限公司Video data processing method and device for application program

Similar Documents

PublicationPublication DateTitle
CN111787340A (en)Network live broadcast system and method
US10999340B2 (en)Cloud-based video delivery
CN110022482B (en) Video broadcasting method, video service system and storage medium
US8850054B2 (en)Hypertext transfer protocol live streaming
US9356985B2 (en)Streaming video to cellular phones
CN102611945B (en)Streaming media slicing method, slicing server and streaming media demand system
US20150372927A1 (en)Method, Device, and System for Acquiring Streaming Media Data
US8892686B1 (en)Dynamic content transformation for multiple devices
CN106559677A (en)The method and device of terminal, caching server and acquisition video slicing
WO2019128800A1 (en)Content service implementation method and device, and content delivery network node
CN110809167B (en) A video playback method, device, electronic device and storage medium
CN104093067A (en) Device and method for sharing and playing audio-visual clips in terminal
WO2017107542A1 (en)Video program obtaining method, device and system
US20140331266A1 (en)Caching of content
JP2017130925A (en) Streaming apparatus and method thereof, streaming service system using the same, and computer-readable recording medium (streaming apparatus and method thereof, streaming service system using the streaming medium and computer readable)
CN111726641A (en) Playback processing method, device and server of live video
CN113438513B (en)Video resolution switching method, device, equipment and storage medium
CN111837405B (en)Methods, systems, and media for delivering non-manifest streaming media content
US9350822B2 (en)Distributed web object identification for web caching
CN107645475B (en)File resource distribution system and method in heterogeneous network
WO2013113150A1 (en)Cache optimization method, cache and cache optimization system
WO2024032363A1 (en)Back-to-source processing method and apparatus, and computing device and storage medium
KR102519390B1 (en)Method for distributing a content and apparatus thereof
CN105359485B (en) Method for obtaining content part of multimedia content by client terminal
CN113473247B (en)Video playing request processing method, device and system and electronic equipment

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20201016


[8]ページ先頭

©2009-2025 Movatter.jp