WO2017185693A1 - Electronic device and method for copying data from another directly connected electronic device - Google Patents
Electronic device and method for copying data from another directly connected electronic device Download PDFInfo
- Publication number
- WO2017185693A1 WO2017185693A1 PCT/CN2016/103395 CN2016103395W WO2017185693A1 WO 2017185693 A1 WO2017185693 A1 WO 2017185693A1 CN 2016103395 W CN2016103395 W CN 2016103395W WO 2017185693 A1 WO2017185693 A1 WO 2017185693A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- electronic device
- mtp
- host
- data
- mode
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/543—User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]
Definitions
- the present application relates to the field of smart device technologies, for example, to a method for copying data from a directly connected second electronic device by a first electronic device and a first electronic device.
- USB Universal Serial Bus
- the host is Host and the slave is Device. USB data exchange can only occur between the host and the device.
- the host (Host) ) and the host (Host), and the device (Device) and device (Device) can not be interconnected, all data transmission is initiated by the host (Host), and the device (Device) is only passive responsible for answering, for example, reading
- the host (Host) issues a read command first, and the device (Device) returns the data after receiving the command.
- the computer is the host (Host), the mobile phone, the U disk, etc. are just devices. Therefore, when the user changes the machine, it needs to use the computer as the data transfer, or through the cloud server as the data transfer, it is impossible to directly connect the two mobile phones for direct data transmission.
- the present application provides a method for copying data from a directly connected electronic device, and related electronic devices, so that data can be directly transmitted between the two electronic devices.
- a method for copying data from a directly connected second electronic device by a first electronic device which is applicable to the first electronic device, and includes:
- MTP Media Transfer Protocol
- the first electronic device is a smart phone.
- the MTP host driving module sets the first electronic device to an MTP host mode, including: the MTP host driving module controls data of a related register by using a hardware control circuit, to set the first electronic device to MTP host mode.
- a first electronic device including an MTP host mode control module, an MTP host driver module, a request sending module, and a data receiving module;
- the MTP host mode control module is configured to receive a command set to an MTP host mode, and the MTP host driving module is configured to set the first electronic device to an MTP host mode, so that the first electronic device is connected to the USB device.
- the second electronic device connected by the cable sets itself to the MTP device mode;
- the request sending module is configured to receive a request for copying data from the second electronic device, and send a request for MTP-based copy data to the second electronic device;
- the data receiving module is configured to receive data sent by the second electronic device according to the request.
- the first electronic device is a smart phone.
- the setting, by the MTP host driver module, the first electronic device to an MTP host mode includes: the MTP host driving module controls data of a related register by using a hardware control circuit, to set the first electronic device to MTP host mode.
- a first electronic device including an MTP host mode control module and an MTP host driver module;
- the MTP host mode control module is configured to receive a command set to an MTP host mode, and the MTP host driving module is configured to set the first electronic device to an MTP host mode, so that the first electronic device is connected to the USB device.
- the second electronic device connected by the cable sets itself to the MTP device mode.
- the first electronic device is a smart phone.
- the setting, by the MTP host driver module, the first electronic device to an MTP host mode includes: the MTP host driving module controls data of a related register by using a hardware control circuit, to set the first electronic device to MTP host mode.
- an electronic device including:
- At least one processor and,
- the memory stores instructions executable by the one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
- the control MTP host driving module sets the first electronic device to an MTP host mode, so that the second electronic device connected to the first electronic device through the USB cable sets itself to MTP device mode;
- non-transitory computer readable storage medium stores computer instructions for causing the computer to perform the above A method in which a first electronic device copies data from a directly connected second electronic device.
- a computer program product comprising a computing program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer And causing the computer to perform the method of copying data from the directly connected second electronic device by any one of the first electronic devices.
- the application uses the Media Transfer Protocol (MTP) and related commands to add an MTP host driver module to the first electronic device, and sets the first electronic device to the MTP host mode, so that the first electronic device is connected through the USB.
- MTP Media Transfer Protocol
- the second electronic device connected to the line sets itself to the MTP device mode, so that the first electronic device functions as a Host and the second electronic device functions as a device, so that data can be directly transmitted between the two electronic devices.
- FIG. 1 is a flowchart of a method for copying data from a directly connected second electronic device by a first electronic device according to an embodiment of the present application
- FIG. 2 is a block diagram of a first electronic device provided by an embodiment of the present application.
- FIG. 3 is a block diagram showing a first electronic device of another embodiment of the present application.
- FIG. 4 is a block diagram showing a hardware configuration of an electronic device provided by an embodiment of the present application.
- the biometric information in the present application may refer to personalized physiological characteristics of humans, such as fingerprints, irises, sounds, etc., which are personalized, and thus can be used to identify users.
- a first embodiment of the present application provides a method for a first electronic device to copy data from a directly connected second electronic device.
- the direct connection between the first electronic device and the second electronic device may mean that the first electronic device and the second electronic device are not transferred between the third electronic device (eg, a computer), but the first electronic device and the second electronic device pass through The USB cable is connected directly.
- the third electronic device eg, a computer
- the method includes steps 110-step 130.
- the first electronic device receives a command sent by the user to set the MTP host mode, and controls the MTP host driving module in the first electronic device to set the first electronic device to the MTP host mode, due to the USB negotiation mechanism.
- the second electronic device connected to the first electronic device through the USB cable may be caused to set itself to the MTP device mode.
- the first electronic device and the second electronic device conform to the master-slave structure of the USB, wherein the first electronic device is a Host and the second electronic device is a Device.
- the first electronic device receives the data copied from the second electronic device sent by the user.
- the command may send a request for the MTP-based copy data (copy command) to the second electronic device according to the above command to copy the data.
- step 130 after receiving the request for copying data, the second electronic device transmits data to the first electronic device, and the first electronic device receives data sent back by the second electronic device according to the request.
- the MTP host driver module can control the data of the related register by using a hardware control circuit, thereby setting the first electronic device to the MTP host mode.
- the application is not limited thereto, and the MTP host driver module may also set the first electronic device to the MTP host mode in another manner.
- the application utilizes a Media Transfer Protocol (MTP) and related commands, and may add an MTP host driver module to the first electronic device, and set the first electronic device to the MTP host mode, so that the first electronic device is connected to the USB device.
- MTP Media Transfer Protocol
- the second electronic device connected to the cable sets itself to the MTP device mode, so that the first electronic device can be used as a Host and the second electronic device can be used as a device, so that data can be directly transmitted between the two electronic devices.
- MTP is a media transmission protocol, usually has a buffer buffer data, and then transmits, the transmission speed is fast, and is suitable for transmitting large packet data.
- the first electronic device and the second electronic device may be smart phones, and the smart phone supports the MTP device mode, so the new smart phone and the old smart phone can be added only by adding the MTP host driver module to the new smart phone. Directly connecting data from old smartphones to new smartphones can increase the ease with which users can replace new smartphones.
- the second embodiment of the present application provides the first electronic device 10.
- the first electronic device 10 and the second electronic device are directly connected, and may mean that the first electronic device 10 and the second electronic device are not transferred between the third electronic device (for example, a computer), but the first electronic device 10 and the second device.
- the electronic device is directly connected via a USB data cable.
- the first electronic device 10 includes an MTP host mode control module 11, an MTP host driver module 12, a request transmitting module 13, and a data receiving module 14.
- the MTP host mode control module 11 is configured to receive a command set to the MTP host mode, and the MTP host driver module 12 controls the first electronic device 10 to be set to the MTP host mode, and the first electronic device 10 is caused by the USB negotiation mechanism.
- the second electronic device connected through the USB cable sets itself to the MTP device mode. After the process is completed, the first electronic device 10 and the second electronic device conform to the master-slave structure of the USB, wherein the first electronic device 10 is a Host, and the second electronic device is a Device.
- the request sending module 13 is configured to receive a command sent by the user to copy data from the second electronic device, and send a request (copy command) based on the MTP-based copy data to the second electronic device according to the command.
- the second electronic device may transmit the data to the first electronic device 10.
- the data receiving module 14 is configured to receive data sent back by the second electronic device in response to the request.
- the MTP host driver module 12 may control the data of the relevant register through a hardware control circuit to set the first electronic device 10 to the MTP host mode.
- the embodiment of the present application is not limited thereto, and the MTP host driver module may also set the first electronic device 10 to the MTP host mode in another manner.
- the application utilizes the MTP and related commands, adds an MTP host driver module to the first electronic device, and sets the first electronic device to the MTP host mode, so that the second electronic device connected to the first electronic device through the USB cable will
- the device is set to the MTP device mode, so that the first electronic device functions as a Host and the second electronic device functions as a device, so that data can be directly transmitted between the two electronic devices.
- the first electronic device and the second electronic device may be smart phones, and the smart phone supports the MTP device mode, so the new smart phone and the old smart phone can be added only by adding the MTP host driver module to the new smart phone. Directly connected, the data in the old smart phone can be easily transferred to the new smart phone, which greatly improves the user's ease of replacing the new smart phone and drives the user to purchase the smart phone.
- the third embodiment of the present application provides the first electronic device 20.
- the first electronic device 20 and the second electronic device are directly connected, and may mean that the first electronic device 20 and the second electronic device are not transferred between the third electronic device (for example, a computer), but the first electronic device 20 and the second device.
- the electronic device is directly connected via a USB data cable.
- the first electronic device 20 includes an MTP host mode control module 21 and an MTP host drive module 22.
- the MTP host mode control module 21 is configured to receive a command set to the MTP host mode, and control the MTP host driver module 22 to set the first electronic device 20 to the MTP host mode. Due to the USB negotiation mechanism, the first electronic device 20 can be The second electronic device connected through the USB cable sets itself to the MTP device mode. After the process is completed, the first electronic device 20 and the second electronic device conform to the master-slave structure of the USB, wherein the first electronic device 20 is a Host and the second electronic device is a Device.
- the embodiment of the present application utilizes a Media Transfer Protocol (MTP) and Related commands
- the MTP host driving module may be added to the first electronic device, and the first electronic device is set to the MTP host mode, so that the second electronic device connected to the first electronic device through the USB cable sets itself to the MTP device mode.
- the first electronic device acts as a Host and the second electronic device acts as a Device, enabling direct communication between the two electronic devices.
- the first electronic device and the second electronic device may be smart phones, and the smart phone supports the MTP device mode, so the new smart phone and the old smart phone can be added only by adding the MTP host driver module to the new smart phone.
- Direct connection to easily transfer data from old smartphones to new smartphones can increase the ease with which users can replace new smartphones and drive users to purchase smartphones.
- an embodiment of the present application provides a first electronic device 30, which may include a processor 3010 and a memory 3020, wherein the memory 3020 is configured to store an instruction, and the instruction is configured to control the processor 3010 to operate.
- the method in the first embodiment is carried out.
- the first electronic device 30 may also include an interface device 3030, a communication device 3040, a display device 3050, an input device 3060, a speaker 3070, a microphone 3080, and the like.
- the processor 3010 can be, for example, a central processing unit CPU, a microprocessor MCU, or the like.
- the memory 3020 includes, for example, a ROM (Read Only Memory), a RAM (Random Access Memory), a nonvolatile memory such as a hard disk, and the like.
- the interface device 3030 includes, for example, a USB interface, a headphone jack, and the like.
- the communication device 3040 can, for example, be capable of wired or wireless communication, and the communication device 3040 should include a WIFI communication module and a mobile data communication module (eg, a SIM card).
- the display device 3050 is, for example, a liquid crystal display, a touch display, or the like.
- Input device 3060 can include, for example, a touch screen, a keyboard, and the like. The user can input/output voice information through the speaker 3070 and the microphone 3080.
- the terminal device shown in FIG. 4 is merely illustrative and is in no way intended to limit the embodiments of the application, its application or use. It will be understood by those skilled in the art that although a plurality of devices are illustrated in FIG. 4, embodiments of the present application may relate only to some of the devices therein.
- the application can be a system, method and/or computer program product.
- the computer program product can include a non-transitory computer readable storage medium having a method for causing a processor to implement any one of the first electronic devices of the present application to copy data from a directly connected second electronic device.
- Computer readable program instructions can include a non-transitory computer readable storage medium having a method for causing a processor to implement any one of the first electronic devices of the present application to copy data from a directly connected second electronic device.
- the computer readable storage medium can be a tangible device that can hold and store the instructions used by the instruction execution device.
- the computer readable storage medium can be, for example, an electrical storage device, a magnetic storage device, an optical storage A device, an electromagnetic storage device, and a semiconductor storage device, or any suitable combination of the foregoing.
- the computer readable storage medium may include: a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), a static random access memory ( SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, for example, a punch card or a concave structure in a groove on which an instruction is stored, And any suitable combination of the above.
- RAM random access memory
- ROM read only memory
- EPROM or flash memory erasable programmable read only memory
- SRAM static random access memory
- CD-ROM compact disk read only memory
- DVD digital versatile disk
- memory stick floppy disk
- mechanical encoding device for example, a punch card or a concave structure in a groove on which an instruction is stored, And any suitable combination of the above.
- a computer readable storage medium as used herein is not to be interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (eg, a light pulse through a fiber optic cable), or through a wire The electrical signal transmitted.
- the computer readable program instructions described herein can be downloaded from a computer readable storage medium to various computing/processing devices or downloaded to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
- the network may include copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and/or edge servers.
- a network adapter card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium in each computing/processing device .
- Computer program instructions for performing the operations of the present application can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine related instructions, microcode, firmware instructions, state setting data, or in one or more programming languages.
- the computer readable program instructions can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer, partly on the remote computer, or entirely on the remote computer or server. carried out.
- the remote computer can be connected to the user's computer via any kind of network, including a local area network (LAN) or wide area network (WAN), or can be connected to an external computer (eg, using an Internet service provider to access the Internet) connection).
- the customized electronic circuit such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), can be customized by utilizing state information of computer readable program instructions.
- Computer readable program instructions are executed to implement various aspects of the present invention.
- the computer readable program instructions can be provided to a general purpose computer, a special purpose computer, or a processor of other programmable data processing apparatus to produce a machine such that when executed by a processor of a computer or other programmable data processing apparatus Means for implementing the functions/acts specified in one or more of the blocks of the flowcharts and/or block diagrams.
- the computer readable program instructions can also be stored in a computer readable storage medium that causes the computer, programmable data processing device, and/or other device to operate in a particular manner, such that the computer readable medium storing the instructions includes An article of manufacture that includes instructions for implementing aspects of the functions/acts recited in one or more of the flowcharts and/or block diagrams.
- the computer readable program instructions can also be loaded onto a computer, other programmable data processing device, or other device to perform a series of operational steps on a computer, other programmable data processing device or other device to produce a computer-implemented process.
- instructions executed on a computer, other programmable data processing apparatus, or other device implement the functions/acts recited in one or more of the flowcharts and/or block diagrams.
- each block in the flowchart or block diagram can represent a module, a program segment, or a portion of an instruction that includes one or more components for implementing the specified logical functions.
- Executable instructions can also occur in a different order than those illustrated in the drawings. For example, two consecutive blocks may be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending upon the functionality involved.
- each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be implemented in a dedicated hardware-based system that performs the specified function or function. Or it can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are equivalent.
- the embodiment of the present application provides a method for copying data from a directly connected second electronic device by a first electronic device and a first electronic device, which can directly connect two electronic devices for direct data transmission.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Systems (AREA)
- Telephone Function (AREA)
Abstract
A method for a first electronic device to copy data from a second directly connected electronic device, and the first electronic device. The method comprises: receiving a command for setting into MTP host mode, controlling an MTP host driving module to set a first electronic device into the MTP host mode, such that a second electronic device that is connected to the first electronic device by means of a USB connecting line sets itself into MTP device mode; receiving a command for copying data from the second electronic device, sending to the second electronic device an MTP-based request for copying data; and, receiving the data sent back by the second electronic device in response to the request.
Description
本申请要求在2016年4月29日提交中国专利局、申请号为201610285460.2、发明名称为“电子设备、从直连的另一电子设备中复制数据的方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application filed on April 29, 2016, the Chinese Patent Office, Application No. 201610285460.2, entitled "Electronic Device, Method of Copying Data from Another Electronic Device Connected Directly", The entire contents are incorporated herein by reference.
本申请涉及智能设备技术领域,例如涉及第一电子设备从直连的第二电子设备中复制数据的方法和第一电子设备。The present application relates to the field of smart device technologies, for example, to a method for copying data from a directly connected second electronic device by a first electronic device and a first electronic device.
通用串行总线(Universal Serial Bus,USB)是一种主从结构,主机为Host,从机为Device,USB的数据交换只能发生在主机(Host)和设备(Device)之间,主机(Host)和主机(Host)、以及设备(Device)和设备(Device)之间不能互连,所有的数据传输都由主机(Host)主动发起,而设备(Device)只是被动的负责应答,例如,在读数据时,主机(Host)先发出读命令,设备(Device)收到该命令后,才返回数据。Universal Serial Bus (USB) is a master-slave structure. The host is Host and the slave is Device. USB data exchange can only occur between the host and the device. The host (Host) ) and the host (Host), and the device (Device) and device (Device) can not be interconnected, all data transmission is initiated by the host (Host), and the device (Device) is only passive responsible for answering, for example, reading When the data is received, the host (Host) issues a read command first, and the device (Device) returns the data after receiving the command.
一般情况下,电脑为主机(Host),手机、U盘等都只是设备(Device)。因此,用户换机时,需要通过电脑作为数据中转,或者通过云端服务器作为数据中转,不能够将两台手机直连起来进行数据直传。Under normal circumstances, the computer is the host (Host), the mobile phone, the U disk, etc. are just devices. Therefore, when the user changes the machine, it needs to use the computer as the data transfer, or through the cloud server as the data transfer, it is impossible to directly connect the two mobile phones for direct data transmission.
发明内容Summary of the invention
本申请提供从直连的电子设备中复制数据的方法、以及相关电子设备,使得两台电子设备之间能够进行数据直传。The present application provides a method for copying data from a directly connected electronic device, and related electronic devices, so that data can be directly transmitted between the two electronic devices.
根据本申请的第一方面,提供了一种第一电子设备从直连的第二电子设备中复制数据的方法,适用于第一电子设备,包括:According to a first aspect of the present application, a method for copying data from a directly connected second electronic device by a first electronic device is provided, which is applicable to the first electronic device, and includes:
接收设置为媒体传输协议(Media Transfer Protocol,MTP)host模式的命令,控制MTP host驱动模块将所述第一电子设备设置为MTP host模式,以使得与所述第一电子设备通过USB连接线连接的第二电子设备将自身设置为MTP device模式;Receiving a command set to a Media Transfer Protocol (MTP) host mode, and controlling the MTP host driver module to set the first electronic device to an MTP host mode, so that the first electronic device is connected through a USB cable The second electronic device sets itself to the MTP device mode;
接收从所述第二电子设备中复制数据的命令,向所述第二电子设备发送基
于MTP的复制数据的请求;以及Receiving a command to copy data from the second electronic device, and transmitting a base to the second electronic device
a request for copying data to the MTP;
接收所述第二电子设备应所述请求而发回的数据。Receiving data sent by the second electronic device in response to the request.
可选地,所述第一电子设备为智能手机。Optionally, the first electronic device is a smart phone.
可选地,所述MTP host驱动模块将所述第一电子设备设置MTP host模式,包括:所述MTP host驱动模块通过硬件控制电路控制相关寄存器的数据,以将所述第一电子设备设置为MTP host模式。Optionally, the MTP host driving module sets the first electronic device to an MTP host mode, including: the MTP host driving module controls data of a related register by using a hardware control circuit, to set the first electronic device to MTP host mode.
根据本申请的第二方面,提供了一种第一电子设备,包括MTP host模式控制模块、MTP host驱动模块、请求发送模块、以及数据接收模块;According to a second aspect of the present application, a first electronic device is provided, including an MTP host mode control module, an MTP host driver module, a request sending module, and a data receiving module;
所述MTP host模式控制模块,设置为接收设置为MTP host模式的命令,控制所述MTP host驱动模块将所述第一电子设备设置为MTP host模式,以使得与所述第一电子设备通过USB连接线连接的第二电子设备将自身设置为MTP device模式;The MTP host mode control module is configured to receive a command set to an MTP host mode, and the MTP host driving module is configured to set the first electronic device to an MTP host mode, so that the first electronic device is connected to the USB device. The second electronic device connected by the cable sets itself to the MTP device mode;
所述请求发送模块,设置为接收从所述第二电子设备中复制数据的命令,向所述第二电子设备发送基于MTP的复制数据的请求;以及The request sending module is configured to receive a request for copying data from the second electronic device, and send a request for MTP-based copy data to the second electronic device;
所述数据接收模块,设置为接收所述第二电子设备应所述请求而发回的数据。The data receiving module is configured to receive data sent by the second electronic device according to the request.
可选地,所述第一电子设备为智能手机。Optionally, the first electronic device is a smart phone.
可选地,所述MTP host驱动模块将所述第一电子设备设置为MTP host模式包括:所述MTP host驱动模块通过硬件控制电路控制相关寄存器的数据,以将所述第一电子设备设置为MTP host模式。Optionally, the setting, by the MTP host driver module, the first electronic device to an MTP host mode includes: the MTP host driving module controls data of a related register by using a hardware control circuit, to set the first electronic device to MTP host mode.
根据本申请的第三方面,提供了一种第一电子设备,包括MTP host模式控制模块和MTP host驱动模块;According to a third aspect of the present application, a first electronic device is provided, including an MTP host mode control module and an MTP host driver module;
所述MTP host模式控制模块,设置为接收设置为MTP host模式的命令,控制所述MTP host驱动模块将所述第一电子设备设置为MTP host模式,以使得与所述第一电子设备通过USB连接线连接的第二电子设备将自身设置为MTP device模式。The MTP host mode control module is configured to receive a command set to an MTP host mode, and the MTP host driving module is configured to set the first electronic device to an MTP host mode, so that the first electronic device is connected to the USB device. The second electronic device connected by the cable sets itself to the MTP device mode.
可选地,所述第一电子设备为智能手机。Optionally, the first electronic device is a smart phone.
可选地,所述MTP host驱动模块将所述第一电子设备设置为MTP host模式包括:所述MTP host驱动模块通过硬件控制电路控制相关寄存器的数据,以将所述第一电子设备设置为MTP host模式。Optionally, the setting, by the MTP host driver module, the first electronic device to an MTP host mode includes: the MTP host driving module controls data of a related register by using a hardware control circuit, to set the first electronic device to MTP host mode.
根据本申请的第四方面,还提供了一种电子设备,包括:According to a fourth aspect of the present application, an electronic device is further provided, including:
至少一个处理器;以及,
At least one processor; and,
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein
所述存储器存储有可被所述一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:The memory stores instructions executable by the one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
接收设置为MTP host模式的命令,控制MTP host驱动模块将所述第一电子设备设置为MTP host模式,以使得与所述第一电子设备通过USB连接线连接的第二电子设备将自身设置为MTP device模式;Receiving a command set to the MTP host mode, the control MTP host driving module sets the first electronic device to an MTP host mode, so that the second electronic device connected to the first electronic device through the USB cable sets itself to MTP device mode;
接收从所述第二电子设备中复制数据的命令,向所述第二电子设备发送基于MTP的复制数据的请求;以及Receiving a request to copy data from the second electronic device, and transmitting a request for MTP-based copy data to the second electronic device;
接收所述第二电子设备应所述请求而发回的数据。Receiving data sent by the second electronic device in response to the request.
根据本申请的第五方面,还提供了一种非暂态计算机可读存储介质,其中,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令用于使所述计算机执行上述的第一电子设备从直连的第二电子设备中复制数据的方法。According to a fifth aspect of the present application, there is also provided a non-transitory computer readable storage medium, wherein the non-transitory computer readable storage medium stores computer instructions for causing the computer to perform the above A method in which a first electronic device copies data from a directly connected second electronic device.
根据本申请的第六方面,还提供了一种计算机程序产品,包括存储在非暂态计算机可读存储介质上的计算程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述任意一种第一电子设备从直连的第二电子设备中复制数据的方法。According to a sixth aspect of the present application, there is also provided a computer program product comprising a computing program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer And causing the computer to perform the method of copying data from the directly connected second electronic device by any one of the first electronic devices.
本申请利用了媒体传输协议(Media Transfer Protocol,MTP)和相关命令,在第一电子设备中增加MTP host驱动模块,将第一电子设备设置为MTP host模式,使得与第一电子设备通过USB连接线连接的第二电子设备将自身设置为MTP device模式,从而使第一电子设备作为Host,第二电子设备作为Device,使得两台电子设备之间能够进行数据直传。The application uses the Media Transfer Protocol (MTP) and related commands to add an MTP host driver module to the first electronic device, and sets the first electronic device to the MTP host mode, so that the first electronic device is connected through the USB. The second electronic device connected to the line sets itself to the MTP device mode, so that the first electronic device functions as a Host and the second electronic device functions as a device, so that data can be directly transmitted between the two electronic devices.
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。The one or more embodiments are exemplified by the accompanying drawings in the accompanying drawings, and FIG. The figures in the drawings do not constitute a scale limitation unless otherwise stated.
图1示出了本申请实施例提供的第一电子设备从直连的第二电子设备中复制数据的方法的流程图;FIG. 1 is a flowchart of a method for copying data from a directly connected second electronic device by a first electronic device according to an embodiment of the present application;
图2示出了本申请实施例提供的第一电子设备的框图;2 is a block diagram of a first electronic device provided by an embodiment of the present application;
图3示出了本申请另一实施例的第一电子设备的框图;以及FIG. 3 is a block diagram showing a first electronic device of another embodiment of the present application;
图4示出了本申请实施例提供的一种电子设备的硬件配置的框图。
FIG. 4 is a block diagram showing a hardware configuration of an electronic device provided by an embodiment of the present application.
为使本申请的目的、技术方案和优点更加清楚,以下将参照本申请实施例中的附图,通过实施方式清楚、完整地描述本申请的技术方案。所描述的实施例是本申请一部分实施例,而不是全部的实施例。在不冲突的情况下,以下实施例和实施例中的特征可以相互组合。In order to make the objects, the technical solutions and the advantages of the present application more clear, the technical solutions of the present application will be clearly and completely described by the embodiments with reference to the accompanying drawings in the embodiments. The described embodiments are a part of the embodiments of the present application, and not all of the embodiments. The features of the following embodiments and embodiments may be combined with each other without conflict.
应注意到:除非另外说明,否则在这些实施例中阐述的部件和步骤的相对布置、数字表达式和数值不限制本发明的范围。It should be noted that the relative arrangement of the components and steps, numerical expressions and numerical values set forth in the embodiments are not intended to limit the scope of the invention.
以下对至少一个示例性实施例的描述实际上仅仅是说明性的,决不作为对本申请及其应用或使用的任何限制。The following description of the at least one exemplary embodiment is merely illustrative and is in no way
在这里示出和讨论的所有例子中,任何具体值应被解释为仅仅是示例性的,而不是作为限制。因此,示例性实施例的其它例子可以具有不同的值。In all of the examples shown and discussed herein, any specific values are to be construed as illustrative only and not as a limitation. Thus, other examples of the exemplary embodiments may have different values.
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中可以不对其进行相关讨论。It should be noted that similar reference numerals and letters indicate similar items in the following figures, and thus, once an item is defined in one drawing, it may not be discussed in the following figures.
本申请中的生物识别信息,可以是指人类的个性化生理特征,例如指纹、虹膜、声音等,这些生理特征是个性化的,因此可以利用这些生物识别信息来识别用户。The biometric information in the present application may refer to personalized physiological characteristics of humans, such as fingerprints, irises, sounds, etc., which are personalized, and thus can be used to identify users.
<实施例一><Example 1>
参考图1所示,本申请实施例一提供了第一电子设备从直连的第二电子设备中复制数据的方法。Referring to FIG. 1, a first embodiment of the present application provides a method for a first electronic device to copy data from a directly connected second electronic device.
第一电子设备和第二电子设备直连,可以是指第一电子设备和第二电子设备之间不经过第三电子设备(例如电脑)中转,而是第一电子设备和第二电子设备通过USB数据线直接连接。The direct connection between the first electronic device and the second electronic device may mean that the first electronic device and the second electronic device are not transferred between the third electronic device (eg, a computer), but the first electronic device and the second electronic device pass through The USB cable is connected directly.
该方法包括步骤110-步骤130。The method includes steps 110-step 130.
在步骤110中,第一电子设备接收用户发来的设置成MTP host模式的命令,控制第一电子设备中的MTP host驱动模块将第一电子设备设置为MTP host模式,由于USB的协商机制,可以使得与第一电子设备通过USB连接线连接的第二电子设备将自身设置为MTP device模式。在步骤101完成后,第一电子设备和第二电子设备符合USB的主从结构,其中第一电子设备为Host,第二电子设备为Device。In step 110, the first electronic device receives a command sent by the user to set the MTP host mode, and controls the MTP host driving module in the first electronic device to set the first electronic device to the MTP host mode, due to the USB negotiation mechanism. The second electronic device connected to the first electronic device through the USB cable may be caused to set itself to the MTP device mode. After the step 101 is completed, the first electronic device and the second electronic device conform to the master-slave structure of the USB, wherein the first electronic device is a Host and the second electronic device is a Device.
在步骤120中,第一电子设备接收用户发来的从第二电子设备中复制数据
的命令,可以根据上述复制数据的命令向第二电子设备发送基于MTP的复制数据的请求(copy命令)。In step 120, the first electronic device receives the data copied from the second electronic device sent by the user.
The command may send a request for the MTP-based copy data (copy command) to the second electronic device according to the above command to copy the data.
在步骤130中,第二电子设备接收到复制数据的请求后,向第一电子设备发送数据,第一电子设备接收第二电子设备应所述请求而发回的数据。In step 130, after receiving the request for copying data, the second electronic device transmits data to the first electronic device, and the first electronic device receives data sent back by the second electronic device according to the request.
可选地,在步骤110中,MTP host驱动模块可以通过硬件控制电路控制相关寄存器的数据,从而将第一电子设备设置为MTP host模式。本申请并不限定于此,MTP host驱动模块还可以采用别的方式将第一电子设备设置为MTP host模式。Optionally, in step 110, the MTP host driver module can control the data of the related register by using a hardware control circuit, thereby setting the first electronic device to the MTP host mode. The application is not limited thereto, and the MTP host driver module may also set the first electronic device to the MTP host mode in another manner.
本申请利用了媒体传输协议(Media Transfer Protocol,MTP)和相关命令,可以在第一电子设备中增加MTP host驱动模块,将第一电子设备设置为MTP host模式,使得与第一电子设备通过USB连接线连接的第二电子设备将自身设置为MTP device模式,从而可以使第一电子设备作为Host,第二电子设备作为Device,使得两台电子设备之间能够进行数据直传。其中,MTP是媒体传输协议,通常有一个buffer缓存数据,然后再进行传输,传输速度快,适合于传输大包数据。The application utilizes a Media Transfer Protocol (MTP) and related commands, and may add an MTP host driver module to the first electronic device, and set the first electronic device to the MTP host mode, so that the first electronic device is connected to the USB device. The second electronic device connected to the cable sets itself to the MTP device mode, so that the first electronic device can be used as a Host and the second electronic device can be used as a device, so that data can be directly transmitted between the two electronic devices. Among them, MTP is a media transmission protocol, usually has a buffer buffer data, and then transmits, the transmission speed is fast, and is suitable for transmitting large packet data.
可选地,第一电子设备和第二电子设备可以为智能手机,智能手机多支持MTP device模式,所以只需要在新智能手机中增加MTP host驱动模块,就可以将新智能手机和旧智能手机直连起来,将旧智能手机中的数据传输到新智能手机中,可以提升了用户更换新智能手机的容易性。Optionally, the first electronic device and the second electronic device may be smart phones, and the smart phone supports the MTP device mode, so the new smart phone and the old smart phone can be added only by adding the MTP host driver module to the new smart phone. Directly connecting data from old smartphones to new smartphones can increase the ease with which users can replace new smartphones.
<实施例二><Embodiment 2>
参考图2所示,本申请实施例二提供了第一电子设备10。第一电子设备10和第二电子设备直连,可以是指第一电子设备10和第二电子设备之间不经过第三电子设备(例如电脑)中转,而是第一电子设备10和第二电子设备通过USB数据线直接连接。Referring to FIG. 2, the second embodiment of the present application provides the first electronic device 10. The first electronic device 10 and the second electronic device are directly connected, and may mean that the first electronic device 10 and the second electronic device are not transferred between the third electronic device (for example, a computer), but the first electronic device 10 and the second device. The electronic device is directly connected via a USB data cable.
第一电子设备10包括MTP host模式控制模块11、MTP host驱动模块12、请求发送模块13、以及数据接收模块14。The first electronic device 10 includes an MTP host mode control module 11, an MTP host driver module 12, a request transmitting module 13, and a data receiving module 14.
MTP host模式控制模块11,设置为接收设置成MTP host模式的命令,控制MTP host驱动模块12将第一电子设备10设置为MTP host模式,由于USB的协商机制,会使得与第一电子设备10通过USB连接线连接的第二电子设备将自身设置为MTP device模式。在这一过程完成后,第一电子设备10和第二电子设备符合USB的主从结构,其中第一电子设备10为Host,第二电子设备为
Device。The MTP host mode control module 11 is configured to receive a command set to the MTP host mode, and the MTP host driver module 12 controls the first electronic device 10 to be set to the MTP host mode, and the first electronic device 10 is caused by the USB negotiation mechanism. The second electronic device connected through the USB cable sets itself to the MTP device mode. After the process is completed, the first electronic device 10 and the second electronic device conform to the master-slave structure of the USB, wherein the first electronic device 10 is a Host, and the second electronic device is a
Device.
请求发送模块13,设置为接收用户发来的从第二电子设备中复制数据的命令,根据这一命令向第二电子设备发送基于MTP的复制数据的请求(copy命令)。The request sending module 13 is configured to receive a command sent by the user to copy data from the second electronic device, and send a request (copy command) based on the MTP-based copy data to the second electronic device according to the command.
第二电子设备接收到复制数据的请求后,可以向第一电子设备10发送数据。After the second electronic device receives the request to copy the data, the second electronic device may transmit the data to the first electronic device 10.
数据接收模块14,设置为接收第二电子设备应所述请求而发回的数据。The data receiving module 14 is configured to receive data sent back by the second electronic device in response to the request.
可选地,MTP host驱动模块12可以通过硬件控制电路控制相关寄存器的数据,从而将第一电子设备10设置为MTP host模式。本申请实施例并不限定于此,MTP host驱动模块还可以采用别的方式将第一电子设备10设置为MTP host模式。Alternatively, the MTP host driver module 12 may control the data of the relevant register through a hardware control circuit to set the first electronic device 10 to the MTP host mode. The embodiment of the present application is not limited thereto, and the MTP host driver module may also set the first electronic device 10 to the MTP host mode in another manner.
本申请利用了MTP和相关命令,在第一电子设备中增加MTP host驱动模块,将第一电子设备设置为MTP host模式,可以使得与第一电子设备通过USB连接线连接的第二电子设备将自身设置为MTP device模式,从而使第一电子设备作为Host,第二电子设备作为Device,使得两台电子设备之间能够进行数据直传。The application utilizes the MTP and related commands, adds an MTP host driver module to the first electronic device, and sets the first electronic device to the MTP host mode, so that the second electronic device connected to the first electronic device through the USB cable will The device is set to the MTP device mode, so that the first electronic device functions as a Host and the second electronic device functions as a device, so that data can be directly transmitted between the two electronic devices.
可选地,第一电子设备和第二电子设备可以为智能手机,智能手机多支持MTP device模式,所以只需要在新智能手机中增加MTP host驱动模块,就可以将新智能手机和旧智能手机直连起来,将旧智能手机中的数据轻易地传输到新智能手机中,大大提升了用户更换新智能手机的容易性,驱动用户购买智能手机。Optionally, the first electronic device and the second electronic device may be smart phones, and the smart phone supports the MTP device mode, so the new smart phone and the old smart phone can be added only by adding the MTP host driver module to the new smart phone. Directly connected, the data in the old smart phone can be easily transferred to the new smart phone, which greatly improves the user's ease of replacing the new smart phone and drives the user to purchase the smart phone.
<实施例三><Example 3>
参考图3所示,本申请实施例三提供了第一电子设备20。第一电子设备20和第二电子设备直连,可以是指第一电子设备20和第二电子设备之间不经过第三电子设备(例如电脑)中转,而是第一电子设备20和第二电子设备通过USB数据线直接连接。Referring to FIG. 3, the third embodiment of the present application provides the first electronic device 20. The first electronic device 20 and the second electronic device are directly connected, and may mean that the first electronic device 20 and the second electronic device are not transferred between the third electronic device (for example, a computer), but the first electronic device 20 and the second device. The electronic device is directly connected via a USB data cable.
第一电子设备20包括MTP host模式控制模块21和MTP host驱动模块22。The first electronic device 20 includes an MTP host mode control module 21 and an MTP host drive module 22.
MTP host模式控制模块21,设置为接收设置成MTP host模式的命令,控制MTP host驱动模块22将第一电子设备20设置为MTP host模式,由于USB的协商机制,可以使得与第一电子设备20通过USB连接线连接的第二电子设备将自身设置为MTP device模式。在这一过程完成后,第一电子设备20和第二电子设备符合USB的主从结构,其中第一电子设备20为Host,第二电子设备为Device。The MTP host mode control module 21 is configured to receive a command set to the MTP host mode, and control the MTP host driver module 22 to set the first electronic device 20 to the MTP host mode. Due to the USB negotiation mechanism, the first electronic device 20 can be The second electronic device connected through the USB cable sets itself to the MTP device mode. After the process is completed, the first electronic device 20 and the second electronic device conform to the master-slave structure of the USB, wherein the first electronic device 20 is a Host and the second electronic device is a Device.
本申请实施例利用了媒体传输协议(Media Transfer Protocol,MTP)和
相关命令,可以在第一电子设备中增加MTP host驱动模块,将第一电子设备设置为MTP host模式,使得与第一电子设备通过USB连接线连接的第二电子设备将自身设置为MTP device模式,从而使第一电子设备作为Host,第二电子设备作为Device,使得两台电子设备之间能够进行直接通信。The embodiment of the present application utilizes a Media Transfer Protocol (MTP) and
Related commands, the MTP host driving module may be added to the first electronic device, and the first electronic device is set to the MTP host mode, so that the second electronic device connected to the first electronic device through the USB cable sets itself to the MTP device mode. Thus, the first electronic device acts as a Host and the second electronic device acts as a Device, enabling direct communication between the two electronic devices.
可选地,第一电子设备和第二电子设备可以为智能手机,智能手机多支持MTP device模式,所以只需要在新智能手机中增加MTP host驱动模块,就可以将新智能手机和旧智能手机直连起来,将旧智能手机中的数据轻易地传输到新智能手机中,可以提升了用户更换新智能手机的容易性,驱动用户购买智能手机。Optionally, the first electronic device and the second electronic device may be smart phones, and the smart phone supports the MTP device mode, so the new smart phone and the old smart phone can be added only by adding the MTP host driver module to the new smart phone. Direct connection to easily transfer data from old smartphones to new smartphones can increase the ease with which users can replace new smartphones and drive users to purchase smartphones.
参考图4所示,本申请实施例提供了一种第一电子设备30,可以包括处理器3010和存储器3020,其中,存储器3020设置为存储指令,所述指令设置为控制处理器3010进行操作以执行实施例一中的方法。Referring to FIG. 4, an embodiment of the present application provides a first electronic device 30, which may include a processor 3010 and a memory 3020, wherein the memory 3020 is configured to store an instruction, and the instruction is configured to control the processor 3010 to operate. The method in the first embodiment is carried out.
第一电子设备30还可以包括接口装置3030、通信装置3040、显示装置3050、输入装置3060、扬声器3070、麦克风3080,等等。The first electronic device 30 may also include an interface device 3030, a communication device 3040, a display device 3050, an input device 3060, a speaker 3070, a microphone 3080, and the like.
处理器3010例如可以是中央处理器CPU、微处理器MCU等。存储器3020例如包括ROM(只读存储器)、RAM(随机存取存储器)、诸如硬盘的非易失性存储器等。接口装置3030例如包括USB接口、耳机接口等。通信装置3040例如能够进行有线或无线通信,通信装置3040应当包括WIFI通信模块和移动数据通信模块(例如SIM卡)。显示装置3050例如是液晶显示屏、触摸显示屏等。输入装置3060例如可以包括触摸屏、键盘等。用户可以通过扬声器3070和麦克风3080输入/输出语音信息。The processor 3010 can be, for example, a central processing unit CPU, a microprocessor MCU, or the like. The memory 3020 includes, for example, a ROM (Read Only Memory), a RAM (Random Access Memory), a nonvolatile memory such as a hard disk, and the like. The interface device 3030 includes, for example, a USB interface, a headphone jack, and the like. The communication device 3040 can, for example, be capable of wired or wireless communication, and the communication device 3040 should include a WIFI communication module and a mobile data communication module (eg, a SIM card). The display device 3050 is, for example, a liquid crystal display, a touch display, or the like. Input device 3060 can include, for example, a touch screen, a keyboard, and the like. The user can input/output voice information through the speaker 3070 and the microphone 3080.
图4所示的终端设备仅是解释性的,并且决不是为了要限制本申请实施例、其应用或用途。本领域技术人员应当理解,尽管在图4中示出了多个装置,但是,本申请实施例可以仅涉及其中的部分装置。The terminal device shown in FIG. 4 is merely illustrative and is in no way intended to limit the embodiments of the application, its application or use. It will be understood by those skilled in the art that although a plurality of devices are illustrated in FIG. 4, embodiments of the present application may relate only to some of the devices therein.
本申请可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括非暂态计算机可读存储介质,该计算机可读存储介质上载有用于使处理器实现本申请的任意一个第一电子设备从直连的第二电子设备中复制数据的方法的计算机可读程序指令。The application can be a system, method and/or computer program product. The computer program product can include a non-transitory computer readable storage medium having a method for causing a processor to implement any one of the first electronic devices of the present application to copy data from a directly connected second electronic device. Computer readable program instructions.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是电存储设备、磁存储设备、光存储
设备、电磁存储设备和半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的可以包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。The computer readable storage medium can be a tangible device that can hold and store the instructions used by the instruction execution device. The computer readable storage medium can be, for example, an electrical storage device, a magnetic storage device, an optical storage
A device, an electromagnetic storage device, and a semiconductor storage device, or any suitable combination of the foregoing. The computer readable storage medium may include: a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), a static random access memory ( SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, for example, a punch card or a concave structure in a groove on which an instruction is stored, And any suitable combination of the above. A computer readable storage medium as used herein is not to be interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (eg, a light pulse through a fiber optic cable), or through a wire The electrical signal transmitted.
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。The computer readable program instructions described herein can be downloaded from a computer readable storage medium to various computing/processing devices or downloaded to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium in each computing/processing device .
用于执行本申请操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言-诸如Smalltalk、C++等,以及常规的过程式编程语言-诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络-包括局域网(LAN)或广域网(WAN)-连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本发明的各个方面。Computer program instructions for performing the operations of the present application can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine related instructions, microcode, firmware instructions, state setting data, or in one or more programming languages. Source code or object code written in any combination, including object oriented programming languages - such as Smalltalk, C++, etc., as well as conventional procedural programming languages - such as the "C" language or similar programming languages. The computer readable program instructions can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer, partly on the remote computer, or entirely on the remote computer or server. carried out. In the case of a remote computer, the remote computer can be connected to the user's computer via any kind of network, including a local area network (LAN) or wide area network (WAN), or can be connected to an external computer (eg, using an Internet service provider to access the Internet) connection). In some embodiments, the customized electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), can be customized by utilizing state information of computer readable program instructions. Computer readable program instructions are executed to implement various aspects of the present invention.
这里参照根据本申请实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本申请的多个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中多个方框的组合,都可以由计算机可读程序指令实
现。Aspects of the present application are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present application. It will be understood that each block of the flowchart illustrations and/or FIG.
Now.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的多个方面的指令。The computer readable program instructions can be provided to a general purpose computer, a special purpose computer, or a processor of other programmable data processing apparatus to produce a machine such that when executed by a processor of a computer or other programmable data processing apparatus Means for implementing the functions/acts specified in one or more of the blocks of the flowcharts and/or block diagrams. The computer readable program instructions can also be stored in a computer readable storage medium that causes the computer, programmable data processing device, and/or other device to operate in a particular manner, such that the computer readable medium storing the instructions includes An article of manufacture that includes instructions for implementing aspects of the functions/acts recited in one or more of the flowcharts and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。The computer readable program instructions can also be loaded onto a computer, other programmable data processing device, or other device to perform a series of operational steps on a computer, other programmable data processing device or other device to produce a computer-implemented process. Thus, instructions executed on a computer, other programmable data processing apparatus, or other device implement the functions/acts recited in one or more of the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本申请的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。对于本领域技术人员来说公知的是,通过硬件方式实现、通过软件方式实现以及通过软件和硬件结合的方式实现都是等价的。The flowchart and block diagrams in the Figures illustrate the architecture, functionality and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a portion of an instruction that includes one or more components for implementing the specified logical functions. Executable instructions. In some alternative implementations, the functions noted in the blocks may also occur in a different order than those illustrated in the drawings. For example, two consecutive blocks may be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts, can be implemented in a dedicated hardware-based system that performs the specified function or function. Or it can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are equivalent.
本申请实施例提供了一种第一电子设备从直连的第二电子设备中复制数据的方法和第一电子设备,能够将两台电子设备直连起来进行数据直传。
The embodiment of the present application provides a method for copying data from a directly connected second electronic device by a first electronic device and a first electronic device, which can directly connect two electronic devices for direct data transmission.
Claims (12)
- 一种第一电子设备从直连的第二电子设备中复制数据的方法,适用于第一电子设备,包括:A method for the first electronic device to copy data from the directly connected second electronic device is applicable to the first electronic device, including:接收设置为多媒体传输协议主机MTP host模式的命令,控制MTP host驱动模块将所述第一电子设备设置为MTP host模式,以使得与所述第一电子设备通过USB连接线连接的第二电子设备将自身设置为多媒体传输协议设备MTPdevice模式;Receiving a command set to a multimedia transmission protocol host MTP host mode, and controlling the MTP host driving module to set the first electronic device to an MTP host mode, so that the second electronic device connected to the first electronic device through a USB cable Set itself to the MTPdevice mode of the multimedia transmission protocol device;接收从所述第二电子设备中复制数据的命令,向所述第二电子设备发送基于MTP的复制数据的请求;以及Receiving a request to copy data from the second electronic device, and transmitting a request for MTP-based copy data to the second electronic device;接收所述第二电子设备应所述请求而发回的数据。Receiving data sent by the second electronic device in response to the request.
- 根据权利要求1所述的方法,其中,所述第一电子设备为智能手机。The method of claim 1 wherein the first electronic device is a smartphone.
- 根据权利要求1所述的方法,其中,所述MTP host驱动模块将所述第一电子设备设置MTP host模式包括:所述MTP host驱动模块通过硬件控制电路控制相关寄存器的数据,以将所述第一电子设备设置为MTP host模式。The method of claim 1, wherein the MTP host driver module sets the MTP host mode of the first electronic device comprises: the MTP host driver module controls data of a related register through a hardware control circuit to The first electronic device is set to the MTP host mode.
- 一种第一电子设备,包括多媒体传输协议主句MTP host模式控制模块、MTP host驱动模块、请求发送模块、以及数据接收模块;A first electronic device includes a multimedia transmission protocol clause MTP host mode control module, an MTP host driver module, a request sending module, and a data receiving module;所述MTP host模式控制模块,设置为接收设置为MTP host模式的命令,控制所述MTP host驱动模块将所述第一电子设备设置为MTP host模式,以使得与所述第一电子设备通过USB连接线连接的第二电子设备将自身设置为多媒体传输协议设备MTP device模式;The MTP host mode control module is configured to receive a command set to an MTP host mode, and the MTP host driving module is configured to set the first electronic device to an MTP host mode, so that the first electronic device is connected to the USB device. The second electronic device connected by the connection line sets itself to the MTP device mode of the multimedia transmission protocol device;所述请求发送模块,设置为接收从所述第二电子设备中复制数据的命令,向所述第二电子设备发送基于MTP的复制数据的请求;The request sending module is configured to receive a command for copying data from the second electronic device, and send a request for MTP-based copy data to the second electronic device;所述数据接收模块,设置为接收所述第二电子设备应所述请求而发回的数据。The data receiving module is configured to receive data sent by the second electronic device according to the request.
- 根据权利要求4所述的第一电子设备,其中,所述第一电子设备为智能手机。The first electronic device of claim 4, wherein the first electronic device is a smart phone.
- 根据权利要求4所述的第一电子设备,其中,所述MTP host驱动模块将所述第一电子设备设置为MTP host模式包括:所述MTP host驱动模块通过 硬件控制电路控制相关寄存器的数据,以将所述第一电子设备设置为MTP host模式。The first electronic device according to claim 4, wherein the setting, by the MTP host driving module, the first electronic device to an MTP host mode comprises: the MTP host driving module passes A hardware control circuit controls data of the associated registers to set the first electronic device to an MTP host mode.
- 一种第一电子设备,包括多媒体传输协议主机MTP host模式控制模块和MTP host驱动模块;A first electronic device includes a multimedia transmission protocol host MTP host mode control module and an MTP host driver module;所述MTP host模式控制模块,设置为接收设置为MTP host模式的命令,控制所述MTP host驱动模块将所述第一电子设备设置为MTP host模式,以使得与所述第一电子设备通过USB连接线连接的第二电子设备将自身设置为多媒体传输协议设备MTP device模式。The MTP host mode control module is configured to receive a command set to an MTP host mode, and the MTP host driving module is configured to set the first electronic device to an MTP host mode, so that the first electronic device is connected to the USB device. The second electronic device connected by the cable sets itself to the MTP device mode of the multimedia transmission protocol device.
- 根据权利要求7所述的第一电子设备,其中,所述第一电子设备为智能手机。The first electronic device of claim 7, wherein the first electronic device is a smart phone.
- 根据权利要求7所述的第一电子设备,其中,所述MTP host驱动模块将所述第一电子设备设置为MTP host模式包括:所述MTP host驱动模块通过硬件控制电路控制相关寄存器的数据,以将所述第一电子设备设置为MTP host模式。The first electronic device according to claim 7, wherein the setting, by the MTP host driving module, the first electronic device to an MTP host mode comprises: the MTP host driving module controlling data of a related register through a hardware control circuit, To set the first electronic device to an MTP host mode.
- 一种电子设备,包括:An electronic device comprising:至少一个处理器;以及,At least one processor; and,与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein所述存储器存储有可被所述一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:The memory stores instructions executable by the one processor, the instructions being executed by the at least one processor to enable the at least one processor to:接收设置为多媒体传输协议主机MTP host模式的命令,控制MTP host驱动模块将所述第一电子设备设置为MTP host模式,以使得与所述第一电子设备通过USB连接线连接的第二电子设备将自身设置为多媒体传输协议设备MTP device模式;Receiving a command set to a multimedia transmission protocol host MTP host mode, and controlling the MTP host driving module to set the first electronic device to an MTP host mode, so that the second electronic device connected to the first electronic device through a USB cable Set itself to the MTP device mode of the multimedia transmission protocol device;接收从所述第二电子设备中复制数据的命令,向所述第二电子设备发送基于MTP的复制数据的请求;以及Receiving a request to copy data from the second electronic device, and transmitting a request for MTP-based copy data to the second electronic device;接收所述第二电子设备应所述请求而发回的数据。Receiving data sent by the second electronic device in response to the request.
- 一种非暂态计算机可读存储介质,其中,所述非暂态计算机可读存储 介质存储计算机指令,所述计算机指令用于使所述计算机执行权利要求1-3任一项所述的第一电子设备从直连的第二电子设备中复制数据的方法。Non-transitory computer readable storage medium, wherein the non-transitory computer readable storage The medium stores computer instructions for causing the computer to perform the method of copying data from the directly connected second electronic device by the first electronic device of any of claims 1-3.
- 一种计算机程序产品,包括存储在非暂态计算机可读存储介质上的计算程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行权利要求1-3任一项所述的第一电子设备从直连的第二电子设备中复制数据的方法。 A computer program product comprising a computing program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform claims 1-3 A method of copying data from a directly connected second electronic device by the first electronic device.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610285460.2 | 2016-04-29 | ||
CN201610285460.2A CN105975353A (en) | 2016-04-29 | 2016-04-29 | Electronic device and method for copying data from the other directly connected electronic device |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017185693A1 true WO2017185693A1 (en) | 2017-11-02 |
Family
ID=56994586
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/103395 WO2017185693A1 (en) | 2016-04-29 | 2016-10-26 | Electronic device and method for copying data from another directly connected electronic device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105975353A (en) |
WO (1) | WO2017185693A1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105975353A (en) * | 2016-04-29 | 2016-09-28 | 乐视控股(北京)有限公司 | Electronic device and method for copying data from the other directly connected electronic device |
CN109271266B (en) * | 2018-10-09 | 2020-07-28 | Oppo广东移动通信有限公司 | File transmission method and device and terminal equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090193153A1 (en) * | 2007-12-26 | 2009-07-30 | Thanos William N | MTP-capable USB device and methods for use therewith |
US20100042580A1 (en) * | 2008-08-14 | 2010-02-18 | Chih-Hung Cheng | Method of for a Host to Access an Object Stored in a Multimedia Device Supported by MTP |
CN105205100A (en) * | 2015-08-24 | 2015-12-30 | 青岛海信移动通信技术股份有限公司 | Data synchronization method based on MTP between terminals and terminals |
CN105356989A (en) * | 2014-08-18 | 2016-02-24 | 北京壹人壹本信息科技有限公司 | MTP mode-based data synchronization method, system and device |
CN105975353A (en) * | 2016-04-29 | 2016-09-28 | 乐视控股(北京)有限公司 | Electronic device and method for copying data from the other directly connected electronic device |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7921244B2 (en) * | 2007-07-04 | 2011-04-05 | Ours Technology, Inc. | Data sharing and transfer systems and methods |
CN101764877A (en) * | 2009-12-18 | 2010-06-30 | 康佳集团股份有限公司 | Method for data transmission between two mobile phones |
CN105188154B (en) * | 2015-08-17 | 2019-01-22 | 北京凌阳益辉科技有限公司 | A kind of method, apparatus and system being automatically brought into operation smart machine |
CN105120009A (en) * | 2015-09-14 | 2015-12-02 | 百度在线网络技术(北京)有限公司 | Terminal interconnection method and device |
-
2016
- 2016-04-29 CN CN201610285460.2A patent/CN105975353A/en active Pending
- 2016-10-26 WO PCT/CN2016/103395 patent/WO2017185693A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090193153A1 (en) * | 2007-12-26 | 2009-07-30 | Thanos William N | MTP-capable USB device and methods for use therewith |
US20100042580A1 (en) * | 2008-08-14 | 2010-02-18 | Chih-Hung Cheng | Method of for a Host to Access an Object Stored in a Multimedia Device Supported by MTP |
CN105356989A (en) * | 2014-08-18 | 2016-02-24 | 北京壹人壹本信息科技有限公司 | MTP mode-based data synchronization method, system and device |
CN105205100A (en) * | 2015-08-24 | 2015-12-30 | 青岛海信移动通信技术股份有限公司 | Data synchronization method based on MTP between terminals and terminals |
CN105975353A (en) * | 2016-04-29 | 2016-09-28 | 乐视控股(北京)有限公司 | Electronic device and method for copying data from the other directly connected electronic device |
Also Published As
Publication number | Publication date |
---|---|
CN105975353A (en) | 2016-09-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102315104B1 (en) | Flexible schema for language model customization | |
US20190306277A1 (en) | Interaction between devices displaying application status information | |
JP5876193B2 (en) | Information exchange method, apparatus, and system | |
CN104699236A (en) | Using context to interpret natural language speech recognition commands | |
US9134887B2 (en) | Multi-device visual correlation interaction | |
CN106990927B (en) | Image forming apparatus, cloud server, image forming system, and connection setting method | |
KR101543578B1 (en) | A terminal certification system for vehicle network connection and certification method thereof | |
CN111049883A (en) | Data reading method, device and system of distributed table system | |
US20190197182A1 (en) | Electronic list user interface | |
WO2017185693A1 (en) | Electronic device and method for copying data from another directly connected electronic device | |
CN106843932A (en) | The upgrade method and system of virtual reality device firmware | |
WO2017148283A1 (en) | State information management system and method, and electronic device | |
WO2018036073A1 (en) | Usb-based method and device for upgrading electronic apparatus, and electronic apparatus | |
CN105450821A (en) | Method and device for phone call | |
US9959598B2 (en) | Method of processing image and electronic device thereof | |
CN104468499A (en) | Determining format compatibility across a data processing device and another data processing device prior to transfer of a multimedia file therebetween | |
US20170344347A1 (en) | Rendering interface objects defined by a separate application | |
US10949095B2 (en) | Method, network adapters and computer program product using network adapter memory to service data requests | |
CN111124874B (en) | Method for debugging webpage, debugging server and main control equipment | |
WO2017185694A1 (en) | Electronic device, and method for providing data for another directly connected electronic device | |
WO2018049975A1 (en) | Data transfer method and related product | |
KR101976665B1 (en) | Apparatus and method for processing electronic document information using image outputting apparatus | |
WO2017185685A1 (en) | Power delivery command processing method and apparatus, and electronic device | |
US20140057557A1 (en) | Electronic device and method for transferring information from one device to another device | |
WO2018049964A1 (en) | Data transfer method and related product |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16900201 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 16900201 Country of ref document: EP Kind code of ref document: A1 |