CN109298956B - File transmission method and device and terminal equipment - Google Patents

File transmission method and device and terminal equipment Download PDF

Info

Publication number
CN109298956B
CN109298956B CN201811173512.2A CN201811173512A CN109298956B CN 109298956 B CN109298956 B CN 109298956B CN 201811173512 A CN201811173512 A CN 201811173512A CN 109298956 B CN109298956 B CN 109298956B
Authority
CN
China
Prior art keywords
cut
version information
copy
operating system
operation set
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811173512.2A
Other languages
Chinese (zh)
Other versions
CN109298956A (en
Inventor
彭学锋
潘腾蛟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201811173512.2A priority Critical patent/CN109298956B/en
Publication of CN109298956A publication Critical patent/CN109298956A/en
Application granted granted Critical
Publication of CN109298956B publication Critical patent/CN109298956B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/543User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application is applicable to the technical field of communication, and provides a file transmission method, a file transmission device and terminal equipment, wherein the method comprises the following steps: after establishing connection with a PC terminal, acquiring version information of an operating system of the PC terminal; if the version information of the operating system of the PC end is first specified version information, sending a first operation set to the PC end, wherein the first operation set comprises a copy object and a cut object supported by an MTP protocol, and the first operation set is used for indicating the PC end to execute corresponding copy operation or cut operation according to the copy object or the cut object supported by the MTP protocol. The method can improve the operation success rate of the copying operation and the cutting operation.

Description

File transmission method and device and terminal equipment
Technical Field
The present application belongs to the field of communications technologies, and in particular, to a file transmission method, an apparatus, a terminal device, and a computer-readable storage medium.
Background
Currently, a user usually copies or cuts data stored in a mobile device (such as a mobile phone, a usb disk, etc.) from one folder to another folder of the mobile device through a Personal Computer (PC). The operation of moving or copying files (or folders) to other folders of the mobile device at the PC end is called Multimedia Transfer Protocol (MTP) transfer, which refers to a Protocol published by microsoft for data interaction between a media device and the PC end, and the bottom layer relies on Universal Serial Bus (USB) Protocol.
The existing MTP transmission method is generally a google native flow, and performing a copy or cut operation requires frequent interaction between the mobile device and the PC. And operation failure or data loss may also be caused by the software version installed on the PC side during the operation.
Therefore, it is necessary to provide a new method to solve the above technical problems.
Disclosure of Invention
In view of this, embodiments of the present application provide a file transmission method to solve the problem of operation failure or data loss caused by executing a copy operation or a cut operation in the prior art.
A first aspect of an embodiment of the present application provides a file transfer method, including:
after establishing connection with a PC terminal, acquiring version information of an operating system of the PC terminal;
if the version information of the operating system of the PC end is first specified version information, sending a first operation set to the PC end, wherein the first operation set comprises a copy object and a cut object supported by an MTP protocol, and the first operation set is used for indicating the PC end to execute corresponding copy operation or cut operation according to the copy object or the cut object supported by the MTP protocol.
A second aspect of the embodiments of the present application provides a file transfer method, including:
after a PC end is connected with a mobile device, receiving a first operation set sent by the mobile device, wherein the first operation set comprises a copy object and a cut object supported by an MTP protocol, and the version information of an operating system of the PC end is first appointed version information;
and if the PC end receives the copy instruction or the cut instruction, executing corresponding copy operation or cut operation according to the copy instruction or the cut instruction and the copy object or the cut object supported by the MTP protocol.
A third aspect of the embodiments of the present application provides a file transfer apparatus, where the file transfer apparatus is applied to a mobile device, and the file transfer apparatus includes:
the system comprises an operating system version information acquisition unit, a data processing unit and a data processing unit, wherein the operating system version information acquisition unit is used for acquiring operating system version information of a PC (personal computer) end after establishing connection with the PC end;
a first operation set sending unit, configured to send a first operation set to the PC end if the os version information of the PC end is first specified version information, where the first operation set includes a copy object and a cut object supported by an MTP protocol, and the first operation set is used to instruct the PC end to perform a corresponding copy operation or a corresponding cut operation according to the copy object or the cut object supported by the MTP protocol.
A fourth aspect of the embodiments of the present application provides a file transfer apparatus, where the file transfer apparatus is applied to a PC side, and the file transfer apparatus includes:
a first operation set receiving unit, configured to receive a first operation set sent by a mobile device after a PC end establishes a connection with the mobile device, where the first operation set includes a copy object and a cut object supported by an MTP protocol, and version information of an operating system of the PC end is first specified version information;
and the operation execution unit is used for executing corresponding copy operation or cut operation according to the copy instruction or the cut instruction and the copy object or the cut object supported by the MTP protocol if the PC end receives the copy instruction or the cut instruction.
A fifth aspect of embodiments of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method according to the first aspect or implements the steps of the method according to the second aspect when executing the computer program.
A sixth aspect of embodiments of the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method according to the first aspect or performs the steps of the method according to the second aspect.
Compared with the prior art, the embodiment of the application has the advantages that:
because the operation set comprising the copy object and the cut object is sent to the PC end after the operation set is connected with the PC end, the interaction with the PC end after one operation is executed is avoided, and because the content included in the operation set is related to the version information of the operating system of the PC end, the copy object and the cut object included in the operation set can be ensured to be matched with the version of the operating system of the PC end, thereby improving the operation success rate of the copy operation and the cut operation and reducing the data loss.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a first file transmission method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a second file transmission method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a third file transmission method according to the second embodiment of the present application;
fig. 4 is a schematic structural diagram of a file transfer device according to a third embodiment of the present application;
fig. 5 is a schematic structural diagram of another file transfer device according to a fourth embodiment of the present application;
fig. 6 is a schematic diagram of a terminal device provided in the fifth embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In particular implementations, the mobile terminals described in embodiments of the present application include, but are not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers having touch sensitive surfaces (e.g., touch screen displays and/or touch pads). It should also be understood that in some embodiments, the devices described above are not portable communication devices, but rather are desktop computers having touch-sensitive surfaces (e.g., touch screen displays and/or touch pads).
In the discussion that follows, a mobile terminal that includes a display and a touch-sensitive surface is described. However, it should be understood that the mobile terminal may include one or more other physical user interface devices such as a physical keyboard, mouse, and/or joystick.
The mobile terminal supports various applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a website creation application, a disc burning application, a spreadsheet application, a gaming application, a telephone application, a video conferencing application, an email application, an instant messaging application, an exercise support application, a photo management application, a digital camera application, a web browsing application, a digital music player application, and/or a digital video player application.
Various applications that may be executed on the mobile terminal may use at least one common physical user interface device, such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal can be adjusted and/or changed between applications and/or within respective applications. In this way, a common physical architecture (e.g., touch-sensitive surface) of the terminal can support various applications with user interfaces that are intuitive and transparent to the user.
In addition, in the description of the present application, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
The first embodiment is as follows:
fig. 1 shows a schematic flow chart of a first file transfer method provided in an embodiment of the present application, where the embodiment is mainly described from a mobile device side, where the mobile device includes a mobile phone, a usb disk, and the details are as follows:
step S11, after establishing connection with the PC terminal, obtaining the version information of the operating system of the PC terminal;
in this embodiment, the mobile device establishes a connection with the PC terminal through a USB cable, and after the connection is established, obtains the os version information of the PC terminal, where the os version information includes an os version number and an os name installed in the PC terminal. Of course, if a plurality of operating systems are installed on the PC, the operating system version number, the operating system name, and the like currently in communication with the mobile device are acquired.
Step S12, if the os version information of the PC is the first specified version information, sending a first operation set to the PC, where the first operation set includes a copy object and a cut object supported by the MTP protocol, and the first operation set is used to instruct the PC to execute a corresponding copy operation or a corresponding cut operation according to the copy object or the cut object supported by the MTP protocol.
Wherein the first specified version information includes at least one operating system version information. When the first specified version information comprises a plurality of operating system version information, if the operating system version information of the PC end is the same as any one of the operating system version information, the operating system version information of the PC end is judged to be the first specified version information. Preferably, the first specified version information is a windows 10 version, or a version above windows 10.
In this step, the MTP protocol specifies input parameters and output parameters, and the mobile device further defines a copy object (CopyObject) and a cut object (MoveObject) supported in the MTP protocol specification, so that the PC can perform corresponding copy operation and cut operation according to the input parameters and the output parameters of the MTP protocol specification and the defined copy object and cut object. The input parameters include the following information: data type, source address, output parameters include the following information: a destination address and a storage location.
In the embodiment of the application, after the connection with the PC end is established, the os version information of the PC end is acquired, and if the os version information of the PC end is the first specified version information, a first operation set is sent to the PC end, where the first operation set includes a copy object and a cut object supported by the MTP protocol, and the first operation set is used to instruct the PC end to perform a corresponding copy operation or a corresponding cut operation according to the copy object or the cut object supported by the MTP protocol. Because the operation set comprising the copy object and the cut object is sent to the PC end after the operation set is connected with the PC end, the interaction with the PC end after one operation is executed is avoided, and because the content included in the operation set is related to the version information of the operating system of the PC end, the copy object and the cut object included in the operation set can be ensured to be matched with the version of the operating system of the PC end, thereby improving the operation success rate of the copy operation and the cut operation and reducing the data loss.
Optionally, there are various ways for the mobile device to obtain the os version information of the PC, for example, obtaining the os version information by inputting the os version information of the PC into the mobile device by a user, or sending the os version information by requesting the PC. When sending the acquisition by requesting the PC side, the step S11 includes:
a1, requesting the version information of the operating system at the PC end through the USB protocol;
a2, receiving the version information of the operating system sent by the PC terminal.
In the above-mentioned a1 and a2, when the mobile device establishes a connection with the PC terminal through the USB cable, the mobile device requests the os version information of the PC terminal through the USB protocol, and the PC terminal sends the os version information corresponding to the os currently communicating with the mobile device to the mobile device.
Optionally, if the operating system of the PC includes a customized copy object and a customized cut object, the mobile device sends a priority setting instruction to the PC, where the priority setting instruction is used to instruct the PC to set different priorities for different scenes: when a copy operation or a cut operation between files (or folders) of the mobile device is executed, setting the priority of a copy object and a cut object which are supported by the MTP protocol and comprise the first operation set to be higher than the priority of a self-defined copy object and a cut object which are contained in an operating system at the PC end; when the copy operation or the cut operation between the files (or the folders) of the PC end is executed, the priority of the copy object and the cut object which are set to be supported by the MTP protocol and comprise the first operation set is lower than the priority of the self-defined copy object and the cut object which are set to be supported by the operating system of the PC end. By setting different priorities for different scenes, the successful execution of the copy operation and the cut operation of the corresponding scene can be ensured.
Fig. 2 shows a schematic flowchart of a second file transmission method provided in an embodiment of the present application, and in fig. 2, the file transmission method further includes:
step S13, if the os version information of the PC is the second specified version information, sending a second operation set to the PC, where the second operation set includes an android native copy object and a native cut object, the native copy object and the native cut object are different from the copy object and the cut object supported by the MTP protocol, and the second operation set instructs the PC to execute a corresponding copy operation or a cut operation according to the native copy object and the native cut object.
Wherein the second specified version information includes at least one operating system version information.
Preferably, the second specified version information is a windows 7 version, or a version below windows 7 or an operating system version corresponding to other non-first specified version information.
Optionally, since the acquired version information of the operating system of the PC may be erroneous, at this time, the copy operation or the cut operation may be unsuccessful, in order to improve the success rate of the copy operation or the cut operation, the file transfer method further includes:
receiving feedback information which comprises operation failure and is sent by the PC end, prompting a user to input the version information of the operating system of the PC end, and taking the version information of the operating system of the PC end input by the user as the acquired version information of the operating system of the PC end.
In this step, if the PC fails to perform the copy operation or the cut operation, sending feedback information including the operation failure to the mobile device, the mobile device prompting the user to input the os version information of the PC, and after the user inputs the related information, taking the related information input by the user as the acquired os version information of the PC. Because the operating system version information is input by the user, the accuracy of the operating system version information of the PC side acquired by the mobile equipment can be ensured.
Example two:
fig. 3 shows a flowchart of a third file transfer method provided in the second embodiment of the present application, which is mainly described from the PC side, and is detailed as follows:
step S31, after the PC end establishes connection with the mobile device, receiving a first operation set sent by the mobile device, wherein the first operation set comprises a copy object and a cut object supported by the MTP protocol, and the version information of the operating system of the PC end is first appointed version information;
the os version information here includes the os version number installed on the PC side, the os name, and the like.
Wherein the first specified version information includes at least one operating system version information. Preferably, the first specified version information is a windows 10 version, or a version above windows 10.
Step S32, if the PC receives the copy instruction or the cut instruction, execute a corresponding copy operation or a cut operation according to the copy instruction or the cut instruction and the copy object or the cut object supported by the MTP protocol.
In this step, the PC copies or cuts the file (or folder) of the mobile device to a corresponding location according to the copy instruction or the cut instruction and the copy object or the cut object supported by the MTP protocol.
Optionally, if the mobile device obtains the os version information of the PC terminal by requesting the PC terminal to send the os version information, before receiving the first operation set sent by the mobile device, the method includes:
b1, receiving a request sent by the mobile equipment through the USB protocol;
and B2, sending the operating system version information to the mobile equipment.
In the above-mentioned B1 and B2, when the mobile device establishes a connection with the PC terminal through the USB cable, the PC terminal sends the os version information corresponding to the os currently communicating with the mobile device to the mobile device.
Optionally, if the operating system of the PC end includes a customized copy object and a customized cut object, the PC end receives a priority setting instruction sent by the mobile device, where the priority setting instruction is used to instruct the PC end to set different priorities for different scenes: when a copy operation or a cut operation between files (or folders) of the mobile device is executed, setting the priority of a copy object and a cut object which are supported by the MTP protocol and comprise the first operation set to be higher than the priority of a self-defined copy object and a cut object which are contained in an operating system at the PC end; when the copy operation or the cut operation between the files (or the folders) of the PC end is executed, the priority of the copy object and the cut object which are set to be supported by the MTP protocol and comprise the first operation set is lower than the priority of the self-defined copy object and the cut object which are set to be supported by the operating system of the PC end. By setting different priorities for different scenes, the successful execution of the copy operation and the cut operation of the corresponding scene can be ensured.
Optionally, the file transfer method further includes:
c1, if the version information of the operating system at the PC end is the second specified version information, receiving a second operation set sent by the mobile device, where the second operation set includes an android native copy object and a native cut object, and the native copy object and the native cut object are different from those supported by the MTP protocol;
and C2, if the PC end receives a copy instruction or a cut instruction, executing corresponding copy operation or cut operation according to the copy instruction or the cut instruction and the android native copy object and the native cut object.
Wherein the second specified version information includes at least one operating system version information.
Preferably, the second specified version information is a windows 7 version, or a version below windows 7 or an operating system version corresponding to other non-first specified version information.
Optionally, if the copy operation or the cut operation fails, sending feedback information including the operation failure to the mobile device.
Specifically, after receiving the feedback information, the mobile device prompts the user to input the version information of the operating system at the PC terminal.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Example three:
corresponding to the embodiment, fig. 4 shows a schematic structural diagram of a file transmission apparatus provided in the third embodiment of the present application, where the file transmission apparatus is applied to a mobile device, and for convenience of description, only the parts related to the embodiment are shown:
the document transfer apparatus 4 includes: an operating system version information acquisition unit 41 and a first operation set transmission unit 42. Wherein:
an operating system version information obtaining unit 41, configured to obtain operating system version information of a PC end after establishing a connection with the PC end;
the os version information here includes the os version number installed on the PC side, the os name, and the like. Of course, if a plurality of operating systems are installed on the PC, the operating system version number, the operating system name, and the like currently in communication with the mobile device are acquired.
A first operation set sending unit 42, configured to send a first operation set to the PC end if the os version information of the PC end is first specified version information, where the first operation set includes a copy object and a cut object supported by an MTP protocol, and the first operation set is used to instruct the PC end to perform a corresponding copy operation or cut operation according to the copy object or the cut object supported by the MTP protocol.
Wherein the first specified version information includes at least one operating system version information.
Preferably, the first specified version information is a windows 10 version, or a version above windows 10.
In the embodiment of the application, after the operation set is connected with the PC end, the operation set comprising the copy object and the cut object is sent to the PC end, so that interaction with the PC end after one operation is executed is avoided, and the content included in the operation set is related to the version information of the operating system of the PC end, so that the copy object and the cut object included in the operation set can be ensured to be matched with the version of the operating system of the PC end, the operation success rate of the copy operation and the cut operation is improved, and data loss is reduced.
Optionally, the file transfer apparatus 4 further includes:
a second operation set sending unit, configured to send a second operation set to the PC end if the os version information of the PC end is a second specified version information, where the second operation set includes an android native copy object and a native cut object, the native copy object and the native cut object are different from the copy object and the cut object supported by the MTP protocol, and the second operation set instructs the PC end to perform a corresponding copy operation or a cut operation according to the native copy object and the native cut object.
Wherein the second specified version information includes at least one operating system version information.
Preferably, the second specified version information is a windows 7 version, or a version below windows 7 or an operating system version corresponding to other non-first specified version information.
Optionally, the operating system version information obtaining unit 41 includes:
the operating system version information module is used for requesting the operating system version information of the PC terminal through the USB protocol;
and the operating system version information receiving module is used for receiving the operating system version information sent by the PC terminal.
Optionally, the file transfer apparatus 4 further includes:
a priority indication sending unit, configured to send a priority setting indication to the PC end if an operating system of the PC end includes a customized copy object and a customized cut object, where the priority setting indication is used to indicate the PC end to set different priorities for different scenes: when a copy operation or a cut operation between files (or folders) of the mobile device is executed, setting the priority of a copy object and a cut object which are supported by the MTP protocol and comprise the first operation set to be higher than the priority of a self-defined copy object and a cut object which are contained in an operating system at the PC end; when the copy operation or the cut operation between the files (or the folders) of the PC end is executed, the priority of the copy object and the cut object which are set to be supported by the MTP protocol and comprise the first operation set is lower than the priority of the self-defined copy object and the cut object which are set to be supported by the operating system of the PC end.
Optionally, the file transfer apparatus 4 further includes:
and the feedback information receiving unit is used for receiving feedback information which comprises operation failure and is sent by the PC terminal, prompting a user to input the operating system version information of the PC terminal, and taking the operating system version information of the PC terminal input by the user as the acquired operating system version information of the PC terminal.
Example four:
corresponding to the embodiment, fig. 5 shows a schematic structural diagram of another file transmission device provided in the fourth embodiment of the present application, where the file transmission device is applied to a PC, and for convenience of description, only the parts related to this embodiment are shown:
the other file transfer device 5 includes: a first operation set receiving unit 51 and an operation performing unit 52.
A first operation set receiving unit 51, configured to receive a first operation set sent by a mobile device after a PC end establishes a connection with the mobile device, where the first operation set includes a copy object and a cut object supported by an MTP protocol, and version information of an operating system of the PC end is first specified version information;
the os version information here includes the os version number installed on the PC side, the os name, and the like.
Wherein the first specified version information includes at least one operating system version information. Preferably, the first specified version information is a windows 10 version, or a version above windows 10.
An operation executing unit 52, configured to, if the PC receives the copy instruction or the cut instruction, execute a corresponding copy operation or a corresponding cut operation according to the copy instruction or the cut instruction and the copy object or the cut object supported by the MTP protocol.
Optionally, if the mobile device obtains the os version information of the PC by requesting the PC to send the os version information, before receiving the first operation set sent by the mobile device, the first operation set receiving unit 51 includes:
the request receiving module is used for receiving a request sent by the mobile equipment through a USB protocol;
and the operating system version information sending module is used for sending the operating system version information to the mobile equipment.
Alternatively, if the operating system of the PC includes a custom copy object and a cut object, the another file transfer device 5 includes:
a priority setting indication receiving unit, configured to receive a priority setting indication sent by the mobile device, where the priority setting indication is used to instruct the PC to set different priorities for different scenes: when a copy operation or a cut operation between files (or folders) of the mobile device is executed, setting the priority of a copy object and a cut object which are supported by the MTP protocol and comprise the first operation set to be higher than the priority of a self-defined copy object and a cut object which are contained in an operating system at the PC end; when the copy operation or the cut operation between the files (or the folders) of the PC end is executed, the priority of the copy object and the cut object which are set to be supported by the MTP protocol and comprise the first operation set is lower than the priority of the self-defined copy object and the cut object which are set to be supported by the operating system of the PC end. By setting different priorities for different scenes, the successful execution of the copy operation and the cut operation of the corresponding scene can be ensured.
Optionally, the another file transfer device 5 includes:
a second operation set receiving unit, configured to receive a second operation set sent by the mobile device if the version information of the operating system at the PC end is second specified version information, where the second operation set includes an android native copy object and a native cut object, and the native copy object and the native cut object are different from the copy object and the cut object supported by the MTP protocol;
and the operation execution unit is used for executing corresponding copying operation or cutting operation according to the copying instruction or the cutting instruction and the android native copying object and the native cutting object if the PC end receives the copying instruction or the cutting instruction.
Wherein the second specified version information includes at least one operating system version information.
Preferably, the second specified version information is a windows 7 version, or a version below windows 7 or an operating system version corresponding to other non-first specified version information.
Optionally, the another file transfer device 5 includes:
and the feedback information sending unit is used for sending feedback information comprising operation failure to the mobile equipment if the copy operation or the cut operation fails.
Example five:
fig. 6 is a schematic diagram of a terminal device according to an embodiment of the present application. As shown in fig. 6, the terminal device 6 of this embodiment includes: a processor 60, a memory 61 and a computer program 62 stored in said memory 61 and executable on said processor 60. The processor 60, when executing the computer program 62, implements the steps in the various file transfer method embodiments described above, such as steps S11-S12 shown in fig. 1, or steps S31-S32 shown in fig. 3. Alternatively, the processor 60, when executing the computer program 62, implements the functions of the modules/units in the device embodiments described above, such as the functions of the modules 41 to 42 shown in fig. 4, or such as the functions of the modules 51 to 52 shown in fig. 5.
Illustratively, the computer program 62 may be partitioned into one or more modules/units that are stored in the memory 61 and executed by the processor 60 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 62 in the terminal device 6. For example, the computer program 62 may be divided into an os version information obtaining unit and a first operation set sending unit, and each unit has the following specific functions:
the system comprises an operating system version information acquisition unit, a data processing unit and a data processing unit, wherein the operating system version information acquisition unit is used for acquiring operating system version information of a PC (personal computer) end after establishing connection with the PC end;
a first operation set sending unit, configured to send a first operation set to the PC end if the os version information of the PC end is first specified version information, where the first operation set includes a copy object and a cut object supported by an MTP protocol, and the first operation set is used to instruct the PC end to perform a corresponding copy operation or a corresponding cut operation according to the copy object or the cut object supported by the MTP protocol.
Alternatively, for example, the computer program 62 may be divided into a first operation set receiving unit and an operation executing unit, and the specific functions of each unit are as follows:
a first operation set receiving unit, configured to receive a first operation set sent by a mobile device after a PC end establishes a connection with the mobile device, where the first operation set includes a copy object and a cut object supported by an MTP protocol, and version information of an operating system of the PC end is first specified version information;
and the operation execution unit is used for executing corresponding copy operation or cut operation according to the copy instruction or the cut instruction and the copy object or the cut object supported by the MTP protocol if the PC end receives the copy instruction or the cut instruction.
The terminal device 6 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 60, a memory 61. Those skilled in the art will appreciate that fig. 6 is merely an example of a terminal device 6 and does not constitute a limitation of terminal device 6 and may include more or less components than those shown, or some components in combination, or different components, for example, the terminal device may also include input output devices, network access devices, buses, etc.
The Processor 60 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 61 may be an internal storage unit of the terminal device 6, such as a hard disk or a memory of the terminal device 6. The memory 61 may also be an external storage device of the terminal device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the terminal device 6. The memory 61 is used for storing the computer program and other programs and data required by the terminal device. The memory 61 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method for file transfer, comprising:
after establishing connection with a PC terminal, acquiring version information of an operating system of the PC terminal;
if the version information of the operating system of the PC terminal is first appointed version information, sending a first operation set to the PC terminal, wherein the first operation set comprises: the method comprises the following steps of defining a copy object and a cut object supported by an MTP protocol in advance according to input parameters and output parameters of the MTP protocol specification, wherein the input parameters comprise the following information: data type and source address, the output parameters including the following information: a destination address and a storage location; the first operation set is used for instructing the PC end to execute corresponding copy operation or cut operation according to the copy object or cut object supported by the MTP protocol.
2. The file transfer method according to claim 1, wherein the file transfer method further comprises:
if the version information of the operating system of the PC end is second specified version information, sending a second operation set to the PC end, wherein the second operation set comprises an android native copy object and a native cut object, the native copy object and the native cut object are different from those supported by the MTP protocol, and the second operation set instructs the PC end to execute corresponding copy operation or cut operation according to the native copy object and the native cut object.
3. The file transfer method according to claim 1, wherein the obtaining of the os version information of the PC terminal comprises:
requesting the version information of the operating system of the PC terminal through a USB protocol;
and receiving the version information of the operating system sent by the PC terminal.
4. The file transfer method according to claim 2, wherein the file transfer method further comprises:
receiving feedback information which comprises operation failure and is sent by the PC end, prompting a user to input the version information of the operating system of the PC end, and taking the version information of the operating system of the PC end input by the user as the acquired version information of the operating system of the PC end.
5. A method for file transfer, comprising:
after establishing connection between a PC (personal computer) end and a mobile device, receiving a first operation set sent by the mobile device, wherein the first operation set comprises: the method comprises the following steps of defining a copy object and a cut object supported by an MTP protocol in advance according to input parameters and output parameters of the MTP protocol specification, wherein the input parameters comprise the following information: data type and source address, the output parameters including the following information: a destination address and a storage location; the version information of the operating system of the PC terminal is first appointed version information;
and if the PC end receives the copy instruction or the cut instruction, executing corresponding copy operation or cut operation according to the copy instruction or the cut instruction and the copy object or the cut object supported by the MTP protocol.
6. The file transfer method according to claim 5, wherein the file transfer method further comprises:
if the version information of the operating system of the PC end is second specified version information, receiving a second operation set sent by the mobile equipment, wherein the second operation set comprises android native copy objects and native cut objects, and the native copy objects and the native cut objects are different from the copy objects and the cut objects supported by the MTP protocol;
and if the PC end receives a copy instruction or a cut instruction, executing corresponding copy operation or cut operation according to the copy instruction or the cut instruction and the android native copy object and the native cut object.
7. A file transmission device applied to a mobile device is characterized by comprising:
the system comprises an operating system version information acquisition unit, a data processing unit and a data processing unit, wherein the operating system version information acquisition unit is used for acquiring operating system version information of a PC (personal computer) end after establishing connection with the PC end;
a first operation set sending unit, configured to send a first operation set to the PC end if the os version information of the PC end is first specified version information, where the first operation set includes: the method comprises the following steps of defining a copy object and a cut object supported by an MTP protocol in advance according to input parameters and output parameters of the MTP protocol specification, wherein the input parameters comprise the following information: data type and source address, the output parameters including the following information: a destination address and a storage location; the first operation set is used for instructing the PC end to execute corresponding copy operation or cut operation according to the copy object or cut object supported by the MTP protocol.
8. A file transmission device applied to a PC (personal computer) end is characterized by comprising:
a first operation set receiving unit, configured to receive a first operation set sent by a mobile device after a PC establishes a connection with the mobile device, where the first operation set includes: the method comprises the following steps of defining a copy object and a cut object supported by an MTP protocol in advance according to input parameters and output parameters of the MTP protocol specification, wherein the input parameters comprise the following information: data type and source address, the output parameters including the following information: a destination address and a storage location; the version information of the operating system of the PC terminal is first appointed version information;
and the operation execution unit is used for executing corresponding copy operation or cut operation according to the copy instruction or the cut instruction and the copy object or the cut object supported by the MTP protocol if the PC end receives the copy instruction or the cut instruction.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 4 or implements the steps of the method according to any one of claims 5 or 6 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 4, or carries out the steps of the method according to any one of claims 5 or 6.
CN201811173512.2A 2018-10-09 2018-10-09 File transmission method and device and terminal equipment Active CN109298956B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811173512.2A CN109298956B (en) 2018-10-09 2018-10-09 File transmission method and device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811173512.2A CN109298956B (en) 2018-10-09 2018-10-09 File transmission method and device and terminal equipment

Publications (2)

Publication Number Publication Date
CN109298956A CN109298956A (en) 2019-02-01
CN109298956B true CN109298956B (en) 2020-07-28

Family

ID=65161931

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811173512.2A Active CN109298956B (en) 2018-10-09 2018-10-09 File transmission method and device and terminal equipment

Country Status (1)

Country Link
CN (1) CN109298956B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112052029B (en) * 2020-08-20 2022-08-12 厦门亿联网络技术股份有限公司 Configuration method and system of USB device management software and computer device
CN114172897B (en) * 2021-12-09 2023-08-25 西安邮电大学 Method and system for transmitting files of PC (personal computer) end and Android end

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1912867A (en) * 2005-08-08 2007-02-14 扬智科技股份有限公司 Dynamic switchover method and device of MTP protocol and MSC mode of portable multimedia device
CN101589592A (en) * 2006-02-27 2009-11-25 微软公司 Multi-protocol removable storage device
CN108268330A (en) * 2018-01-16 2018-07-10 深圳市天珑移动技术有限公司 Document transmission method, mobile terminal and computer readable storage medium
CN108536626A (en) * 2018-03-28 2018-09-14 深圳市四季宏胜科技有限公司 Channel bridging method, bridging device, computer equipment and computer program product

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1912867A (en) * 2005-08-08 2007-02-14 扬智科技股份有限公司 Dynamic switchover method and device of MTP protocol and MSC mode of portable multimedia device
CN101589592A (en) * 2006-02-27 2009-11-25 微软公司 Multi-protocol removable storage device
CN108268330A (en) * 2018-01-16 2018-07-10 深圳市天珑移动技术有限公司 Document transmission method, mobile terminal and computer readable storage medium
CN108536626A (en) * 2018-03-28 2018-09-14 深圳市四季宏胜科技有限公司 Channel bridging method, bridging device, computer equipment and computer program product

Also Published As

Publication number Publication date
CN109298956A (en) 2019-02-01

Similar Documents

Publication Publication Date Title
US10742694B2 (en) Method for migrating data and terminal
CN108900770B (en) Method and device for controlling rotation of camera, smart watch and mobile terminal
CN108038112B (en) File processing method, mobile terminal and computer readable storage medium
CN108427649B (en) Access management method, terminal device, system and storage medium of USB interface
CN110225104B (en) Data acquisition method and device and terminal equipment
CN110286768B (en) Virtual object display method, terminal device and computer-readable storage medium
US20130318262A1 (en) Data Transmission Method and Apparatus
US9335862B1 (en) Virtual multi-device navigation in surface computing system
US11209951B2 (en) Method and apparatus for displaying application program, terminal device, and storage medium
CN109298956B (en) File transmission method and device and terminal equipment
CN110244963B (en) Data updating method and device and terminal equipment
CN109271266B (en) File transmission method and device and terminal equipment
CN105279164B (en) File processing method and device based on IOS (input/output system)
CN107679222B (en) Picture processing method, mobile terminal and computer readable storage medium
CN106775835B (en) Method, server and terminal for acquiring upgrade file
CN111756618B (en) Group chat processing method and device, electronic equipment and readable storage medium
CN109104481B (en) File integrity detection method, file integrity detection device and terminal equipment
CN111400091B (en) Factory setting restoration method, factory setting restoration device and mobile terminal
CN108521460B (en) Information pushing method and device, mobile terminal and computer readable storage medium
EP2813947B1 (en) Electronic device and method for mounting file system using virtual block device
CN111352357B (en) Robot control method and device and terminal equipment
CN110874729A (en) Switching method and switching device for electronic red packet identification strategy and mobile terminal
CN110245016B (en) Data processing method, system, device and terminal equipment
CN108595569B (en) File path copying method, file path copying device and mobile terminal
CN112015459A (en) Method and device for upgrading image file, terminal and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant