Method, device and system for realizing file display, mobile terminal and display terminal
阅读说明:本技术 文件展示的实现方法、装置、系统、移动终端和显示终端 (Method, device and system for realizing file display, mobile terminal and display terminal ) 是由 曾慧鹏 徐源源 于 2018-08-03 设计创作,主要内容包括:本发明实施例公开了一种文件展示的实现方法、装置、系统、移动终端和显示终端,其中,所述方法包括:移动终端与显示终端通过USB连接,建立所述移动终端与所述显示终端之间的数据传输通道;所述移动终端根据接收到的文件展示的请求,获取文件的路径信息,将所述文件的路径信息通过所述数据传输通道发送至所述显示终端;所述显示终端通过监听所述数据传输通道,获取所述文件的路径信息;所述显示终端根据所述文件的路径信息展示所述文件。在本发明实施例中,通过建立移动终端与显示终端之间的数据传输通道,无需用户额外安装第三方软件或在显示终端侧手动搜索文件,即可展示文件,减少了操作复杂度,用户可以随手操作,提升了用户体验。(The embodiment of the invention discloses a method, a device, a system, a mobile terminal and a display terminal for realizing file display, wherein the method comprises the following steps: the method comprises the following steps that a mobile terminal is connected with a display terminal through a USB, and a data transmission channel between the mobile terminal and the display terminal is established; the mobile terminal acquires path information of a file according to a received file display request, and sends the path information of the file to the display terminal through the data transmission channel; the display terminal acquires the path information of the file by monitoring the data transmission channel; and the display terminal displays the file according to the path information of the file. In the embodiment of the invention, the file can be displayed by establishing the data transmission channel between the mobile terminal and the display terminal without additionally installing third-party software or manually searching the file at the display terminal side by a user, so that the operation complexity is reduced, the user can operate at will, and the user experience is improved.)
1. A method for realizing file display is applied to a mobile terminal, and is characterized by comprising the following steps:
the method comprises the following steps of connecting a display terminal through a Universal Serial Bus (USB), and establishing a data transmission channel between the display terminal and the display terminal;
according to the received file display request, obtaining the path information of the file, and sending the path information of the file to the display terminal through the data transmission channel, so that the display terminal displays the file according to the path information of the file.
2. The method of claim 1, wherein establishing a data transmission channel with the display terminal via a USB connection comprises:
the driver is connected with the display terminal through a USB and sends a transmission protocol to the display terminal; and the driver of the transmission protocol carries the extended application of the transmission protocol.
3. The method of claim 1, wherein the obtaining of the path information of the file according to the received request for file presentation and the sending of the path information of the file to the display terminal through the data transmission channel comprises:
an application layer receives a file display request and acquires path information of a file according to the request;
the application layer sends the path information of the file to a transmission protocol service module through a transmission protocol extension interface layer;
and the transmission protocol service module encapsulates an event packet according to the path information of the file and sends the event packet to the display terminal through a physical layer.
4. The method of claim 3, wherein the transport protocol includes at least one of a Media Transfer Protocol (MTP) and a Picture Transfer Protocol (PTP), and the transport protocol service module encapsulates the event packet according to the path information of the file, including:
and packaging a preset identifier and the path information of the file into the event package.
5. The method of claim 3, wherein the transmission protocol comprises an Android Debug Bridge (ADB) protocol, the transmission protocol service module comprises an ADB daemon, and the transmission protocol service module of the mobile terminal encapsulates the event packet according to the path information of the file, comprising:
and packaging the path information of the file into a monitoring event package.
6. A method for realizing file display is applied to a display terminal and is characterized by comprising the following steps:
the method comprises the following steps of connecting a mobile terminal through a Universal Serial Bus (USB), and establishing a data transmission channel with the mobile terminal;
acquiring path information of a file from the mobile terminal by monitoring the data transmission channel;
and displaying the file according to the path information of the file.
7. The method according to claim 6, wherein the establishing a data transmission channel with the mobile terminal through a Universal Serial Bus (USB) connection comprises:
the driver is connected with the mobile terminal through a USB and receives a transmission protocol from the mobile terminal; the driver of the transmission protocol carries the extended application of the transmission protocol;
and installing the extended application, and starting and monitoring the data transmission channel.
8. The method of claim 7, wherein the transmission protocol comprises at least one of a Media Transfer Protocol (MTP) and a Picture Transfer Protocol (PTP), and wherein installing the extended application and initiating listening to the data transmission channel comprises:
and installing the extended application, and starting to monitor the event packet transmitted by the data transmission channel through a monitoring interface for registering an event to a transmission protocol service through the extended application.
9. The method of claim 7, wherein the transport protocol comprises an Android Debug Bridge (ADB) protocol, and wherein installing the extended application and initiating listening to the data transfer channel comprises:
and installing the extended application, sending a monitoring command to the mobile terminal through the extended application, establishing client server mode connection with the mobile terminal, and starting monitoring event packets transmitted by the data transmission channel.
10. The method according to claim 6, wherein the transmission protocol includes at least one of a Media Transfer Protocol (MTP) and a Picture Transfer Protocol (PTP), and the acquiring the path information of the file from the mobile terminal by monitoring the data transmission channel includes:
and filtering the event packets carrying preset identifications by monitoring the event packets transmitted by the data transmission channel, and acquiring the path information of the file from the event packets carrying the preset identifications.
11. The method of claim 6, wherein the transmission protocol comprises an ADB protocol, and wherein the obtaining path information of the file from the mobile terminal by listening to the data transmission channel comprises:
and acquiring the path information of the file from the monitoring event package by monitoring the monitoring event package.
12. The method of claim 6, wherein said presenting the file according to the path information of the file comprises:
opening a folder where the file is located in a resource manager according to the path information of the file, and highlighting the file; or
And opening the file through a program associated with the file according to the path information.
13. The method of claim 6, wherein the transport protocol comprises an ADB protocol, and wherein said exposing the file according to the path information of the file comprises:
copying the file from the mobile terminal to a temporary folder according to the path information of the file;
opening a temporary folder where the file is located in a resource manager, and highlighting the file; or open the file through a program associated with the file.
14. A method for realizing file display is characterized by comprising the following steps:
the method comprises the following steps that a mobile terminal is connected with a display terminal through a Universal Serial Bus (USB), and a data transmission channel between the mobile terminal and the display terminal is established;
the mobile terminal acquires path information of a file according to a received file display request, and sends the path information of the file to the display terminal through the data transmission channel;
the display terminal acquires the path information of the file by monitoring the data transmission channel;
and the display terminal displays the file according to the path information of the file.
15. An apparatus for implementing document display, comprising:
the display device comprises a first establishing module, a second establishing module and a display module, wherein the first establishing module is used for being connected with a display terminal through a Universal Serial Bus (USB) and establishing a data transmission channel between the first establishing module and the display terminal;
the first transmission module is used for acquiring path information of a file according to a received file display request, and sending the path information of the file to the display terminal through the data transmission channel so that the display terminal can display the file according to the path information of the file.
16. An apparatus for implementing document display, comprising:
the second establishing module is used for connecting with a mobile terminal through a Universal Serial Bus (USB) and establishing a data transmission channel with the mobile terminal;
the second transmission module is used for acquiring the path information of the file from the mobile terminal by monitoring the data transmission channel;
and the display module is used for displaying the file according to the path information of the file.
17. A mobile terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program performs the steps of:
the method comprises the following steps of connecting a display terminal through a Universal Serial Bus (USB), and establishing a data transmission channel between the display terminal and the display terminal;
according to the received file display request, obtaining the path information of the file, and sending the path information of the file to the display terminal through the data transmission channel, so that the display terminal displays the file according to the path information of the file.
18. A display terminal comprising a display screen, a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the steps of:
the method comprises the following steps of connecting a mobile terminal through a Universal Serial Bus (USB), and establishing a data transmission channel with the mobile terminal;
acquiring path information of a file from the mobile terminal by monitoring the data transmission channel;
and displaying the file through the display screen according to the path information of the file.
19. A system for implementing file display, comprising the mobile terminal according to claim 16 and the display terminal according to claim 18.
20. A computer-readable storage medium storing computer-executable instructions for performing the method for implementing the file presentation according to any one of claims 1 to 14.
Technical Field
The present application relates to, but not limited to, the field of communications, and in particular, to a method, an apparatus, a system, a mobile terminal, and a display terminal for implementing a document display.
Background
Currently, a mobile terminal adopting the android system uses MTP (Media Transfer Protocol) by default to transmit files such as photos, videos, and audios. For example, when a user wants to copy a photo in the mobile terminal from a computer, the user connects the mobile terminal to the computer through a USB (Universal Serial Bus), opens a browser in the computer, finds a disk corresponding to the mobile terminal, finds a directory corresponding to the photo, finds the photo to be copied, and copies the photo.
However, such an operation is complicated, file searching efficiency is low, and a waiting time is long when a large number of photos are viewed in the preview mode because the USB bandwidth is small. Therefore, from the perspective of user experience, many users feel that copying a picture from a mobile terminal to a computer after taking a picture is a big pain point.
Disclosure of Invention
The embodiment of the invention provides a method, a device and a system for realizing file display, a mobile terminal and a display terminal, so as to reduce fussy operation.
The embodiment of the invention provides a method for realizing file display, which is applied to a mobile terminal and comprises the following steps:
the method comprises the following steps of connecting a display terminal through a Universal Serial Bus (USB), and establishing a data transmission channel between the display terminal and the display terminal;
according to the received file display request, obtaining the path information of the file, and sending the path information of the file to the display terminal through the data transmission channel, so that the display terminal displays the file according to the path information of the file.
The embodiment of the invention also provides a method for realizing file display, which is applied to a display terminal and comprises the following steps:
the method comprises the following steps of connecting a mobile terminal through a Universal Serial Bus (USB), and establishing a data transmission channel with the mobile terminal;
acquiring path information of a file from the mobile terminal by monitoring the data transmission channel;
and displaying the file according to the path information of the file.
The embodiment of the invention also provides a method for realizing file display, which comprises the following steps:
the method comprises the following steps that a mobile terminal is connected with a display terminal through a Universal Serial Bus (USB), and a data transmission channel between the mobile terminal and the display terminal is established;
the mobile terminal acquires path information of a file according to a received file display request, and sends the path information of the file to the display terminal through the data transmission channel;
the display terminal acquires the path information of the file by monitoring the data transmission channel;
and the display terminal displays the file according to the path information of the file.
An embodiment of the present invention further provides an apparatus for implementing file display, including:
the display device comprises a first establishing module, a second establishing module and a display module, wherein the first establishing module is used for being connected with a display terminal through a Universal Serial Bus (USB) and establishing a data transmission channel between the first establishing module and the display terminal;
the first transmission module is used for acquiring path information of a file according to a received file display request, and sending the path information of the file to the display terminal through the data transmission channel so that the display terminal can display the file according to the path information of the file.
An embodiment of the present invention further provides an apparatus for implementing file display, including:
the second establishing module is used for connecting with a mobile terminal through a Universal Serial Bus (USB) and establishing a data transmission channel with the mobile terminal;
the second transmission module is used for acquiring the path information of the file from the mobile terminal by monitoring the data transmission channel;
and the display module is used for displaying the file according to the path information of the file.
The embodiment of the invention also provides a mobile terminal, which comprises a memory, a processor and a computer program which is stored on the memory and can be run on the processor, wherein the processor executes the program to realize the following steps:
the method comprises the following steps of connecting a display terminal through a Universal Serial Bus (USB), and establishing a data transmission channel between the display terminal and the display terminal;
according to the received file display request, obtaining the path information of the file, and sending the path information of the file to the display terminal through the data transmission channel, so that the display terminal displays the file according to the path information of the file.
The embodiment of the invention also provides a display terminal, which comprises a display screen, a memory, a processor and a computer program which is stored on the memory and can be run on the processor, wherein the processor executes the program and realizes the following steps:
the method comprises the following steps of connecting a mobile terminal through a Universal Serial Bus (USB), and establishing a data transmission channel with the mobile terminal;
acquiring path information of a file from the mobile terminal by monitoring the data transmission channel;
and displaying the file through the display screen according to the path information of the file.
The embodiment of the invention also provides a system for realizing the file display, which comprises the mobile terminal and the display terminal.
The embodiment of the invention also provides a computer-readable storage medium, which stores computer-executable instructions, wherein the computer-executable instructions are used for executing the file display implementation method. In the embodiment of the invention, the file can be displayed by establishing the data transmission channel between the mobile terminal and the display terminal without additionally installing third-party software or manually searching the file at the display terminal side by a user, so that the operation complexity is reduced, the user can operate at will, and the user experience is improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the example serve to explain the principles of the invention and not to limit the invention.
FIG. 1 is a system architecture diagram provided by an embodiment of the present invention;
fig. 2 is a flowchart of a method for implementing file display according to an embodiment of the present invention (two sides of a mobile terminal and a display terminal);
FIG. 3 is a flow chart of
FIG. 4 is a flow chart of
FIG. 5 is a flowchart of
fig. 6 is a flowchart of a method for implementing file display (at a mobile terminal) according to an embodiment of the present invention;
fig. 7 is a flowchart of a method for implementing file display according to another embodiment of the present invention (at a mobile terminal);
FIG. 8 is a flow chart of
FIG. 9 is another flow chart of
FIG. 10 is yet another flowchart of
fig. 11 is a flowchart of a method for implementing file display according to an embodiment of the present invention (shown on a terminal side);
FIG. 12 is a flowchart of
FIG. 13 is another flowchart of
FIG. 14 is yet another flowchart of
FIG. 15 is a flowchart of a method for implementing document presentation (shown on the terminal side) according to another embodiment of the present invention;
FIG. 16 is a flowchart of a method for implementing document presentation (shown on the terminal side) according to still another embodiment of the present invention;
FIG. 17 is a flowchart of a method for implementing document presentation (displaying on a terminal side) according to another embodiment of the present invention;
FIG. 18 is a flowchart of
FIG. 19(a) is a flow chart of the present search for photos;
FIG. 19(b) is a flow chart for finding a photo using an embodiment of the present invention;
FIG. 20 is an architecture diagram of application example one;
FIG. 21 is an architecture diagram of application example two;
FIG. 22 is a schematic diagram of a connection using the ADB protocol;
FIG. 23 is an architecture diagram of application example three;
fig. 24 is a schematic diagram of an apparatus for implementing file display (applied to a mobile terminal) provided in an embodiment of the present invention;
FIG. 25 is a schematic diagram of the components of a first transmission module according to an embodiment of the invention;
FIG. 26 is a schematic diagram of the first transmission module according to another embodiment of the invention;
fig. 27 is a schematic diagram of an implementation apparatus for document presentation (applied to a display terminal) according to an embodiment of the present invention;
fig. 28 is a schematic diagram of a mobile terminal according to an embodiment of the present invention;
fig. 29 is a schematic composition diagram of a display terminal according to an embodiment of the present invention.
Detailed Description
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
The steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
Fig. 1 is a system architecture diagram according to an embodiment of the present invention, in which a
As described above, the efficiency of searching and opening files on the mobile terminal on the
As shown in fig. 2, the method for implementing file display provided in the embodiment of the present invention includes:
As shown in fig. 3, in one embodiment,
step 201, the mobile terminal is connected with the display terminal through a USB, and the mobile terminal sends a driver of a transmission protocol to the display terminal; and the driver of the transmission protocol carries the extended application of the transmission protocol.
The data transmission channel transmits data based on the transmission Protocol, and the transmission Protocol may include protocols suitable for USB, such as MTP, PTP (Picture Transfer Protocol), ADB (Android Debug Bridge) Protocol, and the like.
Wherein, PTP is the precursor of MTP, and MTP and PTP in the transmission layer are the same; and the ADB protocol is used for interaction between the android platform PC and the mobile terminal, network connection establishment and the like.
Step 202, the display terminal installs the extended application and starts monitoring the data transmission channel.
The method comprises the steps that a driver of a transmission protocol is installed on a display terminal through a driver installation service of a mobile terminal, the extended application is automatically installed and started as a service, and a user does not need to independently install a third-party application program.
In an embodiment, when the transmission protocol includes MTP and PTP, the step 202 may include:
and the display terminal is provided with the extended application, registers a monitoring interface of an Event (Event) to a transmission protocol service through the extended application and starts monitoring an Event packet transmitted by the data transmission channel.
Wherein, in an embodiment, when the transmission protocol includes an ADB protocol, the step 202 may include:
and the display terminal installs the extended application, sends a Monitor command to the mobile terminal through the extended application, establishes C/S (Client/Server) mode connection with the mobile terminal, and starts monitoring a Monitor event packet transmitted by the data transmission channel.
Wherein, in the C/S mode connection, the mobile terminal is used as a server, and the display terminal is used as a client.
And step 102, the mobile terminal acquires the path information of the file according to the received file display request, and sends the path information of the file to the display terminal through the data transmission channel.
Including, but not limited to, picture files, video files, audio files, text files, etc.
As shown in fig. 4, step 102 may include:
The application layer of the mobile terminal comprises an application program at the mobile terminal side, and provides a User Interface (UI) for User operation, so that a User can select a certain file needing to be pushed to the display terminal.
The user can select the file to be displayed in the menu of the application program, and the application layer of the mobile terminal receives the request for displaying the file from the user and obtains the path information of the file.
The transmission protocol expansion interface layer of the mobile terminal communicates with the lower and transmission protocol service module for the application service of the upper application layer, and transmits the path information of the file from the application layer to the transmission protocol service module.
When the transmission protocol is MTP, the transmission protocol service module may be an MTP server (MTPServer), when the transmission protocol is PTP, the transmission protocol service module may be a PTP server (PTPServer), and when the transmission protocol is ADB protocol, the transmission protocol service module may be ADBD (Android Debug Bridge Daemon).
For example, when the transmission protocol is MTP, MTPServer encapsulates the path information into an event packet through MTP implementation of a standard android system (or other operating systems), and sends the event packet to a transport layer and a physical layer of MTP until the event packet is transmitted to a display terminal side through USB.
In an embodiment, when the transport protocol includes MTP and PTP, the encapsulating, by the transport protocol service module of the mobile terminal, the event packet according to the path information of the file includes:
and packaging a preset identifier and the path information of the file into the event package.
The preset identification can be a designated identification character string, and filtering is convenient to be performed on the display terminal side.
In an embodiment, the transport protocol includes an ADB protocol, the transport protocol service module includes an ADBD, and the transport protocol service module of the mobile terminal encapsulates the event packet according to the path information of the file, including:
and packaging the path information of the file into a Monitor event package.
And 103, the display terminal acquires the path information of the file by monitoring the data transmission channel.
In an embodiment, when the transmission protocol includes MTP and PTP, the display terminal filters the event packet carrying the preset identifier by monitoring the event packet transmitted by the data transmission channel, and acquires the path information of the file from the event packet carrying the preset identifier.
In an embodiment, when the transmission protocol includes an ADB protocol, the event packet includes a Monitor event packet, and the acquiring, by the display terminal, the path information of the file by monitoring the data transmission channel includes:
and the display terminal acquires the path information of the file from the Monitor event package by monitoring the Monitor event package.
And 104, displaying the file by the display terminal according to the path information of the file.
In one embodiment, the
the display terminal opens a folder where the file is located in the resource manager according to the path information of the file, and the file is highlighted; or
And the display terminal opens the file through the program associated with the file according to the path information.
Wherein highlighting the file may include highlighting the file, setting a color of the file to be different from colors of other files, and the like.
Exe may be called to open the resource manager, and the associated program may be opened according to the type of the file in the path information, thereby opening the file. For example, when the file is a picture, the picture can be directly opened by using a picture browser, and when the file is a video, the video can be directly played by using a video player.
And when the transmission protocol comprises MTP and PTP, the display terminal converts the relative path of the file into an absolute path for opening the file at the display terminal side according to the path information.
As shown in fig. 5, in an embodiment, when the transmission protocol includes an ADB protocol,
step 401, the display terminal copies the file from the mobile terminal to a temporary folder of the display terminal according to the path information of the file;
the display terminal can copy the file to a temporary folder of the display terminal by using an adb pull (android debug bridge pull) command.
Step 402, the display terminal opens a temporary folder where the file is located in a resource manager, and highlights the file; or open the file through a program associated with the file.
In the embodiment of the invention, the file can be displayed by establishing the data transmission channel between the mobile terminal and the display terminal without additionally installing third-party software or manually searching the file at the display terminal side by a user, so that the operation complexity is reduced, the user can operate at will, and the user experience is improved.
As shown in fig. 6, for the mobile terminal side, the method for implementing file display provided by the embodiment of the present invention includes:
step 501, connecting with a display terminal through a USB, and establishing a data transmission channel with the display terminal.
In one embodiment, as shown in FIG. 7, step 501 comprises:
The data transmission channel transmits data based on the transmission protocol, and the transmission protocol may include protocols suitable for USB, such as MTP, PTP, ADB protocol, and the like.
Including, but not limited to, picture files, video files, audio files, text files, etc.
As shown in fig. 8,
The application layer of the mobile terminal comprises an application program at the mobile terminal side, and UI is provided for user operation, so that a user can select a certain file needing to be pushed to the display terminal.
The user can select the file to be displayed in the menu of the application program, and the application layer of the mobile terminal receives the request for displaying the file from the user and obtains the path information of the file.
The transmission protocol expansion interface layer of the mobile terminal communicates with the lower and transmission protocol service module for the application service of the upper application layer, and transmits the path information of the file from the application layer to the transmission protocol service module.
When the transmission protocol is MTP, the transmission protocol service module may be an MTP server (MTPServer), when the transmission protocol is PTP, the transmission protocol service module may be a PTP server (PTPServer), and when the transmission protocol is ADB protocol, the transmission protocol service module may be ADBD.
Step 5023, the transport protocol service module encapsulates the event packet according to the path information of the file, and sends the event packet to the display terminal through a physical layer.
For example, when the transmission protocol is MTP, MTPServer encapsulates the path information into an event packet through MTP implementation of a standard android system (or other operating systems), and sends the event packet to a transport layer and a physical layer of MTP until the event packet is transmitted to a display terminal side through USB.
As shown in fig. 9, in an embodiment, the transmission protocol includes at least one of a media transmission protocol MTP and a picture transmission protocol PTP, and step 5023 includes:
The preset identification can be a designated identification character string, and filtering is convenient to be performed on the display terminal side.
As shown in fig. 10, the transport protocol includes an ADB protocol, the transport protocol service module includes an ADBD, and the step 5023 includes:
As shown in fig. 11, for a display terminal side, the method for implementing file display provided in the embodiment of the present invention includes:
As shown in fig. 12, in one embodiment,
As shown in fig. 13, in an embodiment, when the transmission protocol includes at least one of MTP and PTP,
As shown in fig. 14, in an embodiment, when the transmission protocol includes an ADB protocol,
Step 602, obtaining the path information of the file from the mobile terminal by monitoring the data transmission channel.
As shown in fig. 15, in an embodiment, when the transmission protocol includes at least one of MTP and PTP, the step 602 includes:
As shown in fig. 16, in an embodiment, when the transmission protocol includes an ADB protocol, the step 602 includes:
As shown in fig. 17, in an embodiment, the
step 6031, according to the path information of the file, opening a folder where the file is located in the resource manager, and highlighting the file; or
And opening the file through a program associated with the file according to the path information.
As shown in fig. 18, in an embodiment, the transmission protocol includes an ADB protocol, and the
As can be seen from the above description, taking a document as an example of a photo, as shown in fig. 19(a), in the prior art, the method includes:
Using an embodiment of the present invention, as shown in fig. 19(b), includes:
Several application examples are described below.
Application example one, showing files by MTP
As shown in fig. 20, in this application example, when a user selects a file from the mobile terminal and clicks a menu, a request is initiated from the
In the
The MTP
The method comprises the steps that a Path request PathoFile reaches an MTP service process, the MTP service process then transmits PathoFile information to the bottom layer of the MTP through an android framework of the MTP and a JNI (Java Native Interface, Java local Interface, namely a bridge from Java to Native), the MTPServer803 encapsulates the PathoFile information into a standard data structure MtpEventPacket, and an expanded special identification character (namely a preset identification) is added in the process of encapsulating the PathoFile, for example, a special identification character string _ ExtPathEvent is added, so that the filtering on a receiving side is facilitated.
The information packet is sent to the display terminal side through the existing event extension protocol of MTP, and the transmission is realized through the USB driver and the
The MTP driver corresponding to the display terminal side also has a corresponding
The
Application example two, show files through PTP
PTP is similar to MTP, except that PTP can only transmit pictures.
As shown in fig. 21, similar to the application example, when a user selects a photo from the mobile terminal and clicks a menu, a request is initiated from the
In the
The PTP extended
An AIDL file defining a PTP expansion interface, android, is compiled into a channel capable of carrying out BINDER calling, and the channel can connect PTP service processes of the
The method comprises the steps that a Path request is made to reach a PTP service process, the PTP service process then transmits Path information to the bottom layer of the PTP through an android frame of the PTP and a JNI, the PTPServer803 encapsulates the Path information into a standard data structure PtpEventPacket, and in the process of encapsulating Path, an extended special identification character (namely a preset identification) is added, for example, a special identification character string _ ExtPatPasent _ is added, so that filtering is conveniently carried out on a receiving side.
The information packet is sent to the display terminal side through the existing event extension protocol of PTP, and the transmission is realized through the USB driver and the
The PTP driver corresponding to the display terminal side also has a corresponding
The PTP extended
Third application example, the file is shown through the ABD protocol
Besides the realization of USB transmission through MTP/PTP, similar functions can also be realized through the modification of ABD protocol.
As shown in fig. 22, for the ADB USB driver to realize the connection between the
By default, because the ADB has no user interface, only professional debuggers will use the ADB to interact with the mobile terminal through a command line, so the user will not generally obtain pictures in the mobile terminal from the display terminal through the ADB.
The application example realizes transparent file transmission to the user through the improvement of the ADB, and the user can achieve the same user experience as the application example I and the application example II without learning to use the ADB through a command line.
Different from MTP/PTP, ADB can not directly read the files on the mobile terminal side, the files can be dragged to the local temporary folder of the display terminal from the mobile terminal side through ADB pull, and then the corresponding files in the temporary folder are opened through a file system or software.
When the mobile terminal is connected with the display terminal through USB, like MTP/PTP, an ADB driver is automatically installed on the display terminal at the mobile terminal, and the ADB driver carries an extended ADB application (service). The extended ADB application creates a C/S mode connection via Monitor commands and persists until the USB connection is disconnected.
Unlike MTP/PTP, ADB has no event mechanism, so this application instance extends an ADB command adbmitor, which is modified on both sides of ADBD (mobile terminal side) and ABD (display terminal side), and ADBD provides a service interface of the adbmitor, which monitors through C/S mode connection. This C/S mode connection enables the parameters of the request (path information including file name) to be delivered to the ABD side of the display terminal whenever the ADBD of the mobile terminal receives a request from the application layer.
As shown in fig. 23, when a user selects a file from the mobile terminal and clicks a menu, a request is initiated from the
In the
The ADB extension interface layer 1102 is responsible for providing an API applying a standard, and may define an ADB extension interface, through which path information including a file name is transferred between the
The ADBD1103 encapsulates the path information including the file name into a Monitor event packet, and sends the packet to the display terminal side through the ADB driver, the USB driver, and the
The ADB Monitor in the display terminal monitors the Monitor event packet, obtains path information through the ADB driver, the USB driver and the
The
The
As shown in fig. 24, an embodiment of the present invention further provides an apparatus for implementing file display, which is applied to a mobile terminal, and includes:
a
the
In an embodiment, the
As shown in fig. 25, in one embodiment, the
the
the transport
In an embodiment, the transport protocol includes at least one of MTP and PTP, and the transport
As shown in fig. 26, in an embodiment, the transport protocol includes an ADB protocol, and the transport protocol service module includes an ADBD120231, where the ADBD120231 is used to encapsulate the path information of the file into a monitoring event packet.
As shown in fig. 27, an embodiment of the present invention further provides an apparatus for implementing file display, including:
a second establishing module 1301, configured to connect to a mobile terminal through a Universal Serial Bus (USB), and establish a data transmission channel with the mobile terminal;
a second transmission module 1302, configured to obtain path information of a file from the mobile terminal by monitoring the data transmission channel;
and a display module 1303, configured to display the file through a display screen 1304 according to the path information of the file.
In an embodiment, the second establishing module 1301 is configured to connect to the mobile terminal through a USB, and receive a driver of a transport protocol from the mobile terminal; the driver of the transmission protocol carries the extended application of the transmission protocol; and installing the extended application, and starting and monitoring the data transmission channel.
In an embodiment, the transmission protocol includes at least one of a media transfer protocol MTP and a picture transfer protocol PTP, and the second establishing module 1301 is configured to install the extended application, and start monitoring an event packet transmitted by the data transmission channel through a monitoring interface that registers an event to a transmission protocol service through the extended application.
In an embodiment, the transmission protocol includes an ADB protocol, and the second establishing module 1301 is configured to install the extended application, send a Monitor command to the mobile terminal through the extended application, establish a client-server mode connection with the mobile terminal, and start monitoring a Monitor event packet transmitted by the data transmission channel.
In an embodiment, the transmission protocol includes at least one of a media transmission protocol MTP and a picture transmission protocol PTP, and the second transmission module 1302 is configured to filter an event packet carrying a preset identifier by monitoring the event packet transmitted by the data transmission channel, and acquire path information of the file from the event packet carrying the preset identifier.
In an embodiment, the transmission protocol includes an ADB protocol, and the second transmission module 1302 is configured to obtain the path information of the file from the Monitor event packet by monitoring the Monitor event packet.
In an embodiment, the display module 1303 is configured to open a folder in which the file is located in the resource manager according to the path information of the file, and highlight the file; or opening the file through a program associated with the file according to the path information.
In an embodiment, the transmission protocol includes an ADB protocol, and the presentation module 1303 is configured to copy the file from the mobile terminal to a temporary folder according to the path information of the file; opening a temporary folder where the file is located in a resource manager, and highlighting the file; or open the file through a program associated with the file.
As shown in fig. 28, an embodiment of the present invention further provides a mobile terminal, which includes a
the method comprises the following steps of connecting a display terminal through a Universal Serial Bus (USB), and establishing a data transmission channel between the display terminal and the display terminal;
according to the received file display request, obtaining the path information of the file, and sending the path information of the file to the display terminal through the data transmission channel, so that the display terminal displays the file according to the path information of the file.
In one embodiment, the
the driver is connected with the display terminal through a USB and sends a transmission protocol to the display terminal; and the driver of the transmission protocol carries the extended application of the transmission protocol.
In one embodiment, the
an application layer receives a file display request and acquires path information of a file according to the request;
the application layer sends the path information of the file to a transmission protocol service module through a transmission protocol extension interface layer;
and the transmission protocol service module encapsulates an event packet according to the path information of the file and sends the event packet to the display terminal through a physical layer.
In an embodiment, the transmission protocol includes at least one of a media transmission protocol MTP and a picture transmission protocol PTP, and the
and packaging a preset identifier and the path information of the file into the event package.
In one embodiment, the transmission protocol includes an ADB protocol, and the
and packaging the path information of the file into a monitoring event package.
As shown in fig. 29, an embodiment of the present invention further provides a display terminal, which includes a
the method comprises the following steps of connecting a mobile terminal through a Universal Serial Bus (USB), and establishing a data transmission channel with the mobile terminal;
acquiring path information of a file from the mobile terminal by monitoring the data transmission channel;
the file is presented via the
In one embodiment, the
the driver is connected with the mobile terminal through a USB and receives a transmission protocol from the mobile terminal; the driver of the transmission protocol carries the extended application of the transmission protocol;
and installing the extended application, and starting and monitoring the data transmission channel.
In an embodiment, the transmission protocol includes at least one of a media transmission protocol MTP and a picture transmission protocol PTP, and the
and installing the extended application, and starting to monitor the event packet transmitted by the data transmission channel through a monitoring interface for registering an event to a transmission protocol service through the extended application.
In one embodiment, the transmission protocol includes an ADB protocol, and the
and installing the extended application, sending a monitoring command to the mobile terminal through the extended application, establishing client server mode connection with the mobile terminal, and starting monitoring event packets transmitted by the data transmission channel.
In an embodiment, the transmission protocol includes at least one of a media transmission protocol MTP and a picture transmission protocol PTP, and the
and filtering the event packets carrying preset identifications by monitoring the event packets transmitted by the data transmission channel, and acquiring the path information of the file from the event packets carrying the preset identifications.
In one embodiment, the transmission protocol includes an ADB protocol, and the
and acquiring the path information of the file from the monitoring event package by monitoring the monitoring event package.
The embodiment of the invention also provides a system for realizing the file display, which comprises the mobile terminal and the display terminal.
The embodiment of the invention also provides a computer-readable storage medium, which stores computer-executable instructions, wherein the computer-executable instructions are used for executing the file display implementation method.
In this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.