CN106210867A - A kind of method and apparatus of data sharing - Google Patents

A kind of method and apparatus of data sharing Download PDF

Info

Publication number
CN106210867A
CN106210867A CN201510227418.0A CN201510227418A CN106210867A CN 106210867 A CN106210867 A CN 106210867A CN 201510227418 A CN201510227418 A CN 201510227418A CN 106210867 A CN106210867 A CN 106210867A
Authority
CN
China
Prior art keywords
data
target
target device
equipment
source
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510227418.0A
Other languages
Chinese (zh)
Inventor
杨金锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201510227418.0A priority Critical patent/CN106210867A/en
Priority to PCT/CN2016/079156 priority patent/WO2016177257A1/en
Publication of CN106210867A publication Critical patent/CN106210867A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The method and apparatus that the invention provides a kind of data sharing, for realizing the data sharing of source device to target device, wherein method includes: after source device gets the information of target device, creates buffer queue for described target device;The data that will be shared with described target device are plotted to the buffer queue that described target device is corresponding;By the connection between described target device, transmission stream corresponding for data in described buffer queue is sent to described target device.The present invention is no longer limited to the fixing of screenshotss mode and single sharing, it is possible to the difference meeting user shares demand, such as using window data as treating that sharing data is shared to target device;The most such as, different are treated that sharing data is plotted to the buffer queue created for different target equipment respectively, to share.

Description

Data sharing method and device
[ technical field ] A method for producing a semiconductor device
The invention relates to the technical field of computer application, in particular to a data sharing method and device.
[ background of the invention ]
In many cases, users want to share data quickly between different devices, for example, share video data displayed on a current device to another device quickly. One device that shares data may be referred to as a source device and one device that receives data may be referred to as a target device.
The sharing mode mainly adopted at present is data sharing based on wifi, and in this mode, a source device and a target device establish wifi connection through a wifi discovery mechanism at first, establish sharing Session after capability negotiation is completed, screen capture is performed on a screen of the source device, and a screen capture image obtained after screen capture is sent to the target device through wifi connection for display. However, since the source device can only implement screen capture sharing of screen data (screen data refers to data displayed on a screen of the device), sharing of window data may not be implemented. For example, when multiple windows are displayed on the current screen, only screen shot sharing of the screen between the source device and the target device can be achieved, as shown in fig. 1. The data shared in this way is fixed and single, and cannot meet the diversity sharing requirements of users, for example, a user wants to share data of a certain application window, or a user wants to share different data for different target devices.
[ summary of the invention ]
In view of this, the present invention provides a method and an apparatus for data sharing, which can be used to implement diverse data sharing requirements, such as window data sharing.
The specific technical scheme is as follows:
the invention provides a data sharing method, which comprises the following steps:
after obtaining the information of the target equipment, the source equipment creates a cache queue aiming at the target equipment;
drawing data to be shared to the target equipment to a cache queue corresponding to the target equipment;
and transmitting the transport stream corresponding to the data in the cache queue to the target equipment through the connection with the target equipment.
According to an optional embodiment of the present invention, the acquiring, by the source device, the information of the target device includes:
and when the source equipment establishes the connection with the target equipment, acquiring the information of the target equipment.
According to an optional embodiment of the present invention, creating a buffer queue for the target device comprises:
the source equipment creates a data source MediaSource and creates a buffer queue in the MediaSource; and creating a remote display device remoteddisplaydevice corresponding to the target device;
and taking the BufferQueue as a data source of the RemoteDisplaydevice.
According to an optional embodiment of the invention, the establishing of the connection between the source device and the target device comprises:
the source device broadcasts the IP address and the designated port information of the source device in a local area network, and establishes connection with the target device after monitoring a connection request sent by the target device through the designated port; or,
the source device registers the IP address and the designated port information of the source device to a server, and establishes connection with the target device after receiving a connection request sent by the target device through the designated port, wherein the target device acquires the IP address and the designated port information of the source device from the server; or,
and the source equipment establishes connection with the target equipment through a wifi discovery mechanism.
According to an optional embodiment of the present invention, the drawing, to a cache queue corresponding to the target device, the data to be shared with the target device includes:
transmitting the information of the cache queue created aiming at the target equipment as a parameter to an interface combination module;
and after the interface combination module acquires the data to be shared to the target equipment, drawing the data to be shared to the target equipment to a cache queue corresponding to the target equipment.
According to an optional embodiment of the present invention, the drawing, to a cache queue corresponding to the target device, the data to be shared with the target device includes:
if the data to be shared to the target device is data of a certain window, acquiring the data of the window from a cache corresponding to the window, and drawing the data of the window to a cache queue corresponding to the target device; or,
and if the data to be shared to the target equipment is the data of the screen, acquiring the data of each window from the cache corresponding to each window contained in the screen, and drawing the data of each window to the cache queue corresponding to the target equipment according to the position information of each window on the screen.
According to an alternative embodiment of the invention, the method further comprises:
coding the data in the cache queue to obtain a basic data stream ES;
grouping the ES to form a grouped elementary stream PES;
and repackaging the PES to form a transport stream TS corresponding to the data in the buffer queue.
According to an optional embodiment of the present invention, information of a feedback channel between the source device and the target device is further negotiated in the establishment process of the connection;
the method further comprises the following steps:
the source device receives the transmission stream receiving condition fed back by the target device through the feedback channel;
and adjusting the encoding of the data in the buffer queue corresponding to the target equipment according to the receiving condition of the transmission stream.
According to an optional embodiment of the present invention, the transmission stream receiving condition includes a packet loss rate;
the adjusting the encoding of the data in the buffer queue corresponding to the target device comprises: adjusting the coding mode of the data in the cache queue corresponding to the target equipment; or,
and increasing or decreasing the coding rate of the data in the buffer queue corresponding to the target equipment.
According to an alternative embodiment of the invention, the method further comprises:
and after the connection between the source equipment and the target equipment is disconnected, the source equipment deletes the cache queue corresponding to the target equipment.
According to an optional embodiment of the present invention, the source device is a cloud box, and the target device is a user side set top box.
According to an optional embodiment of the present invention, if the number of the target devices is greater than 1, the data sharing method is respectively executed for each target device.
The invention also provides a data sharing device, which is arranged on the source equipment and comprises:
the cache management module is used for creating a cache queue for the target equipment after the source equipment acquires the information of the target equipment;
the interface combination module is used for drawing the data to be shared to the target equipment to a cache queue corresponding to the target equipment;
and the data transmission module is used for transmitting the transport stream corresponding to the data in the cache queue to the target equipment through the connection between the source equipment and the target equipment.
According to an alternative embodiment of the invention, the device further comprises: and the connection establishing module is used for establishing the connection between the source equipment and the target equipment so as to acquire the information of the target equipment.
According to an optional embodiment of the present invention, when creating a cache queue for the target device, the cache management module specifically performs:
creating a MediaSource, and creating a BufferQueue in the MediaSource; and creating a remoteddisplaydevice corresponding to the target device;
and the interface combination module takes the BufferQueue as a data source of the RemoteDisplaydevice.
According to an optional embodiment of the present invention, the connection establishing module is specifically configured to:
broadcasting the IP address and the designated port information of the source equipment in a local area network, and establishing connection with the target equipment after monitoring a connection request sent by the target equipment through the designated port; or,
registering the IP address and the designated port information of the source equipment to a server, and establishing connection with the target equipment after receiving a connection request sent by the target equipment through the designated port, wherein the target equipment acquires the IP address and the designated port information of the source equipment from the server; or,
and establishing connection with the target equipment through a wifi discovery mechanism.
According to an optional embodiment of the present invention, the cache management module is further configured to transmit information of a cache queue created for the target device as a parameter to the interface combination module;
the interface combination module is specifically configured to draw the data to be shared with the target device to a cache queue corresponding to the target device after the data to be shared with the target device is acquired.
According to an optional embodiment of the present invention, if the data to be shared with the target device is data of a certain window, the interface combination module obtains the data of the window from a cache corresponding to the window, and draws the data of the window to a cache queue corresponding to the target device; or,
and if the data to be shared to the target equipment is the data of the screen, the interface combination module acquires the data of each window from the cache corresponding to each window contained in the screen, and draws the data of each window to the cache queue corresponding to the target equipment according to the position information of each window on the screen.
According to an alternative embodiment of the invention, the device further comprises: the streaming processing module is specifically configured to encode the data in the cache queue to obtain an ES; grouping the ES to form a PES; repackaging the PES to form a TS.
According to an alternative embodiment of the invention, the device further comprises:
a connection establishing module, configured to further negotiate information of a feedback channel between the source device and the target device in a process of establishing the connection;
a feedback receiving module, configured to receive, through the feedback channel, a transport stream receiving status fed back by the target device;
and the streaming processing module is further configured to adjust encoding of data in the buffer queue corresponding to the target device according to the transport stream receiving status.
According to an optional embodiment of the present invention, the transmission stream receiving condition includes a packet loss rate;
the streaming processing module is specifically configured to adjust a coding mode of the data in the buffer queue corresponding to the target device, or increase or decrease a coding rate of the data in the buffer queue corresponding to the target device, when adjusting the coding of the data in the buffer queue corresponding to the target device.
According to an optional embodiment of the present invention, the cache management module is further configured to delete the cache queue corresponding to the target device after the connection between the source device and the target device is disconnected.
According to an optional embodiment of the present invention, the source device is a cloud box, and the target device is a user side set top box.
According to an optional embodiment of the present invention, if the number of the target devices is greater than 1, the cache management module creates a cache queue for each target device.
According to the technical scheme, after the source device acquires the information of the target device, the source device can dynamically create the cache queue aiming at the target device, draw the data to be shared to the target device into the cache queue, and further send the transport stream corresponding to the data in the cache queue to the target device, so that the screen data is not limited to be fixedly and singly shared in a screen capture mode, different sharing requirements of a user can be met, and for example, window data serving as the data to be shared are shared to the target device; for another example, different data to be shared are respectively drawn to cache queues created for different target devices to be shared.
[ description of the drawings ]
FIG. 1 is a diagram illustrating the effect of screen data synchronization implemented in the prior art;
FIG. 2 is a flow chart of a main method provided by the embodiment of the present invention;
fig. 3 is a flowchart of a method for establishing an RTSP service through an IP network according to an embodiment of the present invention;
fig. 4 is a schematic diagram of sharing window data by a source device according to an embodiment of the present invention;
fig. 5 is a schematic diagram illustrating a target device displaying shared window data according to an embodiment of the present invention;
fig. 6 is a schematic diagram of interaction of sharing data according to an embodiment of the present invention;
fig. 7 is a diagram illustrating an apparatus according to an embodiment of the present invention.
[ detailed description ] embodiments
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
Fig. 2 is a flow chart of a main method provided by the embodiment of the present invention, and as shown in fig. 2, the method may include the following steps:
in 201, after acquiring information of a target device, a source device creates a cache queue for the target device.
When the source device wants to share data with the target device, it establishes a connection with the target device, where the established connection may be a connection of a Real Time Streaming Protocol (RTSP) service (hereinafter, referred to as an RTSP connection for short), or a connection of other transport Protocol services such as a HTTP (HyperText Transfer Protocol) service. In the process of establishing the connection, the source device may acquire information of the target device, such as an identifier of the target device, address information, port information, and the like. The source device creates a buffer queue for the target device, and the buffer queue is used for buffering data shared by the corresponding target device.
In addition, when the connection is established, the connection can be established through an IP network or a wifi network. The manner in which the connection is established over the IP network will be described in detail in the following embodiments.
In 202, the source device draws data to be shared with the target device to a cache queue corresponding to the target device.
In this step, information of the cache queue created for the target device may be transmitted to the interface combination module as a parameter, and after the data to be shared with the target device is acquired by the interface combination module, the data to be shared with the target device is drawn to the cache queue corresponding to the target device.
The source device may share data with the target device, including but not limited to the following two cases:
in the first case: the user wants to share data of a certain window in the source device to the target device, for example, the user triggers sharing of the data of the window by clicking a sharing option in the certain window. In this case, the interface combination module may obtain data of the window from the cache corresponding to the window, where each window in the source device has a corresponding cache for storing window data, and the interface combination module finds the cache corresponding to the window according to the window identifier corresponding to the user operation, and obtains data from the cache, where the data is data to be shared with the target device. And then, the interface combination module draws the data of the window to a cache queue corresponding to the target equipment.
In the second case: the user wants to share the data of the screen in the source device to the target device, for example, the user triggers sharing of the data of the window by clicking a sharing option of the screen (the option may appear after clicking a virtual button or a physical button, or appear in a certain menu). In this case, the interface combination module may obtain data of each window from a cache corresponding to each window included in the screen, and draw the data of each window to a cache queue corresponding to the target device according to the position information of each window on the screen. The interface combination module acquires the data of each window from the cache corresponding to the window contained in the screen. In order to ensure that the positions of the windows displayed on the screen by the target device and the source device are consistent, the interface combination module draws the data of the windows to the cache queues corresponding to the target device according to the position information of the windows on the screen.
It should be noted that, besides the manner in which the user operates on the source device to trigger the source device to share data with the target device, other manners, such as a manner in which a control signal is sent to the source device, may also be adopted.
In 203, the data in the buffer queue is streamed.
The data in the buffer queue is usually original data, such as original video data, audio data, text data, and the like, and the original data is encoded to obtain an ES (elementary stream, elementary data stream). Then, the ES is packetized to form PES (elementary stream), which is a data stream formed by processing the ES stream by a PES packetizer, and in this process, operations of packetizing the ES, packetizing the PES, and the like are completed. And finally, repackaging the PES to form a TS (transport stream), wherein the TS is formed by TS packets with fixed length, the TS packets are repackaged to the PES packets, and the packet header information of the PES packets still exists in the TS packets.
In 204, the source device sends the TS obtained after the streaming process to the target device through the connection with the target device.
The steps 202 to 204 are continuously executed in the process of sharing data, so that the TS of the source device can be continuously sent to the target device.
In addition, it should be noted that, in the process of establishing the connection between the source device and the target device, in addition to negotiating the transmission channel of the TS, information of a feedback channel between the source device and the target device may be further negotiated. The target device may feed back the TS reception condition, such as the loss code rate, to the source device through the feedback channel. The source device may adjust the streaming processing of the data in the buffer queue corresponding to the target device according to the TS receiving condition, for example, correspondingly increase or decrease the coding rate of the data.
When the data sharing is finished, the sharing is finished may be triggered by a user operation on the source device or the target device side, for example, if the user of the source device or the target device selects an option of finishing the sharing, the sharing is finished, and the connection between the source device and the target device is disconnected. Or automatically triggering after the shared data is finished, for example, a certain window plays a video, and automatically finishing sharing after the video is played, so as to disconnect the connection between the source device and the target device. Then the connection between the source device and the target device is broken and the source device deletes the cache queue corresponding to the target device in 205.
By the above manner, the source device can share data to a plurality of target devices, only the cache queues need to be respectively created for the target devices, and the data shared to the target devices may be the same or different.
The device to which the invention relates may be a PC (personal computer) device, a laptop, a smartphone, a tablet, a smart tv, a PDA (personal digital assistant) or other computer system. These devices are architecturally composed of basic components, such as a bus, a processing system, a memory system, one or more input/output systems, and a communications interface. A bus may include one or more conductors that enable communication among the various components of the device. Processing systems include various types of processors or microprocessors that execute instructions, process processes, or threads. The storage system may include a dynamic memory such as a Random Access Memory (RAM) for storing dynamic information, a static memory such as a Read Only Memory (ROM) for storing static information, and a mass storage including a magnetic or optical recording medium and a corresponding drive. The input system is used for inputting information to a device by a user, such as a keyboard, a mouse, a stylus, a voice recognition system, a touch screen or a biometric system. The output system includes a display, a printer, speakers, etc., for outputting information. The communication interface is used to enable the device to communicate with other devices. The communication interfaces can be connected to a network through a wired connection, a wireless connection or an optical connection, so that the devices can communicate with each other through the network. The network may include a Local Area Network (LAN), a Wide Area Network (WAN), the internet, etc., or a combination of such networks, etc. The devices each contain operating system software for managing system resources, controlling the operation of other programs, and application software for implementing specific functional modules.
The shared data according to the present invention may be text data, media data such as video, audio, and image, or hypertext data such as HTML data.
The above method is described in detail below by way of a specific example. In this embodiment, taking a connection mode that establishes an RTSP service through an IP network, for example, the slave device 1 shares data with the device 2, as shown in fig. 3, the method may specifically include the following steps:
assuming that the current screen status of the device 1 is the screen status of the source device in fig. 1, and assuming that the user wants to share data of the top window (window 3) to the device 2, the user presents an option of the data sharing function in the menu through some operations (such as long pressing the window), as shown in fig. 4, after selecting the option of "share", the user starts to establish a connection with the target device. In 301, device 1 broadcasts the IP address of device 1 and the information of the designated port for establishing an RTSP connection with the target device by broadcasting within the local area network. After receiving the broadcast, the device 2 in the lan sends a connection request to the device 1, where the connection request includes the IP address and port information of the device 2, and after the device 1 replies a response, the RTSP connection between the device 1 and the device 2 is established through the handshake process.
If device 1 and device 2 are not in the same lan, the above-described broadcast in lan approach is no longer applicable. In this case, the device 1 may register the IP address and the designated port information of the device 1 with the server side. The device 2 as the target device can acquire the IP address and the designated port information registered by the device 1 from the server side. When the device 1 registers to the server, a password can be registered at the same time, the device 2 acquires the IP address and the designated port information registered by the device 1 from the server through the password, and other devices without the password cannot acquire the IP address and the designated port information registered by the device 1. Then, the device 2 sends a connection request to the device 1 through the above IP address and port information, and the device 1 and the device 2 establish an RTSP connection.
Certainly, in this embodiment, an RTSP connection is established in an IP network manner, and the device 1 may also perform an RTSP handshake (negotiate a port number used by both parties to establish the RTSP connection) after establishing a wifi connection with the device 2 through a wifi discovery mechanism, so as to establish the RTSP connection.
In 302, device 1 creates a BufferQueue for device 2.
Taking the android system as an example, the source device may create a MediaSource (data source), and create a bufferQueue in the MediaSource. In addition, a remotepisplaydevice is created, which corresponds to the target device, for example, an IP address and port information used by the target device when establishing an RTSP connection with the source device are bound, information of the BufferQueue is transmitted as a parameter to a surfefringer (interface combination module), the BufferQueue is used as a data source of the remoteplaydevice by the surfefringer, and the surfefringer subsequently writes data shared to the remoteplaydevice onto the BufferQueue. If a plurality of target devices exist, a BufferQueue and a RemoteDisplaydevice are created for each target device, respectively.
It should be noted that the names of the above functions may be changed when applied to other operating systems, but the functions and operations performed are similar.
In 303, the surfefringer obtains data from the cache corresponding to the window according to the window identifier operated by the user, and draws the data to the bufferQueue created in step 302.
The surfaceflinger service, during startup, creates two threads, one for monitoring console events and the other for rendering a UI. When rendering the UI, the surfefinger acquires data from the cache corresponding to each window displayed on the screen and draws the data to the frame buffer of the screen. In the invention, on one hand, the surfefringer can determine the window identifier corresponding to the user sharing operation so as to obtain the data to be shared, and on the other hand, the rendering function of the surfefringer can be multiplexed so that the surfefringer can render the window data to the buffer queue of the remotepisplaydevice, and not only render the window data to the local displayDevice.
If the data to be shared is the data of the screen, if the screen data of the device 1 and the screen data of the device 2 are to be consistent, in addition to the data consistency of each window in the screen, the positions of the windows in the screen also need to be consistent. Under the requirement, the surfefringer needs to draw the bufferQueue according to the position of each window on the screen of the device 1, where the position of each window includes not only the position of the window on the screen plane (such as coordinates and window size), but also the Z-order of each window (the position of each window on the Z axis perpendicular to the screen), and the Z-order of each window represents the coverage relation of each window.
In 304, MediaPull (data pull module) in the device 1 takes out data from BufferQueue and sends the data to Converter (encoder) for encoding, so as to obtain ES; then, a PES packer packs the data to form PES; and the TS encapsulation module encapsulates the PES to form the TS.
In 305, a TS formed after the data in the BufferQueue is streamed is sent to the device 2 corresponding to the remoteddisplaydevice through the RTSP connection.
The remoteddisplaydevice binds an IP address and a port number used by the device 2 and the device 1 when establishing the RTSP connection, and a TS formed after data streaming in the BufferQueue is sent to the IP address and the port number.
The device 2 can receive the TS, and accordingly, the device 2 may perform the inverse of the streaming process, that is, decapsulate the TS to obtain the PES, remove the packet header from the PES to obtain the ES, and decode the ES to obtain the original data for display. In this way, the window data shared by the device 1 can be displayed on the device 2, as shown in fig. 5.
In this embodiment, when device 1 and device 2 establish an RTSP connection in 301, a feedback channel is further negotiated in addition to a channel for transmitting a TS, as shown in fig. 6. The feedback channel is used for the device 2 to periodically feed back the receiving condition of the TS to the device 1, for example, the device 2 periodically feeds back the packet loss rate of the TS to the device 1. The device 1 may adjust streaming processing of data in the buffer queue corresponding to the device 2 according to the receiving condition of the TS. For example, when the packet loss rate fed back by the device 2 exceeds a first threshold, the coding rate of the data is decreased, and when the packet loss rate fed back by the device 2 is lower than a second threshold, the coding rate of the data is increased, wherein the first threshold is greater than the second threshold.
At 306, after the data sharing is finished, the RTSP connection between the device 1 and the device 2 is disconnected, and the device 1 deletes remotesdisplaydevice and MediaSource created for the device 2 and BufferQueue therein.
Fig. 7 is a block diagram of an apparatus according to an embodiment of the present invention, where the apparatus is disposed in a source device, and as shown in fig. 8, the apparatus may include: the buffer management module 01, the interface combination module 02, the streaming processing module 03 and the data transmission module 04 may further include a connection establishment module 05 and a feedback receiving module 06.
After the source device acquires the information of the target device, the cache management module 01 is responsible for creating a cache queue for the target device. The connection establishing module 05 is responsible for establishing a connection between the source device and the target device, so as to obtain the information of the target device.
When the source device wants to share data with the target device, the connection establishing module 05 establishes a connection with the target device, where the established connection may be an RTSP connection or a connection of other transport protocol services such as an HTTP service. In the process of establishing the connection, the source device may acquire information of the target device, such as an identifier of the target device, address information, port information, and the like.
When establishing the connection, the connection establishing module 05 may establish the connection through an IP network or a wifi network.
When establishing connection through an IP network, if a source device and a target device belong to the same lan, the connection establishing module 05 may broadcast an IP address and designated port information of the source device within the lan, and after receiving the broadcast, the target device sends a connection request to the source device, where the connection request carries the IP address and designated port information of the target device, where the designated port is a port for establishing RTSP connection. When the connection establishing module 05 of the source device monitors the connection request sent by the target device through the designated port, the connection establishing module establishes connection with the target device.
If the source device and the target device do not belong to the same local area network, the connection establishing module 05 of the source device may register the IP address and the designated port information of the source device with the server. After acquiring the IP address and the designated port information registered by the source device from the server, the target device may send a connection request to the designated port, where the connection request carries the IP address and the designated port information of the target device. In addition, when the source device registers to the server, a password can be provided, and the target device can acquire the IP address and the designated port information registered by the source device only by providing the same password to the server. When the connection establishing module 05 receives a connection request sent by the target device through the designated port, the connection establishing module establishes connection with the target device.
The interface combination module 02 is responsible for drawing data to be shared to the target device to a cache queue corresponding to the target device.
Specifically, the cache management module 01 transfers information of the cache queue created for the target device as a parameter to the interface combination module 02. After the interface combination module 02 acquires the data to be shared with the target device, the data to be shared with the target device is drawn to a cache queue corresponding to the target device. In the Android system, the interface combination module 02 may be embodied as a surfaceflag, and the creating of the cache queue for the target device is embodied as: creating buffer queue in MediaSource, and creating a remotesdisplaydevice, where the remotesdisplaydevice corresponds to a target device, for example, binding an IP address and port information used by the target device when establishing RTSP connection with a source device. The information of the BufferQueue is used as a parameter to be transmitted to the surfeflinger, the bufferQueue is used as a data source of the RemoteDisplaydevice by the surfeflinger, and the surfeflinger writes the data shared by the RemoteDisplaydevice on the BufferQueue. The names of the above functions may change when applied to other operating systems, but the functions and operations performed are similar.
If the data to be shared with the target device is data of a certain window, the interface combination module 02 may obtain the data of the window from the cache corresponding to the window, and draw the data of the window to the cache queue corresponding to the target device.
If the data to be shared with the target device is the data of the screen, and if the screen data of the device 1 and the device 2 are to be consistent, the positions of the windows in the screen need to be consistent in addition to the data of the windows in the screen, so that the interface combination module 02 may obtain the data of the windows from the cache corresponding to the windows included in the screen, and draw the data of the windows to the cache queue corresponding to the target device according to the position information of the windows on the screen. The position of each window here includes not only the position of the window on the screen plane (such as coordinates and window size), but also the Z-order of each window (the position of each window on the Z-axis perpendicular to the screen), which represents the covering relationship of each window.
The streaming processing module 03 is responsible for streaming processing data in the buffer queue. The method specifically comprises the following steps: encoding data in the cache queue to obtain an ES; grouping the ES to form a PES; the PES is repackaged to form the TS.
The data transmission module 04 is responsible for transmitting the transport stream obtained after the streaming processing to the target device through the connection between the source device and the target device.
Further, the connection establishing module 05 may further negotiate information of a feedback channel between the source device and the target device in the process of establishing the connection between the source device and the target device. The target device may feed back the receiving status of the transport stream through the feedback channel, and the feedback receiving module 06 may receive the receiving status of the transport stream fed back by the target device through the feedback channel. The streaming processing module 03 may adjust streaming processing of data in the buffer queue corresponding to the target device according to the receiving status of the transport stream.
The above-mentioned transmission stream receiving condition may include a packet loss rate, and the streaming processing module 03 may adopt a mode of increasing or decreasing a coding rate of data in a buffer queue corresponding to the target device when adjusting streaming processing of the data in the buffer queue corresponding to the target device. For example, when the packet loss rate fed back by the target device exceeds a first threshold, the coding rate of the data is decreased, and when the packet loss rate fed back by the target device is lower than a second threshold, the coding rate of the data is increased, wherein the first threshold is greater than the second threshold.
After the data sharing is finished, the connection between the source device and the target device is disconnected, and the cache management module 01 deletes the cache queue corresponding to the target device.
The following are some application scenarios to which the present invention is applicable, but the present invention is not limited to the following application scenarios:
1) the data displayed on the mobile devices such as the smart phone and the tablet personal computer are shared to the smart television. In some cases, a user wants to "map" data on a smart phone, such as a video being played, a web page being viewed, and even an application being used, onto a smart tv for display, so that the display screen is larger on one hand, and on the other hand, the smart tv is also suitable for being watched by multiple people at the same time. In such a scene, the smart phone can be used as a source device, the smart television can be used as a destination device, and the screen data or the window data of the smart phone can be shared on the smart television for displaying through the method provided by the invention.
2) The data displayed on the notebook computer, the PC or the smart phone is shared to a plurality of smart phones or tablet computers or notebook computers. Under some conditions, for example, a teleconference, a remote teaching and the like, there is a need to share data on one terminal device to a plurality of terminal devices, and screen data or window data on one terminal device can be shared to a plurality of remote terminal devices by the method provided by the invention.
3) The method is applied to the use scene of the cloud box. The cloud box is actually a network set-top box placed in the cloud, and various kinds of APPs which need to be installed by a user are installed in the cloud box, not in a local set-top box or a local television. The user sends a control signal to the cloud box through the set-top box of the user side, and the cloud box pushes a video signal to the set-top box of the user side in a video stream mode according to the control signal. By the mode provided by the invention, the cloud box can be used as source equipment, the set top box of the user side is used as target equipment, and the RTSP connection is established between the cloud box and the set top box based on the IP network, so that data sharing is realized. Even if the set top box of the user side is configured very crudely and cannot install the corresponding APP, the video data of the APP installed and operated in the cloud box can be shared to the set top box of the user side, and therefore the video data playing of the APP is achieved on the set top box of the user side.
As can be seen from the above description, the method and apparatus provided by the present invention can have the following advantages:
1) according to the method and the device, after the source device obtains the information of the target device, the source device can dynamically create the cache queue aiming at the target device, draw the data to be shared to the target device into the cache queue, and further send the transport stream corresponding to the data in the cache queue to the target device, so that the method and the device are not limited to screen data sharing any more, and window data can be shared to the target device.
2) The invention can realize RTSP connection establishment based on the IP network, thereby realizing data sharing among devices and being not limited to a wifi network any more. And the data sharing based on the IP network in the local area network can be realized, and the data sharing based on the IP network which is not in the same local area network can also be realized.
3) The data sharing method and the device can achieve data sharing aiming at a plurality of target devices, and can achieve sharing of different data aiming at different target devices.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware form, and can also be realized in a form of hardware and a software functional module.
The integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (24)

1. A method for data sharing, the method comprising:
after obtaining the information of the target equipment, the source equipment creates a cache queue aiming at the target equipment;
drawing data to be shared to the target equipment to a cache queue corresponding to the target equipment;
and transmitting the transport stream corresponding to the data in the cache queue to the target equipment through the connection with the target equipment.
2. The method according to claim 1, wherein the obtaining, by the source device, the information of the target device includes:
and when the source equipment establishes the connection with the target equipment, acquiring the information of the target equipment.
3. The method of claim 1, wherein creating a buffer queue for the target device comprises:
the source equipment creates a data source MediaSource and creates a buffer queue in the MediaSource; and creating a remote display device remoteddisplaydevice corresponding to the target device;
and taking the BufferQueue as a data source of the RemoteDisplaydevice.
4. The method of claim 1, wherein the establishing of the connection between the source device and the target device comprises:
the source device broadcasts the IP address and the designated port information of the source device in a local area network, and establishes connection with the target device after monitoring a connection request sent by the target device through the designated port; or,
the source device registers the IP address and the designated port information of the source device to a server, and establishes connection with the target device after receiving a connection request sent by the target device through the designated port, wherein the target device acquires the IP address and the designated port information of the source device from the server; or,
and the source equipment establishes connection with the target equipment through a wifi discovery mechanism.
5. The method of claim 1, wherein the drawing the data to be shared with the target device to a cache queue corresponding to the target device comprises:
transmitting the information of the cache queue created aiming at the target equipment as a parameter to an interface combination module;
and after the interface combination module acquires the data to be shared to the target equipment, drawing the data to be shared to the target equipment to a cache queue corresponding to the target equipment.
6. The method of claim 1, wherein the drawing the data to be shared with the target device to a cache queue corresponding to the target device comprises:
if the data to be shared to the target device is data of a certain window, acquiring the data of the window from a cache corresponding to the window, and drawing the data of the window to a cache queue corresponding to the target device; or,
and if the data to be shared to the target equipment is the data of the screen, acquiring the data of each window from the cache corresponding to each window contained in the screen, and drawing the data of each window to the cache queue corresponding to the target equipment according to the position information of each window on the screen.
7. The method of claim 1, further comprising:
coding the data in the cache queue to obtain a basic data stream ES;
grouping the ES to form a grouped elementary stream PES;
and repackaging the PES to form a transport stream TS corresponding to the data in the buffer queue.
8. The method of claim 7, further negotiating information of a feedback channel between the source device and the target device during the establishment of the connection;
the method further comprises the following steps:
the source device receives the transmission stream receiving condition fed back by the target device through the feedback channel;
and adjusting the encoding of the data in the buffer queue corresponding to the target equipment according to the receiving condition of the transmission stream.
9. The method of claim 8, wherein the transmission stream receiving condition comprises a packet loss rate;
the adjusting the encoding of the data in the buffer queue corresponding to the target device comprises: adjusting the coding mode of the data in the cache queue corresponding to the target equipment; or,
and increasing or decreasing the coding rate of the data in the buffer queue corresponding to the target equipment.
10. The method of claim 1, further comprising:
and after the connection between the source equipment and the target equipment is disconnected, the source equipment deletes the cache queue corresponding to the target equipment.
11. The method of claim 1, wherein the source device is a cloud box and the target device is a user side set top box.
12. The method according to any one of claims 1 to 11, wherein if the number of the target devices is more than 1, the data sharing method is performed separately for each target device.
13. The utility model provides a device of data sharing sets up in source equipment, and its characterized in that, the device includes:
the cache management module is used for creating a cache queue for the target equipment after the source equipment acquires the information of the target equipment;
the interface combination module is used for drawing the data to be shared to the target equipment to a cache queue corresponding to the target equipment;
and the data transmission module is used for transmitting the transport stream corresponding to the data in the cache queue to the target equipment through the connection between the source equipment and the target equipment.
14. The apparatus of claim 13, further comprising: and the connection establishing module is used for establishing the connection between the source equipment and the target equipment so as to acquire the information of the target equipment.
15. The apparatus according to claim 13, wherein the cache management module, when creating the cache queue for the target device, specifically performs:
creating a MediaSource, and creating a BufferQueue in the MediaSource; and creating a remoteddisplaydevice corresponding to the target device;
and the interface combination module takes the BufferQueue as a data source of the RemoteDisplaydevice.
16. The apparatus according to claim 14, wherein the connection establishing module is specifically configured to:
broadcasting the IP address and the designated port information of the source equipment in a local area network, and establishing connection with the target equipment after monitoring a connection request sent by the target equipment through the designated port; or,
registering the IP address and the designated port information of the source equipment to a server, and establishing connection with the target equipment after receiving a connection request sent by the target equipment through the designated port, wherein the target equipment acquires the IP address and the designated port information of the source equipment from the server; or,
and establishing connection with the target equipment through a wifi discovery mechanism.
17. The apparatus according to claim 13, wherein the cache management module is further configured to transmit information of a cache queue created for the target device as a parameter to the interface combination module;
the interface combination module is specifically configured to draw the data to be shared with the target device to a cache queue corresponding to the target device after the data to be shared with the target device is acquired.
18. The apparatus according to claim 13, wherein if the data to be shared with the target device is data of a window, the interface combination module obtains the data of the window from a cache corresponding to the window, and draws the data of the window to a cache queue corresponding to the target device; or,
and if the data to be shared to the target equipment is the data of the screen, the interface combination module acquires the data of each window from the cache corresponding to each window contained in the screen, and draws the data of each window to the cache queue corresponding to the target equipment according to the position information of each window on the screen.
19. The apparatus of claim 13, further comprising: the streaming processing module is specifically configured to encode the data in the cache queue to obtain an ES; grouping the ES to form a PES; repackaging the PES to form a TS.
20. The apparatus of claim 19, further comprising:
a connection establishing module, configured to further negotiate information of a feedback channel between the source device and the target device in a process of establishing the connection;
a feedback receiving module, configured to receive, through the feedback channel, a transport stream receiving status fed back by the target device;
and the streaming processing module is further configured to adjust encoding of data in the buffer queue corresponding to the target device according to the transport stream receiving status.
21. The apparatus of claim 20, wherein the transport stream reception status comprises a packet loss rate;
the streaming processing module is specifically configured to adjust a coding mode of the data in the buffer queue corresponding to the target device, or increase or decrease a coding rate of the data in the buffer queue corresponding to the target device, when adjusting the coding of the data in the buffer queue corresponding to the target device.
22. The apparatus according to claim 13, wherein the cache management module is further configured to delete the cache queue corresponding to the target device after the source device and the target device are disconnected.
23. The apparatus of claim 13, wherein the source device is a cloud box and the target device is a user side set top box.
24. The apparatus according to any one of claims 13 to 23, wherein if the number of the target devices is more than 1, the buffer management module creates a buffer queue for each target device.
CN201510227418.0A 2015-05-06 2015-05-06 A kind of method and apparatus of data sharing Pending CN106210867A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510227418.0A CN106210867A (en) 2015-05-06 2015-05-06 A kind of method and apparatus of data sharing
PCT/CN2016/079156 WO2016177257A1 (en) 2015-05-06 2016-04-13 Data sharing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510227418.0A CN106210867A (en) 2015-05-06 2015-05-06 A kind of method and apparatus of data sharing

Publications (1)

Publication Number Publication Date
CN106210867A true CN106210867A (en) 2016-12-07

Family

ID=57217866

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510227418.0A Pending CN106210867A (en) 2015-05-06 2015-05-06 A kind of method and apparatus of data sharing

Country Status (2)

Country Link
CN (1) CN106210867A (en)
WO (1) WO2016177257A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108259935A (en) * 2016-12-29 2018-07-06 北京酷我科技有限公司 A kind of webpage display system and method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106686755B (en) * 2016-12-06 2019-06-07 厦门中控智慧信息技术有限公司 The binding method and device of mobile terminal and logging apparatus

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1455372A (en) * 2003-05-29 2003-11-12 上海交通大学 Screen sharing and synchronous recording method based on IP network
CN1600023A (en) * 2001-12-06 2005-03-23 皇家飞利浦电子股份有限公司 Streaming content associated with a portion of a TV screen to a companion device
CN102595239A (en) * 2012-02-24 2012-07-18 深圳创维-Rgb电子有限公司 Multi-screen interactive method, device and intelligent television for terminal system
CN102647620A (en) * 2012-03-28 2012-08-22 华为终端有限公司 Method, set-top box, cloud terminal application server and system for realizing cloud terminal business
CN103647727A (en) * 2013-11-29 2014-03-19 福建星网锐捷网络有限公司 Audio and video transmission control method and audio and video transmission control device
CN104090706A (en) * 2014-07-31 2014-10-08 北京智谷睿拓技术服务有限公司 Content obtaining method, content sharing method, content obtaining device and content sharing device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5903269A (en) * 1995-10-10 1999-05-11 Anysoft Ltd. Apparatus for and method of acquiring processing and routing data contained in a GUI window
KR100713511B1 (en) * 2005-10-07 2007-04-30 삼성전자주식회사 Method for performing video communication service in mobile communication terminal
CN100456235C (en) * 2006-12-27 2009-01-28 腾讯科技(深圳)有限公司 Method and system for screen drawing-sectioning in instant messaging
CN101895372B (en) * 2010-06-29 2013-04-03 中国科学院计算技术研究所 Data transmission method in radio link control layer acknowledged mode

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1600023A (en) * 2001-12-06 2005-03-23 皇家飞利浦电子股份有限公司 Streaming content associated with a portion of a TV screen to a companion device
CN1455372A (en) * 2003-05-29 2003-11-12 上海交通大学 Screen sharing and synchronous recording method based on IP network
CN102595239A (en) * 2012-02-24 2012-07-18 深圳创维-Rgb电子有限公司 Multi-screen interactive method, device and intelligent television for terminal system
CN102647620A (en) * 2012-03-28 2012-08-22 华为终端有限公司 Method, set-top box, cloud terminal application server and system for realizing cloud terminal business
CN103647727A (en) * 2013-11-29 2014-03-19 福建星网锐捷网络有限公司 Audio and video transmission control method and audio and video transmission control device
CN104090706A (en) * 2014-07-31 2014-10-08 北京智谷睿拓技术服务有限公司 Content obtaining method, content sharing method, content obtaining device and content sharing device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108259935A (en) * 2016-12-29 2018-07-06 北京酷我科技有限公司 A kind of webpage display system and method
CN108259935B (en) * 2016-12-29 2021-07-09 北京酷我科技有限公司 Webpage display system and method

Also Published As

Publication number Publication date
WO2016177257A1 (en) 2016-11-10

Similar Documents

Publication Publication Date Title
EP3046331B1 (en) Media control method and system based on cloud desktop
US9693080B2 (en) Distribution control system, distribution control method, and computer-readable storage medium
US11936921B2 (en) Method for managing network live streaming data and related apparatus, and device and storage medium
US9294533B2 (en) Distribution control, method and system for changing a parameter of reproduction quality at a communication terminal based on the received transmission delay time information
CN106254951B (en) A kind of net cast creation method and its system, access device, management equipment
US9497492B2 (en) Distribution control system, distribution system, distribution control method, and computer-readable storage medium
US20120287231A1 (en) Media sharing during a video call
EP3996355B1 (en) Method for transferring media stream and user equipment
US9894391B2 (en) Distribution management apparatus, distribution method, and program
US9723337B2 (en) Distribution control system and distribution system
EP2779571B1 (en) Distribution control system, distribution system, distribution control method, and computer-readable storage medium
US9628866B2 (en) Distribution control system and distribution system
US10250665B2 (en) Distribution control system, distribution system, distribution control method, and computer-readable storage medium
US20160044079A1 (en) Distribution control system, distribution control method, and computer-readable storage medium
US9578079B2 (en) Distribution control system, distribution system, distribution control method, and computer-readable storage medium
WO2015176648A1 (en) Method and device for transmitting data in intelligent terminal to television terminal
WO2013034103A1 (en) Wireless network, implementation method thereof, and terminal
US20140280722A1 (en) Distribution control system, distribution system, distribution control method, and computer-readable storage medium
US20140280446A1 (en) Distribution control system, distribution system, distribution control method, and computer-readable storage medium
US20160014193A1 (en) Computer system, distribution control system, distribution control method, and computer-readable storage medium
CN106210867A (en) A kind of method and apparatus of data sharing
RU2648982C2 (en) Wireless docking system for audio-video
US9525901B2 (en) Distribution management apparatus for distributing data content to communication devices, distribution system, and distribution management method
CN113067997B (en) Method and device for real-time video call
GB2561343A (en) Signalling of auxiliary content for a broadcast signal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20161207