Method, device and system for realizing file display, mobile terminal and display terminal

文档序号:1534988 发布日期:2020-02-14 浏览:19次 中文

阅读说明:本技术 文件展示的实现方法、装置、系统、移动终端和显示终端 (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 step 101 in FIG. 2;

FIG. 4 is a flow chart of step 102 of FIG. 2;

FIG. 5 is a flowchart of step 104 of FIG. 2;

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 step 502;

FIG. 9 is another flow chart of step 502;

FIG. 10 is yet another flowchart of step 502;

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 step 601;

FIG. 13 is another flowchart of step 601;

FIG. 14 is yet another flowchart of step 601;

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 step 603;

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 mobile terminal 100 and a display terminal 200 are connected via USB. The mobile terminal may include a mobile terminal such as a mobile phone, a smart phone, a notebook computer, a Digital broadcast receiver, a PDA (Personal Digital Assistant), a PAD (tablet computer), a PMP (portable multimedia Player), a navigation device, and the like. The display terminal may include, for example, a PC (Personal Computer), a PAD (tablet), a notebook, and the like.

As described above, the efficiency of searching and opening files on the mobile terminal on the display terminal 200 is low, and the operation is cumbersome. Some users solve the problem through third-party software, such as pea pods, computer housekeeping, or software intercommunication methods such as WeChat and QQ. However, installing such additional software is itself an additional requirement for the user, increasing operating costs and threshold for the user. The embodiment of the invention provides a method for realizing file display, which enables a user to connect a mobile terminal 100 and a display terminal 200 through a USB (universal serial bus), so that files appointed by the user on the mobile terminal 100 can be displayed, and the complicated searching and traversing processes are reduced.

As shown in fig. 2, the method for implementing file display provided in the embodiment of the present invention includes:

step 101, 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.

As shown in fig. 3, in one embodiment, step 101 includes:

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:

step 301, an application layer of the mobile terminal receives a request for displaying a file, and obtains path information of the file according to the request.

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.

Step 302, the application layer of the mobile terminal sends the path information of the file to a transmission protocol service module of the mobile terminal through a transmission protocol extension interface layer of the mobile terminal.

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).

Step 303, the transport protocol service module of the mobile terminal 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.

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 step 104 includes:

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 104 includes:

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:

step 5011, connecting the mobile terminal with the display terminal through a USB, and sending a driver of a transmission protocol to the display terminal by the mobile 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, ADB protocol, and the like.

Step 502, obtaining 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 displays the file according to the path information of the file.

Including, but not limited to, picture files, video files, audio files, text files, etc.

As shown in fig. 8, step 502 includes:

step 5021, the application layer receives a file display request and acquires the path information of the file according to the request.

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.

Step 5022, the application layer sends the path information of the file to a transmission protocol service module through a transmission protocol extension interface layer.

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:

step 50231, 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.

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:

step 50232, the path information of the file is packaged into a Monitor event package.

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:

step 601, connecting with a mobile terminal through a USB, and establishing a data transmission channel with the mobile terminal.

As shown in fig. 12, in one embodiment, step 601 includes:

step 6011, connecting with the mobile terminal through a USB, and receiving a driver of a transport protocol from the mobile terminal; the driver of the transmission protocol carries the extended application of the transmission protocol;

step 6012, installing the extended application, and starting to monitor the data transmission channel.

As shown in fig. 13, in an embodiment, when the transmission protocol includes at least one of MTP and PTP, step 6012 includes:

step 60121, installing the extended application, and starting to monitor the event packet transmitted by the data transmission channel through a monitoring interface of the extended application registering an event to a transmission protocol service.

As shown in fig. 14, in an embodiment, when the transmission protocol includes an ADB protocol, step 6012 includes:

step 60122, installing the extended application, sending Monitor command to the mobile terminal through the extended application, establishing C/S mode connection with the mobile terminal, and starting monitoring Monitor event package transmitted by the data transmission channel.

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:

step 6021, filtering the event packet carrying the preset identifier by monitoring the event packet transmitted by the data transmission channel, and acquiring the path information of the file from the event packet carrying the preset identifier.

As shown in fig. 16, in an embodiment, when the transmission protocol includes an ADB protocol, the step 602 includes:

step 6022, by monitoring the Monitor event package, obtaining the path information of the file from the Monitor event package.

Step 603, displaying the file according to the path information of the file.

As shown in fig. 17, in an embodiment, the step 603 includes:

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 step 603 includes:

step 6032, copying the file from the mobile terminal to a temporary folder according to the path information of the file;

step 6033, opening a temporary folder where the file is located in the resource manager, and highlighting the file; or open the file through a program associated with the file.

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: step 701, taking a picture by a user; step 702, connecting a display terminal through a USB; step 703, finding the mobile terminal in the display terminal, and opening a folder of the mobile terminal; step 704, the user searches the photos one by one in the catalog; step 705, view or copy after finding. The process is cumbersome and complicated. Moreover, because the USB bandwidth is small, when the photos are browsed in the preview mode, a few minutes are needed for opening a directory of hundreds of photos, and the wanted photos cannot be found without opening the preview.

Using an embodiment of the present invention, as shown in fig. 19(b), includes: step 711, taking a picture by the user; step 712, connecting the display terminal through the USB, and establishing a data transmission channel between the mobile terminal and the display terminal; step 713, the user selects to view the photo at the mobile terminal side; step 714, the mobile terminal automatically sends the path information of the selected photo to the display terminal; in step 715, the display terminal displays the photo (through a browser or an associated program) according to the path information. In the embodiment of the invention, after the mobile terminal is connected with the display terminal, a user can directly and quickly find the photo on the mobile terminal side and open the photo on the display terminal side, so that the waiting time of the user on the display terminal side for several minutes is reduced, the operation is simple and convenient, and the experience of the user on the display terminal can be obviously improved.

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 application layer 801, the MTP server803 is written through the MTP expansion interface layer 802, and then an Event packet is sent to the physical layer 813 of the display terminal side through the USB channel via the physical layer 804, the display terminal is installed with an expanded MTP application (service) 812, and after monitoring the USB channel Event packet, the application layer 811 of the display terminal performs processing, and can perform actions such as opening a file directory defined by the user and highlighting convenience for user copying, or directly opening with an associated program.

In the application layer 801 of the mobile terminal, the application implementing the application example may be an independent application, or may be embedded in an existing application program, such as a photographing application, a recorder application, a file browser application, a picture browser application, and the like, and mainly from the viewpoint that a user can use the application conveniently, the application may transmit file information through the MTP expansion interface layer. For example, after a photo is taken, the photo often appears at a position which is easy to find by a user, after the user opens the photo, the user clicks a menu- > opens the photo at the PC side, and after simple interaction, information of a file currently operated by the user is issued to the MTP service through an interface layer.

The MTP expansion Interface layer 802 is responsible for providing an Application Programming Interface (API) that applies a standard, and may Define an MTP expansion Interface through an aid l (Android Interface definition Language) file, so as to implement a function of displaying a file on a display terminal. An AIDL file defining an MTP expansion interface, android will be compiled into a channel that can be called by BINDER (Standard inter-process communication protocol of android), and the channel can connect the application layer 801 and MTP service process of MTP server 803. In addition to the channel of IPC (inter process Communication) such as bind, the function of the channel can also be realized by a mechanism such as broadcasting, provider, etc. Pathfile is a file path parameter for application layer transport.

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 physical layer 804.

The MTP driver corresponding to the display terminal side also has a corresponding physical layer 813, a transport layer and an application layer 811, the event packet sent before is transmitted to the application layer 811 corresponding to the display terminal side, the MTP extension application 812 corresponding to the display terminal side filters the event packet of the mobile terminal every time the event packet arrives through a listening callback function registered for the event packet, and the filtering algorithm is consistent with the identifier at the time of sending, that is, the event packet with the _ extpagevent _ character string is filtered, and pathfix file is analyzed. And obtaining a relative path of the mobile terminal side according to the PathofFile, combining and opening an absolute path of the file on the display terminal side, and calling methods such as explorer.

The MTP extension application 812 corresponding to the display terminal is a system directory installed in the display terminal when the user installs the self-contained driver of the mobile terminal, and is registered as a service, and is automatically started by default to perform MTP monitoring.

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 application layer 901, and is written into the PTP server903 through the PTP extended interface layer 902, and then sends an Event packet to the physical layer 913 of the display terminal through the USB channel via the physical layer 904, the display terminal is installed with an extended PTP application (service) 912, and after monitoring the USB channel Event packet, the application layer 911 of the display terminal performs processing, and can perform actions such as opening a file directory defined by the user and highlighting the file directory for the user to copy, or directly opening the file directory with a picture browser.

In the application layer 901 of the mobile terminal, the application implementing the application example may be an independent application, or may be embedded in an existing application program, such as a photographing application, a picture browser application, and the like, and mainly from the viewpoint that a user can use the application conveniently, the application may transmit file information through the PTP extended interface layer. For example, after a photo is taken, the photo often appears at a position which is easy to find by a user, after the user opens the photo, the user clicks a menu- > opens the photo at a PC side, and after simple interaction, information of a file currently operated by the user is issued to the PTP service through an interface layer.

The PTP extended interface layer 902 is responsible for providing an API applying a standard, and a PTP extended interface may be defined by an aid l file, so as to realize a function of displaying a file at a display terminal.

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 application layer 901 and the PTPServer 903. Besides the channel of IPC, BINDER, the channel can also be used by broadcast, provider, etc. Pathfile is a file path parameter for application layer transport.

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 physical layer 904 in the middle.

The PTP driver corresponding to the display terminal side also has a corresponding physical layer 913, a transport layer, and an application layer 911, the event packet sent before is transmitted to the application layer 911 on the display terminal side, the PTP extension application 912 on the display terminal side filters the event packet of the mobile terminal each time it arrives through a listening callback function registered to the event packet, the filtering algorithm is consistent with the identifier at the time of sending, that is, the event packet with the _ extpagevent _ character string is filtered, and PathofFile is analyzed. And obtaining a relative path of the mobile terminal side according to the PathofFile, combining and opening an absolute path of the file on the display terminal side, and calling methods such as explorer.

The PTP extended application 912 corresponding to the display terminal is a system directory installed to the display terminal when the user installs the self-contained driver of the mobile terminal, and is registered as a service, and is automatically started by default to perform PTP monitoring.

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 mobile terminal 100 and the display terminal 200, the mobile terminal listens to the request from the display terminal through the ADBD process, the ADB on the display terminal side is a binary applet and can be run through a command line, and after the ADB command is executed, the ADB USB driver and the ADBD process on the mobile terminal can initiate the request, similar to the C/S architecture. Wherein, the mobile terminal side comprises an ADBD server, and the display terminal side comprises an ADB client. The picture is obtained from the mobile terminal through an adb pull command, for example, the A picture can be obtained through Cmdline adb pull/sdcard/pics/A.jpg.

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 application layer 1101, the ADBD1103 is written through the ADB expansion interface layer 1102, and then a Monitor event package is sent to the physical layer 1113 of the display terminal through the USB channel via the physical layer 1104, the display terminal is installed with an expansion ADB application (service) 1112, the adbmonitor can obtain the file name of the user's request, according to the path of the file, the expansion ADB application drags the file to the local temporary folder through an ADB pull command, and the application layer 1111 of the display terminal performs processing, and can execute actions such as opening a file directory defined by the user and highlighting the file for the user to copy, or directly opening the file with an associated program.

In the application layer 1101 of the mobile terminal, the application implementing the application example may be an independent application, or may be embedded in an existing application program, such as a photographing application, a recorder application, a file browser application, a picture browser application, and the like, and mainly from the viewpoint that a user can use the application conveniently, the application may transmit file information through the ADB expansion interface layer. For example, after a photo is taken, the photo often appears at a position that is easy to find by a user, after the user opens the photo, the user clicks a "menu- > opens the photo at the PC side" and other simple interactions, and then information of a file currently operated by the user is issued to the ADBD through the ADB expansion interface layer 1102.

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 application layer 1101 and the ADBD 1103.

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 physical layer 1104.

The ADB Monitor in the display terminal monitors the Monitor event packet, obtains path information through the ADB driver, the USB driver and the physical layer 1113 at the display terminal side, and sends the path information to the extended ADB application (service) 1112, and the ADB application (service) 1112 drags the file to the local temporary folder by using an ADB pull command according to the path information.

The application layer 1111 on the display terminal side opens the temporary folder or directly opens the file by calling an explorer.

The extended ADB application 1112 corresponding to the display terminal is a system directory installed to the display terminal when the user installs the self-contained driver of the mobile terminal, and registers as a service, and automatically starts monitoring a Monitor event packet by default.

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 first establishing module 1201, configured to connect to a display terminal through a universal serial bus USB, and establish a data transmission channel with the display terminal;

the first transmission module 1202 is configured to obtain path information of a file according to a received file display request, and send 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 an embodiment, the first establishing module 1201 is configured to connect with the display terminal through a USB and send a driver of a transport protocol to the display terminal; and the driver of the transmission protocol carries the extended application of the transmission protocol.

As shown in fig. 25, in one embodiment, the first transmission module 1202 includes:

the application layer 12021 is configured to receive a request for file display, acquire path information of the file according to the request, and send the path information of the file to the transport protocol service module 12023 through the transport protocol extension interface layer 12022;

the transport protocol service module 12023 is configured to encapsulate an event packet according to the path information of the file, and send the event packet to the display terminal through the physical layer 12024.

In an embodiment, the transport protocol includes at least one of MTP and PTP, and the transport protocol service module 12023 is configured to encapsulate a preset identifier and path information of the file into the event packet.

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 memory 141, a processor 142, and a computer program 143 stored on the memory 141 and executable on the processor 142, where the processor 142 implements the following steps when executing the program:

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 processor 142 executes the program to perform the following steps:

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 processor 142 executes the program to perform the following steps:

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 processor 142 implements the following steps when executing the program:

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 processor 142 implements the following steps when executing the program:

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 display screen 154, a memory 151, a processor 152, and a computer program 153 stored in the memory 151 and capable of running on the processor 152, where the processor 152 implements the following steps when executing the program:

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 display screen 154 according to the path information of the file.

In one embodiment, the processor 152, when executing the program, performs the following steps:

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 processor 152 executes the program to implement the following steps:

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 processor 152 executes the program to perform the following steps:

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 processor 152 executes the program to implement the following steps:

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 processor 152 executes the program to perform the following steps:

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.

34页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于GPIO管脚实现MIDO从机功能的方法及终端

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!