CN108833963B - Method, computer device, readable storage medium and system for displaying interface screen - Google Patents
Method, computer device, readable storage medium and system for displaying interface screen Download PDFInfo
- Publication number
- CN108833963B CN108833963B CN201810548283.1A CN201810548283A CN108833963B CN 108833963 B CN108833963 B CN 108833963B CN 201810548283 A CN201810548283 A CN 201810548283A CN 108833963 B CN108833963 B CN 108833963B
- Authority
- CN
- China
- Prior art keywords
- terminal
- target
- video stream
- server
- identifier
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
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/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/431—Generation of visual interfaces for content selection or interaction; Content or additional data rendering
- H04N21/4312—Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
- H04N21/2343—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/25—Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
- H04N21/258—Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data
- H04N21/25866—Management of end-user data
- H04N21/25875—Management of end-user data involving end-user authentication
-
- 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/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)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Computer Security & Cryptography (AREA)
- Computer Graphics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本发明实施例公开了一种显示界面画面的方法、计算机设备、可读存储介质和系统,属于互联网技术领域。所述方法包括:服务器可以接收第一终端发送的目标视频流,目标视频流由第一终端的当前显示的界面画面组成;确定第一终端对应的第二终端,第二终端为对第一终端进行远程控制的终端;向第二终端发送目标视频流,目标视频流为未经封装过的视频流,用于第二终端显示界面画面。第二终端在第二终端对第一终端进行远程控制的过程中,获取网页解码脚本和网页绘制脚本;获取服务器发送的目标视频流;通过网页解码脚本和网页绘制脚本,基于目标视频流,显示界面画面。采用本发明,可以降低显示界面画面的延迟。
The embodiments of the present invention disclose a method, computer device, readable storage medium and system for displaying an interface picture, which belong to the technical field of the Internet. The method includes: the server can receive a target video stream sent by the first terminal, and the target video stream is composed of an interface screen currently displayed by the first terminal; determining a second terminal corresponding to the first terminal, and the second terminal is for the first terminal. A terminal performing remote control; sending a target video stream to the second terminal, where the target video stream is an unencapsulated video stream, which is used for the second terminal to display an interface picture. During the process that the second terminal remotely controls the first terminal, the second terminal obtains the webpage decoding script and the webpage drawing script; obtains the target video stream sent by the server; through the webpage decoding script and the webpage drawing script, based on the target video stream, display interface screen. By adopting the present invention, the delay of the display interface picture can be reduced.
Description
技术领域technical field
本发明涉及互联网技术领域,特别涉及一种显示界面画面的方法、计算机设备、可读存储介质和系统。The present invention relates to the field of Internet technologies, and in particular, to a method, computer device, readable storage medium and system for displaying an interface picture.
背景技术Background technique
目前,云端可以部署有手机等终端,以便用户可以通过网络对云端的终端(可称为第一终端)进行操控。在使用第一终端的过程中,用户可以通过操作,触发本地的电脑等终端(可称为第二终端)获取第一终端当前显示的界面画面,并通过浏览器对获取到的界面画面进行显示,进而,可以在第二终端通过画面中的按钮对第一终端进行操作,即可以对第一终端进行远程控制。Currently, a terminal such as a mobile phone can be deployed in the cloud, so that the user can control the terminal (which may be referred to as the first terminal) in the cloud through the network. In the process of using the first terminal, the user can trigger a terminal such as a local computer (which may be referred to as the second terminal) to acquire the interface picture currently displayed by the first terminal through an operation, and display the acquired interface picture through the browser , and further, the first terminal can be operated on the second terminal through buttons on the screen, that is, the first terminal can be remotely controlled.
为了第二终端可以流畅的显示第一终端的界面画面,往往以视频流的形式获取界面画面。目前,第二终端一般采用flash插件的方式显示获取到的界面画面,为了可以使得第二终端可以通过flash插件对以视频流形式获取到的界面画面进行显示,往往发送至第二终端的视频流是封装后的视频流。具体的,第一终端可以根据当前显示的界面画面生成视频流(可称为第一视频流),进而,可以向服务器(其中,该服务器可以是网络侧部署的用于第一终端与第二终端进行通信的服务器)发送生成的第一视频流。服务器接收到第一视频流后,可以对其进行RTMP(Real Time Messaging Protocol,实时消息传输协议)封装,得到第二视频流,再将第二视频流发送至第二终端。第二终端接收到第二视频流后,可以通过安装的flash插件对第二视频流进行解码和播放,即可以显示界面画面。In order for the second terminal to smoothly display the interface picture of the first terminal, the interface picture is often obtained in the form of a video stream. At present, the second terminal generally uses a flash plug-in to display the obtained interface screen. In order to enable the second terminal to display the interface screen obtained in the form of a video stream through the flash plug-in, the video stream sent to the second terminal is often sent to the second terminal. is the encapsulated video stream. Specifically, the first terminal may generate a video stream (which may be referred to as a first video stream) according to the currently displayed interface screen, and further, may send a video stream to a server (wherein, the server may be deployed on the network side for the first terminal and the second terminal to communicate with each other). The server that the terminal communicates with) sends the generated first video stream. After receiving the first video stream, the server may perform RTMP (Real Time Messaging Protocol, Real Time Messaging Protocol) encapsulation on the first video stream to obtain a second video stream, and then send the second video stream to the second terminal. After receiving the second video stream, the second terminal can decode and play the second video stream through the installed flash plug-in, that is, an interface picture can be displayed.
在实现本发明的过程中,发明人发现相关技术至少存在以下问题:In the process of realizing the present invention, the inventor found that the related art has at least the following problems:
基于上述显示界面画面的处理方式,服务器在对第一视频流进行封装时,往往需要一定的缓存,并且flash解码到视频流中的视频帧后,也需要先缓存几帧视频帧,才进行显示,从而,导致界面画面的显示延迟比较大。Based on the above-mentioned processing method of the display interface, when the server encapsulates the first video stream, it often needs a certain amount of buffering, and after the flash decodes the video frames in the video stream, it also needs to buffer several video frames before displaying. , thus, the display delay of the interface picture is relatively large.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供了一种显示界面画面的方法、计算机设备、可读存储介质和系统,可以解决相关技术中存在的界面画面的显示延迟比较大的问题。所述技术方案如下:The embodiments of the present invention provide a method, a computer device, a readable storage medium and a system for displaying an interface picture, which can solve the problem of relatively large display delay of the interface picture in the related art. The technical solution is as follows:
一方面,提供了一种显示界面画面的系统,所述系统包括服务器和第二终端,其中:In one aspect, a system for displaying an interface picture is provided, the system includes a server and a second terminal, wherein:
所述服务器,用于接收第一终端发送的目标视频流,所述目标视频流由所述第一终端的当前显示的界面画面组成;确定所述第一终端对应的第二终端,所述第二终端为对所述第一终端进行远程控制的终端;向所述第二终端发送所述目标视频流,所述目标视频流为未经封装过的视频流,用于所述第二终端显示所述界面画面;The server is configured to receive a target video stream sent by a first terminal, where the target video stream is composed of an interface screen currently displayed by the first terminal; determine the second terminal corresponding to the first terminal, the first terminal The second terminal is a terminal that remotely controls the first terminal; sends the target video stream to the second terminal, where the target video stream is an unencapsulated video stream for display by the second terminal the interface screen;
所述第二终端,用于获取网页解码脚本和网页绘制脚本;在所述第二终端对所述第一终端进行远程控制的过程中,获取服务器发送的目标视频流;通过所述网页解码脚本和所述网页绘制脚本,基于所述目标视频流,显示所述界面画面。The second terminal is used to obtain a webpage decoding script and a webpage drawing script; in the process of remote control of the first terminal by the second terminal, the target video stream sent by the server is obtained; and the webpage drawing script to display the interface screen based on the target video stream.
一方面,提供了显示界面画面的方法,应用于服务器,所述方法包括:In one aspect, a method for displaying an interface picture is provided, which is applied to a server, and the method includes:
接收第一终端发送的目标视频流,所述目标视频流由所述第一终端的当前显示的界面画面组成;receiving a target video stream sent by a first terminal, where the target video stream consists of an interface screen currently displayed by the first terminal;
确定所述第一终端对应的第二终端,所述第二终端为对所述第一终端进行远程控制的终端;determining a second terminal corresponding to the first terminal, where the second terminal is a terminal that remotely controls the first terminal;
向所述第二终端发送所述目标视频流,所述目标视频流为未经封装过的视频流,用于所述第二终端显示所述界面画面。Sending the target video stream to the second terminal, where the target video stream is an unencapsulated video stream, for the second terminal to display the interface picture.
一方面,提供了一种显示界面画面的方法,应用于第二终端,所述方法包括:In one aspect, a method for displaying an interface picture is provided, which is applied to a second terminal, and the method includes:
获取网页解码脚本和网页绘制脚本;Obtain webpage decoding scripts and webpage drawing scripts;
在所述第二终端对第一终端进行远程控制的过程中,获取服务器发送的目标视频流,所述目标视频流是由所述第一终端当前显示的界面画面组成、且未经封装过的视频流;During the process of remote control of the first terminal by the second terminal, the target video stream sent by the server is obtained, where the target video stream is composed of the interface screen currently displayed by the first terminal and is not encapsulated video stream;
通过所述网页解码脚本和所述网页绘制脚本,基于所述目标视频流,显示所述界面画面。The interface picture is displayed based on the target video stream by using the webpage decoding script and the webpage drawing script.
一方面,提供了一种显示界面画面的装置,该装置包括:In one aspect, a device for displaying an interface picture is provided, the device comprising:
第一接收模块,用于接收第一终端发送的目标视频流,所述目标视频流由所述第一终端的当前显示的界面画面组成;a first receiving module, configured to receive a target video stream sent by a first terminal, where the target video stream is composed of an interface screen currently displayed by the first terminal;
确定模块,用于确定所述第一终端对应的第二终端,所述第二终端为对所述第一终端进行远程控制的终端;a determining module, configured to determine a second terminal corresponding to the first terminal, where the second terminal is a terminal that remotely controls the first terminal;
第一发送模块,用于向所述第二终端发送所述目标视频流,所述目标视频流为未经封装过的视频流,用于所述第二终端显示所述界面画面。The first sending module is configured to send the target video stream to the second terminal, where the target video stream is an unencapsulated video stream for the second terminal to display the interface picture.
一方面,提供了一种显示界面画面的装置,该装置包括:In one aspect, a device for displaying an interface picture is provided, the device comprising:
第一获取模块,用于获取网页解码脚本和网页绘制脚本;The first obtaining module is used to obtain the webpage decoding script and the webpage drawing script;
第二获取模块,用于在所述第二终端对所述第一终端进行远程控制的过程中,获取服务器发送的目标视频流,所述目标视频流是由第一终端当前显示的界面画面组成、且未经封装过的视频流;A second acquiring module, configured to acquire a target video stream sent by the server during the process of remote control of the first terminal by the second terminal, where the target video stream is composed of the interface screen currently displayed by the first terminal , and unencapsulated video streams;
第一显示模块,用于通过所述网页解码脚本和所述网页绘制脚本,基于所述目标视频流,显示所述界面画面。The first display module is configured to display the interface picture based on the target video stream by using the webpage decoding script and the webpage drawing script.
一方面,提供了一种计算机设备,所述计算机设备包括处理器和存储器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如上述所述的显示界面画面的方法。In one aspect, a computer device is provided, the computer device includes a processor and a memory, the memory stores at least one instruction, at least one segment of a program, a code set or an instruction set, the at least one instruction, the at least one segment The program, the code set or the instruction set is loaded and executed by the processor to implement the method for displaying an interface screen as described above.
一方面,提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由处理器加载并执行以实现如上述所述的显示界面画面的方法。In one aspect, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, at least one piece of program, code set or instruction set, the at least one instruction, the at least one piece of program, the code set Or the instruction set is loaded and executed by the processor to implement the method for displaying an interface picture as described above.
本发明实施例提供的技术方案带来的有益效果至少包括:The beneficial effects brought by the technical solutions provided by the embodiments of the present invention include at least:
本发明实施例中,通过服务器接收到第一终端发送的目标视频流后,不再对目标视频流进行封装,直接将其转发给第二终端,来避免服务器先对视频帧缓存的情况出现,从而,可以降低第二终端获取到目标视频流的延迟,进而,可以降低显示界面画面的延迟。另外,本发明实施例中,通过第二终端接收到目标视频流后,通过网页解码脚本和网页绘制脚本,基于目标视频流,显示界面画面,来实现第二终端解码到界面画面后可以及时对其进行显示的目的,从而,可以降低显示界面画面的延迟。In the embodiment of the present invention, after the server receives the target video stream sent by the first terminal, it does not encapsulate the target video stream, and directly forwards it to the second terminal, so as to avoid the situation that the server buffers the video frame first. Therefore, the delay in acquiring the target video stream by the second terminal can be reduced, and further, the delay in displaying the interface picture can be reduced. In addition, in the embodiment of the present invention, after receiving the target video stream through the second terminal, the web page decoding script and the web page drawing script are used to display the interface picture based on the target video stream, so that after the second terminal decodes the interface picture, the interface picture can be decoded in time. The purpose of its display is to reduce the delay of displaying the interface picture.
附图说明Description of drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort.
图1是本发明实施例提供的一种系统框架示意图;1 is a schematic diagram of a system framework provided by an embodiment of the present invention;
图2是本发明实施例提供的一种显示界面画面的方法流程图;2 is a flowchart of a method for displaying an interface screen provided by an embodiment of the present invention;
图3是本发明实施例提供的一种界面示意图;3 is a schematic diagram of an interface provided by an embodiment of the present invention;
图4是本发明实施例提供的一种界面示意图;4 is a schematic diagram of an interface provided by an embodiment of the present invention;
图5是本发明实施例提供的一种显示界面画面的装置结构示意图;5 is a schematic structural diagram of a device for displaying an interface screen provided by an embodiment of the present invention;
图6是本发明实施例提供的一种显示界面画面的装置结构示意图;6 is a schematic structural diagram of a device for displaying an interface screen provided by an embodiment of the present invention;
图7是本发明实施例提供的一种显示界面画面的装置结构示意图;7 is a schematic structural diagram of a device for displaying an interface screen provided by an embodiment of the present invention;
图8是本发明实施例提供的一种显示界面画面的装置结构示意图;8 is a schematic structural diagram of a device for displaying an interface screen provided by an embodiment of the present invention;
图9是本发明实施例提供的一种显示界面画面的装置结构示意图;9 is a schematic structural diagram of a device for displaying an interface screen provided by an embodiment of the present invention;
图10是本发明实施例提供的一种终端的装置结构示意图;FIG. 10 is a schematic diagram of an apparatus structure of a terminal according to an embodiment of the present invention;
图11是本发明实施例提供的一种服务器的装置结构示意图。FIG. 11 is a schematic diagram of an apparatus structure of a server according to an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
本发明实施例提供了一种显示界面画面的方法,该方法可以由第一终端101、服务器102和第二终端103共同实现。其中,第一终端101可以是云端的电子设备,比如,可以是云端的手机等移动设备,可以用于用户通过本地终端对第一终端进行远程控制,也可称为云真机。服务器102可以是用于第一终端101与第二终端103之间进行通信的服务器,可以是一个单独的服务器,也可以由多个服务器组成的服务器组,比如,可以包括视频服务器和信令服务器,其中,视频服务器可以用于传输第一终端的目标视频流,信令服务器可以用于传输第二终端对第一终端的操作命令。第二终端103可以是本地终端,可以是对第一终端进行远程控制的终端,可以是安装有浏览器的终端,比如,可以是安装有浏览器的PC(personalcomputer,个人电脑)等终端。An embodiment of the present invention provides a method for displaying an interface picture, and the method may be jointly implemented by the
服务器102可以包括处理器、存储器、收发器等部件。处理器可以为CPU(CentralProcessing Unit,中央处理单元)等,可以用于确定第一终端对应的第二终端的相关处理。存储器可以为RAM(Random Access Memory,随机存取存储器)、Flash(闪存)等,可以用于存储接收到的数据、处理过程所需的数据、处理过程中生成的数据等,如终端标识与账户标识的对应关系等。收发器可以用于与终端或其它服务器进行数据传输,例如,接收第一终端发送的目标视频流,向第二终端发送目标视频流,收发器可以包括天线、匹配电路、调制解调器等。
第二终端103可以包括处理器、存储器、收发器、屏幕等部件。处理器可以为CPU等,可以用于对第一终端进行远程控制、基于目标视频流显示界面画面的相关处理。存储器可以为RAM、Flash等,可以用于存储接收到的数据、处理过程所需的数据、处理过程中生成的数据等,如目标视频流、网页解码脚本和网页绘制脚本等。屏幕可以是显示器,可以用于显示目标网页、选择界面等,屏幕还可以是触控屏,此种情况下,还可以用于检测触碰信号等。收发器可以用于与其它设备进行数据传输,例如,接收服务器发送的目标视频流,可以包括天线、匹配电路、调制解调器等。The
为了使用户在不购买相应终端的情况下,可以使用多种机型的终端,可以在云端部署多种机型的终端,以便用户可以通过网络对云端的终端进行操控,其中,云端的任一终端可以称为第一终端。例如,云端的终端可以供业务开发人员使用。在开发过程中,开发人员可以开发适用于多种操作系统的业务(比如,开发适用于安卓操作系统的业务、ios操作系统的业务)。开发出相应业务后,可以通过云端的相应终端对开发的业务进行测试,以便查找开发过程中产生的错误,还可以预见业务在真实终端中运行时的用户体验,以便对开发的业务进行优化。这样,开发人员无需购买终端,可以通过云端的终端即可完成开发工作,从而,可以节省开发成本。In order to enable users to use various types of terminals without purchasing corresponding terminals, various types of terminals can be deployed in the cloud, so that users can control the terminals in the cloud through the network. The terminal may be referred to as the first terminal. For example, a terminal in the cloud can be used by business developers. During the development process, developers can develop services applicable to multiple operating systems (for example, developing services applicable to Android operating systems, and ios operating systems). After the corresponding service is developed, the developed service can be tested through the corresponding terminal in the cloud to find errors in the development process, and the user experience when the service is running in the real terminal can be predicted, so as to optimize the developed service. In this way, developers do not need to purchase terminals, and can complete development work through terminals in the cloud, thereby saving development costs.
在使用第一终端的过程中,用户可以通过操作,触发本地的电脑等终端(可称为第二终端)获取第一终端当前显示的界面画面,并通过浏览器对获取到的界面画面进行显示,进而,可以在第二终端通过画面中的按钮对第一终端进行操作,即可以对第一终端进行远程控制。目前,可以采用不同的方式获取第一终端当前显示的界面画面,并对获取的界面画面进行显示。比如,可以以图像的形式获取第一终端当前显示的界面画面(可以将该种方式称为方式一),并对界面画面进行显示,或者,可以以视频流的形式获取第一终端当前显示的界面画面(可以将该种方式称为方式二),并对界面画面进行显示。In the process of using the first terminal, the user can trigger a terminal such as a local computer (which may be referred to as the second terminal) to acquire the interface picture currently displayed by the first terminal through an operation, and display the acquired interface picture through the browser , and further, the first terminal can be operated on the second terminal through buttons on the screen, that is, the first terminal can be remotely controlled. Currently, the interface picture currently displayed by the first terminal may be acquired in different ways, and the acquired interface picture is displayed. For example, the interface picture currently displayed by the first terminal may be acquired in the form of an image (this method may be referred to as mode 1), and the interface picture may be displayed, or the interface picture currently displayed by the first terminal may be acquired in the form of a video stream The interface picture (this method can be called the second method), and the interface picture is displayed.
方式一的具体处理过程可以如下:第二终端可以基于预设的周期向服务器获取第一终端当前显示的界面画面,或者,服务器可以自动向第二终端推送第一终端当前显示的界面画面。第二终端获取到第一终端当前显示的界面画面后可以通过URL.createObjectURL()创建本地临时对象URL,将一张界面画面的src源设置为临时图片对象的URL,进而,可以将该界面画面绘制到Canvas画布中,实现对第一终端当前显示的界面画面的显示。采用方式一显示第一终端当前显示的界面画面,服务器发送的界面画面的数据量比较大,一般为100KB(千字节),如果获取的速率是每秒25张界面画面,则每秒需要2.5MB/s(兆字节/秒)的网络带宽才能流畅的显示界面画面,由此可见,该种方式对网络的要求较高,占用的带宽较大,如果网络不能满足上述条件的话,则第二终端无法流畅的显示界面画面,从而,导致显示界面画面的延迟较大。The specific processing process of
由于在生成视频流前会对图像进行压缩编码,因此,为了第二终端可以流畅的显示第一终端的界面画面,可以以视频流的形式获取界面画面,即采用方式二的方式不需要太大的网络带宽,占用带宽较小。目前,获取到视频流后,第二终端的浏览器可以通过安装的flash插件对视频流进行解码和播放,flash插件可以对特定形式的视频流进行播放,比如可以对RTMP视频流(即对第一终端产生的视频流进行RTMP封装后的视频流)和H264视频流(即采用帧内-帧间压缩算法压缩后的视频流,也可以是H265视频流)进行播放,其中,通过flash插件播放视频流均需要服务器对第一终端生成的视频流进行封装处理。视频流的形式不同,方式二的具体处理过程不同,针对视频流是RTMP视频流的情况,方式二的具体处理过程可以如下:第一终端可以根据当前显示的界面画面生成视频流(可称为第一视频流),进而,可以向服务器(其中,该服务器可以是网络侧部署的用于第一终端与第二终端进行通信的服务器)发送生成的第一视频流。服务器接收到第一视频流后,可以对其进行RTMP(Real Time Messaging Protocol,实时消息传输协议)封装,得到第二视频流,再将第二视频流发送至第二终端。第二终端接收到第二视频流后,可以通过安装的flash插件对第二视频流进行解码和播放,即可以显示界面画面。这样,基于上述显示界面画面的处理方式,服务器(此种情况下,该服务器也可称为流媒体服务器)在对第一视频流进行封装时,往往需要一定的缓存,并且flash解码到视频流中的视频帧后,也需要先缓存几帧视频帧,才进行显示,从而,导致界面画面的显示延迟比较大。Since the image is compressed and encoded before the video stream is generated, so that the second terminal can smoothly display the interface picture of the first terminal, the interface picture can be obtained in the form of a video stream, that is, the second method does not need to be too large. the network bandwidth and occupy less bandwidth. At present, after obtaining the video stream, the browser of the second terminal can decode and play the video stream through the installed flash plug-in, and the flash plug-in can play the video stream in a specific form, such as RTMP video stream (that is, for the first video stream). The video stream generated by a terminal is RTMP encapsulated video stream) and H264 video stream (that is, the video stream compressed by the intra-frame-inter-frame compression algorithm, or the H265 video stream) for playback. All video streams require the server to perform encapsulation processing on the video stream generated by the first terminal. The form of the video stream is different, and the specific processing process of Mode 2 is different. For the case where the video stream is an RTMP video stream, the specific processing process of Mode 2 may be as follows: The first terminal may generate a video stream (which may be referred to as the currently displayed interface picture) the first video stream), and further, the generated first video stream may be sent to a server (wherein, the server may be a server deployed on the network side for communication between the first terminal and the second terminal). After receiving the first video stream, the server may perform RTMP (Real Time Messaging Protocol, Real Time Messaging Protocol) encapsulation on the first video stream to obtain a second video stream, and then send the second video stream to the second terminal. After receiving the second video stream, the second terminal can decode and play the second video stream through the installed flash plug-in, that is, an interface picture can be displayed. In this way, based on the above-mentioned processing method of displaying the interface picture, the server (in this case, the server may also be called a streaming media server) often needs a certain amount of buffering when encapsulating the first video stream, and the flash decodes the video stream into the video stream. After the video frames in the , it is also necessary to buffer several video frames before displaying them, which results in a relatively large delay in the display of the interface screen.
针对视频流是H264视频流的情况,方式二的具体处理过程可以如下:第一终端可以根据当前显示的界面画面生成视频流(可称为第一视频流),进而,可以向服务器(其中,该服务器可以是网络侧部署的用于第一终端与第二终端进行通信的服务器)发送生成的第一视频流。服务器接收到视频流后,可以对其进行FLV(其中,FLV是一种视频格式)文件头封装,得到第二视频流,再将第二视频流发送至第二终端。第二终端接收到第二视频流后,可以通过安装的flash插件对第二视频流进行解码和播放,即可以显示界面画面。这样,基于上述显示界面画面的处理方式,服务器需要对第一视频流进行封装,耗费一定的市场,并且flash解码到视频流中的视频帧后,也需要先缓存几帧视频帧,才进行显示,从而,导致界面画面的显示延迟比较大。由此可见,采用方式二获取第一终端当前显示的界面画面,用户想要通过第二终端远程控制第一终端时,需要先安装flash插件,此外,显示界面画面的延迟比较大。For the case where the video stream is an H264 video stream, the specific processing process of the second method may be as follows: the first terminal may generate a video stream (which may be referred to as a first video stream) according to the currently displayed interface picture, and further, may send a message to the server (wherein, The server may be a server deployed on the network side for communication between the first terminal and the second terminal) to send the generated first video stream. After receiving the video stream, the server can perform FLV (wherein FLV is a video format) file header encapsulation to obtain a second video stream, and then send the second video stream to the second terminal. After receiving the second video stream, the second terminal can decode and play the second video stream through the installed flash plug-in, that is, an interface picture can be displayed. In this way, based on the above-mentioned processing method of the display interface picture, the server needs to encapsulate the first video stream, which consumes a certain market, and after the flash decodes the video frames in the video stream, it also needs to cache several video frames before displaying. , thus, the display delay of the interface picture is relatively large. It can be seen that, using the second method to obtain the interface picture currently displayed by the first terminal, when the user wants to remotely control the first terminal through the second terminal, the flash plug-in needs to be installed first. In addition, the delay in displaying the interface picture is relatively large.
然而,本方案中,服务器接收到第一终端发送的目标视频流后,可以确定当前对第一终端进行远程控制的第二终端,进而,可以直接向第二终端发送第一终端发送的目标视频流,其中,目标视频流是未经封装过的视频流。第二终端可以在对第一终端进行远程控制的过程中,可以获取网页解码脚本和网页绘制脚本。当获取到服务器发送的目标视频流后,可以通过获取到的网页解码脚本和网页绘制脚本,基于获取到的目标视频流,显示第一终端当前显示的界面画面。这样,服务器接收到目标视频流后,未作封装处理,直接将其转发给第二终端,可以保证第二终端可以及时获取到目标视频流。另外,第二终端通过浏览器对网页解码脚本和网页绘制脚本进行解析,解码到目标视频流中的界面画面后,可以直接显示界面画面,无需对其进行缓存,从而,可以降低显示界面画面的延迟。However, in this solution, after receiving the target video stream sent by the first terminal, the server can determine the second terminal that currently controls the first terminal remotely, and further, can directly send the target video sent by the first terminal to the second terminal stream, where the target video stream is an unencapsulated video stream. The second terminal may acquire the webpage decoding script and the webpage drawing script in the process of remotely controlling the first terminal. After acquiring the target video stream sent by the server, the interface picture currently displayed by the first terminal may be displayed based on the acquired target video stream by using the acquired webpage decoding script and webpage drawing script. In this way, after receiving the target video stream, the server directly forwards it to the second terminal without encapsulation processing, which can ensure that the second terminal can obtain the target video stream in time. In addition, the second terminal parses the webpage decoding script and the webpage drawing script through the browser, and after decoding the interface picture in the target video stream, the interface picture can be directly displayed without buffering the interface picture, thereby reducing the cost of displaying the interface picture. Delay.
下面将结合具体实施方式,对图2所示的处理流程进行详细的说明,内容可以如下:The processing flow shown in FIG. 2 will be described in detail below in conjunction with the specific embodiments, and the content may be as follows:
步骤201,第二终端显示选择界面,选择界面中包括多个终端的选项。Step 201, the second terminal displays a selection interface, and the selection interface includes options of multiple terminals.
在实施中,第二终端中可以安装有浏览器,当用户想要使用云端的终端(即想要对云端的终端进行远程控制)时,可以通过操作,触发第二终端开启浏览器,进而,用户可以在浏览器的地址栏,输入选择界面的网址,触发第二终端接收到获取指令。第二终端接收到获取指令后,可以向服务器获取选择界面(其中,第二终端可以与服务器建立有Websocket连接,Websocket是一种传输协议),进而,可以对选择界面进行显示,其中,选择界面中包括云端部署的多个终端的选项,每个选项包括对应终端的介绍信息,如图3所示。In implementation, a browser may be installed in the second terminal. When the user wants to use the terminal in the cloud (that is, he wants to remotely control the terminal in the cloud), he can trigger the second terminal to open the browser through an operation, and then, The user can enter the website address of the selection interface in the address bar of the browser to trigger the second terminal to receive the acquisition instruction. After receiving the obtaining instruction, the second terminal may obtain the selection interface from the server (wherein, the second terminal may establish a Websocket connection with the server, and Websocket is a transmission protocol), and further, may display the selection interface, wherein the selection interface It includes options for multiple terminals deployed in the cloud, and each option includes the introduction information of the corresponding terminal, as shown in Figure 3.
步骤202,第二终端获取网页解码脚本和网页绘制脚本。Step 202, the second terminal obtains the webpage decoding script and the webpage drawing script.
在实施中,第二终端接收到获取指令后,除了向服务器获取选择界面,还可以获取网页解码脚本和网页绘制脚本,其中,网页解码脚本和网页绘制脚本可以是用于浏览器解析的脚本,可以是JS文件。In implementation, after receiving the obtaining instruction, the second terminal may obtain the webpage decoding script and the webpage drawing script in addition to obtaining the selection interface from the server, wherein the webpage decoding script and the webpage drawing script may be scripts used for browser parsing, Can be a JS file.
可选的,网页解码脚本和网页绘制脚本可以从服务器获取的,相应的,步骤202的处理过程可以如下:当获取到对目标网页的显示指令时,从服务器下载网页解码脚本和网页绘制脚本。Optionally, the webpage decoding script and the webpage drawing script can be obtained from the server. Correspondingly, the processing procedure of step 202 can be as follows: when the display instruction for the target webpage is obtained, the webpage decoding script and the webpage drawing script are downloaded from the server.
在实施中,第二终端接收到获取指令后的过程中,会显示多个网页,比如可以显示包含选择界面的网页,或者,显示视频流显示网页等。在显示网页前,第二终端会接收到对该网页(可称为目标网页)的显示指令,此时,第二终端可以从服务器下载网页解码脚本和网页绘制脚本。比如,当目标网页为包含上述选择界面的网页时,第二终端接收到对选择界面的获取指令后,即可从服务器下载网页解码脚本和网页绘制脚本。In implementation, after the second terminal receives the acquisition instruction, it will display multiple web pages, for example, a web page including a selection interface, or a video stream display web page, etc. may be displayed. Before displaying the web page, the second terminal will receive a display instruction for the web page (may be called a target web page), and at this time, the second terminal may download the web page decoding script and the web page drawing script from the server. For example, when the target web page is a web page including the above selection interface, after receiving the obtaining instruction for the selection interface, the second terminal can download the web page decoding script and the web page drawing script from the server.
需要说明的是,基于获取网页解码脚本和网页绘制脚本的触发机制不同,步骤202的处理时序与步骤201、步骤203的处理时序没有先后关系。It should be noted that, based on the difference in triggering mechanisms for acquiring the webpage decoding script and the webpage drawing script, the processing sequence of step 202 has no sequential relationship with the processing sequence of step 201 and step 203 .
步骤203,第二终端当接收到对多个终端中第一终端的选择指令时,获取当前登录账户的目标账户标识、以及第一终端的目标终端标识。Step 203: When receiving the selection instruction for the first terminal among the multiple terminals, the second terminal acquires the target account identifier of the current login account and the target terminal identifier of the first terminal.
在实施中,显示选择界面后,用户可以根据自己的需求,选择相应的终端,此时,第二终端可以接收到对多个终端中某终端(即第一终端)的选择指令,进而,第二终端可以获取当前登录的账户标识(即目标账户标识,可用UserID表示)、以及第一终端的终端标识(即目标终端标识,可用DeviceID表示)。In the implementation, after the selection interface is displayed, the user can select a corresponding terminal according to his own needs. At this time, the second terminal can receive a selection instruction for a terminal (ie, the first terminal) among the multiple terminals, and further, the first terminal The second terminal can acquire the currently logged-in account identifier (that is, the target account identifier, which can be represented by UserID) and the terminal identifier of the first terminal (that is, the target terminal identifier, which can be represented by DeviceID).
步骤204,第二终端对目标账户标识和目标终端标识进行加密,得到加密后的目标账户标识和目标终端标识。Step 204, the second terminal encrypts the target account identifier and the target terminal identifier to obtain the encrypted target account identifier and the target terminal identifier.
在实施中,第二终端获取到目标账户标识和目标终端标识后,可以对其进行加密,得到加密后的目标账户标识和目标终端标识,其中,可以通过对称加密算法对目标账户标识和目标终端标识进行加密。具体的,第二终端获取到目标账户标识和目标终端标识后,可以通过Base64Encode(Base64Encode是一种加密方法)对目标账户标识和目标终端标识进行加密,得到加密后的目标终端标识和目标账户标识,可称作key,进而,可以将得到的key设置到Cookie中,其中,Cookie中的key可以如下:Base64Encode(DeviceID+UserID)。In implementation, after acquiring the target account identifier and the target terminal identifier, the second terminal can encrypt them to obtain the encrypted target account identifier and the target terminal identifier, wherein the target account identifier and the target terminal identifier can be encrypted by a symmetric encryption algorithm. The ID is encrypted. Specifically, after obtaining the target account identifier and the target terminal identifier, the second terminal can encrypt the target account identifier and the target terminal identifier through Base64Encode (Base64Encode is an encryption method), and obtain the encrypted target terminal identifier and target account identifier. , which can be called a key, and further, the obtained key can be set into a cookie, wherein the key in the cookie can be as follows: Base64Encode(DeviceID+UserID).
步骤205,第二终端向服务器发送加密后的目标账户标识和目标终端标识。Step 205, the second terminal sends the encrypted target account identifier and target terminal identifier to the server.
在实施中,第二终端得到加密后的目标账户标识和目标终端标识后,可以向服务器发送加密后的目标账户标识和目标终端标识。针对第二终端将加密后的目标账户标识和目标终端标识设置为Cookie中的字段key的数据的情况,第二终端可以向服务器发送Cookie。In implementation, after obtaining the encrypted target account identifier and target terminal identifier, the second terminal may send the encrypted target account identifier and target terminal identifier to the server. In the case where the second terminal sets the encrypted target account identifier and the target terminal identifier as data of the field key in the cookie, the second terminal may send the cookie to the server.
相应的,第二终端向服务器发送加密后的目标账户标识和目标终端标识后,服务器可以接收第二终端发送的加密后的目标账户标识和目标终端标识。Correspondingly, after the second terminal sends the encrypted target account identifier and target terminal identifier to the server, the server may receive the encrypted target account identifier and target terminal identifier sent by the second terminal.
步骤206,服务器对加密后的目标账户标识和目标终端标识进行解密,得到目标账户标识和目标终端标识。Step 206, the server decrypts the encrypted target account identifier and target terminal identifier to obtain the target account identifier and the target terminal identifier.
在实施中,服务器接收到第二终端发送的加密后的目标账户标识和目标终端标识后,可以对其进行解密,得到目标账户标识和目标终端标识。针对第二终端通过Base64Encode对目标账户标识和目标终端标识进行加密的情况,服务器可以通过Base64Decode对加密后的目标账户标识和目标终端标识进行解密,得到目标账户标识和目标终端标识。另外,针对第二终端将加密后的目标账户标识和目标终端标识设置为Cookie中的字段key的数据,并向服务器发送Cookie的情况,服务器可以读取Cookie中字段key的数据,并对读取到的数据进行解密,得到目标账户标识和目标终端标识。In implementation, after receiving the encrypted target account identifier and target terminal identifier sent by the second terminal, the server may decrypt them to obtain the target account identifier and the target terminal identifier. In the case where the second terminal encrypts the target account identifier and the target terminal identifier through Base64Encode, the server can decrypt the encrypted target account identifier and the target terminal identifier through Base64Decode to obtain the target account identifier and the target terminal identifier. In addition, in the case where the second terminal sets the encrypted target account identifier and target terminal identifier as the data of the field key in the cookie, and sends the cookie to the server, the server can read the data of the field key in the cookie, and read the data of the field key in the cookie. The received data is decrypted to obtain the target account ID and target terminal ID.
步骤207,服务器对目标账户标识和目标终端标识进行校验处理,如果校验成功,则向目标终端标识对应的第一终端发送视频流获取请求,视频流获取请求用于向第一终端请求目标视频流。Step 207, the server performs verification processing on the target account identifier and the target terminal identifier, and if the verification is successful, sends a video stream acquisition request to the first terminal corresponding to the target terminal identifier, and the video stream acquisition request is used to request the target terminal from the first terminal. video stream.
在实施中,服务器得到目标账户标识和目标终端标识后,可以对其进行校验处理,如果校验成功,则服务器可以目标终端标识对应的第一终端发送视频获取请求,其中,同一时刻第一终端可以被一个第二终端远程控制,即如果第一终端处于未被远程控制的状态,则向目标终端标识对应的第一终端发送视频流获取请求,此时第二终端即进入对第一终端进行远程控制的过程。另外,当第二终端接收到对第一终端的选择指令时,除了向服务器发送目标账户标识和目标终端标识外,还可以向其他服务器发送目标账户标识和目标终端标识,此种情况下,服务器得到目标账户标识和目标终端标识后,可以向其他服务器获取目标账户标识对应的终端标识,如果从其他服务器获取到的终端标识与服务器得到的目标终端标识一致,则校验成功。In implementation, after obtaining the target account identifier and the target terminal identifier, the server may perform verification processing on them. If the verification is successful, the server may send a video acquisition request to the first terminal corresponding to the target terminal identifier. The terminal can be remotely controlled by a second terminal, that is, if the first terminal is not remotely controlled, a video stream acquisition request is sent to the first terminal corresponding to the target terminal identifier, and the second terminal enters the first terminal. The process of remote control. In addition, when the second terminal receives the selection instruction for the first terminal, in addition to sending the target account identifier and the target terminal identifier to the server, it can also send the target account identifier and the target terminal identifier to other servers. In this case, the server After obtaining the target account identifier and the target terminal identifier, the terminal identifier corresponding to the target account identifier can be obtained from other servers. If the terminal identifier obtained from the other server is consistent with the target terminal identifier obtained by the server, the verification is successful.
相应的,服务器向第一终端发送视频流获取请求后,第一终端可以接收服务器发送的视频流获取请求。Correspondingly, after the server sends the video stream acquisition request to the first terminal, the first terminal may receive the video stream acquisition request sent by the server.
可选的,校验成功后,服务器还可以将目标账户标识与目标终端标识对应存储,相应的,还可以进行如下处理:将目标账户标识与目标终端标识对应存储到账户标识与终端标识的对应关系中。Optionally, after the verification is successful, the server may also store the target account identifier and the target terminal identifier correspondingly, and correspondingly, may also perform the following processing: store the target account identifier and the target terminal identifier in correspondence with the account identifier and the terminal identifier. in relationship.
在实施中,服务器中可以存储有账户标识与终端标识的对应关系,其中,终端标识可以是云端部署的终端的标识。服务器对目标账户标识和目标终端标识校验成功后,可以将目标账户标识与目标终端标识对应存储到账户标识与终端标识的对应关系中,以便接收到第一终端发送的目标视频流后,确定对第一终端进行远程控制的第二终端。In implementation, the server may store a correspondence between the account identifier and the terminal identifier, where the terminal identifier may be the identifier of the terminal deployed in the cloud. After successfully verifying the target account identifier and the target terminal identifier, the server may store the target account identifier and the target terminal identifier in the corresponding relationship between the account identifier and the terminal identifier, so that after receiving the target video stream sent by the first terminal, determine A second terminal that remotely controls the first terminal.
步骤208,第一终端根据当前显示的界面画面,生成目标视频流。Step 208: The first terminal generates a target video stream according to the currently displayed interface picture.
在实施中,第一终端接收到服务器发送的视频流获取请求后,可以点亮屏幕,基于当前显示的界面画面,生成视频流(可称为目标视频流),比如,点亮屏幕后,第一终端显示屏幕桌面,则第一终端生成的视频流的第一帧即是屏幕桌面,如图4所示。其中,第一终端可以采用录屏的方式,获取当前显示的界面画面,并基于获取到的界面画面,生成视频流。In implementation, after receiving the video stream acquisition request sent by the server, the first terminal can light up the screen, and generate a video stream (which may be called a target video stream) based on the currently displayed interface screen. When a terminal displays a screen desktop, the first frame of the video stream generated by the first terminal is the screen desktop, as shown in FIG. 4 . Wherein, the first terminal may acquire the currently displayed interface picture by recording a screen, and generate a video stream based on the acquired interface picture.
第一终端生成目标视频流后,可以向服务器发送目标视频流。After generating the target video stream, the first terminal may send the target video stream to the server.
步骤209,服务器接收第一终端发送的目标视频流,目标视频流由第一终端的当前显示的界面画面组成。Step 209: The server receives the target video stream sent by the first terminal, where the target video stream is composed of the interface picture currently displayed by the first terminal.
在实施中,第一终端向服务器发送目标视频流后,服务器可以接收第一终端发送的目标视频流。In implementation, after the first terminal sends the target video stream to the server, the server may receive the target video stream sent by the first terminal.
步骤210,服务器确定第一终端对应的第二终端,第二终端为对第一终端进行远程控制的终端。In step 210, the server determines a second terminal corresponding to the first terminal, and the second terminal is a terminal that remotely controls the first terminal.
在实施中,服务器接收到第一终端发送的目标视频流后,可以确定当前对第一终端进行远程控制的第二终端。In the implementation, after receiving the target video stream sent by the first terminal, the server may determine the second terminal that is currently remotely controlling the first terminal.
可选的,针对服务器中存储有账户标识与终端标识的对应关系的情况,相应的,步骤210的处理过程可以如下:根据预先存储的上述对应关系,确定第一终端对应的第二终端。Optionally, for a situation where the server stores a corresponding relationship between the account identifier and the terminal identifier, correspondingly, the processing procedure of step 210 may be as follows: according to the pre-stored corresponding relationship, determine the second terminal corresponding to the first terminal.
在实施中,服务器接收到第一终端发送的目标视频流后,可以在上述账户标识与终端标识的对应关系中,确定第一终端的目标终端标识对应的目标账户标识,进而,可以将目标账户标识对应的终端确定为第二终端。In implementation, after receiving the target video stream sent by the first terminal, the server can determine the target account identifier corresponding to the target terminal identifier of the first terminal in the correspondence between the account identifier and the terminal identifier, and further, the target account identifier can be The terminal corresponding to the identification is determined to be the second terminal.
步骤211,服务器向第二终端发送目标视频流,目标视频流为未经封装过的视频流,用于第二终端显示界面画面。Step 211: The server sends a target video stream to the second terminal, where the target video stream is an unencapsulated video stream, which is used for the second terminal to display an interface picture.
在实施中,服务器确定出第二终端后,可以向第二终端发送第一终端发送的目标视频流,其中,目标视频流为未经封装过的视频流,服务器可以通过Websocket向第二终端发送目标视频流。也就是说,服务器接收到第一终端发送的目标视频流后,可以不对其进行处理,直接将其转发至第二终端。这样,服务器可以不对视频帧进行缓存,进而,可以保证第二终端能够及时获取到目标视频流。In implementation, after determining the second terminal, the server may send the target video stream sent by the first terminal to the second terminal, where the target video stream is an unencapsulated video stream, and the server may send the target video stream to the second terminal through Websocket target video stream. That is to say, after receiving the target video stream sent by the first terminal, the server may directly forward it to the second terminal without processing it. In this way, the server may not buffer the video frames, and further, it may be ensured that the second terminal can obtain the target video stream in time.
可选的,服务器可以以预设格式向第二终端发送目标视频流,相应的,步骤211的处理过程可以如下:向第二终端发送预设格式的数据,数据包括目标数据类型和目标视频流,目标数据类型为视频流对应的数据类型。Optionally, the server may send the target video stream to the second terminal in a preset format. Correspondingly, the processing process of step 211 may be as follows: send data in a preset format to the second terminal, and the data includes the target data type and the target video stream. , the target data type is the data type corresponding to the video stream.
在实施中,每当服务器向第二终端发送对应第一终端的数据时,可以向第二终端发送预设格式的数据,其中,格式可以是:Len+Type+Data,Len为4字节的整数,网络字节序,用于表示整个数据包的长度,Type为1字节的整数,表示当前数据包的类型,Data是具体的数据,比如可以是目标视频流。此种情况下,服务器接收到目标视频流后,可以向第二终端发送预设格式的数据,其中,Type为目标数据类型(比如,可以为0),Data为目标视频流,目标数据类型为视频流对应的数据类型。In implementation, whenever the server sends data corresponding to the first terminal to the second terminal, it may send data in a preset format to the second terminal, where the format may be: Len+Type+Data, where Len is 4 bytes Integer, network byte order, used to indicate the length of the entire data packet, Type is an integer of 1 byte, indicating the type of the current data packet, Data is specific data, such as a target video stream. In this case, after receiving the target video stream, the server can send data in a preset format to the second terminal, where Type is the target data type (for example, it can be 0), Data is the target video stream, and the target data type is The data type corresponding to the video stream.
步骤212,第二终端在第二终端对第一终端进行远程控制的过程中,获取服务器发送的目标视频流,目标视频流是由第一终端当前显示的界面画面组成、且未经封装过的视频流。Step 212, the second terminal acquires the target video stream sent by the server in the process that the second terminal remotely controls the first terminal, and the target video stream is composed of the interface picture currently displayed by the first terminal and has not been encapsulated. video stream.
在实施中,第一终端接收到视频获取请求后,可以持续基于当前显示的界面画面,生成目标视频流,并持续向服务器发送目标视频流。相应的,第二终端可以持续接收并获取服务器发送的目标视频流,其中,目标视频流是由第一终端当前显示的界面画面组成、且未经封装过的视频流。In implementation, after receiving the video acquisition request, the first terminal may continue to generate a target video stream based on the currently displayed interface screen, and continue to send the target video stream to the server. Correspondingly, the second terminal can continuously receive and acquire the target video stream sent by the server, where the target video stream is an unencapsulated video stream composed of the interface screen currently displayed by the first terminal.
可选的,第二终端可以通过服务器发送的数据中携带的数据类型,判定当前接收到的数据是否是目标视频流,相应的,接收服务器发送的预设格式的数据;如果数据包括的数据类型为目标数据类型,则获取数据中包括的目标视频流,目标数据类型为视频流对应的数据类型。Optionally, the second terminal can use the data type carried in the data sent by the server to determine whether the currently received data is the target video stream, and correspondingly, receive the data in the preset format sent by the server; if the data includes the data type is the target data type, the target video stream included in the data is obtained, and the target data type is the data type corresponding to the video stream.
在实施中,针对服务器向第二终端发送预设格式的数据的情况,第二终端接收到服务器发送的预设格式的数据后,可以判断数据中包括的数据类型,如果数据包括的数据类型为目标数据类型,则可以获取数据中包括的目标视频流,目标数据类型为视频流对应的数据类型。In implementation, for a situation where the server sends data in a preset format to the second terminal, after receiving the data in the preset format sent by the server, the second terminal can determine the type of data included in the data, if the type of data included in the data is If the target data type is selected, the target video stream included in the data can be obtained, and the target data type is the data type corresponding to the video stream.
步骤213,第二终端通过网页解码脚本和网页绘制脚本,基于目标视频流,显示界面画面。Step 213, the second terminal displays an interface picture based on the target video stream through the webpage decoding script and the webpage drawing script.
在实施中,第二终端获取到目标视频流后,可以通过获取到的网页解码脚本和网页绘制脚本,对目标视频流进行处理,显示第一终端当前显示的界面画面。另外,第二终端当接收到对第一终端的选择指令时,除了进行上述处理,还可以显示用于显示界面画面的网页,此种情况下,第二终端可以将获取到的界面画面在该网页进行显示。In implementation, after acquiring the target video stream, the second terminal may process the target video stream by using the acquired webpage decoding script and webpage drawing script, and display the interface picture currently displayed by the first terminal. In addition, when the second terminal receives the selection instruction for the first terminal, in addition to the above processing, it can also display a web page for displaying the interface screen. In this case, the second terminal can display the acquired interface screen in the web page is displayed.
可选的,第二终端可以通过网页解码脚本对目标视频流进行解码,网页绘制脚本用于显示解码得到的界面画面,相应的,步骤206的处理过程可以如下:通过网页解码脚本,对目标视频流进行解码,得到界面画面的画面数据;通过网页绘制脚本,基于界面画面的画面数据,显示界面画面。Optionally, the second terminal can decode the target video stream through a webpage decoding script, and the webpage drawing script is used to display the interface picture obtained by decoding. Correspondingly, the processing process of step 206 can be as follows: through the webpage decoding script, the target video stream is decoded by the webpage decoding script. The stream is decoded to obtain the picture data of the interface picture; the script is drawn through the webpage, and the interface picture is displayed based on the picture data of the interface picture.
在实施中,获取到目标视频流后,第二终端可以通过网页解码脚本,对目标视频流中的各视频帧(其中,各视频帧即是第一终端的界面画面)进行解码,得到界面画面的画面数据,其中,画面数据可以包括界面画面的图像数据,图像的宽和高。得到画面数据后,第二终端可以通过网页绘制脚本将界面画面显示在画布中,并且还可以基于图像的宽和高调整画布的大小。In implementation, after acquiring the target video stream, the second terminal can decode each video frame in the target video stream (wherein each video frame is the interface picture of the first terminal) through the webpage decoding script to obtain the interface picture The picture data, wherein the picture data may include the image data of the interface picture, the width and height of the image. After obtaining the picture data, the second terminal can display the interface picture on the canvas through the webpage drawing script, and can also adjust the size of the canvas based on the width and height of the image.
可选的,针对目标视频流是视频帧通过帧内-帧间压缩算法压缩后的视频流的情况,第二终端在接收目标视频流的过程中,可以将确定出的各个网络传输单元存储到缓存中,相应的,处理过程可以如下:在获取目标视频流的过程中,每当获取到包含网络传输单元开始标识的数据包时,将数据包到下一个包含网络传输单元开始标识的数据包之间的数据包,确定为完整的网络传输单元;将获取到的网络传输单元存储到缓存中;通过网页解码脚本,对缓存中的各网络传输单元进行解码,得到界面画面的画面数据。Optionally, for the case where the target video stream is a video stream compressed by the video frame through the intra-frame compression algorithm, the second terminal may store the determined network transmission units in the process of receiving the target video stream. In the cache, correspondingly, the processing process can be as follows: in the process of acquiring the target video stream, whenever a data packet containing the start identification of the network transmission unit is acquired, the data packet is sent to the next data packet containing the start identification of the network transmission unit The data packets between them are determined as complete network transmission units; the acquired network transmission units are stored in the cache; each network transmission unit in the cache is decoded through the webpage decoding script to obtain the picture data of the interface screen.
相比第二终端采用flash插件播放视频流的方案,采用本方案,显示界面画面的延迟比较低,没有对视频帧进行任何缓存,对网络要求的也比较低,如果网络条件比较好,则延迟可以控制在50毫秒以内。Compared with the solution that the second terminal uses the flash plug-in to play the video stream, using this solution, the delay of the display interface screen is relatively low, there is no buffering of video frames, and the network requirements are relatively low. If the network conditions are good, the delay will be Can be controlled within 50 milliseconds.
在实施中,在获取目标视频流的过程中,可以基于接收到的数据包判断是否已获取到完整的网络传输单元(NAL),如果确定出已获取到完整的NAL,第二终端可以将完整的NAL存储到缓存中。其中,每个NAL对应的第一个数据包中可以包含有NAL开始标识,此种情况下,第二终端可以在获取目标视频流的过程中,每当获取到包含网络传输单元开始标识的数据包时,第二终端可以将该数据包到下一个包含网络传输单元开始标识的数据包之间的数据包,确定为完整的NAL,进而,可以将完整的NAL存储到缓存中,其中,一个或多个NAL对应一个视频帧。后续第二终端可以通过网页解码脚本对缓存中的各网络传输单元进行解码,得到界面画面的画面数据。In implementation, in the process of acquiring the target video stream, it can be determined whether a complete network transmission unit (NAL) has been acquired based on the received data packets. If it is determined that a complete NAL has been acquired, the second terminal can NALs are stored into the cache. The first data packet corresponding to each NAL may contain a NAL start identifier. In this case, the second terminal may acquire the data containing the network transmission unit start identifier during the process of acquiring the target video stream. packet, the second terminal may determine the data packet between the data packet and the next data packet containing the start identifier of the network transmission unit as a complete NAL, and further, may store the complete NAL in the cache, where one or multiple NALs corresponding to a video frame. Subsequently, the second terminal may decode each network transmission unit in the cache through the webpage decoding script to obtain picture data of the interface picture.
本发明实施例中,通过服务器接收到第一终端发送的目标视频流后,不再对目标视频流进行封装,直接将其转发给第二终端,来避免服务器先对视频帧缓存的情况出现,从而,可以降低第二终端获取到目标视频流的延迟,进而,可以降低显示界面画面的延迟。另外,本发明实施例中,通过第二终端接收到目标视频流后,通过网页解码脚本和网页绘制脚本,基于目标视频流,显示界面画面,来实现第二终端解码到界面画面后可以及时对其进行显示的目的,从而,可以降低显示界面画面的延迟。In the embodiment of the present invention, after the server receives the target video stream sent by the first terminal, it does not encapsulate the target video stream, and directly forwards it to the second terminal, so as to avoid the situation that the server buffers the video frame first. Therefore, the delay in acquiring the target video stream by the second terminal can be reduced, and further, the delay in displaying the interface picture can be reduced. In addition, in the embodiment of the present invention, after receiving the target video stream through the second terminal, the web page decoding script and the web page drawing script are used to display the interface picture based on the target video stream, so that after the second terminal decodes the interface picture, the interface picture can be decoded in time. The purpose of its display is to reduce the delay of displaying the interface picture.
基于相同的技术构思,本发明实施例还提供了一种显示界面画面的装置,该装置可以是上述服务器,如图5所示,该装置包括:Based on the same technical concept, an embodiment of the present invention also provides a device for displaying an interface picture, and the device may be the above-mentioned server. As shown in FIG. 5 , the device includes:
第一接收模块510,用于接收第一终端发送的目标视频流,所述目标视频流由所述第一终端的当前显示的界面画面组成;a
确定模块520,用于确定所述第一终端对应的第二终端,所述第二终端为对所述第一终端进行远程控制的终端;a determining
第一发送模块530,用于向所述第二终端发送所述目标视频流,所述目标视频流为未经封装过的视频流,用于所述第二终端显示所述界面画面。The
可选的,所述第一发送模块530,用于:Optionally, the
向所述第二终端发送预设格式的数据,所述数据包括目标数据类型和所述目标视频流,所述目标数据类型为视频流对应的数据类型。Sending data in a preset format to the second terminal, the data includes a target data type and the target video stream, and the target data type is a data type corresponding to the video stream.
可选的,如图6所示,所述装置还包括:Optionally, as shown in Figure 6, the device further includes:
第二接收模块540,用于接收所述第二终端发送的加密后的目标账户标识和目标设备标识;The
解密模块550,用于对所述加密后的目标账户标识和目标设备标识进行解密,得到所述目标账户标识和所述目标设备标识;
第二发送模块560,用于对所述目标账户标识和所述目标设备标识进行校验处理,如果校验成功,则向所述目标设备标识对应的第一终端发送视频流获取请求,所述视频流获取请求用于向所述第一终端请求所述目标视频流。The
可选的,如图7所示,所述装置还包括:Optionally, as shown in Figure 7, the device further includes:
存储模块570,用于将所述目标账户标识与所述目标设备标识对应存储到账户标识与设备标识的对应关系中;A
所述确定模块520,用于:The determining
根据预先存储的所述对应关系,确定所述第一终端对应的第二终端。A second terminal corresponding to the first terminal is determined according to the pre-stored correspondence.
基于相同的技术构思,本发明实施例还提供了一种显示界面画面的装置,该装置可以是上述第二终端,如图8所示,该装置包括:Based on the same technical concept, an embodiment of the present invention further provides a device for displaying an interface picture, which may be the above-mentioned second terminal. As shown in FIG. 8 , the device includes:
第一获取模块810,用于获取网页解码脚本和网页绘制脚本;The first obtaining
第二获取模块820,用于在所述第二终端对所述第一终端进行远程控制的过程中,获取服务器发送的目标视频流,所述目标视频流是由第一终端当前显示的界面画面组成、且未经封装过的视频流;The second acquiring
第一显示模块830,用于通过所述网页解码脚本和所述网页绘制脚本,基于所述目标视频流,显示所述界面画面。The
可选的,所述第一获取模块810,用于:Optionally, the first obtaining
当获取到对目标网页的显示指令时,向所述服务器下载目标网页解码脚本和目标网页绘制脚本。When the display instruction for the target web page is acquired, the target web page decoding script and the target web page drawing script are downloaded to the server.
可选的,所述第二获取模块820,用于:Optionally, the second obtaining
在所述第二终端对所述第一终端进行远程控制的过程中,接收服务器发送的预设格式的数据;During the process that the second terminal remotely controls the first terminal, receiving data in a preset format sent by a server;
如果所述数据包括的数据类型为目标数据类型,则获取数据中包括的目标视频流,所述目标数据类型为视频流对应的数据类型。If the data type included in the data is the target data type, the target video stream included in the data is acquired, and the target data type is the data type corresponding to the video stream.
可选的,所述第一显示模块830,用于:Optionally, the
通过所述网页解码脚本,对所述目标视频流进行解码,得到所述界面画面的画面数据;Decode the target video stream through the webpage decoding script to obtain picture data of the interface picture;
通过所述网页绘制脚本,基于所述界面画面的画面数据,显示所述界面画面。The interface picture is displayed based on the picture data of the interface picture through the webpage drawing script.
可选的,所述目标视频流是视频帧通过帧内-帧间压缩算法压缩后的视频流;Optionally, the target video stream is a video stream compressed by a video frame through an intra-frame compression algorithm;
所述第一显示模块830,用于:The
在获取所述目标视频流的过程中,每当获取到包含网络传输单元开始标识的数据包时,将所述数据包到下一个包含网络传输单元开始标识的数据包之间的数据包,确定为完整的网络传输单元;In the process of acquiring the target video stream, whenever a data packet containing the start identifier of the network transmission unit is acquired, the data packet between the data packet and the next data packet containing the start identifier of the network transmission unit is determined. It is a complete network transmission unit;
将获取到的网络传输单元存储到缓存中;Store the acquired network transmission unit in the cache;
通过网页解码脚本,对所述缓存中的各网络传输单元进行解码,得到所述界面画面的画面数据。Through the webpage decoding script, each network transmission unit in the cache is decoded to obtain the picture data of the interface picture.
可选的,如图9所示,所述装置还包括:Optionally, as shown in Figure 9, the device further includes:
第二显示模块840,用于显示选择界面,所述选择界面显示有多个终端的选项;The
第三获取模块850,用于当接收到对所述多个终端中的第一终端的选择指令时,获取当前登录账户的目标账户标识、以及所述第一终端的目标设备标识;The third obtaining
加密模块860,用于对所述目标账户标识和所述目标设备标识进行加密,得到加密后的目标账户标识和目标设备标识;An
发送模块870,用于向所述服务器发送所述加密后的目标账户标识和目标设备标识。A sending
本发明实施例中,通过服务器接收到第一终端发送的目标视频流后,不再对目标视频流进行封装,直接将其转发给第二终端,来避免服务器先对视频帧缓存的情况出现,从而,可以降低第二终端获取到目标视频流的延迟,进而,可以降低显示界面画面的延迟。另外,本发明实施例中,通过第二终端接收到目标视频流后,通过网页解码脚本和网页绘制脚本,基于目标视频流,显示界面画面,来实现第二终端解码到界面画面后可以及时对其进行显示的目的,从而,可以降低显示界面画面的延迟。In the embodiment of the present invention, after the server receives the target video stream sent by the first terminal, it does not encapsulate the target video stream, and directly forwards it to the second terminal, so as to avoid the situation that the server buffers the video frame first. Therefore, the delay in acquiring the target video stream by the second terminal can be reduced, and further, the delay in displaying the interface picture can be reduced. In addition, in the embodiment of the present invention, after receiving the target video stream through the second terminal, the web page decoding script and the web page drawing script are used to display the interface picture based on the target video stream, so that after the second terminal decodes the interface picture, the interface picture can be decoded in time. The purpose of its display is to reduce the delay of displaying the interface picture.
需要说明的是:上述实施例提供的显示界面画面的装置在显示界面画面时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将服务器和第二终端的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的显示界面画面的装置与显示界面画面的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that: when the device for displaying an interface picture provided by the above-mentioned embodiment displays an interface picture, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions may be allocated to different functional modules as required. To complete, that is, to divide the internal structures of the server and the second terminal into different functional modules, so as to complete all or part of the functions described above. In addition, the apparatus for displaying an interface picture provided by the above-mentioned embodiments and the method for displaying an interface picture belong to the same concept, and the specific implementation process thereof is detailed in the method embodiment, which will not be repeated here.
基于相同的技术构思,本发明实施例还提供了一种显示界面画面的系统,所述系统包括服务器和第二终端,其中:Based on the same technical concept, an embodiment of the present invention further provides a system for displaying an interface picture, the system includes a server and a second terminal, wherein:
所述服务器,用于接收第一终端发送的目标视频流,所述目标视频流由所述第一终端的当前显示的界面画面组成;确定所述第一终端对应的第二终端,所述第二终端为对所述第一终端进行远程控制的终端;向所述第二终端发送所述目标视频流,所述目标视频流为未经封装过的视频流,用于所述第二终端显示所述界面画面;The server is configured to receive a target video stream sent by a first terminal, where the target video stream is composed of an interface screen currently displayed by the first terminal; determine the second terminal corresponding to the first terminal, the first terminal The second terminal is a terminal that remotely controls the first terminal; sends the target video stream to the second terminal, where the target video stream is an unencapsulated video stream for display by the second terminal the interface screen;
所述第二终端,用于获取网页解码脚本和网页绘制脚本;在所述第二终端对所述第一终端进行远程控制的过程中,获取服务器发送的目标视频流;通过所述网页解码脚本和所述网页绘制脚本,基于所述目标视频流,显示所述界面画面。The second terminal is used to obtain a webpage decoding script and a webpage drawing script; in the process of remote control of the first terminal by the second terminal, the target video stream sent by the server is obtained; and the webpage drawing script to display the interface screen based on the target video stream.
可选的,所述服务器,用于:Optionally, the server is used for:
向所述第二终端发送预设格式的数据,所述数据包括目标数据类型和所述目标视频流,所述目标数据类型为视频流对应的数据类型;Sending data in a preset format to the second terminal, the data includes a target data type and the target video stream, and the target data type is a data type corresponding to the video stream;
所述第二终端,用于:The second terminal is used for:
在所述第二终端对所述第一终端进行远程控制的过程中,接收服务器发送的预设格式的数据;During the process that the second terminal remotely controls the first terminal, receiving data in a preset format sent by a server;
如果所述数据包括的数据类型为目标数据类型,则获取数据中包括的目标视频流,所述目标数据类型为视频流对应的数据类型。If the data type included in the data is the target data type, the target video stream included in the data is acquired, and the target data type is the data type corresponding to the video stream.
可选的,所述第二终端还用于:Optionally, the second terminal is also used for:
显示选择界面,所述选择界面中包括多个终端的选项;displaying a selection interface, where the selection interface includes options of multiple terminals;
当接收到对所述多个终端中第一终端的选择指令时,获取当前登录账户的目标账户标识、以及所述第一终端的目标终端标识;When receiving the selection instruction for the first terminal in the plurality of terminals, acquiring the target account identifier of the current login account and the target terminal identifier of the first terminal;
对所述目标账户标识和所述目标终端标识进行加密,得到加密后的目标账户标识和目标终端标识;Encrypting the target account identification and the target terminal identification to obtain the encrypted target account identification and the target terminal identification;
向所述服务器发送所述加密后的目标账户标识和目标终端标识;sending the encrypted target account identifier and target terminal identifier to the server;
所述服务器还用于:The server is also used to:
接收所述第二终端发送的加密后的目标账户标识和目标终端标识;receiving the encrypted target account identifier and target terminal identifier sent by the second terminal;
对所述加密后的目标账户标识和目标终端标识进行解密,得到所述目标账户标识和所述目标终端标识;Decrypting the encrypted target account identification and target terminal identification to obtain the target account identification and the target terminal identification;
对所述目标账户标识和所述目标终端标识进行校验处理,如果校验成功,则向所述目标终端标识对应的第一终端发送视频流获取请求,所述视频流获取请求用于向所述第一终端请求所述目标视频流。Verification processing is performed on the target account identifier and the target terminal identifier, and if the verification is successful, a video stream acquisition request is sent to the first terminal corresponding to the target terminal identifier, and the video stream acquisition request is used to The first terminal requests the target video stream.
可选的,所述服务器还用于:Optionally, the server is also used for:
将所述目标账户标识与所述目标终端标识对应存储到账户标识与终端标识的对应关系中;correspondingly storing the target account identification and the target terminal identification in the corresponding relationship between the account identification and the terminal identification;
所述服务器,用于:the server for:
根据预先存储的所述对应关系,确定所述第一终端对应的第二终端。A second terminal corresponding to the first terminal is determined according to the pre-stored correspondence.
可选的,所述第二终端,用于:Optionally, the second terminal is used for:
当获取到对目标网页的显示指令时,从所述服务器下载网页解码脚本和网页绘制脚本。When the display instruction for the target web page is acquired, the web page decoding script and the web page drawing script are downloaded from the server.
可选的,所述第二终端,用于:Optionally, the second terminal is used for:
通过所述网页解码脚本,对所述目标视频流中进行解码,得到所述界面画面的画面数据;Decode the target video stream through the webpage decoding script to obtain the picture data of the interface picture;
通过所述网页绘制脚本,基于所述界面画面的画面数据,显示所述界面画面。The interface picture is displayed based on the picture data of the interface picture through the webpage drawing script.
可选的,所述目标视频流是视频帧通过帧内-帧间压缩算法压缩后的视频流;Optionally, the target video stream is a video stream compressed by a video frame through an intra-frame compression algorithm;
所述第二终端,用于:The second terminal is used for:
在获取所述目标视频流的过程中,每当获取到包含网络传输单元开始标识的数据包时,将所述数据包到下一个包含网络传输单元开始标识的数据包之间的数据包,确定为完整的网络传输单元;In the process of acquiring the target video stream, whenever a data packet containing the start identifier of the network transmission unit is acquired, the data packet between the data packet and the next data packet containing the start identifier of the network transmission unit is determined. It is a complete network transmission unit;
将获取到的网络传输单元存储到缓存中;Store the acquired network transmission unit in the cache;
通过网页解码脚本,对所述缓存中的各网络传输单元进行解码,得到所述界面画面的画面数据。Through the webpage decoding script, each network transmission unit in the cache is decoded to obtain the picture data of the interface picture.
本发明实施例中,通过服务器接收到第一终端发送的目标视频流后,不再对目标视频流进行封装,直接将其转发给第二终端,来避免服务器先对视频帧缓存的情况出现,从而,可以降低第二终端获取到目标视频流的延迟,进而,可以降低显示界面画面的延迟。另外,本发明实施例中,通过第二终端接收到目标视频流后,通过网页解码脚本和网页绘制脚本,基于目标视频流,显示界面画面,来实现第二终端解码到界面画面后可以及时对其进行显示的目的,从而,可以降低显示界面画面的延迟。In the embodiment of the present invention, after the server receives the target video stream sent by the first terminal, it does not encapsulate the target video stream, and directly forwards it to the second terminal, so as to avoid the situation that the server buffers the video frame first. Therefore, the delay in acquiring the target video stream by the second terminal can be reduced, and further, the delay in displaying the interface picture can be reduced. In addition, in the embodiment of the present invention, after receiving the target video stream through the second terminal, the web page decoding script and the web page drawing script are used to display the interface picture based on the target video stream, so that after the second terminal decodes the interface picture, the interface picture can be decoded in time. The purpose of its display is to reduce the delay of displaying the interface picture.
图10示出了本发明一个示例性实施例提供的终端1000的结构框图。该终端1000可以是:智能手机、平板电脑、MP3播放器(Moving Picture Experts Group Audio LayerIII,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group AudioLayer IV,动态影像专家压缩标准音频层面4)播放器、笔记本电脑或台式电脑。终端1000还可能被称为用户设备、便携式终端、膝上型终端、台式终端等其他名称,可以是上述第二终端。FIG. 10 shows a structural block diagram of a terminal 1000 provided by an exemplary embodiment of the present invention. The terminal 1000 can be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, the
通常,终端1000包括有:处理器1001和存储器1002。Generally, the terminal 1000 includes: a
处理器1001可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器1001可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器1001也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central ProcessingUnit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器1001可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器1001还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。The
存储器1002可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器1002还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器1002中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器1001所执行以实现本申请中方法实施例提供的显示界面画面的方法。
在一些实施例中,终端1000还可选包括有:外围设备接口1003和至少一个外围设备。处理器1001、存储器1002和外围设备接口1003之间可以通过总线或信号线相连。各个外围设备可以通过总线、信号线或电路板与外围设备接口1003相连。具体地,外围设备包括:射频电路1004、触摸显示屏1005、摄像头1006、音频电路1007、定位组件1008和电源1009中的至少一种。In some embodiments, the terminal 1000 may optionally further include: a
外围设备接口1003可被用于将I/O(Input/Output,输入/输出)相关的至少一个外围设备连接到处理器1001和存储器1002。在一些实施例中,处理器1001、存储器1002和外围设备接口1003被集成在同一芯片或电路板上;在一些其他实施例中,处理器1001、存储器1002和外围设备接口1003中的任意一个或两个可以在单独的芯片或电路板上实现,本实施例对此不加以限定。The
射频电路1004用于接收和发射RF(Radio Frequency,射频)信号,也称电磁信号。射频电路1004通过电磁信号与通信网络以及其他通信设备进行通信。射频电路1004将电信号转换为电磁信号进行发送,或者,将接收到的电磁信号转换为电信号。可选地,射频电路1004包括:天线系统、RF收发器、一个或多个放大器、调谐器、振荡器、数字信号处理器、编解码芯片组、用户身份模块卡等等。射频电路1004可以通过至少一种无线通信协议来与其它终端进行通信。该无线通信协议包括但不限于:城域网、各代移动通信网络(2G、3G、4G及5G)、无线局域网和/或WiFi(Wireless Fidelity,无线保真)网络。在一些实施例中,射频电路1004还可以包括NFC(Near Field Communication,近距离无线通信)有关的电路,本申请对此不加以限定。The
显示屏1005用于显示UI(User Interface,用户界面)。该UI可以包括图形、文本、图标、视频及其它们的任意组合。当显示屏1005是触摸显示屏时,显示屏1005还具有采集在显示屏1005的表面或表面上方的触摸信号的能力。该触摸信号可以作为控制信号输入至处理器1001进行处理。此时,显示屏1005还可以用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,显示屏1005可以为一个,设置终端1000的前面板;在另一些实施例中,显示屏1005可以为至少两个,分别设置在终端1000的不同表面或呈折叠设计;在再一些实施例中,显示屏1005可以是柔性显示屏,设置在终端1000的弯曲表面上或折叠面上。甚至,显示屏1005还可以设置成非矩形的不规则图形,也即异形屏。显示屏1005可以采用LCD(Liquid Crystal Display,液晶显示屏)、OLED(Organic Light-Emitting Diode,有机发光二极管)等材质制备。The
摄像头组件1006用于采集图像或视频。可选地,摄像头组件1006包括前置摄像头和后置摄像头。通常,前置摄像头设置在终端的前面板,后置摄像头设置在终端的背面。在一些实施例中,后置摄像头为至少两个,分别为主摄像头、景深摄像头、广角摄像头、长焦摄像头中的任意一种,以实现主摄像头和景深摄像头融合实现背景虚化功能、主摄像头和广角摄像头融合实现全景拍摄以及VR(Virtual Reality,虚拟现实)拍摄功能或者其它融合拍摄功能。在一些实施例中,摄像头组件1006还可以包括闪光灯。闪光灯可以是单色温闪光灯,也可以是双色温闪光灯。双色温闪光灯是指暖光闪光灯和冷光闪光灯的组合,可以用于不同色温下的光线补偿。The
音频电路1007可以包括麦克风和扬声器。麦克风用于采集用户及环境的声波,并将声波转换为电信号输入至处理器1001进行处理,或者输入至射频电路1004以实现语音通信。出于立体声采集或降噪的目的,麦克风可以为多个,分别设置在终端1000的不同部位。麦克风还可以是阵列麦克风或全向采集型麦克风。扬声器则用于将来自处理器1001或射频电路1004的电信号转换为声波。扬声器可以是传统的薄膜扬声器,也可以是压电陶瓷扬声器。当扬声器是压电陶瓷扬声器时,不仅可以将电信号转换为人类可听见的声波,也可以将电信号转换为人类听不见的声波以进行测距等用途。在一些实施例中,音频电路1007还可以包括耳机插孔。
定位组件1008用于定位终端1000的当前地理位置,以实现导航或LBS(LocationBased Service,基于位置的服务)。定位组件1008可以是基于美国的GPS(GlobalPositioning System,全球定位系统)、中国的北斗系统、俄罗斯的格雷纳斯系统或欧盟的伽利略系统的定位组件。The
电源1009用于为终端1000中的各个组件进行供电。电源1009可以是交流电、直流电、一次性电池或可充电电池。当电源1009包括可充电电池时,该可充电电池可以支持有线充电或无线充电。该可充电电池还可以用于支持快充技术。The
在一些实施例中,终端1000还包括有一个或多个传感器1010。该一个或多个传感器1010包括但不限于:加速度传感器1011、陀螺仪传感器1012、压力传感器1013、指纹传感器1014、光学传感器1015以及接近传感器1016。In some embodiments, the terminal 1000 further includes one or more sensors 1010 . The one or more sensors 1010 include, but are not limited to, an acceleration sensor 1011 , a gyro sensor 1012 , a pressure sensor 1013 , a fingerprint sensor 1014 , an optical sensor 1015 and a proximity sensor 1016 .
加速度传感器1011可以检测以终端1000建立的坐标系的三个坐标轴上的加速度大小。比如,加速度传感器1011可以用于检测重力加速度在三个坐标轴上的分量。处理器1001可以根据加速度传感器1011采集的重力加速度信号,控制触摸显示屏1005以横向视图或纵向视图进行用户界面的显示。加速度传感器1011还可以用于游戏或者用户的运动数据的采集。The acceleration sensor 1011 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the
陀螺仪传感器1012可以检测终端1000的机体方向及转动角度,陀螺仪传感器1012可以与加速度传感器1011协同采集用户对终端1000的3D动作。处理器1001根据陀螺仪传感器1012采集的数据,可以实现如下功能:动作感应(比如根据用户的倾斜操作来改变UI)、拍摄时的图像稳定、游戏控制以及惯性导航。The gyroscope sensor 1012 can detect the body direction and rotation angle of the terminal 1000 , and the gyroscope sensor 1012 can cooperate with the acceleration sensor 1011 to collect 3D actions of the user on the
压力传感器1013可以设置在终端1000的侧边框和/或触摸显示屏1005的下层。当压力传感器1013设置在终端1000的侧边框时,可以检测用户对终端1000的握持信号,由处理器1001根据压力传感器1013采集的握持信号进行左右手识别或快捷操作。当压力传感器1013设置在触摸显示屏1005的下层时,由处理器1001根据用户对触摸显示屏1005的压力操作,实现对UI界面上的可操作性控件进行控制。可操作性控件包括按钮控件、滚动条控件、图标控件、菜单控件中的至少一种。The pressure sensor 1013 may be disposed on the side frame of the terminal 1000 and/or the lower layer of the
指纹传感器1014用于采集用户的指纹,由处理器1001根据指纹传感器1014采集到的指纹识别用户的身份,或者,由指纹传感器1014根据采集到的指纹识别用户的身份。在识别出用户的身份为可信身份时,由处理器1001授权该用户执行相关的敏感操作,该敏感操作包括解锁屏幕、查看加密信息、下载软件、支付及更改设置等。指纹传感器1014可以被设置终端1000的正面、背面或侧面。当终端1000上设置有物理按键或厂商Logo时,指纹传感器1014可以与物理按键或厂商Logo集成在一起。The fingerprint sensor 1014 is used to collect the user's fingerprint, and the
光学传感器1015用于采集环境光强度。在一个实施例中,处理器1001可以根据光学传感器1015采集的环境光强度,控制触摸显示屏1005的显示亮度。具体地,当环境光强度较高时,调高触摸显示屏1005的显示亮度;当环境光强度较低时,调低触摸显示屏1005的显示亮度。在另一个实施例中,处理器1001还可以根据光学传感器1015采集的环境光强度,动态调整摄像头组件1006的拍摄参数。The optical sensor 1015 is used to collect ambient light intensity. In one embodiment, the
接近传感器1016,也称距离传感器,通常设置在终端1000的前面板。接近传感器1016用于采集用户与终端1000的正面之间的距离。在一个实施例中,当接近传感器1016检测到用户与终端1000的正面之间的距离逐渐变小时,由处理器1001控制触摸显示屏1005从亮屏状态切换为息屏状态;当接近传感器1016检测到用户与终端1000的正面之间的距离逐渐变大时,由处理器1001控制触摸显示屏1005从息屏状态切换为亮屏状态。A proximity sensor 1016 , also called a distance sensor, is usually disposed on the front panel of the
本领域技术人员可以理解,图10中示出的结构并不构成对终端1000的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。Those skilled in the art can understand that the structure shown in FIG. 10 does not constitute a limitation on the terminal 1000, and may include more or less components than the one shown, or combine some components, or adopt different component arrangements.
本发明实施例中,通过服务器接收到第一终端发送的目标视频流后,不再对目标视频流进行封装,直接将其转发给第二终端,来避免服务器先对视频帧缓存的情况出现,从而,可以降低第二终端获取到目标视频流的延迟,进而,可以降低显示界面画面的延迟。另外,本发明实施例中,通过第二终端接收到目标视频流后,通过网页解码脚本和网页绘制脚本,基于目标视频流,显示界面画面,来实现第二终端解码到界面画面后可以及时对其进行显示的目的,从而,可以降低显示界面画面的延迟。In the embodiment of the present invention, after the server receives the target video stream sent by the first terminal, it does not encapsulate the target video stream, and directly forwards it to the second terminal, so as to avoid the situation that the server buffers the video frame first. Therefore, the delay in acquiring the target video stream by the second terminal can be reduced, and further, the delay in displaying the interface picture can be reduced. In addition, in the embodiment of the present invention, after receiving the target video stream through the second terminal, the web page decoding script and the web page drawing script are used to display the interface picture based on the target video stream, so that after the second terminal decodes the interface picture, the interface picture can be decoded in time. The purpose of its display is to reduce the delay of displaying the interface picture.
图11是本发明实施例提供的一种服务器的结构示意图,该服务器1100可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(central processingunits,CPU)1101和一个或一个以上的存储器1102,其中,所述存储器1102中存储有至少一条指令,所述至少一条指令由所述处理器1101加载并执行以实现上述显示界面画面的方法步骤。FIG. 11 is a schematic structural diagram of a server according to an embodiment of the present invention. The
本发明实施例还提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由处理器加载并执行以实现上述的显示界面画面的方法。An embodiment of the present invention further provides a computer-readable storage medium, where at least one instruction, at least one piece of program, code set or instruction set is stored in the storage medium, the at least one instruction, the at least one piece of program, the at least one piece of program, the The code set or the instruction set is loaded and executed by the processor to implement the above-mentioned method for displaying an interface picture.
本发明实施例中,通过服务器接收到第一终端发送的目标视频流后,不再对目标视频流进行封装,直接将其转发给第二终端,来避免服务器先对视频帧缓存的情况出现,从而,可以降低第二终端获取到目标视频流的延迟,进而,可以降低显示界面画面的延迟。另外,本发明实施例中,通过第二终端接收到目标视频流后,通过网页解码脚本和网页绘制脚本,基于目标视频流,显示界面画面,来实现第二终端解码到界面画面后可以及时对其进行显示的目的,从而,可以降低显示界面画面的延迟。In the embodiment of the present invention, after the server receives the target video stream sent by the first terminal, it does not encapsulate the target video stream, and directly forwards it to the second terminal, so as to avoid the situation that the server buffers the video frame first. Therefore, the delay in acquiring the target video stream by the second terminal can be reduced, and further, the delay in displaying the interface picture can be reduced. In addition, in the embodiment of the present invention, after receiving the target video stream through the second terminal, the web page decoding script and the web page drawing script are used to display the interface picture based on the target video stream, so that after the second terminal decodes the interface picture, the interface picture can be decoded in time. The purpose of its display is to reduce the delay of displaying the interface picture.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk, etc.
以上所述仅为本发明的一个实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above is only an embodiment of the present invention, and is not intended to limit the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention. within.
Claims (13)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810548283.1A CN108833963B (en) | 2018-05-31 | 2018-05-31 | Method, computer device, readable storage medium and system for displaying interface screen |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810548283.1A CN108833963B (en) | 2018-05-31 | 2018-05-31 | Method, computer device, readable storage medium and system for displaying interface screen |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN108833963A CN108833963A (en) | 2018-11-16 |
| CN108833963B true CN108833963B (en) | 2020-12-11 |
Family
ID=64145838
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810548283.1A Active CN108833963B (en) | 2018-05-31 | 2018-05-31 | Method, computer device, readable storage medium and system for displaying interface screen |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN108833963B (en) |
Families Citing this family (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109525899A (en) * | 2018-11-19 | 2019-03-26 | 青岛海信传媒网络技术有限公司 | The method and device that subtitle and audio video synchronization are presented |
| CN109684218A (en) * | 2018-12-26 | 2019-04-26 | 世纪龙信息网络有限责任公司 | Test macro and test method based on cloud prototype |
| CN109600282A (en) * | 2018-12-26 | 2019-04-09 | 世纪龙信息网络有限责任公司 | Test macro and test method based on cloud prototype |
| CN109714628B (en) * | 2018-12-29 | 2021-08-03 | 广州方硅信息技术有限公司 | Method, device, equipment, storage medium and system for playing audio and video |
| CN110368689B (en) * | 2019-07-19 | 2021-08-06 | 腾讯科技(深圳)有限公司 | Game interface display method, system, electronic equipment and storage medium |
| CN110554831B (en) * | 2019-09-06 | 2021-08-10 | 腾讯科技(深圳)有限公司 | Operation synchronization method, device, equipment and storage medium |
| CN112085828B (en) * | 2020-09-18 | 2024-04-26 | 深圳市欢太科技有限公司 | Image processing method and device, cloud real machine system, storage medium and electronic device |
| CN112187959B (en) * | 2020-11-27 | 2021-06-22 | 蘑菇车联信息科技有限公司 | Remote control method and system for vehicle-mounted computer, electronic equipment and storage medium |
| CN112788193A (en) * | 2020-12-30 | 2021-05-11 | 北京达佳互联信息技术有限公司 | Image transmission method, image transmission device, electronic equipment and storage medium |
| CN113485780B (en) * | 2021-07-22 | 2022-04-29 | 辽宁向日葵教育科技有限公司 | Desktop transmission method based on web server |
| CN114356269B (en) * | 2022-01-07 | 2024-07-05 | 中国工商银行股份有限公司 | Screen picture switching method and device, electronic equipment and storage medium |
| CN115988234A (en) * | 2022-12-05 | 2023-04-18 | 中信银行股份有限公司 | Audio and video processing method and system |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102883135A (en) * | 2012-11-01 | 2013-01-16 | 成都飞视美视频技术有限公司 | Screen sharing and control method thereof |
| CN104618435A (en) * | 2014-12-29 | 2015-05-13 | 北京奇虎科技有限公司 | Method for achieving remote desktops and remote desktop management system |
| CN105450463A (en) * | 2014-08-26 | 2016-03-30 | 阿里巴巴集团控股有限公司 | Hardware equipment debugging method, hardware equipment debugging device and hardware equipment debugging system |
| US9621961B1 (en) * | 2014-12-31 | 2017-04-11 | The Directv Group, Inc. | Method and system for controlling a centralized content distribution system with a remote control |
| CN107005547A (en) * | 2014-09-30 | 2017-08-01 | 思杰系统有限公司 | For the system and method for the single-sign-on that the remote desktop session for client computer is performed by middle device |
Family Cites Families (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104506907B (en) * | 2014-11-25 | 2018-03-13 | 上海众应信息科技有限公司 | Interactive operation method and system between control terminal and multiple long-range controlled terminals |
| KR102263369B1 (en) * | 2015-01-13 | 2021-06-11 | 한국전자통신연구원 | System and method for multi-computer control |
| CN106572139B (en) * | 2015-10-13 | 2020-08-11 | 阿里巴巴集团控股有限公司 | Multi-terminal control method, terminal, server and system |
| CN105915527B (en) * | 2016-05-16 | 2019-03-08 | 北京安云世纪科技有限公司 | A method and device for controlling a mobile terminal, and a mobile terminal |
| CN107508849A (en) * | 2016-08-10 | 2017-12-22 | 广东小天才科技有限公司 | Remote control method and system of mobile terminal and mobile terminal |
| US11238290B2 (en) * | 2016-10-26 | 2022-02-01 | Google Llc | Timeline-video relationship processing for alert events |
| CN107071035B (en) * | 2017-04-20 | 2021-03-19 | 北京奇虎科技有限公司 | Mobile terminal remote control method, device and corresponding mobile terminal |
| CN107147656B (en) * | 2017-05-26 | 2021-08-03 | 努比亚技术有限公司 | Method and system for establishing remote control and readable storage medium |
| CN107817962B (en) * | 2017-10-26 | 2021-05-04 | 百度在线网络技术(北京)有限公司 | Remote control method, device, control server and storage medium |
-
2018
- 2018-05-31 CN CN201810548283.1A patent/CN108833963B/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102883135A (en) * | 2012-11-01 | 2013-01-16 | 成都飞视美视频技术有限公司 | Screen sharing and control method thereof |
| CN105450463A (en) * | 2014-08-26 | 2016-03-30 | 阿里巴巴集团控股有限公司 | Hardware equipment debugging method, hardware equipment debugging device and hardware equipment debugging system |
| CN107005547A (en) * | 2014-09-30 | 2017-08-01 | 思杰系统有限公司 | For the system and method for the single-sign-on that the remote desktop session for client computer is performed by middle device |
| CN104618435A (en) * | 2014-12-29 | 2015-05-13 | 北京奇虎科技有限公司 | Method for achieving remote desktops and remote desktop management system |
| US9621961B1 (en) * | 2014-12-31 | 2017-04-11 | The Directv Group, Inc. | Method and system for controlling a centralized content distribution system with a remote control |
Non-Patent Citations (1)
| Title |
|---|
| 《分布式在线真机APP调试系统的设计与实现》;韩雪明;《中国优秀硕士学位论文全文数据库》;20170615;全文 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108833963A (en) | 2018-11-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108833963B (en) | Method, computer device, readable storage medium and system for displaying interface screen | |
| CN110368689B (en) | Game interface display method, system, electronic equipment and storage medium | |
| CN108391171B (en) | Video playback control method, device and terminal | |
| CN108966008B (en) | Live video playback method and device | |
| CN110996117B (en) | Video transcoding method and device, electronic equipment and storage medium | |
| CN112394895A (en) | Cross-equipment display method and device of picture and electronic equipment | |
| CN108093268A (en) | The method and apparatus being broadcast live | |
| CN105900074A (en) | Method and device for screen sharing | |
| CN109413453B (en) | Video playing method, device, terminal and storage medium | |
| CN110121084B (en) | Method, device and system for switching ports | |
| CN110149491B (en) | Video encoding method, video decoding method, terminal and storage medium | |
| CN111010588B (en) | Live broadcast processing method, device, storage medium and device | |
| WO2022105445A1 (en) | Browser-based application screen projection method and related apparatus | |
| CN108616835B (en) | Method, device and system for acquiring network resources based on browser and storage medium | |
| CN110662105A (en) | Animation file generation method and device and storage medium | |
| CN108881286A (en) | Method, terminal, sound-box device and the system of multimedia control | |
| CN112104648A (en) | Data processing method, device, terminal, server and storage medium | |
| CN108769738A (en) | Method for processing video frequency, device, computer equipment and storage medium | |
| CN111510757A (en) | A method, device and system for sharing media data stream | |
| CN109726064B (en) | Method, device and system for simulating abnormal operation of client and storage medium | |
| CN110213308A (en) | A kind of method and device of decoding video data | |
| CN109714628B (en) | Method, device, equipment, storage medium and system for playing audio and video | |
| CN113485596B (en) | Virtual model processing method and device, electronic equipment and storage medium | |
| CN108833970B (en) | Live broadcast recording method and device, computer equipment and storage medium | |
| CN112911337B (en) | Method and device for configuring video cover pictures of terminal equipment |
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 |