CN111405303A - Method for quickly establishing live broadcast based on webpage - Google Patents
Method for quickly establishing live broadcast based on webpage Download PDFInfo
- Publication number
- CN111405303A CN111405303A CN202010152096.9A CN202010152096A CN111405303A CN 111405303 A CN111405303 A CN 111405303A CN 202010152096 A CN202010152096 A CN 202010152096A CN 111405303 A CN111405303 A CN 111405303A
- Authority
- CN
- China
- Prior art keywords
- live broadcast
- live
- web page
- control program
- link
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/21—Server components or server architectures
- H04N21/218—Source of audio or video content, e.g. local disk arrays
- H04N21/2187—Live feed
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
- G06F16/9558—Details of hyperlinks; Management of linked annotations
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/478—Supplemental services, e.g. displaying phone caller identification, shopping application
- H04N21/4782—Web browsing, e.g. WebTV
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/478—Supplemental services, e.g. displaying phone caller identification, shopping application
- H04N21/4788—Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/81—Monomedia components thereof
- H04N21/8166—Monomedia components thereof involving executable data, e.g. software
- H04N21/8173—End-user applications, e.g. Web browser, game
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/85—Assembly of content; Generation of multimedia applications
- H04N21/858—Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot
- H04N21/8586—Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot by using a URL
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本申请涉及一种基于网页快速建立直播的方法,方法包括:读入用于直播交流的目标网页;在所述目标网页中引入包含网页操作信息采集功能的第一直播控制程序并存储为第一链接;在目标网页中引入包含解析执行网页操作指令功能的第二直播控制程序并存储为第二链接;在直播通信服务单元中创建第一链接、第二链接之间的通信关系。所述第一直播控制程序采集用户对目标网页的操作数据发送至所述直播通信服务单元,所述直播通信服务单元接收并发送至其它用户,由其他用户第二直播控制程序解析所接收的数据,还原为网页操作指令执行。本申请有利于主播与观众针对网页内容进行同步操作交流,同时减少资源消耗,提升了用户体验。
The present application relates to a method for quickly establishing a live broadcast based on a web page, the method comprising: reading in a target web page for live broadcast communication; introducing a first live broadcast control program including a web page operation information collection function into the target web page and storing it as a first link; introducing a second live broadcast control program including a function of parsing and executing web page operation instructions into the target web page and storing it as a second link; and creating a communication relationship between the first link and the second link in a live broadcast communication service unit. The first live broadcast control program collects the user's operation data on the target web page and sends it to the live broadcast communication service unit, which receives and sends it to other users, and the second live broadcast control program of the other users parses the received data and restores it to web page operation instructions for execution. The present application facilitates the host and the audience to conduct synchronous operation and communication on web page content, while reducing resource consumption and improving user experience.
Description
技术领域technical field
本发明涉及通信领域,尤其涉及一种基于网页快速建立直播的方法。The present invention relates to the field of communications, in particular to a method for quickly establishing a live broadcast based on a webpage.
背景技术Background technique
在互联网发展的今天,直播已成为人们常见的交流形式,一般直播平台主要采用视频直播形式,主播和观众安装客户端软件或插件,主播创建账号后开启直播,同一平台观众进入直播房间后观看直播,通过点赞、留言、赠送礼物等形式互动,为高效率的交流手段之一,例如在近期面对突发的冠状病毒肺炎疫情时人们面对面交流不便的场景下,发挥了巨大的作用。但应用于生产却存在许多不足,主要包括以下几点:主播甚至观众需要安装直播软件或插件,拥有账号和熟悉软件操作;直播内容限于人物视频直播,讲解其它内容不便;直播过程中针对讲解特定内容与观众的互动性差;直播过程主要为视频传输,网络资源消耗非常大;无法直接针对需讲解的内容快速建立直播。With the development of the Internet today, live broadcasting has become a common form of communication. Generally, live broadcasting platforms mainly adopt the form of video live broadcasting. The anchor and audience install client software or plug-ins. After the anchor creates an account, the live broadcast is started, and the audience on the same platform enters the live broadcast room to watch the live broadcast. , interaction through likes, messages, gifts, etc. is one of the efficient means of communication. For example, it has played a huge role in the inconvenience of face-to-face communication in the face of the sudden coronavirus pneumonia epidemic recently. However, there are many deficiencies in production, mainly including the following points: anchors and even viewers need to install live broadcast software or plug-ins, have an account and be familiar with software operations; live broadcast content is limited to character video live broadcast, which is inconvenient to explain other content; The interaction between the content and the audience is poor; the live broadcast process is mainly video transmission, which consumes a lot of network resources; it is impossible to quickly establish a live broadcast directly for the content to be explained.
发明内容SUMMARY OF THE INVENTION
本申请有鉴于上述现有的状况,第一方面,本申请提供了一种基于网页快速建立直播的方法,所述方法包括:In view of the above-mentioned existing situation, the present application provides, in the first aspect, a method for quickly establishing a live broadcast based on a webpage, the method comprising:
读入用于直播交流的目标网页;Read in the landing page for live communication;
在所述目标网页中引入包含网页操作信息采集功能的第一直播控制程序,将所述包含第一直播控制程序的目标网页存储并生成为第一链接;在目标网页中引入包含解析执行网页操作指令功能的第二直播控制程序,将所述包含第二直播控制程序的目标网页存储并生成为第二链接;所述第一链接、第二链接可按照预定规则生成或按照直播通信服务单元分配;Introduce a first live broadcast control program including a webpage operation information collection function into the target webpage, and store and generate the target webpage including the first live broadcast control program as a first link; The second live control program of the instruction function stores and generates the target web page containing the second live control program as a second link; the first link and the second link can be generated according to predetermined rules or distributed according to the live communication service unit ;
或者,将所述目标网页发送至直播网页计算产生服务单元注册,并按照预定规则生成或按照直播通信服务单元分配产生第一链接、第二链接;当所述直播网页计算产生服务单元在接收到所述第一链接访问请求时,返回包含所述目标网页以及第一直播控制程序的网页内容,所述第一直播控制程序包含网页操作信息采集功能;当所述直播网页计算产生服务单元在接收到所述第二链接访问请求时,返回包含所述目标网页以及第二直播控制程序的网页内容,所述第二直播控制程序包含解析执行网页操作指令功能;Alternatively, the target webpage is sent to the live webpage calculation and generation service unit for registration, and is generated according to predetermined rules or distributed according to the live communication service unit to generate the first link and the second link; when the live webpage calculation and generation service unit receives the When the first link access request is made, the webpage content including the target webpage and the first live broadcast control program is returned, and the first live broadcast control program includes a webpage operation information collection function; when the live webpage calculation and generation service unit is receiving When the second link access request is reached, the webpage content including the target webpage and the second live broadcast control program is returned, and the second live broadcast control program includes the function of parsing and executing webpage operation instructions;
在所述直播通信服务单元中创建第一链接、第二链接之间的通信关系,所述直播通信服务单元为第一链接、第二链接提供直播通信服务;creating a communication relationship between the first link and the second link in the live communication service unit, where the live communication service unit provides a live communication service for the first link and the second link;
所述第一直播控制程序采集用户对目标网页的操作数据,将所述操作数据发送至所述直播通信服务单元,所述直播通信服务单元接收并发送至其它用户,由其他用户第二直播控制程序解析所接收的数据,还原为网页操作指令执行,达到与原用户网页画面同步的效果。The first live broadcast control program collects the user's operation data on the target web page, and sends the operation data to the live broadcast communication service unit, and the live broadcast communication service unit receives and sends it to other users, and is controlled by the second live broadcast of other users. The program parses the received data and restores it to the execution of web page operation instructions to achieve the effect of synchronizing with the original user's web page screen.
第二方面,本申请还提供了另一种基于网页快速建立直播的方法,所述方法包括:In a second aspect, the present application also provides another method for quickly establishing a live broadcast based on a webpage, the method comprising:
读入用于直播交流的目标网页网址;Read in the landing page URL for live communication;
读入包含iframe标签和第一直播控制程序的第一框架网页,所述第一直播控制程序包含网页操作信息采集功能,将所述目标网页网址添加进所述iframe标签,并将所述第一框架网页存储并生成为第一链接;读入包含iframe标签和第二直播控制程序的第二框架网页,所述第二直播控制程序包含解析执行网页操作指令功能,将所述目标网页网址添加进所述iframe标签,并将所述第二框架网页存储并生成为第二链接;Read in a first frame web page including an iframe tag and a first live control program, the first live control program includes a web page operation information collection function, add the target web address into the iframe tag, and add the first live control program to the iframe tag. The frame web page is stored and generated as the first link; the second frame web page containing the iframe tag and the second live control program is read in, and the second live control program includes the function of parsing and executing web page operation instructions, and adding the target web address into the the iframe tag, and store and generate the second frame web page as a second link;
或者,将所述目标网页网址发送至直播网页计算产生服务单元注册,并按照预定规则生成或按照直播通信服务单元分配产生第一链接、第二链接;所述直播网页计算产生服务单元在接收到所述第一链接访问请求时,读入包含iframe标签和第一直播控制程序的第一框架网页,所述第一直播控制程序包含网页操作信息采集功能,并将所述目标网页网址添加进所述iframe标签并返回;所述直播网页计算产生服务单元在接收到所述第二链接访问请求时,读入包含iframe标签和第二直播控制程序的第二框架网页,所述第二直播控制程序包含解析执行网页操作指令功能,并将所述目标网页网址添加进所述iframe标签并返回;Or, send the target webpage URL to the live webpage calculation and generation service unit for registration, and generate the first link and the second link according to the predetermined rule or according to the distribution of the live communication service unit; the live webpage calculation and generation service unit receives the When the first link access request is made, the first frame web page containing the iframe tag and the first live control program is read in, and the first live control program includes the function of collecting web page operation information, and the target web address is added to all the web pages. Describe the iframe tag and return; When the said live web page calculation and generation service unit receives the said second link access request, reads in the second frame web page that includes the iframe tag and the second live broadcast control program, the second live broadcast control program Including the function of parsing and executing webpage operation instructions, and adding the target webpage URL into the iframe tag and returning it;
在所述直播通信服务单元中创建第一链接、第二链接之间的通信关系,所述直播通信服务单元为第一链接、第二链接提供直播通信服务;creating a communication relationship between the first link and the second link in the live communication service unit, where the live communication service unit provides a live communication service for the first link and the second link;
所述第一链接中包含的所述第一直播控制程序采集用户对第一框架网页的操作数据,将所述操作数据发送至所述直播通信服务单元;所述第二链接中所包含的所述第二直播控制程序解析所接收的数据,还原为网页操作指令执行,达到与原用户网页画面同步的效果。The first live broadcast control program contained in the first link collects user operation data on the first frame web page, and sends the operation data to the live broadcast communication service unit; The second live control program parses the received data, and restores it to the execution of web page operation instructions, so as to achieve the effect of synchronizing with the original user's web page screen.
本申请提供的基于网页快速建立直播的方法,主播和观众分别访问第一链接、第二链接即可开启直播交流,无需进行注册下载等其他操作,简化了直播流程,直播过程中网页操作画面保持同步,提高了主播与观众的沟通效率,有助于主播讲解和观众互动,提升用户体验。In the method for quickly establishing a live broadcast based on a webpage provided by this application, the host and the audience can access the first link and the second link respectively to start the live broadcast exchange, and other operations such as registration and download are not required, which simplifies the live broadcast process, and the webpage operation screen remains during the live broadcast process. Synchronization improves the communication efficiency between the anchor and the audience, helps the anchor explain and interacts with the audience, and improves the user experience.
附图说明Description of drawings
图1为本申请实施方式所提供的一种基于网页快速建立直播的方法的流程示意图;1 is a schematic flowchart of a method for quickly establishing a live broadcast based on a webpage according to an embodiment of the present application;
图2为本申请实施方式所提供的基于源内容生成目标网页的流程示意图;2 is a schematic flowchart of generating a target web page based on source content according to an embodiment of the present application;
图3为本申请实施方式所提供的基于直播网页模板生成目标网页的流程示意图;3 is a schematic flowchart of generating a target web page based on a live web page template provided by an embodiment of the present application;
图4为本申请实施方式所提供的针对目标网页的重构方法的流程示意图;4 is a schematic flowchart of a reconstruction method for a target webpage provided by an embodiment of the present application;
图5为本申请实施方式所提供的另一种基于网页快速建立直播的方法的流程示意图;5 is a schematic flowchart of another method for quickly establishing a live broadcast based on a webpage provided by an embodiment of the present application;
图6为本申请实施方式所提供的第一框架网页内部结构示意图;6 is a schematic diagram of the internal structure of the first frame webpage provided by the embodiment of the present application;
图7为本申请实施方式所提供的第二框架网页内部结构示意图;7 is a schematic diagram of the internal structure of a second frame webpage provided by an embodiment of the present application;
图8为本申请实施方式所提供的根据直播配置要求配置直播通信的流程示意图;8 is a schematic flowchart of configuring live communication according to live configuration requirements provided by an embodiment of the present application;
图9为本申请实施方式所提供的创建、配置直播的界面示意图;9 is a schematic diagram of an interface for creating and configuring a live broadcast provided by an embodiment of the present application;
图10为本申请实施方式所提供的创建直播过程中上传源内容的界面示意图;10 is a schematic interface diagram of uploading source content in the process of creating a live broadcast provided by an embodiment of the present application;
图11为本申请实施方式所提供的创建直播过程中生成链接后的界面示意图;11 is a schematic diagram of an interface after a link is generated in the process of creating a live broadcast provided by an embodiment of the present application;
图12为本申请实施方式所提供的主播端(第一链接)界面示意图;12 is a schematic diagram of the interface of the host (first link) provided by the embodiment of the present application;
图13为本申请实施方式所提供的观众端(第二链接)界面示意图;FIG. 13 is a schematic diagram of a viewer terminal (second link) interface provided by an embodiment of the present application;
具体实施方式Detailed ways
以下,参考附图,详细地说明本发明的一种实施方式。Hereinafter, one embodiment of the present invention will be described in detail with reference to the accompanying drawings.
如图1所示,本申请提供一种基于网页快速建立直播的方法,方法包括:As shown in Figure 1, the present application provides a method for quickly establishing a live broadcast based on a webpage, the method comprising:
步骤S101,读入用于直播交流的目标网页;Step S101, read in the target webpage for live communication;
步骤S1021,在所述目标网页中引入包含网页操作信息采集功能的第一直播控制程序,将所述包含第一直播控制程序的目标网页存储并生成为第一链接;在目标网页中引入包含解析执行网页操作指令功能的第二直播控制程序,将所述包含第二直播控制程序的目标网页存储并生成为第二链接。或步骤S1022,将所述目标网页发送至直播网页计算产生服务单元注册并产生第一链接、第二链接,所述直播网页计算产生服务单元根据第一链接、第二链接访问请求,返回包含目标网页以及第一直播控制程序的网页内容、返回包含目标网页以及第二直播控制程序的网页内容;Step S1021: Introduce a first live broadcast control program including a webpage operation information collection function into the target webpage, store and generate the target webpage including the first live broadcast control program as a first link; The second live broadcast control program executing the function of the webpage operation instruction stores and generates the target webpage containing the second live broadcast control program as a second link. Or in step S1022, the target webpage is sent to the live webpage calculation and generation service unit to register and generate a first link and a second link, and the live webpage calculation and generation service unit returns an access request including the target link according to the first link and the second link. the webpage and the webpage content of the first live broadcast control program, and return the webpage content including the target webpage and the second live broadcast control program;
步骤S103,在直播通信服务单元中创建第一链接、第二链接之间的通信关系。Step S103, creating a communication relationship between the first link and the second link in the live communication service unit.
其中,步骤S101,所述目标网页为包含直播交流内容的网页文件,通过直播创建者上传的源内容处理、转换生成。Wherein, in step S101, the target webpage is a webpage file containing live broadcast communication content, and is generated by processing and converting the source content uploaded by the live broadcast creator.
在目标网页中引入控制程序和生成两个链接,包括步骤S1021、步骤S1022两种方式:Introducing the control program and generating two links in the target webpage, including step S1021 and step S1022 two ways:
步骤S1021,在所述目标网页中插入script标签,所述script标签中包含用于执行网页操作信息采集功能的第一直播控制程序的程序文件地址或者用于执行网页操作信息采集功能的第一直播控制程序内容,然后将包含所述第一直播控制程序的目标网页存储部署生成第一链接,其中第一链接可以通过预定规则生成(如根据创建者信息、时间信息生成文件名称;如第一链接、第二链接采用不同文件名称或者相同文件名称+参数),或者按照直播通信服务单元分配(如直播通信服务单元预先配置了直播房间的访问地址,在部署包含所述第一直播控制程序的目标网页时采用该访问网址);相同的,按照以上步骤在目标网页中引入用于执行解析执行网页操作指令功能的第二直播控制程序存储部署并生成第二链接。此种方式中,生成了静态的引入直播控制程序的目标网页,当访问第一链接、第二链接时,返回包含直播控制程序的目标网页文件。Step S1021, insert a script tag in the target web page, the script tag contains the program file address of the first live broadcast control program for executing the webpage operation information collection function or the first live broadcast for executing the webpage operation information collection function. Control program content, and then store and deploy the target web page containing the first live control program to generate a first link, where the first link can be generated through predetermined rules (such as generating a file name according to creator information and time information; such as the first link , the second link adopts a different file name or the same file name+parameter), or is distributed according to the live broadcast communication service unit (such as the live broadcast communication service unit is preconfigured with the access address of the live broadcast room, and the target that includes the first live broadcast control program is deployed in the deployment The access URL is used for the webpage); similarly, according to the above steps, a second live broadcast control program for performing the function of parsing and executing webpage operation instructions is introduced into the target webpage, stored and deployed, and a second link is generated. In this way, a static target webpage into which the live broadcast control program is introduced is generated, and when the first link and the second link are accessed, the target webpage file containing the live broadcast control program is returned.
步骤S1022,动态的生成包含直播控制程序的目标网页,所述包含直播控制程序的目标网页由直播网页计算产生服务单元实时计算生成,具体的,在直播创建过程中,将目标网页发送至直播网页计算产生服务单元注册,所述直播网页计算产生服务单元保存所述目标网页信息,并按照预定规则生成或按照直播通信服务单元分配,首先产生第一链接、第二链接并提供,同时建立所述第一链接、第二链接与目标网页数据之间对应关系,直播启动后,当所述播网页计算产生服务单元在接收到第一链接、第二链接请求时,根据之前建立的对应关系查找到所述目标网页数据内容并读入,在所述目标网页数据内容中插入相应的直播控制程序(即直播控制API)后返回。其中第一链接请求获得的数据包括目标网页数据以及第一直播控制程序;第二链接请求获得的数据包括目标网页以及第二直播控制程序。此种方式中,在服务器上运行直播网页计算产生服务单元(例如Servlet等服务程序),动态生成包含直播控制程序的目标网页内容。Step S1022, dynamically generate a target webpage containing the live broadcast control program, and the target webpage containing the live broadcast control program is calculated and generated in real time by the live broadcast webpage calculation and generation service unit. Specifically, in the live broadcast creation process, the target webpage is sent to the live broadcast webpage. The calculation and generation service unit is registered, the live web page calculation and generation service unit saves the target web page information, and generates according to predetermined rules or distributes according to the live communication service unit, firstly generates and provides the first link and the second link, and simultaneously establishes the The corresponding relationship between the first link, the second link and the target web page data, after the live broadcast is started, when the web page calculation and generation service unit receives the first link and the second link request, it finds the The data content of the target web page is read in, and the corresponding live control program (ie, the live control API) is inserted into the data content of the target web page and returned. The data obtained by the first link request includes the target webpage data and the first live broadcast control program; the data obtained by the second link request includes the target webpage and the second live broadcast control program. In this way, the live web page is run on the server to calculate and generate a service unit (such as a service program such as Servlet), and the target web page content including the live control program is dynamically generated.
步骤S103中,所述直播通信服务单元一般为用于直播的通信服务器,直播过程中为主播端、观众端提供通信及控制服务。由此,创建直播需在直播通信服务单元中进行注册,具体为,按照用于主播端访问的第一链接、用于观众端访问的第二链接、直播创建的配置要求创建直播通信服务记录,并存储第一链接、第二链接与所述直播通信记录之间的对应关系。当接收到第一链接访问请求时,根据所述访问请求按照所述对应关系查找直播通信记录,并基于所述通信记录启动本次直播服务,建立主播端与所述直播通信服务单元之间的通信连接(如Socket通信连接),当接收到第二链接访问请求时,根据所述第二链接访问请求按照所述对应关系查找直播通信记录,在查找到的通信记录主播端与所述直播通信服务单元通信连接已建立的状态下,建立观众端与所述直播通信服务单元之间的通信连接(如Socket通信连接)。所述直播通信服务单元按照第一链接、第二链接之间的对应关系接收、处理、发送数据,提供直播通信及控制服务。In step S103, the live broadcast communication service unit is generally a communication server used for live broadcast, and provides communication and control services for the host and the audience during the live broadcast. Therefore, creating a live broadcast needs to be registered in the live broadcast communication service unit. Specifically, the live broadcast communication service record is created according to the configuration requirements of the first link used for the anchor access, the second link used for the audience access, and the live broadcast creation. and store the correspondence between the first link, the second link and the live broadcast communication record. When receiving the first link access request, look up the live broadcast communication record according to the corresponding relationship according to the access request, start the live broadcast service based on the communication record, and establish a connection between the host and the live broadcast communication service unit. A communication connection (such as a Socket communication connection), when receiving a second link access request, according to the second link access request to search for a live communication record according to the corresponding relationship, and communicate with the live broadcast at the found communication record host end In the state that the communication connection of the service unit has been established, a communication connection (such as a Socket communication connection) between the viewer and the live communication service unit is established. The live communication service unit receives, processes and sends data according to the corresponding relationship between the first link and the second link, and provides live communication and control services.
根据步骤S103,当建立直播通信关系后,所述第一链接中包含的所述第一直播控制程序采集用户对目标网页的操作数据,将所述操作数据发送至所述直播通信服务单元;所述第二链接中所包含的所述第二直播控制程序解析所接收的数据,还原为网页操作指令执行,达到与原用户网页画面同步的效果。According to step S103, after the live broadcast communication relationship is established, the first live broadcast control program included in the first link collects the user's operation data on the target webpage, and sends the operation data to the live broadcast communication service unit; The second live broadcast control program included in the second link parses the received data, and restores it to the execution of web page operation instructions, so as to achieve the effect of synchronizing with the original user's web page screen.
本实施方式中,主播端对应的第一直播控制程序包含网页操作信息采集功能,其中所述网页操作包括针对网页的常见操作与用于辅助直播的其它操作。针对网页的常见操作如:页面滑动、点击、输入、缩放、拖拽、跳转等;用于辅助直播的其它操作,如涂鸦操作、文字输入操作、音频操作、视频操作等,所述用于辅助直播的其它操作由第一直播控制程序提供。当主播进行直播操作时,所述第一直播控制程序将针对不同的操作类型采集生成对应的操作类型数据,例如使用涂鸦操作时,将通过第一直播控制程序在目标网页上建立一个Canvas画布,主播在Canvas画布上进行涂鸦操作,此时会采集涂鸦轨迹、涂鸦笔类型、涂鸦笔粗细等相关涂鸦操作数据。执行数据采集后将操作数据发送至直播通信服务单元,直播通信服务单元再进行广播转发,发送给其他观众端,观众端对应的第二直播控制程序解析直播操作数据并按照操作类型还原对应的直播操作,例如,第二直播控制程序接收到的网页操作数据包含网页body滑动数据时,基于所述网页操作数据中网页滑动前的位置数据、滑动后的位置数据、滑动的起始时间与结束时间,所述第二直播控制程序调用网页body设置方法设置scrollTop属性,将其scrollTop值设置为滑动后的位置数据,同时根据滑动时间生成滑动动画,从而实现还原主播端的操作的滑动效果。In this embodiment, the first live broadcast control program corresponding to the host terminal includes a webpage operation information collection function, wherein the webpage operation includes common operations for webpages and other operations for assisting live broadcast. Common operations on web pages such as: page sliding, clicking, input, zooming, dragging, jumping, etc.; other operations used to assist live broadcasts, such as graffiti operations, text input operations, audio operations, video operations, etc. Other operations to assist the live broadcast are provided by the first live broadcast control program. When the host performs a live broadcast operation, the first live broadcast control program will collect and generate corresponding operation type data for different operation types. For example, when using the graffiti operation, a Canvas canvas will be created on the target webpage through the first live broadcast control program, When the host performs graffiti operations on the Canvas canvas, relevant graffiti operation data such as graffiti trajectories, graffiti pen types, and graffiti pen thicknesses will be collected. After data collection is performed, the operation data is sent to the live broadcast communication service unit, and the live broadcast communication service unit then broadcasts and forwards it to other audiences. The second live broadcast control program corresponding to the audience end parses the live broadcast operation data and restores the corresponding live broadcast according to the operation type. Operation, for example, when the webpage operation data received by the second live control program includes webpage body sliding data, based on the position data before the webpage sliding, the position data after sliding, the start time and the end time of the sliding in the webpage operation data , the second live control program calls the webpage body setting method to set the scrollTop property, sets the scrollTop value to the position data after sliding, and generates a sliding animation according to the sliding time, so as to realize the sliding effect of restoring the operation of the host.
在本申请的一些实施方式中,所述第一直播控制程序、第二直播控制程序为集成了多种功能函数的程序集合,本申请仅定义在主播端引入所述第一直播控制程序,在观众端引入所述第二直播控制程序,但不限于所述第一直播控制程序与第二直播控制程序在实质上为同一程序或部分内容相同,所述第一直播控制程序、第二直播控制程序均可包含网页操作信息采集、解析执行网页操作指令、涂鸦操作数据采集、解析涂鸦数据、音频操作数据采集、解析音频操作数据、视频操作数据采集、解析视频操作数据、文字操作数据采集、解析文字操作数据功能的一种或多种。例如:如果第二直播控制程序包括网页操作信息采集、音频操作数据采集、涂鸦操作数据采集、视频操作数据采集功能,则观众端在会议模式下获得直播权限后也可以执行直播操作,并通过所述直播通信服务单元将数据转发给其他用户,其它观众端通过第二直播控制程序解析执行数据,同时主播端对应的第一直播控制程序也可以执行操作数据解析及其它数据解析功能,还原对应的直播操作。In some embodiments of the present application, the first live broadcast control program and the second live broadcast control program are a set of programs integrating multiple functional functions. The viewer side introduces the second live control program, but is not limited to that the first live control program and the second live control program are substantially the same program or part of the same content, the first live control program, the second live control program The program can include web page operation information collection, parsing and executing web page operation instructions, graffiti operation data collection, parsing graffiti data, audio operation data collection, audio operation data analysis, video operation data collection, video operation data analysis, text operation data collection, analysis One or more of the text manipulation data functions. For example: if the second live broadcast control program includes the functions of web page operation information collection, audio operation data collection, Tuya operation data collection, and video operation data collection functions, the viewer can also perform the live broadcast operation after obtaining the live broadcast permission in the conference mode. The live communication service unit forwards the data to other users, and other viewers parse the execution data through the second live control program, and the first live control program corresponding to the host can also perform operation data analysis and other data analysis functions, and restore the corresponding Live action.
本实施方式中,目标网页中引入的第一直播控制程序还用于监听用户的直播控制指令,对直播过程进行控制。所述直播控制指令包括开始/停止直播、开启/关闭发言、直播/会议模式切换、内容切换、内容更换、处理发言请求、观众管理、直播权移交、视频开关、音频开关、涂鸦设置、消息处理中的一种或多种,详细说明如下:In this embodiment, the first live broadcast control program introduced in the target webpage is also used to monitor the user's live broadcast control instruction, and to control the live broadcast process. The live broadcast control instructions include start/stop live broadcast, open/close speaking, live broadcast/conference mode switching, content switching, content replacement, processing speech requests, audience management, live broadcast right handover, video switch, audio switch, graffiti setting, message processing One or more of the following details:
当接收到开始/停止直播控制指令时,所述第一直播控制程序会向所述直播通信服务单元发送对应请求,直播通信服务单元收到开始直播控制指令后会建立主播端与直播通信服务单元之间的连接,当收到停止直播控制指令后会进行本次直播停止处理并断开与本次直播通信相关的所有连接;When receiving the start/stop live broadcast control instruction, the first live broadcast control program will send a corresponding request to the live broadcast communication service unit, and the live broadcast communication service unit will establish the host terminal and the live broadcast communication service unit after receiving the start/stop live broadcast control command After receiving the stop live control command, the live broadcast will be stopped and all connections related to the live broadcast will be disconnected;
当接收开启/关闭发言控制指令后,将所述控制指令通过直播通信服务单元转发给观众端的第二直播控制程序,开启/关闭发言功能针对观众端发言进行控制;After receiving the open/close speaking control instruction, the control instruction is forwarded to the second live control program of the audience through the live communication service unit, and the open/close function of speaking is controlled for the audience to speak;
当接收到直播模式切换控制指令时,将所述控制指令发送至直播通信服务单元,所述直播通信服务单元将当前服务模式切换为直播模式,设定为直播模式下的数据收发处理方式,发送指令至观众端与主播端进行模式切换处理,如关闭观众端的发言功能,开启主播端的网页操作、发言、视频、涂鸦等功能;当接收到会议模式切换控制指令时,将所述控制指令发送至直播通信服务单元,所述直播通信服务单元将当前服务模式切换为会议模式,设定为会议模式下的数据收发处理方式,发送指令至观众端与主播端进行模式切换处理,如开启观众端的网页操作、发言、涂鸦功能等。所述直播模式与会议模式的主要区别为,直播模式下仅允许主播进行直播讲解操作,会议模式下允许全部或部分观众获取直播讲解操作权;When receiving the live mode switching control command, the control command is sent to the live broadcast communication service unit, and the live broadcast communication service unit switches the current service mode to the live broadcast mode, sets the data transmission and reception processing mode in the live broadcast mode, and sends the Commands are sent to the audience and the host to perform mode switching processing, such as turning off the speech function of the audience, and enabling the web page operation, speech, video, graffiti and other functions of the host; when receiving the conference mode switching control command, the control command is sent to The live communication service unit, which switches the current service mode to the conference mode, sets the data transmission and reception processing mode in the conference mode, and sends an instruction to the audience and the host to perform mode switching processing, such as opening the web page of the audience Operation, speech, graffiti functions, etc. The main difference between the live broadcast mode and the conference mode is that in the live broadcast mode, only the host is allowed to perform live broadcast explanation operations, and in the conference mode, all or part of the audience is allowed to obtain the live broadcast explanation operation right;
当接收到内容切换控制指令时,将调出可切换内容的列表界面,主播选择需要切换的内容记录,并将切换的目标内容记录标识发送至直播通信服务单元,所述直播通信服务单元发送切换指令以及切换的目标内容记录标识至观众端或主播端执行切换操作,发送刷新指令触发主播端和观众端的网页刷新功能。所述内容切换功能用于提供多个讲解内容(多个网址、网页、按素材编排为多个网页等)的创建者在直播讲解过程中进行内容切换;When receiving the content switching control instruction, the list interface of switchable content will be called up, the host selects the content record to be switched, and sends the switch target content record identifier to the live communication service unit, and the live communication service unit sends the switch The instruction and the target content record identifier of the switch are sent to the viewer or the host to perform the switching operation, and a refresh instruction is sent to trigger the webpage refresh function of the host and the viewer. The content switching function is used to provide the creator of multiple explanation contents (multiple URLs, webpages, multiple webpages arranged according to materials, etc.) to switch the content during the live explanation process;
当接收到内容更换控制指令时,将调出用于生成新目标网页的网址或源内容采集界面,将所采集信息直接或间接发送至直播生成单元,新的目标网页生成后,发送内容更新请求至直播通信服务单元,最终由直播通信服务单元发送更新指令至主播端与观众端,触发主播端和用户端更新直播内容。所述内容更换功能用于至直播过程中整体改变或增加新的直播内容;When receiving the content replacement control instruction, it will call up the website or source content collection interface for generating a new target webpage, and send the collected information directly or indirectly to the live broadcast generation unit. After the new target webpage is generated, a content update request will be sent. to the live broadcast communication service unit, and finally the live broadcast communication service unit sends an update instruction to the host and the viewer, triggering the host and the client to update the live content. The content replacement function is used to change or add new live content as a whole during the live broadcast;
当接收到处理发言请求控制指令时,将处理发言请求的处理结果发送至发送至直播生成单元,经所述直播通信服务单元处理并根据发言请求处理结果发送指令至观众端,由所述第二直播控制程序执行客户端开启或关闭发言操作;When receiving the control instruction for processing the speaking request, the processing result of processing the speaking request is sent to the live broadcast generation unit, and the live communication service unit processes and sends the instruction to the audience according to the processing result of the speaking request, and the second The live control program executes the client opening or closing the speech operation;
当接收到观众管理控制指令时,将从直播通信服务单元获取当前在线观众的信息,并调出观众信息列表界面,主播可以查看观众信息,也可以点击信息列表界面上的禁言、踢出按钮对某个观众执行对应的操作,例如点击禁言时,将所述禁言指令至发送至直播通信服务单元,经所述直播通信服务单元处理并发送指令至相应观众端,由所述第二直播控制程序执行客户端相关功能关闭操作;When receiving the audience management control instruction, the information of the current online audience will be obtained from the live communication service unit, and the audience information list interface will be called up. The anchor can view the audience information, or click the mute and kick buttons on the information list interface. Perform a corresponding operation on a certain audience, for example, when clicking mute, send the mute command to the live communication service unit, and the live communication service unit processes and sends the command to the corresponding viewer, and the second The live control program executes the closing operation of the client-side related functions;
当接收到直播权移交控制指令时,将所述控制指令发送至直播通信服务单元,经所述直播通信服务单元处理并发送权限移交指令至相关的主播端、观众端,由所包含的第一直播控制程序、第二直播控制程序执行权限移交的客户端处理;When receiving the live broadcast right handover control command, the control command is sent to the live broadcast communication service unit, which is processed by the live broadcast communication service unit and sends the right handover command to the relevant host and viewer. Client-side processing of the handover of the execution authority of the live control program and the second live control program;
当接收到视频开关控制指令时,所述第一直播控制程序将开始执行视频操作数据采集功能,并将所采集视频数据发送至直播通信服务单元;当接收到视频关闭指令时,停止视频操作数据采集;When receiving the video switch control instruction, the first live control program will start to perform the video operation data acquisition function, and send the collected video data to the live communication service unit; when receiving the video close instruction, stop the video operation data collection;
当接收到音频开启指令时,所述第一直播控制程序将开始执行音频操作数据采集功能,并将所采集音频数据发送至直播通信服务单元;当接收到音频关闭指令时,停止音频操作数据采集;When receiving the audio turn-on instruction, the first live control program will start to perform the audio operation data collection function, and send the collected audio data to the live communication service unit; when receiving the audio turn-off instruction, stop the audio operation data collection ;
当接收到涂鸦设置控制指令时,将调出涂鸦相关的设置按钮并在目标网页执行涂鸦操作,并开始采集主播的涂鸦操作数据,将所采集涂鸦数据发送至直播通信服务单元,当主播对涂鸦进行设置时,第一直播控制程序根据对应的设置参数调整涂鸦属性;When receiving the Tuya setting control command, it will call up the Tuya related setting buttons and perform Tuya operations on the target web page, start to collect the Tuya operation data of the host, and send the collected Tuya data to the live communication service unit. When the host responds to Tuya When setting, the first live broadcast control program adjusts the graffiti properties according to the corresponding setting parameters;
消息处理指令,执行相关消息处理操作,如:接收直播通信服务单元消息数据并更新消息列表。The message processing instruction executes related message processing operations, such as: receiving the message data of the live communication service unit and updating the message list.
相应地,目标网页中引入的第二直播控制程序也可以监听观众端的直播控制指令,所述直播控制指令包括进入/退出直播、发言请求、直播权接收、直播权交回、视频开关、音频开关、涂鸦设置、消息处理中的一种或多种。其中进入/退出直播建立/断开与直播通信服务单元之间的连接;发言请求控制指令用于向直播通信服务单元发送发言请求,申请获取直播的发言权;执行直播权接收指令表示同意接收直播权移交的请求;执行直播权交回指令发送至直播通信服务单元,由所述直播通信服务单元进行直播权限回收处理。Correspondingly, the second live broadcast control program introduced in the target web page can also monitor the live broadcast control instructions of the audience, and the live broadcast control instructions include entering/exiting the live broadcast, request to speak, live broadcast right reception, live broadcast right handover, video switch, audio switch. , one or more of doodle settings, and message handling. Among them, entering/exiting the live broadcast establishes/disconnects the connection with the live broadcast communication service unit; the speaking request control instruction is used to send a speech request to the live broadcast communication service unit to apply for the right to speak in the live broadcast; executing the live broadcast right receiving instruction means agreeing to receive the live broadcast The request for handover of the right of live broadcast is sent to the live broadcast communication service unit, and the live broadcast communication service unit performs the recovery processing of the live broadcast right.
在一种可选的实施方式中,对应步骤S101中读入用于直播交流的目标网页之前,还包括处理并生成目标网页,具体实施可以有两种方式,第一种方式,参考图2所示,步骤包括:In an optional implementation manner, before the target webpage for live communication is read in corresponding step S101, it also includes processing and generating the target webpage. There are two specific implementation methods. For the first method, refer to FIG. 2 . shown, the steps include:
步骤S201,接收源内容并识别所述源内容类型;Step S201, receiving source content and identifying the source content type;
步骤S202,接收来自直播创建者的网页素材处理要求、内容结构要求、内容编排要求、显示样式要求中的一种或多种,和/或结合系统内置的网页素材规范、内容结构规范、内容编排规则、标签规范中的一种或多种处理源内容;Step S202: Receive one or more of webpage material processing requirements, content structure requirements, content arrangement requirements, and display style requirements from the live broadcast creator, and/or combine the built-in webpage material specifications, content structure specifications, and content arrangement requirements of the system One or more of the rules, label specifications process the source content;
步骤S203,将源内容转换为目标网页。Step S203, converting the source content into a target web page.
步骤S201中,所述源内容通过直播创建者上传,所述源内容类型包括网页、网址、能够转换为网页的文件、网页支持的素材文件中的一种或多种,且每种类型的源内容可上传一个或多个,当上传多个网页、网址、能够转换为网页的文件时,直播创建者可指定按照一定顺序排列,生成直播后,可以使用内容切换控制指令在多个内容中进行切换。In step S201, the source content is uploaded by the creator of the live broadcast, and the source content type includes one or more of web pages, URLs, files that can be converted into web pages, and material files supported by the web pages, and each type of source content. One or more contents can be uploaded. When uploading multiple webpages, URLs, and files that can be converted into webpages, the creator of the live broadcast can specify to arrange them in a certain order. switch.
步骤S202中,所述网页素材处理要求指直播创建者针对网页素材内容提出的处理要求,其中包括图片显示尺寸、图片显示画质、音频音质、文字大小、文字字体等,详细说明如下:In step S202, the web page material processing requirements refer to the processing requirements put forward by the creator of the live broadcast for the web page material content, including picture display size, picture display quality, audio sound quality, text size, text font, etc. The details are as follows:
内容结构要求,可以将源内容按照所提供的内容结构处理后生成目标网页。例如,提供某树状结构作为内容结构要求,则根据该结构对源内容进行处理,生成对应的树状章节并插入相关源内容。If the content structure is required, the source content can be processed according to the provided content structure to generate the target web page. For example, if a certain tree structure is provided as the content structure requirement, the source content is processed according to the structure, a corresponding tree section is generated, and the relevant source content is inserted.
内容编排要求,主要为创建者按照直播时内容讲解的顺序、优先级提出的要求,基于该要求对源内容显示顺序进行编排,例如当上传的源内容为多个图片时,可以按照内容编排要求设置图片的展示顺序。The content arrangement requirements are mainly the requirements put forward by the creator according to the order and priority of the content explanation during the live broadcast. Based on this requirement, the display order of the source content is arranged. For example, when the uploaded source content contains multiple pictures, it can be arranged according to the content arrangement requirements. Set the display order of images.
显示样式要求,可以规定源内容处理后的显示样式,按照显示样式要求处理源内容,修改尺寸、颜色、位置、阴影、边框、模糊、CSS动画效果等显示样式。Display style requirements, you can specify the display style of the source content after processing, process the source content according to the display style requirements, and modify the display styles such as size, color, position, shadow, border, blur, CSS animation effect, etc.
系统内置的网页素材规范,指系统规定的网页素材需符合的规范,如图片文件大小、图片尺寸、文件类型、视频文件大小需符合的规范等。The built-in web page material specification of the system refers to the specification that the web page material specified by the system must conform to, such as the specification that the image file size, image size, file type, and video file size must conform to.
系统内置的内容结构规范,即系统对内容结构的限制性要求,如内容结构的层数限制等。同时,系统为进行源内容整理提供默认结构处理规范,而且可包括多个默认规范,根据源内容的类型、数量、上传顺序等从默认结构处理规范中选择。The built-in content structure specification of the system, that is, the system's restrictive requirements for the content structure, such as the limit on the number of layers of the content structure. At the same time, the system provides default structure processing specifications for sorting source content, and can include multiple default specifications, which are selected from the default structure processing specifications according to the type, quantity, upload order, etc. of the source content.
系统内置的内容编排规则,即系统针对源内容的默认的编排规则,如按照上传的时间顺序编排规则、按照源内容类型的编排规则等。The system's built-in content arrangement rules, that is, the system's default arrangement rules for source content, such as arrangement rules according to the time sequence of upload, arrangement rules according to source content types, etc.
系统内置的标签处理规范,即系统对源内容标签的限制性要求,如限制使用HTML5已废弃的标签以及标签属性等(如font标签、tt标签、frame标签、align属性等)。The system's built-in tag processing specification, that is, the system's restrictive requirements for source content tags, such as restricting the use of HTML5 deprecated tags and tag attributes (such as font tags, tt tags, frame tags, align attributes, etc.).
根据步骤S202,系统结合直播创建者的要求以及系统规定的要求处理源内容,当创建者未提供相关要求时,则采用系统相应的默认要求,当创建者提供的要求不符合系统要求时,一般优先执行系统要求。如创建者用户提供了某网页素材图片,其大小为2M,图片尺寸为2000*1000像素,要求以宽度1000像素显示,系统对图片文件的大小要求为500K,则处理方式为:根据用户提出的图片处理要求,将图片尺寸缩放至1000*500,此时用户要求已满足,但原图片文件大小不满足系统要求,则需对图片文件进行尺寸缩放、压缩处理,使其文件大小小于500K,达到系统要求。According to step S202, the system processes the source content in combination with the requirements of the creator of the live broadcast and the requirements specified by the system. When the creator does not provide relevant requirements, the corresponding default requirements of the system are adopted. When the requirements provided by the creator do not meet the system requirements, generally System requirements are prioritized. For example, if the creator user provides a web page material picture, its size is 2M, the picture size is 2000*1000 pixels, it is required to be displayed with a width of 1000 pixels, and the system requires a picture file size of 500K, the processing method is: According to the user's request Image processing requirements, zoom the image size to 1000*500. At this time, the user requirements have been met, but the original image file size does not meet the system requirements. System Requirements.
其中步骤S203,根据源内容的不同类型执行不同的转换步骤,详细如下:Wherein, in step S203, different conversion steps are performed according to different types of source content, and the details are as follows:
当判断所述源内容类型为网页时,获取源网页内容生成为目标网页;When judging that the source content type is a webpage, obtain the source webpage content and generate it as a target webpage;
当判断所述源内容类型为网址时,通过所述网址获取对应的网页文件内容生成目标网页;When judging that the source content type is a website, obtain the corresponding webpage file content through the website to generate a target webpage;
当判断所述源内容类型为可转换为网页的文件时,首先执行转换为网页操作,然后读取转换所得的网页内容生成目标网页,例如PDF、Word、PPT等格式的文件;When judging that the source content type is a file that can be converted into a web page, first perform the conversion to web page operation, and then read the converted web page content to generate a target web page, such as files in PDF, Word, PPT and other formats;
当判断所述源内容类型为网页支持的素材文件时,首先创建新网页,在所述新网页中创建所述素材文件类型对应的HTML标签,设置所述标签属性与内容放置所述素材文件生成目标网页,例如创建者提供一组JPG图片以及数段文字,则首先创建新网页,在新网页中添加img标签并设置属性放置图片,添加p标签放置文本内容,生成最终目标网页。When judging that the source content type is a material file supported by a web page, first create a new web page, create an HTML tag corresponding to the material file type in the new web page, set the tag attribute and the content to place the material file to generate For example, if the creator provides a set of JPG images and several paragraphs of text, a new web page is first created, the img tag is added to the new web page and the attributes are set to place the image, and the p tag is added to place the text content to generate the final destination web page.
第二种方式,参考图3所示,步骤包括:The second way, referring to Figure 3, the steps include:
S301接收源内容并读入直播网页模板;S301 receives the source content and reads the live web page template;
S302根据所述直播网页模板中的对直播内容的要求处理源内容,使用处理后的源内容替换模板中的对应项,生成所述目标网页。S302 processes the source content according to the requirements for the live content in the live web page template, and replaces the corresponding item in the template with the processed source content to generate the target web page.
该方式中,所述直播网页模板为系统预置,供直播创建者进行选择。所述直播网页模板已包含了直播内容处理要求,例如网页素材处理要求、内容结构要求、内容编排要求、显示样式要求等,直播创建者仅需基于需交流的内容选择相应的直播网页模板,并根据模板内容要求上传源内容,步骤S302根据模板对网页素材的处理要求进行素材处理,如缩放图片至模板要求尺寸,压缩处理图片符合模板要求的文件大小等,然后读入直播网页模板所对应的模板文件,根据处理后的素材替换对应项目,从而生成目标网页。通常,应用直播网页模板能够为创建者节约时间,所述网页直播模板结构类似于PPT模板,模板中包括了详细的交互功能、动画效果,创建者仅需提供素材便可以快速生成优秀的直播作品。In this manner, the live web page template is preset by the system for the creator of the live broadcast to choose. The live web page template already contains the live content processing requirements, such as web material processing requirements, content structure requirements, content arrangement requirements, display style requirements, etc. The live creator only needs to select the corresponding live web page template based on the content to be communicated, and Upload the source content according to the template content requirements, step S302 performs material processing according to the template's processing requirements for the webpage material, such as scaling the picture to the size required by the template, compressing the processed picture to meet the file size required by the template, etc., and then reading in the corresponding live webpage template. The template file replaces the corresponding items according to the processed material to generate the target web page. Usually, applying a live web page template can save time for the creator. The structure of the web page live template is similar to a PPT template. The template includes detailed interactive functions and animation effects. The creator only needs to provide materials to quickly generate excellent live works. .
在一种可选的实施方式中,参考图4,步骤S401在目标网页中引入第一直播控制程序、第二直播控制程序之后,还包括:In an optional implementation manner, referring to FIG. 4 , after introducing the first live broadcast control program and the second live broadcast control program in the target webpage, step S401 further includes:
S402,对包含直播控制程序的目标网页进行重构操作。S402: Perform a reconstruction operation on the target webpage including the live broadcast control program.
步骤S402中,所述重构操作包括网页结构调整、标签调整、CSS样式调整、脚本调整、加载调整、事件调整、存储调整中的一种或多种。相对于步骤S202来讲,S402步骤中对包含直播控制程序的目标网页进行重构在于进一步提升直播网页的性能,前者侧重于内容、显示方面,后者侧重于质量、性能方面。本方法采用了一种自动生成直播网页代码的方式,因此,进行网页程序代码重构操作更为重要。In step S402, the reconstruction operation includes one or more of webpage structure adjustment, label adjustment, CSS style adjustment, script adjustment, loading adjustment, event adjustment, and storage adjustment. Compared with step S202, the reconstruction of the target web page including the live control program in step S402 is to further improve the performance of the live web page. The former focuses on content and display, while the latter focuses on quality and performance. This method adopts a way of automatically generating the code of the live web page, therefore, it is more important to reconstruct the code of the web page program.
步骤S402中,所述重构基于程序质量以及性能方面考虑,围绕各种重构目的进行调整,重构的目的包括:使得网页中包含的常用JS库保持最新状态、不存在已抛弃使用的HTML标签和属性、网页结构布局清晰、网页内容中不存在恶意的广告及链接、程序代码不存在内存泄露问题、在内容较多网页结构布局清晰的情况下异步加载待讲解的内容、代码静态检查合格、页面加载顺序合理、网页中不允许包含非法内容、网页本地存储运行正常、调用数据库正常且连接正常、资源加载在合理的时间范围内、在期望的设备环境下网页显示正常、不存在与直播控制相冲突的事件等。In step S402, the refactoring is based on the consideration of program quality and performance, and is adjusted around various refactoring purposes. The refactoring purposes include: keeping the commonly used JS libraries included in the web pages in the latest state, and there is no HTML that has been discarded for use. Labels and attributes, clear web page structure and layout, no malicious advertisements and links in web page content, no memory leaks in program code, asynchronous loading of content to be explained in the case of a large number of web pages with clear structure and layout, and qualified code static check , The page loading sequence is reasonable, the webpage is not allowed to contain illegal content, the local storage of the webpage is running normally, the database is called normally and the connection is normal, the resources are loaded within a reasonable time range, and the webpage is displayed normally under the expected device environment, and does not exist and live broadcast. Control conflicting events, etc.
步骤S402中,所述重构操作基于上述重构目的,调用对应的重构工具或方法,进行网页结构调整、标签调整、CSS样式调整、脚本调整、加载调整、事件调整、存储调整等,综合达到重构目的。如为使网页结构布局清晰,即需进行网页结构调整,对导航栏、栏目、正文内容等页面组成元素进行调整和布局(DOM调整),同时还要进行CSS调整。In step S402, the refactoring operation calls the corresponding refactoring tool or method based on the above refactoring purpose to perform web page structure adjustment, label adjustment, CSS style adjustment, script adjustment, loading adjustment, event adjustment, storage adjustment, etc. achieve the purpose of reconstruction. In order to make the structure and layout of the web page clear, it is necessary to adjust the structure of the web page, adjust and layout (DOM adjustment) of the page components such as the navigation bar, column, and text content, and at the same time, adjust the CSS.
本申请的其他实施方式中还提供了另一种基于网页快速建立直播的方法,参考图5所示,在该种实施方式中,所述方法包括:Another embodiment of the present application also provides another method for quickly establishing a live broadcast based on a webpage, as shown in FIG. 5 , in this embodiment, the method includes:
步骤S501,读入用于直播交流的目标网页网址;Step S501, read in the target webpage URL for live broadcast communication;
步骤S5021,读入包含iframe标签和第一直播控制程序的第一框架网页,所述第一直播控制程序包含网页操作信息采集功能,将所述目标网页网址添加进所述iframe标签,并将所述第一框架网页存储并生成为第一链接;读入包含iframe标签和第二直播控制程序的第二框架网页,所述第二直播控制程序包含解析执行网页操作指令功能,将所述目标网页网址添加进所述iframe标签,并将所述第二框架网页存储并生成为第二链接。或步骤S5022,将所述目标网页网址发送至直播网页计算产生服务单元注册,并按照预定规则生成或按照直播通信服务单元分配产生第一链接、第二链接;所述直播网页计算产生服务单元在接收到所述第一链接访问请求时,读入包含iframe标签和第一直播控制程序的第一框架网页,所述第一直播控制程序包含网页操作信息采集功能,并将所述目标网页网址添加进所述iframe标签并返回;所述直播网页计算产生服务单元在接收到所述第二链接访问请求时,读入包含iframe标签和第二直播控制程序的第二框架网页,所述第二直播控制程序包含解析执行网页操作指令功能,并将所述目标网页网址添加进所述iframe标签并返回;Step S5021, read in the first frame web page that includes an iframe tag and a first live control program, the first live control program includes a web page operation information collection function, add the target web address to the iframe tag, and add all the web pages to the iframe tag. The first frame web page is stored and generated as the first link; the second frame web page containing the iframe tag and the second live control program is read in, and the second live control program includes the function of parsing and executing web page operation instructions, and the target web page is The web address is added into the iframe tag, and the second frame web page is stored and generated as a second link. Or in step S5022, the target webpage address is sent to the live webpage calculation generation service unit for registration, and is generated according to predetermined rules or distributed according to the live broadcast communication service unit to generate the first link and the second link; the live webpage calculation generation service unit is in When receiving the first link access request, read in the first frame web page containing the iframe tag and the first live control program, the first live control program including the web page operation information collection function, and add the target web address Enter the iframe tag and return; when the live web page calculation and generation service unit receives the second link access request, read in the second frame web page containing the iframe tag and the second live control program, the second live broadcast The control program includes the function of parsing and executing webpage operation instructions, and adding the target webpage URL into the iframe tag and returning it;
步骤S503在所述直播通信服务单元创建第一链接、第二链接之间的通信关系,所述直播通信服务单元为第一链接、第二链接提供直播通信服务。Step S503 creates a communication relationship between the first link and the second link in the live communication service unit, and the live communication service unit provides a live communication service for the first link and the second link.
以下,详细介绍本实施方式要点:The main points of this embodiment are described in detail below:
本实施方式中,步骤S501,读入的用于直播交流的目标网页网址可为一个或多个,当为多个网址时,直播创建者可指定按照一定顺序排列,生成直播后,可以使用内容切换控制指令在多个内容中进行切换。In this embodiment, in step S501, there may be one or more target webpage URLs read for live communication. When there are multiple URLs, the creator of the live broadcast can specify to arrange them in a certain order. After the live broadcast is generated, the content can be used. The switching control instruction switches among multiple contents.
本实施方式中,参考图6、图7所示,所述第一框架网页和所述第二框架网页已集成直播控制程序,且为目标网页提供了iframe标签,仅需将所述iframe标签中src属性修改为目标网页网址后即可获得最终的直播网页,本方式通过所述第一框架网页和所述第二框架网页中包含的iframe标签创建内联框架,在iframe标签中添加所述目标网页网址后,iframe标签基于目标网页网址调用目标网页,实现目标网页嵌入在框架网页中运行。In this embodiment, referring to FIG. 6 and FIG. 7 , the first frame web page and the second frame web page have integrated a live broadcast control program, and an iframe tag is provided for the target web page. After the src attribute is modified to the target webpage URL, the final live webpage can be obtained. In this method, an inline frame is created through the iframe tags contained in the first frame webpage and the second frame webpage, and the target is added to the iframe tag. After the webpage URL, the iframe tag calls the target webpage based on the target webpage URL, so that the target webpage is embedded in the frame webpage and runs.
本实施方式中,所述第一直播控制程序包含网页操作信息采集功能,所述网页操作包括针对网页的常见操作与用于辅助直播的其它操作,其中针对网页的常见操作与图1所示的实施方式略有不同,由于第一直播控制程序和目标网页在通信时存在跨域限制,第一直播控制程序无法采集用户对目标网页的部分操作数据(如目标网页内部按钮的点击操作等),所以此实施方式仅能提供有限的网页操作(如目标网页滑动、跳转等)。In this embodiment, the first live control program includes a web page operation information collection function, and the web page operations include common operations for web pages and other operations for assisting live broadcast, wherein the common operations for web pages are the same as those shown in FIG. 1 . The implementation is slightly different, because the first live broadcast control program and the target webpage have cross-domain restrictions when communicating, the first live broadcast control program cannot collect part of the user's operation data on the target webpage (such as the click operation of the internal button of the target webpage, etc.), Therefore, this embodiment can only provide limited web page operations (such as target web page sliding, jumping, etc.).
本实施方式中,所述第一直播控制程序在监听到用户输入的内容切换控制指令时,调出可切换的目标网页网址的列表界面,并将用户选择的目标网页网址标识发送至直播通信服务单元,直播通信服务单元将所述新的目标网页网址和更新指令发送至主播端与观众端,触发第一框架网页和第二框架网页中iframe标签的地址更新。In this embodiment, when monitoring the content switching control instruction input by the user, the first live control program calls up a list interface of switchable target webpage URLs, and sends the target webpage URL identifier selected by the user to the live communication service unit, the live communication service unit sends the new target webpage URL and update instruction to the host and the viewer, triggering the address update of the iframe tags in the first frame webpage and the second frame webpage.
本实施方式中,所述第一直播控制程序在监听到用户发送的内容更换控制指令后,调出用于输入新的目标网页网址的界面并接收新的目标网页网址,将所述新的目标网页网址和内容更新请求发送至直播通信服务单元,直播通信服务单元将所述新的目标网页网址和更新指令发送至主播端与观众端,触发第一框架网页和第二框架网页中iframe标签的地址更新。In this embodiment, after listening to the content replacement control instruction sent by the user, the first live control program calls out an interface for inputting a new target web address, receives the new target web address, and converts the new target web address to the new target web address. The webpage URL and content update request are sent to the live communication service unit, and the live communication service unit sends the new target webpage URL and update instruction to the host and the audience, triggering the iframe tags in the first frame webpage and the second frame webpage. Address update.
同样地,本实施方式在以上内容切换控制指令和内容更换控制指令响应后,在更新过程中不改变所述直播通信服务单元与所述第一链接、所述第二链接之间的通信状态,不改变所述直播已形成的状态数据。Similarly, in this embodiment, after the above content switching control instruction and content replacement control instruction are responded, the communication state between the live communication service unit and the first link and the second link is not changed during the update process, The state data already formed by the live broadcast is not changed.
由于本实施方式为主播端、观众端直播网页提供了完整的生成基础(即已集成对应直播控制程序的框架网页,类似于程序模板,且具有一定的成熟度),在构建过程中,仅需添加目标网页网址即可生成最终的直播网页,创建过程中,创建者无需提供直播创建要求,系统无需进行复杂的重构处理,尤其适用于根据已有网址快速建立直播,对目标网页进行展示讲解,操作交互要求不高的情形。Since this embodiment provides a complete generation base for the live web pages of the broadcaster and the audience (that is, the frame web page corresponding to the live control program has been integrated, which is similar to a program template and has a certain degree of maturity), in the construction process, only The final live web page can be generated by adding the target webpage URL. During the creation process, the creator does not need to provide the live broadcast creation requirements, and the system does not need to perform complex reconstruction processing. It is especially suitable for quickly establishing a live broadcast based on the existing URL and showing and explaining the target webpage. , the situation where the operation interaction requirements are not high.
在一种可选的实施方式中,在步骤S602(对应步骤S103或步骤S503)所述直播通信服务单元创建第一链接、第二链接之间的通信关系步骤之前,参考图8所示,还包括以下步骤:In an optional implementation manner, before step S602 (corresponding to step S103 or step S503) the live communication service unit creates the communication relationship between the first link and the second link, referring to FIG. Include the following steps:
S601,接收直播配置要求,并基于所述配置要求配置本次直播通信服务。S601. Receive a live broadcast configuration requirement, and configure the current live broadcast communication service based on the configuration requirement.
步骤S601中,所述直播配置要求包括直播时间配置要求、人数限制配置要求、功能权限配置要求、用户限制配置要求、消息发送配置要求中的一种或者多种,直播通信服务单元接收直播配置要求后,对直播通信服务按照直播配置要求进行配置,例如:设置直播时间配置要求,以实现根据所述时间配置要求中的起始时间、结束时间建立和断开通信连接;设置人数限制配置要求,直播通信服务单元检测当前连接的用户人数,对直播人数进行限制;设置功能权限配置要求,可对直播中的用户功能权限进行限制;设置消息发送配置要求,控制消息的发送范围、频率、类型等。In step S601, the live broadcast configuration requirements include one or more of live broadcast time configuration requirements, number limit configuration requirements, functional rights configuration requirements, user restriction configuration requirements, and message sending configuration requirements, and the live broadcast communication service unit receives the live broadcast configuration requirements. After that, configure the live broadcast communication service according to the live broadcast configuration requirements, for example: set the live broadcast time configuration requirements to realize the establishment and disconnection of the communication connection according to the start time and end time in the time configuration requirements; set the number limit configuration requirements, The live broadcast communication service unit detects the number of users currently connected, and limits the number of live broadcasters; sets the function permission configuration requirements to limit the user function permissions in the live broadcast; sets the message sending configuration requirements, and controls the sending range, frequency, and type of messages, etc. .
下面以一方法具体应用场景进行示例性说明和阐述:The following is an exemplary description and elaboration of a specific application scenario of a method:
参考图9至图11,为直播的一个创建示例过程。Referring to Figures 9-11, an example process is created for one of the live broadcasts.
直播创建第一步,参考图9所示,用户需提供直播标题、简介、介绍图片、运行环境、时间设定、其它设置信息等。其中标题、简介、介绍图片用于邀请链接转发时的链接说明,同时应用于直播未开启时的引导画面;运行环境比如PC、手机等,该信息还将用作系统内置的针对目标网页处理规范(如网页素材规范、内容结构规范、内容编排规则、标签规范等)的计算参考,同时还用作计算最终的重构目的参考;时间设定包括直播的起始时间、结束时间、计时方式(显示时长或倒计时)等;其它设置信息包括观众人数限制、观众来源区域限制、会议模式发言人数限制、是否超时自动关闭直播等,该信息用作计算直播配置要求(直播时间配置要求、人数限制配置要求、功能权限配置要求、用户限制配置要求、消息发送配置要求等)。The first step in creating a live broadcast, as shown in Figure 9, the user needs to provide the live broadcast title, introduction, introduction picture, operating environment, time setting, and other setting information. The title, introduction, and introduction picture are used for the link description when the invitation link is forwarded, and are also applied to the guide screen when the live broadcast is not turned on; the operating environment such as PC, mobile phone, etc., this information will also be used as the system's built-in processing specification for target web pages (such as webpage material specifications, content structure specifications, content arrangement rules, label specifications, etc.) calculation reference, and also used as a reference for calculating the final reconstruction purpose; time settings include the start time, end time, timing method ( Display time or countdown), etc.; other setting information includes audience limit, audience source area limit, conference mode speaker limit, whether to automatically close live broadcast over time, etc. This information is used to calculate live broadcast configuration requirements (live broadcast time configuration requirements, number of people limit configuration requirements, functional rights configuration requirements, user restriction configuration requirements, message sending configuration requirements, etc.).
以上直播概要信息、配置信息设置完成后,下一步进入直播内容设置。After the above live broadcast summary information and configuration information are set, the next step is to enter the live broadcast content setting.
直播内容设置的初始画面,参考图10所示,该页面为用户提供了多种直播内容设置的方式,以充分满足用户的直播创建需求。The initial screen of the live content setting is shown in Figure 10. This page provides the user with a variety of ways to set the live content to fully meet the user's needs for live broadcast creation.
A.从网址创建。该方式接收用户上传的网址作为直播内容创建直播,针对用户已拥有一个或多个网址(如:网站),需要为他人快速讲解的情形,使用本方式最为适合。A. Create from URL. This method receives the URL uploaded by the user as the live broadcast content to create a live broadcast. This method is most suitable for the situation where the user already has one or more URLs (such as websites) and needs to quickly explain to others.
该方式同时支持用户上传多个网址的创建方式,当上传多个网址时,需指定一个默认网址作为直播起始内容,同时,用户可指定每个网址的选择顺序(系统默认按照上传顺序存储为选择顺序),本方法对用户上传的网址进行存储、排序处理,在直播过程中供用户切换选择。This method also supports the creation method of uploading multiple URLs by the user. When uploading multiple URLs, a default URL needs to be specified as the starting content of the live broadcast. At the same time, the user can specify the selection order of each URL (the system defaults to store in the upload order as selection order), this method stores and sorts the URLs uploaded by the user, and provides the user to switch and select during the live broadcast process.
根据用户对直播内容的处理要求,通过本方式创建直播,用户还可选择一种针对网页内容的处理方式,如:保留原网页、优化处理,前者系统在最大程度上保留原网页显示、交互内容,后者系统根据网页内容进行优化处理,如调整网页布局、缩放图片等,获得最佳的显示效果。According to the user's processing requirements for the live content, the user can also choose a processing method for the content of the web page, such as: retain the original web page, optimize the processing, the former system preserves the original web page display and interactive content to the greatest extent. , the latter system performs optimization processing according to the content of the web page, such as adjusting the layout of the web page, scaling pictures, etc., to obtain the best display effect.
另外,本方式基于网址的方式创建直播,同时支持图1、图5两种直播生成方法,具体取决于用户上传的网址所指向的网页内容,用户选择从网址创建后,同时询问用户对直播的交互要求,当不涉及网页内部的事件交互,仅用于浏览讲解(类似PPT讲解)时,系统选择以图5(使用包含iframe标签的框架网页进行创建)方式创建直播。In addition, this method creates a live broadcast based on the URL, and supports two live broadcast generation methods as shown in Figure 1 and Figure 5, depending on the content of the webpage pointed to by the URL uploaded by the user. Interaction requirements, when the event interaction inside the webpage is not involved, and it is only used for browsing explanations (similar to PPT explanations), the system chooses to create the live broadcast in the way of Figure 5 (created using a frame webpage containing an iframe tag).
B.从网页创建。该方式与从网址创建非常相似,不同之处在于,用户拥有的不是网址,而是实际的网页文件,上传内容不仅包括网页文件,同时包括网页所引用的资源文件(图片等),为方便用户执行上传操作,同时提供了文件夹、压缩包的上传方式。文件上传后,经目标网页生成处理,根据需要在服务器临时存储生成网络文件。B. Created from a web page. This method is very similar to creating from a web address, the difference is that what the user has is not a web address, but an actual web page file. The uploaded content includes not only the web page file, but also the resource files (pictures, etc.) referenced by the web page. For the convenience of users Execute upload operation, and provide upload methods for folders and compressed packages. After the file is uploaded, the target web page is generated and processed, and the generated network file is temporarily stored on the server as required.
同样地,本创建方式支持多个网页生成直播内容,按照图1、图5所示步骤生成直播。Likewise, this creation method supports multiple webpages to generate live content, and generates live broadcasts according to the steps shown in FIG. 1 and FIG. 5 .
C.从其它文件创建。在用户拥有PPT文件、PDF文件、Word文件等的前提下,使用该方式创建非常方便,用户仅需将文件上传,服务端调用相应的转换工具,对上传文件进行转换网页处理。同时,转换过程中可根据原文件的分页建立网页的内部分页,并建立目录、翻页导航等,生成与原文件一致的浏览效果,该操作具体根据用户要求而定。C. Created from other files. On the premise that the user has PPT files, PDF files, Word files, etc., it is very convenient to use this method to create. The user only needs to upload the file, and the server calls the corresponding conversion tool to convert the uploaded file for web page processing. At the same time, in the conversion process, the internal page division of the web page can be established according to the paging of the original file, and the directory, page turning navigation, etc. can be established to generate a browsing effect consistent with the original file. This operation is determined according to the user's requirements.
该创建方式理论上接收可转换为网页的文件进行转换操作,同时支持多个文件上传、根据用户要求处理目标网页、根据内容交互要求选择图1或图5的直播生成方法等。This creation method theoretically receives files that can be converted into web pages for conversion operations, supports multiple file uploads, processes target web pages according to user requirements, and selects the live broadcast generation method in Figure 1 or Figure 5 according to content interaction requirements.
D.从内容、素材创建。从原理上讲,该方式内含了一个根据网页素材自动构建网页的过程,针对手头拥有一些素材的用户(如一组工程图片),采用该方式简单快捷的生成直播。创建过程中,用户可以选择不定义生成要求,由系统根据素材的特征进行结构处理、内容编排,生成目标网页。从直播生成方法上看,采用图1、图5(需要将上传内容、生成的目标网页存储为网络文件)方法均可。D. Created from content, material. In principle, this method includes a process of automatically building a webpage based on webpage materials. For users who have some materials at hand (such as a set of engineering pictures), this method is used to generate live broadcasts simply and quickly. During the creation process, the user can choose not to define the generation requirements, and the system will process the structure and arrange the content according to the characteristics of the material to generate the target web page. From the point of view of the live broadcast generation method, the methods shown in Figure 1 and Figure 5 (the uploaded content and the generated target webpage need to be stored as network files) can be used.
E.从模板创建。该方式在以上从内容、素材创建方式的基础上,为用户提供了一种快速创建高质量直播内容的方式。用户可以根据需求选择模板,设置模板中的文字以及更换模板中包含的素材文件,由于模板提供了专业的设计排版、配色方案、动画效果、交互方案,应用模板可快速生成风格统一的直播目标网页。同时,模板根据内部的交互特点一般匹配了最佳的直播生成方法(采用图1或图5方法)。E. Create from template. This method provides users with a way to quickly create high-quality live content on the basis of the above method of creating content and materials. Users can choose a template according to their needs, set the text in the template, and replace the material files contained in the template. Since the template provides professional design layout, color scheme, animation effect, and interaction scheme, the application of the template can quickly generate a uniform style of live broadcast landing page. . At the same time, the template generally matches the best live broadcast generation method (using the method in Figure 1 or Figure 5) according to the internal interaction characteristics.
以上直播创建、配置设置、源内容上传完成后,在服务器中存储了本次直播的网页链接或者服务端具有了动态生成直播网页的能力,所生成信息、设置信息还需在直播通信服务器(即直播通信服务单元)进行注册,注册步骤一般为:在数据库中创建一条提供直播的记录,包含ID、创建者、直播名称、直播内容简介、直播时间、主播端链接、观众端链接、目标网页生成方式(动态生成或静态提供)、直播创建方式(如使用包含iframe标签的框架网页创建方式)、认证方式、用户限制数量、创建时间、其它设置等信息。After the above live broadcast creation, configuration settings, and source content upload are completed, the web page link of this live broadcast is stored in the server or the server has the ability to dynamically generate the live broadcast webpage. The live communication service unit) is registered, and the registration steps are generally: create a record in the database to provide live broadcast, including ID, creator, live broadcast name, live broadcast content introduction, live broadcast time, anchor link, viewer link, target page generation Information such as the method (dynamically generated or statically provided), the way of creating the live broadcast (such as using a framed webpage containing an iframe tag), the authentication method, the number of users to limit the number of users, the creation time, and other settings.
直播创建完成后,即生成本次直播的主播、观众分享链接,参考图11所示,提供了二维码、链接供创建者分享和进入直播。After the live broadcast is created, the host and audience sharing link of the live broadcast will be generated. Referring to Figure 11, a QR code and link are provided for the creator to share and enter the live broadcast.
直播通信服务器根据接收到的主播访问链接,查找到相应的直播创建记录,为该记录建立直播通信服务。The live broadcast communication server finds a corresponding live broadcast creation record according to the received anchor access link, and establishes a live broadcast communication service for the record.
主播端与观众端访问对应链接,按照直播创建时设定的时间,当未到开始时间时,显示直播信息画面,包括直播主题、直播内容简介、直播开启倒计时等信息。The host and the audience access the corresponding links. According to the time set when the live broadcast is created, when the start time is not reached, the live broadcast information screen will be displayed, including the live broadcast theme, live broadcast content introduction, live broadcast start countdown and other information.
参考图12、图13,为直播过程中主播端、观众端的一个示例。Referring to FIG. 12 and FIG. 13 , it is an example of the host side and the viewer side during the live broadcast.
直播正常开启后,所述主播端页面参考图12所示,页面主要包括:目标网页内容显示区域、直播信息展示区域、快捷工具区域、消息区域、直播控制区域等几个主要区域。After the live broadcast is normally started, the host page is shown in FIG. 12 . The page mainly includes several main areas, such as the target webpage content display area, the live broadcast information display area, the shortcut tool area, the message area, and the live broadcast control area.
目标网页内容显示区域用来显示本次直播讲解的网页内容,即目标网页内容。主播可在目标网页内容显示区域进行网页操作,如滑动、点击、输入、缩放、拖拽、跳转等操作,与此同时,观众端保持该区域的画面同步。The target webpage content display area is used to display the webpage content explained in this live broadcast, that is, the target webpage content. The host can perform webpage operations in the content display area of the target webpage, such as sliding, clicking, inputting, zooming, dragging, jumping, etc. At the same time, the audience keeps the screen synchronization in this area.
直播信息展示区域用来展示本直播相关信息,如当前直播观众参与人数、当前直播模式、当前发言人、当前发言人视频、时长或计时信息等。The live broadcast information display area is used to display the relevant information of the live broadcast, such as the number of current live broadcast viewers, the current live broadcast mode, the current speaker, the current speaker video, duration or timing information, etc.
快捷工具区域主要包含主播在直播过程中的常用操作工具,如:内容同步开关、视频开关按钮、音频开关按钮、涂鸦操作按钮,其中内容控制开启和关闭目标网页内容显示区域的画面同步,视频、音频开关控制开启和关闭发送主播视频、音频,涂鸦操作在开启后,目标网页内容显示区域内针对网页的操作处于无效状态,此时便于在屏幕上进行涂鸦操作,同时显示详细的涂鸦工具,如涂鸦笔类型切换、颜色切换、线条粗细设置等,涂鸦过程中观众端画面同样保持同步,涂鸦操作关闭后,恢复针对目标网页内容显示区域内针对网页的操作。The shortcut tool area mainly includes the commonly used operation tools of the host during the live broadcast, such as: content synchronization switch, video switch button, audio switch button, and graffiti operation button. The audio switch controls the on and off of sending the host video and audio. After the graffiti operation is turned on, the operations for the webpage in the target webpage content display area are in an invalid state. At this time, it is convenient to perform graffiti operations on the screen and display detailed graffiti tools, such as Graffiti pen type switching, color switching, line thickness settings, etc. During the graffiti process, the audience screen also keeps synchronization. After the graffiti operation is closed, the operation for the webpage in the target webpage content display area is resumed.
消息区域显示直播过程中主播与观众发送的消息,其中部分消息携带请求指令,如请求发言、发言完毕交回发言权等,通过消息区域可快速启动相关处理。The message area displays the messages sent by the host and the audience during the live broadcast. Some of the messages carry request instructions, such as requesting to speak, returning the right to speak after speaking, etc. The relevant processing can be quickly started through the message area.
直播控制区域包含直播控制的全部功能,如直播模式切换、内容选择、更换内容、观众管理、设置、停止等。直播模式切换包括普通直播模式、会议模式两种,两者区别在于,普通直播模式为主播单独发送语音,会议模式允许多个发言人(发言人数量根据设置)同时发送语音;内容选择,针对上传了多个直播内容的情形,该处可进行内容选择;更换内容为在直播过程中临时更换新的直播内容,如播放讲解一个新网址时使用,系统会在保持通信状态不变的前提下,执行新目标网页内容的生成、替换操作;观众管理显示观众列表,其中包含观众的名称、地区、发言状态、音视频开关状态等信息,管理操作如查看详细信息、拉黑、屏蔽消息、屏蔽发言、请求发言、收回发言权等,如可在该列表中指定某观众发言,并将直播权转移;设置功能包括针对直播的其它设置信息,如计时显示模式、关闭观众进入、消息发送接收范围、直播时间调整、麦克风音量调整、是否记录直播过程数据等;停止功能即关闭本次直播。The live control area includes all the functions of live control, such as live mode switching, content selection, content replacement, audience management, setting, stopping, etc. There are two types of live broadcast mode switching: ordinary live broadcast mode and conference mode. The difference between the two is that the ordinary live broadcast mode sends voice to the host alone, and the conference mode allows multiple speakers (the number of speakers is set according to the settings) to send voice at the same time; content selection, for uploading In the case of multiple live broadcast contents, the content selection can be performed here; the replacement content is to temporarily replace the new live broadcast content during the live broadcast process. Execute the operation of generating and replacing the content of the new target page; the audience management displays the audience list, which includes the audience's name, region, speech status, audio and video switch status and other information, management operations such as viewing detailed information, blocking, blocking messages, and blocking speeches , request to speak, withdraw the right to speak, etc., if you can specify an audience in this list to speak, and transfer the right of live broadcast; the setting function includes other setting information for live broadcast, such as timing display mode, closing audience entry, message sending and receiving range, Live broadcast time adjustment, microphone volume adjustment, whether to record live broadcast process data, etc.; the stop function closes the live broadcast.
直播正常开启后,所述观众端页面参考图13所示,页面主要包括:目标网页内容显示区域、直播信息展示区域、快捷工具区域、消息区域、观众直播控制区域等几个主要区域,与主播端略同。After the live broadcast is normally started, the audience page is shown in Figure 13. The page mainly includes: the target webpage content display area, the live broadcast information display area, the shortcut tool area, the message area, and the audience live broadcast control area. Slightly the same.
目标网页内容显示区域用来显示本次直播讲解的网页内容,直播过程中一般与主播端保持画面同步,且该区域的网页操作处于屏蔽状态,仅当在观众端取得直播权的情况下,方可进行网页操作并同步至其他用户。The target webpage content display area is used to display the webpage content explained in this live broadcast. During the live broadcast, the screen is generally kept in sync with the host, and the webpage operations in this area are blocked. Only when the audience has obtained the right to live broadcast, Web pages can be operated and synchronized to other users.
直播信息展示区域,该区域同主播端基本相同,常规状态下直播发言人的小视频(参考图13左上角),用户可选择放大、关闭该视频。The live broadcast information display area is basically the same as the host terminal. In the normal state, the small video of the speaker (refer to the upper left corner of Figure 13) is broadcast live, and the user can choose to enlarge or close the video.
快捷工具区域,该区域所包含的操作工具及功能与主播端基本相同,在观众取得直播权限时后供内容同步控制、音频开关控制、视频开关控制、涂鸦控制、直播权交回等功能,在未取得直播权限的情况下,该区域隐藏或将相关按钮置为不可用状态。The shortcut tool area, the operation tools and functions contained in this area are basically the same as those of the anchor terminal. After the viewer obtains the live broadcast permission, it provides functions such as content synchronization control, audio switch control, video switch control, graffiti control, and live broadcast right handover. If the live broadcast permission is not obtained, the area will be hidden or the relevant buttons will be disabled.
消息区域,该区域与主播端功能相同,显示消息并可携带请求指令,如“接受发言请求”。The message area, which has the same function as the host, displays messages and can carry request instructions, such as "accept the request to speak".
观众直播控制区域,该区域包含直播过程中观众直播控制的全部功能,如我要发言、消息、观众列表、退出等。我要发言功能便于观众在直播过程中争取直播权限;消息功能启动消息发送窗口,并可指定发送至主播或某一观众;观众列表用于查看观众的基本信息。Audience live control area, this area includes all the functions of audience live control during live broadcast, such as I want to speak, message, audience list, exit, etc. The I want to speak function is convenient for viewers to strive for live broadcast rights during the live broadcast; the message function starts the message sending window, which can be sent to the host or a certain audience; the audience list is used to view the basic information of the audience.
直播通信服务器为直播过程提供服务,同时可记录直播全部过程。直播结束后,主播与观众访问链接,显示直播的简介、直播时长等信息,同时可查看直播回放。The live broadcast communication server provides services for the live broadcast process, and can record the whole process of the live broadcast at the same time. After the live broadcast is over, the anchor and the audience will access the link, display the introduction of the live broadcast, the live broadcast duration and other information, and can view the live broadcast playback at the same time.
本申请提供的基于网页快速建立直播的方法,可以基于多种类型的源内容快速建立直播,访问本方法生成的链接后即可快速开始直播,无需下载额外的软件或插件,也无需学习直播软件相关的操作知识,简化流程并降低了使用成本。同时,本方法提供多种辅助直播工具,主播端与观众端画面实时同步,提升了主播与观众之间的互动性,有助于观众更好的理解直播内容。另外,直播过程中产生的数据,相对于传统直播的视频流数据而言,传输量要小很多且可达到无损的效果,有利于实现快速传输。The method for quickly establishing a live broadcast based on a webpage provided by this application can quickly establish a live broadcast based on various types of source content. After accessing the link generated by this method, the live broadcast can be quickly started without downloading additional software or plug-ins, and without learning the live broadcast software. Relevant operational knowledge simplifies the process and reduces the cost of use. At the same time, the method provides a variety of auxiliary live broadcast tools, and the screen of the host and the audience is synchronized in real time, which improves the interaction between the host and the audience, and helps the audience to better understand the live broadcast content. In addition, compared with the video stream data of traditional live broadcast, the data generated during the live broadcast has a much smaller transmission volume and can achieve a lossless effect, which is conducive to the realization of fast transmission.
虽然以上结合附图和实施例对本发明进行了具体说明,但是可以理解,上述说明不以任何形式限制本发明。本领域技术人员在不偏离本发明的实质精神和范围的情况下可以根据需要对本发明进行变形和变化,这些变形和变化均落入本发明的范围内。Although the present invention has been specifically described above with reference to the accompanying drawings and embodiments, it should be understood that the above description does not limit the present invention in any form. Those skilled in the art can make modifications and changes to the present invention as required without departing from the essential spirit and scope of the present invention, and these modifications and changes all fall within the scope of the present invention.
Claims (10)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010152096.9A CN111405303B (en) | 2020-03-06 | 2020-03-06 | Method for quickly establishing live broadcast based on webpage |
| CN202111220269.7A CN113938699B (en) | 2020-03-06 | 2020-03-06 | Method for quickly establishing live broadcast based on webpage |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010152096.9A CN111405303B (en) | 2020-03-06 | 2020-03-06 | Method for quickly establishing live broadcast based on webpage |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202111220269.7A Division CN113938699B (en) | 2020-03-06 | 2020-03-06 | Method for quickly establishing live broadcast based on webpage |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111405303A true CN111405303A (en) | 2020-07-10 |
| CN111405303B CN111405303B (en) | 2021-11-12 |
Family
ID=71436626
Family Applications (2)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202111220269.7A Active CN113938699B (en) | 2020-03-06 | 2020-03-06 | Method for quickly establishing live broadcast based on webpage |
| CN202010152096.9A Active CN111405303B (en) | 2020-03-06 | 2020-03-06 | Method for quickly establishing live broadcast based on webpage |
Family Applications Before (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202111220269.7A Active CN113938699B (en) | 2020-03-06 | 2020-03-06 | Method for quickly establishing live broadcast based on webpage |
Country Status (1)
| Country | Link |
|---|---|
| CN (2) | CN113938699B (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111954015A (en) * | 2020-08-13 | 2020-11-17 | 南京百家云科技有限公司 | Method and device for realizing online live broadcast classroom |
| CN114422460A (en) * | 2021-12-12 | 2022-04-29 | 路九阳 | A method and system for establishing communication and sharing on the same screen in an instant messaging application |
| EP4145835A4 (en) * | 2020-11-03 | 2023-12-06 | Beijing Bytedance Network Technology Co., Ltd. | METHOD AND DEVICE FOR SETTING UP A LIVE STREAMING ROOM, ELECTRONIC DEVICE AND STORAGE MEDIUM |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20150089565A1 (en) * | 2001-05-24 | 2015-03-26 | Vixs Systems, Inc. | Method and set top box for use in a multimedia system |
| CN107423312A (en) * | 2017-03-14 | 2017-12-01 | 北京潘达互娱科技有限公司 | Live data player method and device |
| CN108307243A (en) * | 2018-01-10 | 2018-07-20 | 武汉斗鱼网络科技有限公司 | Platform game through transport setting method, storage medium, electronic equipment and system is broadcast live |
| CN110297917A (en) * | 2019-06-28 | 2019-10-01 | 腾讯科技(深圳)有限公司 | Live broadcasting method, device, electronic equipment and storage medium |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20060026286A (en) * | 2004-09-20 | 2006-03-23 | 남동화 | How to broadcast on a web page |
| US20120005187A1 (en) * | 2010-07-02 | 2012-01-05 | Philippe Chavanne | Web Site Content Management Techniques |
| CN106326403A (en) * | 2016-08-22 | 2017-01-11 | 乐视控股(北京)有限公司 | Web page generating method and device |
| CN110020073B (en) * | 2017-10-12 | 2021-04-27 | 北京国双科技有限公司 | Live broadcast webpage crawling method and device |
| CN110233844A (en) * | 2019-06-13 | 2019-09-13 | 杭州雅顾科技有限公司 | A kind of multimedia live broadcast method, apparatus, equipment and medium |
-
2020
- 2020-03-06 CN CN202111220269.7A patent/CN113938699B/en active Active
- 2020-03-06 CN CN202010152096.9A patent/CN111405303B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20150089565A1 (en) * | 2001-05-24 | 2015-03-26 | Vixs Systems, Inc. | Method and set top box for use in a multimedia system |
| CN107423312A (en) * | 2017-03-14 | 2017-12-01 | 北京潘达互娱科技有限公司 | Live data player method and device |
| CN108307243A (en) * | 2018-01-10 | 2018-07-20 | 武汉斗鱼网络科技有限公司 | Platform game through transport setting method, storage medium, electronic equipment and system is broadcast live |
| CN110297917A (en) * | 2019-06-28 | 2019-10-01 | 腾讯科技(深圳)有限公司 | Live broadcasting method, device, electronic equipment and storage medium |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111954015A (en) * | 2020-08-13 | 2020-11-17 | 南京百家云科技有限公司 | Method and device for realizing online live broadcast classroom |
| EP4145835A4 (en) * | 2020-11-03 | 2023-12-06 | Beijing Bytedance Network Technology Co., Ltd. | METHOD AND DEVICE FOR SETTING UP A LIVE STREAMING ROOM, ELECTRONIC DEVICE AND STORAGE MEDIUM |
| US11936924B2 (en) | 2020-11-03 | 2024-03-19 | Beijing Bytedance Network Technology Co., Ltd. | Live room setup method and apparatus, electronic device, and storage medium |
| CN114422460A (en) * | 2021-12-12 | 2022-04-29 | 路九阳 | A method and system for establishing communication and sharing on the same screen in an instant messaging application |
| CN114422460B (en) * | 2021-12-12 | 2024-03-01 | 路九阳 | Method and system for establishing same-screen communication sharing in instant communication application |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113938699B (en) | 2024-03-08 |
| CN113938699A (en) | 2022-01-14 |
| CN111405303B (en) | 2021-11-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110597774B (en) | File sharing method, system, device, computing equipment and terminal equipment | |
| TW525393B (en) | System and method for collaborative multi-device web browsing | |
| US9549007B2 (en) | User interface widget unit sharing for application user interface distribution | |
| US10872127B2 (en) | Method and system of providing for cross-device operations between user devices | |
| CN109474843B (en) | Method for voice control of terminal, client and server | |
| CN108566561B (en) | Video playing method, device and storage medium | |
| WO2007082442A1 (en) | An electronic program guide interface customizing method, server, set top box and system | |
| US20150120654A1 (en) | Method, apparatus and terminal for processing documents | |
| JP5669277B2 (en) | Method and apparatus for providing supplemental information | |
| CN112329403B (en) | Live document processing method and device | |
| US20150106730A1 (en) | Framework for screen content sharing system with generalized screen descriptions | |
| CN111405303A (en) | Method for quickly establishing live broadcast based on webpage | |
| WO2012022271A1 (en) | Realization method, system, stb (set top box) and remote controller of iptv and value-added business thereof | |
| US9721321B1 (en) | Automated interactive dynamic audio/visual performance with integrated data assembly system and methods | |
| CN101115180B (en) | An electronic program menu system and its function module dynamic loading operation method | |
| WO2015180446A1 (en) | System and method for maintaining connection channel in multi-device interworking service | |
| AU2010287106A1 (en) | System and device for data management, and method thereof | |
| CN108600793A (en) | a kind of hierarchical control method and device | |
| CN100505861C (en) | Dynamic updating method and system for page layout background | |
| EP1878201B1 (en) | System, method and engine for playing smil based multimedia contents | |
| JP5792326B2 (en) | Reading service providing method, content providing server and system | |
| WO2024016703A1 (en) | Data processing method and apparatus, computer device, and readable storage medium | |
| KR101097372B1 (en) | Application service method and server in home network system | |
| CN101552907B (en) | Imaging distribution apparatus and imaging distribution method | |
| US20060242578A1 (en) | Method for managing content |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |