[0078] Embodiment 2
[0079] Corresponding to the structure diagram of each part of the above-mentioned network live access video conference system, this embodiment discloses a method for network live access to a video conference. see figure 2 , which shows a schematic flowchart of an embodiment of a method for accessing a video conference by live webcasting, which is described in detail as follows:
[0080] Step S101, the background server receives the request information sent by the first web user to obtain the address of the user proxy server, and sends the address of the user proxy server to the first web user, so that the first web user can obtain the address of the user proxy server according to the The address of the user agent server is connected to the user agent server.
[0081] The first Web user is the first Web user who logs in to the live broadcast room within a preset time period.
[0082] Optionally, step S101 specifically includes the following steps:
[0083] After receiving the request information sent by the first Web user, the background server performs authentication and verification on the first Web user;
[0084] After the backend server passes the authentication and verification of the first web user, the backend server returns the address of the user proxy server to the first web user in combination with the IP address of the first web user and the load pressure of the user proxy server. user, and a Token is added to the database of the background server, and then the first Web user connects to the user agent server.
[0085] It is easy to understand that the above method uses a background server to perform authentication and verification on the first Web user. In addition, a separate server may also be used to perform authentication and verification on the first Web user.
[0086] Step S102: After detecting that the first Web user is connected, the user proxy server connects with the live server.
[0087] Wherein, after detecting the connection of the first Web user, the user agent server activates the Token to the background server, obtains the address of the live broadcast server, and then connects to the live broadcast server.
[0088] Step S103, after the live server detects that the user agent server is connected, activates the live room and obtains the information of the live room from the background server.
[0089] The corresponding information of the live broadcast room received by the live broadcast server includes: the address of the video conference server, the allocated address of the media server, and the address of the small file server.
[0090] Step S104, the live server creates a virtual user of the video conference server according to the address of the video conference server and logs in to the video conference server to receive information of the video conference server.
[0091] In one embodiment, the information of the video conference server received by the live broadcast server includes: service control signaling in the live broadcast system, signaling obtained from the video conference server, and electronic whiteboard data.
[0092] Step S105, the live server connects to the small file server according to the address of the small file server, and sends a first instruction to the small file server, so that the small file server obtains conference materials from the video conference server; The meeting materials described include pictures of the meeting room and shared documents.
[0093] The small file server obtains conference materials from the video conference server, specifically: the small file server creates a virtual user of the video conference server after receiving the first instruction sent by the live broadcast server, and logs in to the video conference server. After the small file server logs in to the video conference server, the small file server sends request information to the video conference server to acquire the conference materials. The request information includes GUID (Globally Unique Identifier).
[0094] Step S106, the live server connects to the media server according to the address of the media server, and sends a second instruction to the media server, so that the media server obtains media data from the video conference server.
[0095] see image 3 , step S106 can be specifically implemented through the following process:
[0096] Step S201, the live server sends a second instruction for creating an input channel to the media server according to the address of the media server, where the second instruction for creating an input channel includes an input channel identifier.
[0097] The live server is the signaling center in the live system. When a Web user wants to create a live room and the owner of the live room will turn on audio or video, the live server first receives a notification of creating a context, and then the live server receives a notification of creating a context. The address of the media server is connected to the media server, and a second instruction for creating an input channel is sent to the media server, where the second instruction for creating an input channel includes an input channel identifier. The input channel identifier is used to obtain the required media data.
[0098] When the presenter cancels audio or video, the live server notifies the media server to delete the input channel.
[0099] Step S202, the media server requests the video conference server for media data matching the identifier of the input channel, and returns the result of creating the input channel to the live server.
[0100] Wherein, in the process that the host of the live room will turn on the audio or video, after the media server obtains the media data from the video conference server, the media server will send the result of creating the input channel to the live server, and the live server will The input channel is subscribed to the output channel;
[0101] In the process of cancelling the audio or video by the presenter of the live broadcast room, the live broadcast server unsubscribes the input channel in the output channel.
[0102] Step S203, the live server sends output parameter setting request information to the media server.
[0103] Step S204, the media server sets output parameters according to the output parameter setting request information.
[0104] The media server determines the acquired media data by setting the output parameter of the specific input channel number of the subscription. In addition, the media server determines parameters for encoding and decoding the acquired media data by setting the frame rate of the video, the bit rate of the video, and the resolution of the video.
[0105] Step S205, the media server re-encodes and decodes the acquired media data according to the input channel and the output parameter.
[0106] After acquiring the media data from the video conference server according to the input channel, the media server performs appropriate encoding and decoding, sound mixing, and screen mixing processing on the media data to obtain video data in H246 format and audio data in Acc format.
[0107] Step S107, the Web page acquires the conference data and the media data, plays the media data, and displays the conference data.
[0108] As a possible implementation manner, the process of acquiring and displaying conference materials on the Web page may specifically include:
[0109] The first Web user is connected to the Nginx server through the CDN, and the Nginx server obtains the conference data from the small file server, and returns the conference data to the CDN;
[0110] The CDN returns the conference materials to the Web page for display.
[0111] Specifically, the media server pushes the conference data to the Nginx server, the Nginx server transmits the conference data to the CDN by connecting with the CDN, and the web page requests the conference data from the CDN. Specifically, the web page requests and displays conference materials from the CDN through the returned url1. Wherein, the url1 is returned by the small file server to the live broadcast server, the live broadcast server is returned to the user agent server, and the user agent server is finally returned to the Web page.
[0112] As another possible implementation manner, the Web page may be directly connected to the small file server, and the conference materials are requested from the small file server.
[0113] Wherein, the obtained conference materials include: pictures or shared documents, but are not limited thereto.
[0114] As an implementation manner, the process of acquiring and playing the media data by the web page may specifically be as follows: the media server pushes the encoded and decoded media data to the CDN using the RTMP protocol, and the first web user downloads the media data from the CDN. Request media data. Specifically: the web page requests media data from the CDN through the returned url2 and plays it. Wherein, the url2 is returned by the media server to the live broadcast server, the live broadcast server is returned to the user proxy server, and the user proxy server is finally returned to the first Web user.
[0115] As another possible implementation manner, the process of acquiring and playing the media data by the web page may specifically be as follows: the media server pushes the encoded and decoded media data to the Nginx server, and the first web user downloads the media data from the Nginx server. Request media data. Specifically, the Nginx server obtains the IP address of the media server after decoding, and the web page connects to the media server through the Nginx server to obtain media data.
[0116] As another possible implementation manner, the process of acquiring and playing the media data by the web page may specifically be as follows: the web page is directly connected to the media server, and requests the media data from the media server.
[0117] In this process, by using CDN intranet distribution network, users in remote areas and across network operators can load media data more smoothly, obtain image data faster, and provide better user experience; in addition, using CDN can make The video conference system obtains data in three protocol stream formats, namely RTMP, FLV, and HLS, and supports a wider range of data formats. The Nginx cluster is used as the reverse proxy of the small file server, which is connected to the CDN. The conference data in the small file server is transmitted to the CDN through the Nginx cluster, so that the small file server is invisible to the outside world, thereby improving the security and reliability of the live broadcast system. maintainability.
[0118] Optionally, the method for accessing a video conference via live webcasting may further include:
[0119] The user agent server, live server, media server, and small file server send heartbeat data packets to the background server to verify whether the link with the background server is disconnected;
[0120] The user agent server, the media server, and the small file server send heartbeat data packets to the live broadcast server to verify whether the link with the live broadcast server is disconnected.
[0121] In this embodiment, the entire system framework is kept alive through the sending and receiving of heartbeat data packets, and each server node provides daemon care to verify whether the links between the two communicating parties are connected so that a certain server When a node crashes, it can be restarted immediately and continue to provide services as a new server; and when an abnormality occurs on the server node, the corresponding client will request a new server from the background server and re-establish a business connection. Web users cannot perceive the abnormality of the server. , there is no need to log out of the conference room or log in again during the live broadcast, providing a good user experience for Web users.
[0122] Optionally, the method for accessing a video conference via live webcasting may further include:
[0123] Implement load balancing between the first Web user and the user proxy server, the live server, the small file server and the media server through the background server; or,
[0124] A separate server is used to implement load balancing of the first Web user and the user proxy server, the live broadcast server, the small file server and the media server.
[0125] In this embodiment, in order to achieve load balancing, the following method is adopted: for different servers with different load pressures, according to the server's memory usage, bandwidth usage, CPU usage, etc., combined with the server's maximum load for sensitive data and Judging by the current load amount, select the server with the least load pressure at present. For example, the load pressure of the user agent server is the number of Web user connections, the load pressure of the live server is the number of live rooms, and the media server is the number of output channels of the media stream. If the load capacity of the user agent server A is 5000 Web users, the current There are already 1000 web users logged in on user proxy server A, the load capacity of user proxy server B is 2000 web users, and 1000 web users are currently logged in on user proxy server B. If a new web user logs in , the selected load user agent server should be user agent server A. The above load balancing process is implemented by a background server or a separate server.
[0126]In this embodiment, the first user of each live broadcast room in the user proxy server only needs to log in all the above steps S101 to S107, and other users only need to obtain the address of the user proxy server to obtain the relevant data from the user proxy server. . The network live broadcast accesses the structure of the user agent server, the live broadcast server, the media server and the small file server in the video conference system to separate the business and data, so as to improve the maintainability and stability of the system. In addition, the system uses the user proxy server to share the pressure of user login, the live server to share the signaling and logic pressure, the media server to share the pressure of media data processing, and the CDN to share the pressure of Web users to obtain media data, so that the system can solve the problem of large concurrency and easily Support a large number of users to participate in the conference at the same time.
[0127] The above method for accessing a video conference by live webcasting uses a user agent server to connect to the live broadcast server to obtain the information of the live broadcast room, and then the live broadcast server notifies the small file server and the media server to create a context and log in to the video conference server to obtain the meeting content, thereby enabling the Web The user directly obtains the relevant conference content from the user agent server. Through the cooperation of user agent server, small file server, media server, live server and background server, business and data are separated, and the stability and reliability of the system are improved. The method is simple and quick to operate, and only a few users need to log in to the conference system, so that a huge number of users can directly access the page to participate in the conference and obtain conference materials.