WO2024046117A1 - Data transmission method and terminal device - Google Patents

Data transmission method and terminal device Download PDF

Info

Publication number
WO2024046117A1
WO2024046117A1 PCT/CN2023/113203 CN2023113203W WO2024046117A1 WO 2024046117 A1 WO2024046117 A1 WO 2024046117A1 CN 2023113203 W CN2023113203 W CN 2023113203W WO 2024046117 A1 WO2024046117 A1 WO 2024046117A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
mouse
target data
drag
keyboard
Prior art date
Application number
PCT/CN2023/113203
Other languages
French (fr)
Chinese (zh)
Inventor
李鹏飞
Original Assignee
荣耀终端有限公司
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 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Publication of WO2024046117A1 publication Critical patent/WO2024046117A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0486Drag-and-drop
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages

Definitions

  • the present application relates to the field of terminal technology, and in particular, to a data transmission method and terminal equipment.
  • multiple terminal devices can support keyboard and mouse traversal to achieve cross-device collaboration.
  • the user's computer, mobile phone and tablet are connected, they can share the computer's mouse and keyboard.
  • the user can control the mobile phone and tablet through the computer's mouse and keyboard.
  • users can use the mouse to drag files, text, pictures and other data from their mobile phones or tablets to their computers, or users can use their mouse to drag files, texts, pictures and other data from their computers to their mobile phones or computers.
  • This application provides a data transmission method that can improve data transmission efficiency, reduce user operations, and improve user experience.
  • a data transmission method including: a first device detects a first operation of a user, and the first operation is used to move an identification of target data from a third device to the first device via a second device through a mouse. , the third device and the second device support keyboard and mouse traversal, and the second device and the first device support keyboard and mouse traversal; in response to the first operation, the first device sends information requesting target data to the third device through the second device; One device receives target data from a third device.
  • the first operation is used to move the identification of the target data from the third device to the first device via the second device through the mouse, where moving to the first device can be understood as dragging to the first device, that is, the user controls Use the mouse to drag the mark of the target data to the first device through the second device.
  • the identification of the target data may be pictures, documents, texts, music, videos, etc., which are not limited in the embodiments of the present application.
  • the target data is data dragged by the user, which can be any data that supports dragging, and can also be called dragging data, which is not limited in the embodiment of the present application.
  • the first device is the device that receives the target data, and can also be understood as the device that drags in the target data.
  • the second device can be understood as an intermediate device, which does not drag data out or import data.
  • the third device is a device that sends target data, and can also be understood as a device that drags out target data.
  • the first device and the third device may deploy the Android system and may be called Android devices.
  • the second device can deploy Windows system.
  • the first device may be a tablet 103
  • the second device may be a computer 101
  • the third device may be a mobile phone 102
  • the first device may be a mobile phone 102
  • the second device may be a computer 101
  • the third device may be a tablet 103 .
  • the first device requests the target data by requesting information about the target data.
  • the message may be sent to the first device first, and then sent by the second device to the third device.
  • the data transmission method provided by this application can support users to drag data from the first device through the second device to the third device, which can improve data transmission efficiency, reduce user operations, and improve user experience.
  • the first device receives the target data from the third device, including: the first device establishes a data transmission channel with the third device; the first device uses the data transmission channel Receive target data from a third device.
  • the first device and the third device directly establish a data transmission channel.
  • Using a transmission channel to transmit data does not require a second device to transfer data, which is more efficient and helps further improve data transmission efficiency.
  • the method further includes: the first device removes the data transmission channel.
  • the first device can dismantle the data transmission channel and establish it again when data needs to be transmitted, which is beneficial to saving the power consumption of the first device and avoiding waste of resources.
  • the first device receiving the target data from the third device includes: the first device receiving the target data from the third device through the second device.
  • the first device receives the target data from the third device through the second device, that is, the first device can obtain the target data from the second device, and the target data of the second device is sent by the third device.
  • the first device can obtain target data from the second device, and the target data of the second device is sent by the third device.
  • the existing data transmission method can be reused with minimal changes, which is conducive to application promotion. .
  • the method before sending the information requesting the target data to the third device through the second device, the method further includes: the first device determines that the mouse drags the identifier of the target data into Whether the area is a preset area; sending information requesting target data to the third device through the second device, including: in the case that the area dragged into by the identifier of the target data is a preset area, the first device sends the request to the third device through the second device.
  • Three devices send messages requesting target data.
  • the preset area is an area provided by the first device that allows data to be dragged in, and may vary according to different applications, and is not limited in this embodiment of the present application.
  • the first device can send information requesting the target data to the third device through the second device. If the area to which the target data identifier is dragged is not a preset area, it may indicate that the drag operation failed and the first device does not need to request the target data.
  • the data transmission method provided by this application when the area into which the target data identifier is dragged is a preset area, requests the target data from the third device through the second device, which is beneficial to displaying the drag data in the preset area.
  • the target data includes at least one of the following: text data, image data, document data, email data, compressed package data, music data or video data.
  • a data transmission method including: a third device detects a user's first operation, and the first operation is used to move an identification of target data from the third device to the first device through the second device through the mouse. , the third device and the second device support keyboard and mouse traversal, and the second device and the first device support keyboard and mouse traversal; the third device responds to the first operation, Information requesting target data from the first device is received through the second device; and the third device sends the target data to the first device.
  • the third device sends the target data to the first device, including: the third device establishes a data transmission channel with the first device; the third device transmits the target data to the first device through the data transmission channel. The first device sends the target data.
  • the method further includes: the third device removes the data transmission channel.
  • the third device sends the target data to the first device, including: the third device sends the target data to the first device through the second device.
  • the method before receiving the information requesting the target data from the first device through the second device, the method further includes: in response to the first operation, the third device obtains the target data.
  • URI universal resource identifier
  • the third device When the third device detects the first operation, it may first obtain the URI identified by the target data, so as to determine the target data based on the URI.
  • the target data includes at least one of the following: text data, image data, document data, email data, compressed package data, music data or video data.
  • a data transmission method including: the second device detects a first operation of the user, and the first operation is used to move the identification of the target data from the third device to the first device through the second device through the mouse. , the third device and the second device support keyboard and mouse traversal, and the second device and the first device support keyboard and mouse traversal; in response to the first operation, the second device receives information requesting target data from the first device; the second device sends The third device sends a message requesting the target data.
  • the second device After the second device receives the information requesting the target data, it sends the information requesting the target data to the third device, which is helpful for the first device and the third device to complete communication.
  • the method before the second device sends the information requesting the target data to the third device, the method further includes: in response to the first operation, the second device determines the movement status as Move from the third device to the first device; the second device sends the information requesting the target data to the third device, including: the second device sends the information requesting the target data to the third device based on the information requesting the target data and the movement status.
  • the moving state may also be called a dragging state, which is not limited in the embodiments of the present application.
  • the moving status can be dragging completed, dragging to the first device, dragging to the second device, or dragging to the third device, etc.
  • the movement state is dragging to the first device, it means that the target data is moved from the third device to the first device. If the movement state is dragging to the third device, it means that the target data is moved from the first device to the third device. If the movement state is dragging to the second device, it means that the target data is moved from the first device or the third device to the second device. If the moving status is dragging completed, it means the moving operation is completed.
  • the second device may send the information requesting the target data to the third device based on the information requesting the target data and the movement status to implement communication between the first device and the third device.
  • the method further includes: the second device receives target data from the third device; and the second device sends the target data to the first device.
  • the target data includes at least one of the following: text data, image data, document data, email data, compressed package data, music data or video data.
  • a terminal device including: a processing module and a transceiver module.
  • the processing module is used to: detect the user's first operation, the first operation is used to move the identification of the target data from the third device to the second device through the mouse, the third device and the second device support keyboard and mouse traversal, The second device supports keyboard and mouse traversal;
  • the transceiver module is configured to: in response to the first operation, send information requesting target data to the third device through the second device; and receive target data from the third device.
  • the above-mentioned processing module is also used to: establish a data transmission channel with the third device; the above-mentioned transceiver module is also used to: receive data from the third device through the data transmission channel. target data.
  • the above processing module is also used to: remove the data transmission channel.
  • the above-mentioned transceiver module is further configured to: receive target data from the third device through the second device.
  • the above-mentioned processing module is also used to: determine whether the area into which the mark of the target data is dragged by the mouse is a preset area; the above-mentioned transceiver module is also used to: in the target data When the area dragged into by the identifier is a preset area, information requesting target data is sent to the third device through the second device.
  • the target data includes at least one of the following: text data, image data, document data, email data, compressed package data, music data or video data.
  • a terminal device including: a processing module and a transceiver module.
  • the processing module is used to: detect the user's first operation, the first operation is used to move the identification of the target data from the second device to the first device through the mouse, and the second device supports keyboard and mouse traversal, and the second device The first device supports keyboard and mouse traversal;
  • the transceiver module is configured to: in response to the first operation, receive information requesting target data from the first device through the second device; and send the target data to the first device.
  • the above-mentioned processing module is also used to: establish a data transmission channel with the first device; the above-mentioned transceiver module is also used to: send the target to the first device through the data transmission channel. data.
  • the above processing module is also used to: dismantle the data transmission channel.
  • the above-mentioned transceiver module is also used to: send target data to the first device through the second device.
  • the above processing module is further configured to: in response to the first operation, obtain the universal resource identifier URI identified by the target data; and determine the data corresponding to the URI as the target data.
  • the target data includes at least one of the following: text data, image data, document data, email data, compressed package data, music data or video data.
  • a terminal device including: a processing module and a transceiver module.
  • the processing module is used to: detect the user's first operation, the first operation is used to move the identification of the target data from the third device to the first device through the mouse, the third device supports keyboard and mouse traversal, and the first device The device supports keyboard and mouse traversal;
  • the transceiver module is configured to: in response to the first operation, receive information requesting target data from the first device; and send information requesting target data to the third device.
  • the above-mentioned processing module is further configured to: in response to the first operation, determine the movement state as moving from the third device to the first device; the above-mentioned transceiver module is also configured to: : Based on the information and movement status of the requested target data, send the information requesting the target data to the third device.
  • the above-mentioned transceiver module is also used to: receive target data from the third device; and send the target data to the first device.
  • the target data includes at least one of the following: text data, image data, document data, email data, compressed package data, music data or video data.
  • the present application provides a terminal device, including a processor, which is coupled to a memory and can be used to execute instructions in the memory to implement the method in any of the possible implementation manners of any of the above aspects.
  • the device further includes memory.
  • the device further includes a transceiver, and the processor is coupled to the transceiver.
  • the present application provides a processor, including: an input circuit, an output circuit and a processing circuit.
  • the processing circuit is configured to receive signals through the input circuit and transmit signals through the output circuit, so that the processor performs the method in any of the possible implementations of any of the above aspects.
  • the above-mentioned processor can be a chip, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, a gate circuit, a flip-flop, and various logic circuits.
  • the input signal received by the input circuit may be received and input by, for example, but not limited to, the receiver, and the signal output by the output circuit may be, for example, but not limited to, output to and transmitted by the transmitter, and the input circuit and the output A circuit may be the same circuit that functions as an input circuit and an output circuit at different times.
  • This application does not limit the specific implementation methods of the processor and various circuits.
  • the present application provides a processing device, including a processor and a memory.
  • the processor is used to read instructions stored in the memory, and can receive signals through a receiver and transmit signals through a transmitter to execute the method in any of the possible implementations of any of the above aspects.
  • processors there are one or more processors and one or more memories.
  • the memory may be integrated with the processor, or the memory may be provided separately from the processor.
  • the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated on the same chip as the processor, or can be set in different On the chip, this application does not limit the type of memory and the arrangement of the memory and the processor.
  • ROM read-only memory
  • sending instruction information may be a process of outputting instruction information from the processor
  • receiving capability information may be a process of the processor receiving input capability information.
  • the data output by the processing can be output to the transmitter, and the input data received by the processor can come from the receiver.
  • the transmitter and receiver can be collectively called a transceiver.
  • the processing device in the ninth aspect can be a chip, and the processor can be implemented by hardware or software.
  • the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software.
  • the processor can be a general-purpose processor, which is implemented by reading the software code stored in the memory.
  • the memory can be integrated in the processor, or can be located outside the processor and exist independently.
  • the present application provides a computer-readable storage medium that stores a computer program (which can also be called code, or instructions) that when run on a computer causes the computer to execute any of the above.
  • a computer program which can also be called code, or instructions
  • the present application provides a computer program product.
  • the computer program product includes: a computer program (which can also be called a code, or an instruction).
  • a computer program which can also be called a code, or an instruction.
  • the computer program When the computer program is run, it causes the computer to execute any one of the above aspects. possible implementation methods.
  • Figure 1 is a schematic diagram of transferring photos across devices
  • Figure 2 is a schematic diagram of transmitting photos across devices according to an embodiment of the present application.
  • Figure 3 is a schematic diagram of another cross-device photo transmission provided by an embodiment of the present application.
  • Figure 4 is a schematic diagram of yet another cross-device photo transmission provided by an embodiment of the present application.
  • Figure 5 is a schematic diagram of a cross-device file transfer failure provided by an embodiment of the present application.
  • Figure 6 is a software structure block diagram of a PC provided by an embodiment of the present application.
  • Figure 7 is a software structure block diagram of an Android device provided by an embodiment of the present application.
  • Figure 8 is a schematic flow chart of a keyboard and mouse connection method provided by an embodiment of the present application.
  • Figure 9 is a schematic flow chart of a mouse crossing detection method provided by an embodiment of the present application.
  • Figure 10 is a schematic diagram of establishing a screen coordinate system provided by an embodiment of the present application.
  • Figure 11 is a schematic flow chart of a data transmission method provided by an embodiment of the present application.
  • Figure 12 is a schematic flow chart of a method for obtaining data provided by an embodiment of the present application.
  • Figure 13 is a schematic flow chart of another method of obtaining data provided by an embodiment of the present application.
  • Figure 14 is a schematic diagram of a terminal device provided by an embodiment of the present application.
  • Figure 15 is a schematic diagram of another terminal device provided by an embodiment of the present application.
  • words such as “first” and “second” are used to distinguish the same or similar items with basically the same functions and effects. Those skilled in the art can understand that words such as “first” and “second” do not limit the number and execution order, and words such as “first” and “second” do not limit the number and execution order.
  • At least one means one or more
  • plural means two or more.
  • “And/or” describes the association of associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A, B can be singular or plural.
  • the character “/” generally indicates that the related objects are in an “or” relationship.
  • “At least one of the following” or similar expressions thereof refers to any combination of these items, including any combination of a single item (items) or a plurality of items (items).
  • At least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.
  • multiple terminal devices can support keyboard and mouse traversal to achieve cross-device collaboration.
  • the user's computer, mobile phone and tablet are connected, they can share the computer's mouse and keyboard.
  • the user can control the mobile phone and tablet through the computer's mouse and keyboard.
  • users can use the mouse to drag files, text, pictures and other data from their mobile phones or tablets to their computers, or users can use their mouse to drag files, texts, pictures and other data from their computers to their mobile phones or computers.
  • FIG. 1 shows a schematic diagram of transmitting photos across devices.
  • the communication system includes a computer 101, a mobile phone 102 and a tablet 103.
  • the operating system of the computer 101 is Windows system
  • the operating system of mobile phone 102 and tablet 103 is Android system.
  • Keyboard and mouse travel can be realized between the computer 101 and the mobile phone 102
  • keyboard and mouse travel can be realized between the computer 101 and the tablet 103. That is to say, the computer 101, the mobile phone 102 and the tablet 103 can share the mouse and keyboard.
  • the computer 101 can be called the source device or the sending end
  • the mobile phone 102 and the tablet 103 can be called the peer device or the receiving end, but the embodiment of the present application is not limited thereto.
  • the computer 101 After the computer 101's keyboard and mouse travel to the mobile phone 102 or tablet 103, it can also realize cross-device transfer of files, photos, music and other content. That is to say, the user can drag files, photos, music and other content from the mobile phone 102 or tablet 103. Drag it to the computer 101, or drag files, photos, music and other content in the computer 101 to the mobile phone 102 or tablet 103. It can be understood that the embodiments of the present application are not limited to content such as documents, photos, and music.
  • the mobile phone 102 when the user takes a screenshot of the main interface of the mobile phone 102, the mobile phone 102 takes a screenshot in response to the user's operation of taking a screenshot, and displays the picture in the lower left corner of the interface.
  • the user can drag the picture to the desktop of the computer 101 through the mouse.
  • b in Figure 1 may be displayed in response to the operation.
  • the computer 101 can display the drag icon of the picture, and accordingly, the picture in the lower right corner of the interface of the mobile phone 102 disappears.
  • the picture can be saved to the file manager and the interface of the file manager is displayed, that is, c in Figure 1 is displayed.
  • the computer 101 saves the image to the file manager and names the image as 20220405_1 by default.
  • the format of the displayed image is png and the size of the displayed image is 302.08 kilobytes (Kilobyte, kb). As well as showing the time the picture was saved was "just now”.
  • the user transfers a screenshot of the mobile phone 102 to the tablet 103, he can only drag the data from the mobile phone 102 to the computer 101 through the mouse, and then drag the data from the computer 101 to the tablet 103 through the mouse.
  • the data from the mobile phone is directly transmitted to the tablet, which reduces the data transmission efficiency and makes the operation cumbersome, which is not conducive to the user experience.
  • embodiments of the present application provide a data transmission method, which can improve data transmission efficiency, reduce user operations, and improve user experience. That is to say, the user can use the mouse to drag the data from the mobile phone 102 directly to the tablet 103 via the computer 101, or the user can directly drag the data from the tablet 103 to the mobile phone 102 via the computer 101. There is no need to drag the data into the computer 101 first. Drag to Tablet 103.
  • Figure 2 shows a schematic diagram of transferring photos across devices.
  • the user drags the picture on the mobile phone 102 to the main interface of the tablet 103.
  • the mobile phone 102 takes a screenshot in response to the user's operation of taking a screenshot, and displays the picture in the lower left corner of the interface.
  • the user can drag the picture to the main interface of the tablet 103 through the computer 101 using the mouse.
  • the computer 101 detects the user's operation of dragging the picture to the main interface of the computer 101, b in Figure 2 may be displayed in response to the operation.
  • the computer 101 can display the drag icon A, and accordingly, the picture in the lower right corner of the interface of the mobile phone 102 disappears.
  • the computer 101 detects the user's drag operation to the tablet 103, and in response to the operation, c in Figure 2 can be displayed.
  • the tablet 103 may display the drag icon B.
  • the picture can be saved to the file manager and the interface of the file manager is displayed, that is, d in Figure 2 is displayed.
  • the tablet 103 saves the image to the file manager and names the image as 20220405_1 by default, the format of the displayed image is png and the size of the displayed image is 302.08 kilobytes (Kilobyte, kb).
  • the file manager can support any type of data, so the tablet 103 can be used to save data such as pictures, music, and files dragged to the main interface.
  • Figure 3 shows another schematic diagram of transferring photos across devices.
  • the user drags the picture on the mobile phone 102 to the chat interface of the tablet 103.
  • the mobile phone 102 takes a screenshot in response to the user's operation of taking a screenshot, and displays the picture in the lower left corner of the interface.
  • the user can drag the picture to the chat interface of the tablet 103 through the computer 101 with the mouse.
  • the computer 101 detects the user's operation of dragging the picture to the main interface of the computer 101, b in Figure 3 may be displayed in response to the operation.
  • the computer 101 can display the drag icon A, and accordingly, the picture in the lower right corner of the interface of the mobile phone 102 disappears.
  • the computer 101 detects the user's drag operation to the tablet 103, and in response to the operation, c in Figure 3 can be displayed.
  • the tablet 103 can display the drag icon B on the chat interface.
  • the picture can be displayed on the chat interface, that is, d in Figure 3 is displayed.
  • tablet 103 is displayed on the chat interface.
  • chat application can support data of image, file and other types, and can allow data transmission.
  • Figure 4 shows yet another schematic diagram of transferring photos across devices.
  • the user drags pictures from the mobile phone 102 to the gallery application of the tablet 103.
  • the mobile phone 102 takes a screenshot in response to the user's operation of taking a screenshot, and displays the picture in the lower left corner of the interface.
  • the user can drag the picture to the gallery application of the tablet 103 through the computer 101 with the mouse.
  • the computer 101 detects the user's operation of dragging the picture to the main interface of the computer 101, b in Figure 4 may be displayed in response to the operation.
  • the computer 101 can display the drag icon A, and accordingly, the picture in the lower right corner of the interface of the mobile phone 102 disappears.
  • the computer 101 detects the user's drag operation to the tablet 103, and in response to the operation, c in Figure 4 can be displayed.
  • the tablet 103 can display the drag icon B in the gallery application.
  • the picture can be saved to the gallery application, that is, d in Figure 4 is displayed.
  • the tablet 103 can display the picture in the gallery application.
  • the gallery application only supports the transmission of image data and does not allow the transmission of other data.
  • the gallery application does not support the file format, the gallery application does not save the dragged data, and the drag and drop fails.
  • FIG. 5 shows a schematic diagram of a file transfer failure across devices.
  • tablet 103 displays a file manager interface, which includes two documents, one of which is the meeting process and the other is the meeting content.
  • the computer 101 displays the main interface
  • the mobile phone 102 displays the interface of the gallery application.
  • the interface includes 5 pictures, and the 5 icons include photo 1, photo 2, photo 3, photo 4 and photo 5. If the user drags a meeting document on the tablet 103 to the gallery application of the mobile phone 102 via the computer 101, and the tablet 103 detects the user's operation of dragging the document out of the screen and onto the computer 101, in response to the operation, it can be displayed b in Figure 2.
  • the interface displayed by the tablet 103 only includes the meeting process document, and the computer 101 can display the drag icon A.
  • the computer 101 detects the user's operation of dragging the document out of the screen and onto the mobile phone 102.
  • c in Figure 5 can be displayed.
  • the mobile phone 102 can display the drag icon B in the gallery application.
  • the mobile phone 102 detects that the user cancels the drag operation on the document, in response to the operation, it determines whether the document is a data type supported by the gallery application. If the document does not meet the data type supported by the gallery application, the document can be refused to be received, and the document can be displayed as shown in Figure 4 d.
  • the tablet 103, the computer 101 and the mobile phone 102 display the initial interface before the drag operation without any changes.
  • drag icon B may vary according to the data type of the drag data.
  • the corresponding relationship between the data type and the drag icon B may be preset.
  • embodiments of the present application provide specific implementation methods of data transmission.
  • the method provided by the embodiment of the present application can be applied to a communication system with keyboard and mouse traversal, and the communication system includes three devices.
  • the communication system can include personal computers and Android devices.
  • the Android device includes Android device 1 and Android device 2, such as the communication system 100 described in Figure 1 above.
  • the PC is the computer 101
  • the mobile phone 102 can be the Android device 1
  • the tablet 103 can be the Android device 2.
  • a personal computer can be a desktop computer, a laptop computer (such as 101 above), a small laptop computer, a tablet computer, an ultrabook and other devices.
  • the software system of the personal computer is the windows system.
  • Android devices are devices that deploy the Android system, such as mobile phones (such as the above-mentioned mobile phone 102), tablets (such as the above-mentioned mobile phone 103), and so on.
  • FIG. 6 shows a software structure block diagram of a PC.
  • PC includes business layer, capability layer and driver layer.
  • the business layer includes applications, human-computer interaction (user interface, UI) interface implementation modules, keyboard and mouse business modules, and drag-and-drop modules.
  • applications include applications such as gallery, chat, and file managers.
  • the UI interface implementation module is used to provide users with a visual interface.
  • the UI interface implementation module can display the main interface shown in Figure 1 above, and so on.
  • the keyboard and mouse business module is used to call the keyboard virtualization capability module to realize keyboard and mouse traversal.
  • the drag module is used to call the drag framework to monitor the user's drag operation.
  • the capability layer includes the drag-and-drop framework, communication module (magic link), PC manager framework, keyboard virtualization capability module, audio system and storage system.
  • the drag and drop framework is used to support the user's drag and drop operation.
  • the communication module is used to communicate with Android devices.
  • the keyboard virtualization capability module is used to obtain keyboard and mouse events and transmit keyboard and mouse events.
  • PC housekeeper framework is used to manage PC housekeeper options.
  • the audio system manages the playback of high-performance audio. Storage systems are used for data storage.
  • the driver layer includes Bluetooth driver, audio driver, wifi driver and human interface device (HID) driver.
  • HID human interface device
  • Figure 7 shows a software structure block diagram of an Android device.
  • the Android device includes the application layer, application framework layer, Android runtime and system libraries, and kernel layer.
  • the application layer includes keyboard and mouse business modules, UI interface implementation modules, drag and drop modules, keyboard and mouse virtualization capability modules, communication modules (magic link) and applications.
  • the UI interface implementation module is used to provide users with a visual interface.
  • the UI interface implementation module is used to display the main interface and application interface.
  • the drag module is used to call the drag framework to monitor the user's drag operation.
  • the keyboard and mouse virtualization capability module is used to provide keyboard and mouse virtualization capabilities, that is, to obtain keyboard and mouse events and to transmit keyboard and mouse events.
  • the communication module is used to provide connection channels between devices and data capability transmission. Applications include applications such as gallery, chat, and file managers.
  • the application framework layer includes drag-and-drop framework, multi-screen framework, input management module and storage system.
  • the drag frame is used to provide drag capabilities when the keyboard and mouse traverse.
  • the input management module is used to provide keyboard and mouse event reporting.
  • Storage systems are used to store data.
  • the multi-screen framework is used to provide multi-screen operation with keyboard and mouse.
  • Android runtime and system libraries include core libraries, virtual machines, surface managers, media libraries, and 3D graphics processing libraries.
  • the Android system runtime is responsible for the scheduling and management of the Android system.
  • the core library contains two parts: one part is required by the Java language The function function called, the other part is the core library of Android.
  • the application layer and application framework layer run in virtual machines.
  • the virtual machine executes the Java files of the application layer and application framework layer as binary files.
  • the virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection and other functions.
  • the system library can contain modules with multiple functions, such as surface manager, media library, and 3D graphics processing library.
  • the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc.
  • the media library can support multiple audio and video encoding formats, such as JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, composition and layer processing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer is used to drive the hardware and make the hardware work.
  • the kernel layer includes Bluetooth driver, audio driver, wifi driver, virtual input driver (Uinput driver) and HID driver. Among them, the virtual input driver is used to inject input events.
  • the embodiment of the present application specifically introduces the method provided by the embodiment of the present application in conjunction with the modules involved in the above-mentioned Figures 5 and 6.
  • FIG. 8 shows a schematic flow chart of a keyboard and mouse connection method 800.
  • the method 800 can be applied to communication systems including PCs and Android devices, such as the above-mentioned communication system 100 , but the embodiments of the present application are not limited thereto.
  • the software architecture diagram of the PC can be shown in Figure 6, and the software architecture diagram of the Android device can be shown in Figure 7.
  • the embodiments of the present application are not limited thereto.
  • the method 800 may include the following steps:
  • the keyboard and mouse business module of the PC establishes a transmission connection with the keyboard and mouse business module of the Android device.
  • the keyboard and mouse business module of the PC and the keyboard and mouse business module of the Android device can establish a transmission connection.
  • the Android device is Android device 1 or Android device 2, which is not limited in the embodiment of the present application.
  • the keyboard and mouse business module of the PC sends the instruction information for starting the keyboard and mouse service to the keyboard and mouse business module of the Android device.
  • the keyboard and mouse business module of the Android device receives the instruction information for starting the keyboard and mouse service.
  • the instruction information for enabling the keyboard and mouse service is used to instruct the keyboard and mouse business module of the Android device to enable the keyboard and mouse service.
  • the keyboard and mouse service is also the keyboard and mouse traversal option.
  • the instruction information to enable the keyboard and mouse service means instructing the keyboard and mouse business module of the Android device to enable the keyboard and mouse traversal option.
  • the keyboard and mouse business module of the Android device determines whether the keyboard and mouse service is supported based on the instruction information for enabling the keyboard and mouse service.
  • the keyboard and mouse service is also the keyboard and mouse traversal option.
  • the opening and closing of the keyboard and mouse service is determined by the user.
  • the keyboard and mouse business module of the Android device determines whether the keyboard and mouse service is supported, that is, the keyboard and mouse business module of the Android device determines whether the user has checked, selected, or enabled the keyboard and mouse traversal option.
  • the keyboard and mouse business module of the Android device can support the keyboard and mouse service. If the user has not checked, unchecked, or turned off the keyboard and mouse traversal option, the keyboard and mouse business module of the Android device does not support the keyboard and mouse service, and keyboard and mouse traversal cannot be performed.
  • the keyboard and mouse business module of the Android device sends the instruction information for starting the keyboard and mouse service to the keyboard and mouse virtualization capability module of the Android device.
  • the keyboard and mouse virtualization capability module of the Android device receives Instructions for starting the keyboard and mouse service.
  • the keyboard and mouse virtualization capability module of the Android device registers a virtual input (Uinput) based on the instruction information for starting the keyboard and mouse service.
  • Uinput is used to inject keyboard and mouse events.
  • the keyboard and mouse virtualization capability module of the Android device sends the registration result A to the keyboard and mouse business module of the Android device.
  • the keyboard and mouse business module of the Android device receives the registration result A.
  • the registration result A can be used to indicate whether the registration of Uinput is successful.
  • the registration result can be success or failure.
  • success and failure may be represented by binary identifiers. For example, 1 indicates success and 0 indicates failure.
  • the keyboard and mouse virtualization capability module of the Android device sends the instruction information of registering cursor position monitoring to the multi-screen framework module of the Android device.
  • the multi-screen framework module of the Android device receives the instruction information for registering cursor position monitoring and registers cursor position monitoring.
  • the multi-screen framework module After the multi-screen framework module registers cursor position monitoring, it can monitor the cursor position.
  • the keyboard and mouse virtualization capability module of the Android device is based on the instruction information for starting the keyboard and mouse service.
  • the order between registering Uinput and sending the instruction information for registering cursor position monitoring is not limited. That is to say, the embodiment of the present application
  • the execution order of the above S805 and S808 is not limited.
  • the keyboard and mouse virtualization capability module of the Android device sends the registration result B to the keyboard and mouse business module of the Android device.
  • the keyboard and mouse business module of the Android device receives the registration result B.
  • Registration result B can be used to indicate whether the registration for cursor position monitoring is successful.
  • the registration result can be success or failure.
  • success and failure may be represented by binary identifiers. For example, 1 indicates success and 0 indicates failure.
  • the keyboard and mouse business module of the Android device sends instruction information for registering drag and drop monitoring to the drag and drop management module of the Android device.
  • the keyboard and mouse virtualization capability module of the Android device receives the registration. Instructions for drag monitoring.
  • the order in which the keyboard and mouse business module of the Android device sends the instruction information for starting the keyboard and mouse service and the instruction information for registering drag and drop monitoring is not limited. That is to say, The embodiment of the present application does not limit the execution order of the above S804 and S809.
  • the drag management module of the Android device sends the instruction information for registering drag and drop monitoring to the multi-screen framework module of the Android device.
  • the multi-screen framework module of the Android device receives the instruction information for registering drag and drop monitoring.
  • the keyboard and mouse business module of the Android device saves the processing result A, where the processing result A includes the results of whether the keyboard and mouse service is enabled, whether the Uinput registration is successful, and whether the cursor position monitoring registration is successful.
  • the processing result A may include that the keyboard and mouse service is started, Uinput is successfully registered, and cursor position monitoring is successfully registered.
  • the keyboard and mouse business module of the Android device sends the processing result A to the keyboard and mouse business module of the PC.
  • the keyboard and mouse business module of the PC receives the processing result A.
  • the keyboard and mouse business module of the PC sends instruction information to enable the keyboard and mouse service to the keyboard and mouse virtualization capability module of the PC.
  • the keyboard and mouse business module of the PC receives the instruction information to enable the keyboard and mouse service.
  • the above-mentioned S802 and S813 are sent in parallel by the keyboard and mouse business module of the PC, so the above-mentioned S802 ⁇ S812 and S813 ⁇ S818 are executed in parallel.
  • the PC's keyboard and mouse virtualization capability module registers keyboard and mouse event monitoring based on the instruction information for starting the keyboard and mouse service.
  • the PC's keyboard and mouse virtualization capability module registers keyboard and mouse event monitoring, and can monitor keyboard and mouse events.
  • the PC's keyboard and mouse virtualization capability module can monitor keyboard presses and mouse movements, clicks, drags, and other operations.
  • the keyboard and mouse virtualization capability module of the PC sets keyboard and mouse event interception based on the instruction information to enable the keyboard and mouse service.
  • the keyboard and mouse virtualization capability module of the PC sets up the keyboard and mouse event interception to intercept the keyboard and mouse events after the keyboard and mouse travel through.
  • the embodiment of the present application does not limit the execution order of the above S814 and S815.
  • the keyboard and mouse virtualization capability module of the PC saves the processing result B, where the processing result B includes the results of whether the registration of the keyboard and mouse software is successful and whether the setting of keyboard and mouse event interception is successful.
  • the processing result B may include successful registration of keyboard and mouse components and success in setting keyboard and mouse event interception.
  • the keyboard and mouse virtualization capability module of the PC sends the processing result B to the keyboard and mouse business module of the PC.
  • the keyboard and mouse business module of the PC receives the processing result B.
  • the keyboard and mouse business module of the PC sends the processing result B to the keyboard and mouse business module of the Android device.
  • the keyboard and mouse business module of the Android device receives the processing result B.
  • the keyboard and mouse business module of the PC and the keyboard and mouse business module of the Android device can compare the processing result A with the processing result B to determine whether the keyboard and mouse connection is successful.
  • the keyboard and mouse business module of the PC and the keyboard and mouse business module of the Android device can determine that the keyboard and mouse connection is successful. If at least one of the results in processing result A and processing result B is a failure, the keyboard and mouse business module of the PC and the keyboard and mouse business module of the Android device can determine that the keyboard and mouse connection is unsuccessful.
  • keyboard and mouse business module of the PC and the keyboard and mouse business module of the Android device are not successfully connected, both will return to the initialization state, that is, the above registration process will be re-executed.
  • the keyboard and mouse connection method provided by the embodiment of the present application enables keyboard and mouse connection between different devices during data transmission to prepare for subsequent data transmission, which is conducive to the smooth progress of data transmission.
  • the PC and the Android device can transmit data.
  • FIG. 9 shows a schematic flow chart of a mouse crossing detection method 900.
  • the method 900 may include the following steps:
  • the keyboard virtualization capability module of the PC obtains the mouse position.
  • the mouse position is the coordinates of the mouse on the screen.
  • the PC's keyboard virtualization capability module can create a two-dimensional coordinate system on the screen.
  • the coordinates of the mouse in the two-dimensional coordinate system are the mouse positions.
  • the mouse position can be represented by (XRaw, YRaw), but the embodiment of the present application is not limited to this.
  • FIG. 10 shows a schematic diagram of establishing a screen coordinate system.
  • screen OABC establishes a coordinate system with point O as the origin, the straight line where OA is located as the X-axis, and the straight line where OC is located as the Y-axis.
  • the screen resolution is 1920*1080
  • the length of line segment OA is equal to the length of line segment CB, which is equal to 1920
  • the length of line segment OC is equal to the length of line segment AB, which is equal to 1080
  • the coordinates of point O are (0,0)
  • the coordinates of point B are (1920,0)
  • the coordinates of point B are (1920,1080)
  • the coordinates of point C are (0,1080).
  • the mouse position is the coordinates of the mouse in the coordinate system.
  • the mouse position can be (1920,960).
  • Mouse displacement is the distance the mouse moves.
  • Mouse displacement can be expressed as (Lx, Ly).
  • Lx and Ly may be positive values or negative values, which are not limited in the embodiments of the present application.
  • the keyboard virtualization capability module of the PC calculates the position of the mouse after movement based on the mouse position and mouse displacement.
  • the position of the mouse after movement can be expressed by (curX, curY).
  • the keyboard virtualization capability module of the PC determines whether the position of the mouse after movement exceeds the screen.
  • the PC's keyboard virtualization capability module can determine that the mouse exceeds the screen. If curY is less than the minimum value of the screen on the Y-axis or greater than the maximum value of the screen on the Y-axis, the PC's keyboard virtualization capability module can determine that the mouse exceeds the screen.
  • the mouse crossing can be determined, that is, S905 is executed. If the position of the mouse after movement does not exceed the screen, the position after movement of the mouse can be determined as the current position, and the mouse movement continues to be obtained, that is, S902 is executed.
  • the keyboard virtualization capability module of the PC can determine the mouse traversal.
  • the PC can also determine the crossing direction of the mouse, for example, the crossing direction is left crossing, right crossing, up crossing, or down crossing.
  • the PC can determine that the crossing direction of the mouse is left crossing. If curX is greater than 1920, the PC can determine that the mouse's crossing direction is right crossing. If curY is less than 0, the PC's keyboard virtualization capability module can determine that the mouse's traversing direction is up. If curX is greater than 1080, the PC can determine that the mouse's crossing direction is downward crossing.
  • the mouse crossing detection method provided by the embodiment of the present application can determine whether the mouse exceeds the screen through the mouse position and mouse displacement, and determine the crossing direction, which is beneficial to improving the accuracy of detecting mouse crossing.
  • FIG. 11 shows a schematic flow chart of a data transmission method 1100.
  • the method 1100 can be applied to a communication system including a PC and an Android device, where the Android device includes Android device 1 and Android device 2 .
  • the PC is the computer 101, but the embodiment of the present application is not limited thereto.
  • the software architecture diagram of the PC can be shown in Figure 6, and the software architecture diagram of the Android device can be shown in Figure 7.
  • the embodiments of the present application are not limited thereto.
  • the method 1100 may include the following steps:
  • the application of Android device 1 detects the user's operation of dragging out data.
  • the application program may be at least one of a gallery, a chat, or a file manager, but the embodiment of the present application is not limited to the gallery, a chat, or a file manager.
  • the operation of the user dragging out the data may be the operation of the user dragging the data through the mouse.
  • the data dragged out by the user can be pictures, files, texts, compressed packages, emails, music, videos, etc. It can be understood that the data dragged out by the user can be any data that supports drag and drop, and the embodiments of this application do not do this. limited.
  • the Android device 1 may be the above-mentioned mobile phone 102 or tablet 103, which is not limited in the embodiment of the present application.
  • the Android device 1 may be a tablet 103
  • the application may be a file manager
  • the file manager detects the user's operation of dragging out a document.
  • the application program of Android device 1 sends data dragging information to the dragging framework of Android device 1.
  • the dragging framework of Android device 1 receives the data dragging information.
  • the drag and drop framework of Android device 1 sends data drag to the drag and drop module of Android device 1 based on the information of data drag.
  • the drag module of Android device 1 receives the information dragged out by the data.
  • the Android device 1 drag and drop module obtains the universal resource identifier (URI) of the dragged data based on the information dragged out.
  • URI universal resource identifier
  • URI is used to represent the data to be operated on.
  • the application of Android device 1 receives the user's operation of dragging out of the screen.
  • the application of Android device 1 may determine whether the user drags data off the screen based on the above method 900 .
  • the application program of Android device 1 sends a drag-out instruction to the drag module of the PC.
  • the drag module of the PC receives the instruction to drag out the screen.
  • the PC may be the above-mentioned computer 101, but the embodiment of the present application is not limited thereto.
  • the command of dragging out of the screen is used to inform the PC's drag module that the data has been dragged into the PC.
  • the instruction to drag out of the screen can be expressed by an identification bit, but the embodiment of the present application is not limited to this.
  • the instruction to drag out the screen may include an identification bit 1 to indicate that the data has been dragged into the PC.
  • S1106 is a simplified way of writing.
  • the application program of Android device 1 cannot communicate directly with the drag and drop module of PC.
  • the application program of Android device 1 can send the drag-and-drop command of Android device 1 to the drag-and-drop module of Android device 1.
  • the frame is transmitted from the drag frame of Android device 1 to the drag module of Android device 1, and then the drag module of Android device 1 sends the instruction of dragging out of the screen to the communication module of Android device 1.
  • the communication module of the Android device 1 receives the instruction of dragging out of the screen, it can transmit it to the communication module of the PC.
  • the communication module of the PC sends the instruction of dragging out of the screen to the drag module of the PC.
  • the drag-and-drop module of the PC can record the drag-and-drop status based on the command of dragging out of the screen.
  • the dragging status can be any one of dragging completed, dragging to PC, dragging to Android device 1 or dragging to Android device 2.
  • the drag-and-drop module of PC is based on the command of dragging out of the screen, and can record the drag-and-drop status as drag-and-drop to PC. If the drag-and-drop module of the PC detects the user's operation of dragging in data, the drag-and-drop status can be recorded (or updated) as drag-and-drop completion. If the drag module of the PC detects the user's dragging operation out of the screen, the drag status can be recorded (or updated) as drag to Android device 2.
  • the drag module of the PC detects the user's drag operation out of the screen.
  • the drag and drop module of the PC can update the drag and drop status in response to the user's dragging operation out of the screen.
  • the PC's drag module can update the drag status to drag to Android device 2.
  • the drag module of the PC sends the instruction information of dragging out of the screen to the drag module of the Android device 2.
  • the drag module of the Android device 2 receives the instruction information of dragging out of the screen.
  • S1110 is a simplified way of writing.
  • the drag and drop module of the PC cannot directly communicate with the drag and drop module of the Android device 2.
  • the drag and drop module of the PC can first send the instruction information of dragging out of the screen to the communication of the PC. module, then the communication module of the PC sends the instruction information for dragging out of the screen to the communication module of Android device 2, and finally the communication module of Android device 2 sends the instruction information for dragging out of the screen to the drag module of Android device 2.
  • the drag module of Android device 2 calls the interface provided by the drag framework of Android device 2 to initiate dragging, and draws an icon according to the image (bitmap) corresponding to the dragged out data.
  • the drag and drop module of Android device 2 calls the drag and drop framework to support the drag and drop function.
  • the drag-and-drop module of Android device 2 can display an icon at the mouse location based on the image (bitmap) corresponding to the dragged data.
  • the drag and drop module of Android device 2 can preset multiple data types and their corresponding bitmaps.
  • data types may include pictures, files, text, videos, and music.
  • the drag and drop module of Android device 2 can determine the data type of the dragged data based on the instruction information of dragging out of the screen, and determine the bitmap based on the data type.
  • the drag and drop module of Android device 2 can display icons at the mouse location based on bitmap.
  • the icon may be the drag icon B in Figure 2, Figure 3, Figure 4 or Figure 5, but the embodiment of the present application is not limited thereto.
  • the drag frame block of Android device 2 determines whether it is dragged into the draggable area.
  • the draggable area refers to the area that allows data to be dragged in. If the user drags data into the draggable area, the application can display the dragged data in the draggable area. If the user does not drag the data into the draggable area, the application does not allow the data to be dragged in, and the user's drag operation fails.
  • the dragging framework of Android device 2 sends business callback information to the application program of Android device 2.
  • the application program of Android device 2 receives the business callback information.
  • the application of Android device 2 performs business callback based on the business callback information, that is, executes the business after being dragged in.
  • the data transmission method provided by the embodiment of the present application can support users to drag and drop from Android device 1 to Android device 2 via PC, realizing data transmission across multiple devices. There is no need to drag and drop from Android device 1 to PC first, and then from PC to Android device 1. Dragging and dropping to an Android device 2 reduces PC transfers, helps improve the efficiency of data transmission, avoids cumbersome operations, and improves user experience.
  • Android device 2 can obtain the data from Android device 1.
  • the embodiments of this application provide two methods of obtaining data.
  • the first method of obtaining data is that Android device 1 first sends the data to the PC, and the PC then sends the data to Android device 2.
  • FIG. 12 shows a schematic flowchart of a method 1200 for obtaining data. As shown in Figure 12, the method 1200 includes the following steps:
  • the application of Android device 2 detects the user's operation of dragging in data.
  • the application program may be at least one of a gallery, a chat, or a file manager, but the embodiment of the present application is not limited to the gallery, a chat, or a file manager.
  • the application program of Android device 1 and the application program of Android device 2 may be the same or different, and this is not limited in the embodiment of the present application.
  • the application program of the Android device 2 is a chat application.
  • the application program of Android device 2 sends information requesting data to the drag module of Android device 2.
  • the drag module of Android device 2 receives the information requesting data.
  • the information for requesting data is used to request the dragged-in data from the drag-and-drop module of Android device 2.
  • the application program of Android device 2 can first send the information requesting data to the drag and drop framework of Android device 2, and then the drag and drop framework of Android device 2 will send the information requesting data. Drag and drop module sent to Android device 2.
  • the drag and drop module of the Android device 2 sends the information of the requested data to the drag and drop module of the PC.
  • the drag and drop module of the PC receives the information of the requested data.
  • the drag and drop module of Android device 2 can first request the The communication module sends information requesting data, and then the communication module of the Android device 2 sends the information requesting data to the communication module of the PC. Finally, the communication module of the PC sends the information requesting data to the drag module of the PC.
  • the drag and drop module of the PC determines whether it is a cross-PC drag and drop operation according to the drag and drop status.
  • the dragging state is dragging to the Android device 2, and the dragging module of the PC can determine that the dragging operation is a cross-PC dragging operation.
  • the drag and drop module of the PC sends information requesting data to the drag and drop module of Android device 1.
  • the drag and drop module of Android device 1 receives the information requesting data.
  • the drag and drop module of the PC can first send the information requesting data to the communication module of the PC, and then the communication module of the PC sends the information requesting the data to the communication module of the Android device 1, and finally the communication module of the Android device 1 Send a message requesting data to the drag and drop module of Android device 1.
  • the drag and drop module of Android device 1 determines the drag and drop data based on the URI of the data based on the information of the requested data.
  • the drag data may be a binary string, but the embodiment of the present application is not limited to this.
  • the drag and drop module of Android device 1 sends drag and drop data to the drag and drop module of the PC.
  • the drag and drop module of the PC receives the drag and drop data.
  • the drag and drop module of Android device 1 can first send drag and drop data to the communication module of the PC, and then the communication module of the PC sends the drag and drop data to the communication module of Android device 2, and finally the communication module of Android device 2 Send drag data to the drag module of Android device 2.
  • the drag and drop module of the PC is based on the drag and drop data and saves the drag and drop data.
  • the drag and drop module of the PC sends the drag and drop data to the communication module of the Android device 2.
  • the communication module of the Android device 2 receives the drag and drop data.
  • the drag and drop module of the PC can first send the drag and drop data to the communication module of the PC, and then the communication module of the PC sends the drag and drop data to the communication module of the Android device 2 .
  • the communication module of the Android device 2 sends the data reception success message to the drag and drop module of the Android device 2.
  • the drag and drop module of the Android device 2 receives the data reception success message.
  • the information of successful data reception is used to indicate that the communication module of the Android device 2 has successfully received the communication data.
  • the information of successful data reception may also include drag and drop data, so that the drag and drop module of the Android device 2 can obtain the drag and drop data.
  • the drag-and-drop module of Android device 2 sends drag-and-drop data to the application program based on the information that data reception is successful.
  • the application program sends drag-and-drop data.
  • Applications can also display drag data in the interface.
  • the drag-and-drop module of the Android device 2 can also send the information of successful data reception to the drag-and-drop module of the PC.
  • the drag-and-drop module of the PC receives the information of successful data reception.
  • the embodiment of the present application does not limit the execution order of S1211 and S1212.
  • the drag and drop module of the PC clears the drag and drop data based on the information that data reception is successful.
  • the PC drag and drop module clears the drag and drop data based on the information of successful data reception, and can also update the drag and drop status to drag and drop completed.
  • Android device 1 when Android device 2 requests to obtain the dragged-in data, Android device 1 can first transmit the data to the PC, and then transmit the data from the PC to Android device 2, using the PC for data transfer, which is equivalent to First Drag data from Android device 1 to PC, and then drag data from PC to Android device 2. You can reuse the existing data transmission method with minimal changes, which is conducive to application promotion.
  • the communication module of Android device 2 can request data again from the drag and drop module of PC.
  • the drag and drop module of PC can send data to the communication module of Android device 2 based on the saved data. Saving the steps to obtain data will help improve data transmission efficiency.
  • Android device 1 directly sends data to Android device 2, that is, the data does not pass through the PC.
  • FIG. 13 shows a schematic flowchart of a method 1300 for obtaining data.
  • the method 1300 may include the above-mentioned S1201 to S1205, and may also include the following steps:
  • the drag module of Android device 1 sends instruction information for establishing a transmission channel to the communication module of Android device 1.
  • the communication module of Android device 1 receives the instruction information for establishing a transmission channel.
  • the instruction information for establishing a transmission channel is used to instruct the communication module of Android device 1 and the communication module of Android device 2 to establish a transmission channel.
  • the communication module of Android device 1 establishes a data transmission channel with the communication module of Android device 2 based on the instruction information for establishing a transmission channel.
  • the drag and drop module of Android device 1 sends drag and drop data to the communication module of Android device 1.
  • the communication module of Android device 1 receives the drag and drop data.
  • the communication module of Android device 1 sends drag and drop data to the communication module of Android device 2 through the data transmission channel.
  • the communication module of Android device 2 receives the drag and drop data.
  • the communication module of the Android device 2 sends the data reception success message to the drag and drop module of the Android device 2.
  • the drag and drop module of the Android device 2 receives the data reception success message.
  • the information of successful data reception is used to indicate that the communication module of the Android device 2 has successfully received the communication data.
  • the information of successful data reception may also include drag and drop data, so that the drag and drop module of the Android device 2 can obtain the drag and drop data.
  • the drag-and-drop module of Android device 2 sends drag-and-drop data to the application program based on the information that data reception is successful.
  • the application program sends drag-and-drop data.
  • Applications can also display drag data in the interface.
  • the drag-and-drop module of Android device 2 can also send the information of successful data reception to the drag-and-drop module of the PC.
  • the drag-and-drop module of the PC receives the information of successful data reception.
  • the embodiment of the present application does not limit the execution order of S1306 and S1307.
  • the drag and drop module of the PC updates the drag and drop status based on the information of successful data reception.
  • the PC's drag and drop module updates the drag and drop status to drag and drop completed.
  • the drag and drop module of the PC sends a drag and drop completion message to the drag and drop module of the Android device 1.
  • the drag and drop module of the Android device 1 receives the drag and drop completion message.
  • the drag completion message is used to indicate that the drag has been completed.
  • the drag module of Android device 1 sends the instruction information of the disassembly channel to the communication module of Android device 1.
  • the communication module of Android device 1 receives the instruction information of the dismantling channel, and dismantles the instruction information based on the disassembly.
  • Channel indication information remove the data transmission channel.
  • the instruction information to remove the channel is used to instruct the communication module of the Android device 1 to remove the channel.
  • Android device 1 when Android device 2 requests to obtain the dragged-in data, Android device 1 can transmit the data to Android device 2 through the data transmission channel between Android device 1 and Android device 2, without the need for a PC. Data transfer deliberately reduces the data transmission process and improves data transmission efficiency.
  • the size of the serial numbers of the above processes does not mean the order of execution.
  • the execution order of each process should be determined by its functions and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
  • FIG. 14 shows a schematic diagram of a terminal device 1400 provided by an embodiment of the present application.
  • the terminal device 1400 includes: a processing module 1410 and a transceiver module 1420.
  • the terminal device 1400 can perform the steps performed by the Android device 2 in the above embodiment.
  • the processing module 1410 is used to: detect the user's first operation, the first operation is used to move the identification of the target data from the third device to the second device through the mouse, and the third device and the second device support keyboard and mouse traversal. , the second device supports keyboard and mouse traversal; the transceiver module 1420 is configured to: in response to the first operation, send information requesting target data to the third device through the second device; and receive target data from the third device.
  • the terminal device 1400 can perform the steps performed by the Android device 1 in the above embodiment.
  • the processing module 1410 is used to: detect the user's first operation, the first operation is used to move the identification of the target data from the second device to the first device through the mouse, and the second device supports keyboard and mouse traversal, and the second The device and the first device support keyboard and mouse traversal; the transceiver module 1420 is configured to: in response to the first operation, receive information requesting target data from the first device through the second device; and send the target data to the first device.
  • the terminal device 1400 can perform the steps performed by the PC in the above embodiment.
  • the processing module 1410 is used to: detect the user's first operation, the first operation is used to move the identification of the target data from the third device to the first device through the mouse, the third device supports keyboard and mouse traversal, and the third device A device supports keyboard and mouse traversal; the transceiver module 1420 is configured to: in response to the first operation, receive information requesting target data from the first device; and send information requesting target data to a third device.
  • the terminal device 1400 here is embodied in the form of a functional module.
  • module may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group of processors) for executing one or more software or firmware programs. processor, etc.) and memory, merged logic circuitry, and/or other suitable components to support the described functionality.
  • ASIC application specific integrated circuit
  • the terminal device 1400 can be specifically the Android device 2, PC or Android device 1 in the above method embodiment, or the Android device 2, PC or Android device 1 in the above method embodiment.
  • the functions of the Android device 1 can be integrated in the terminal device 1400, and the terminal device 1400 can be used to perform various processes and/or steps corresponding to the Android device 2, PC or Android device 1 in the above method embodiments. To avoid duplication, here No longer.
  • the above terminal device 1400 has the function of implementing the corresponding steps performed by the Android device 2, PC or Android device 1 in the above method embodiment; the above functions can be implemented by hardware, or can also be implemented by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the terminal device 1400 in Figure 14 may also be a chip or a chip system, such as a system on chip (SoC).
  • SoC system on chip
  • FIG. 15 is a schematic block diagram of another terminal device 1500 provided by an embodiment of the present application.
  • the terminal device 1500 includes a processor 1510, a transceiver 1520 and a memory 1530.
  • the processor 1510, the transceiver 1520 and the memory 1530 communicate with each other through internal connection paths.
  • the memory 1530 is used to store instructions, and the processor 1520 is used to execute the instructions stored in the memory 1530 to control the transceiver 1520 to send signals and /or receive a signal.
  • the terminal device 1500 can be specifically the Android device 2, PC or Android device 1 in the above method embodiment, or the functions of the Android device 2, PC or Android device 1 in the above method embodiment can be integrated into the terminal device 1500.
  • the terminal device 1500 can be used to execute various steps and/or processes corresponding to the Android device 2, PC or Android device 1 in the above method embodiment.
  • the memory 1530 may include read-only memory and random access memory and provide instructions and data to the processor. A portion of the memory may also include non-volatile random access memory.
  • the memory may also store device type information.
  • the processor 1510 can be used to execute instructions stored in the memory, and when the processor executes the instructions, the processor can execute various steps and/or processes corresponding to the terminal device in the above method embodiment.
  • the processor 1510 may be a central processing unit (CPU).
  • the processor may also be other general-purpose processors, digital signal processors (DSP), or application specific integrated circuits (ASICs). ), field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • DSP digital signal processors
  • ASICs application specific integrated circuits
  • FPGA field programmable gate array
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
  • each step of the above method can be completed by instructions in the form of hardware integrated logic circuits or software in the processor.
  • the steps of the methods disclosed in conjunction with the embodiments of the present application can be directly implemented by a hardware processor for execution, or can be executed by a combination of hardware and software modules in the processor.
  • the software module can be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other mature storage media in this field.
  • the storage medium is located in the memory, and the processor executes the instructions in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
  • This application also provides a computer-readable storage medium, which is used to store a computer program.
  • the computer program is used to implement the method corresponding to the Android device 2, PC or Android device 1 in the above method embodiment.
  • This application also provides a chip system, which is used to support the Android device 2, PC or Android device 1 in the above method embodiment to implement the functions shown in the embodiment of this application.
  • the computer program product includes a computer program (which can also be called a code, or an instruction).
  • a computer program which can also be called a code, or an instruction.
  • the computer program When the computer program is run on a computer, the computer can execute the steps shown in the above method embodiments.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of modules is only a logical function division. In actual implementation, there may be other division methods.
  • multiple modules or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or modules, and may be in electrical, mechanical or other forms.
  • modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module.
  • the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The present application provides a data transmission method and a terminal device, which can improve the data transmission efficiency, reduce the operations of a user, and improve the user experience. The data transmission method provided in the present application comprises: a first device detecting a first operation of a user, wherein the first operation is used for moving, by means of a mouse, an identifier of target data from a third device to the first device via a second device, the third device and the second device support keyboard-mouse crossover, and the second device and the first device support keyboard-mouse crossover; in response to the first operation, the first device sending information of requesting the target data to the third device by means of the second device; and the first device receiving the target data from the third device.

Description

数据传输方法和终端设备Data transmission method and terminal equipment
本申请要求于2022年09月02日提交中国国家知识产权局、申请号为202211071845.0、申请名称为“数据传输方法和终端设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on September 2, 2022, with application number 202211071845.0 and application name "Data transmission method and terminal equipment", the entire content of which is incorporated into this application by reference. middle.
技术领域Technical field
本申请涉及终端技术领域,尤其涉及一种数据传输方法和终端设备。The present application relates to the field of terminal technology, and in particular, to a data transmission method and terminal equipment.
背景技术Background technique
为了满足用户工作和学习的需求,多个终端设备之间可以支持键鼠穿越,以实现跨设备协同。例如,用户的电脑、手机以及平板连接后,可以共用电脑的鼠标和键盘,也就是说,用户可以通过电脑的鼠标和键盘控制手机以及平板。比如,用户可以通过鼠标将手机或者平板的文件、文本以及图片等数据拖拽至电脑,或者,用户可以通过鼠标将电脑的文件、文本以及图片等数据拖拽至手机或者电脑。In order to meet the needs of users for work and study, multiple terminal devices can support keyboard and mouse traversal to achieve cross-device collaboration. For example, after the user's computer, mobile phone and tablet are connected, they can share the computer's mouse and keyboard. In other words, the user can control the mobile phone and tablet through the computer's mouse and keyboard. For example, users can use the mouse to drag files, text, pictures and other data from their mobile phones or tablets to their computers, or users can use their mouse to drag files, texts, pictures and other data from their computers to their mobile phones or computers.
在这种情况下,若用户将手机的数据传输至平板,只能先通过鼠标将手机的数据拖拽至电脑,再通过鼠标将数据从电脑拖拽至平板,不能将手机的数据直接传输至平板,降低数据传输效率,且操作繁琐,不利于用户体验。In this case, if the user transfers the data from the mobile phone to the tablet, he can only drag the data from the mobile phone to the computer through the mouse, and then drag the data from the computer to the tablet through the mouse. The data from the mobile phone cannot be transferred directly to the tablet. Tablets reduce data transmission efficiency and are cumbersome to operate, which is not conducive to user experience.
发明内容Contents of the invention
本申请提供一种数据传输方法,可以提高数据传输效率,减少用户的操作,提高用户体验。This application provides a data transmission method that can improve data transmission efficiency, reduce user operations, and improve user experience.
第一方面,提供了一种数据传输方法,包括:第一设备检测到用户的第一操作,第一操作用于通过鼠标将目标数据的标识从第三设备经第二设备移动至第一设备,第三设备与第二设备支持键鼠穿越,第二设备与第一设备支持键鼠穿越;第一设备响应于第一操作,通过第二设备向第三设备发送请求目标数据的信息;第一设备接收来自第三设备的目标数据。In a first aspect, a data transmission method is provided, including: a first device detects a first operation of a user, and the first operation is used to move an identification of target data from a third device to the first device via a second device through a mouse. , the third device and the second device support keyboard and mouse traversal, and the second device and the first device support keyboard and mouse traversal; in response to the first operation, the first device sends information requesting target data to the third device through the second device; One device receives target data from a third device.
第一操作用于通过鼠标将目标数据的标识从第三设备经第二设备移动至第一设备,其中,移动至第一设备,可以理解为拖拽至第一设备,也就是说,用户控制鼠标将目标数据的标识经过第二设备拖拽至第一设备。目标数据的标识可以为图片、文档、文本、音乐以及视频等等,本申请实施例对此不作限定。The first operation is used to move the identification of the target data from the third device to the first device via the second device through the mouse, where moving to the first device can be understood as dragging to the first device, that is, the user controls Use the mouse to drag the mark of the target data to the first device through the second device. The identification of the target data may be pictures, documents, texts, music, videos, etc., which are not limited in the embodiments of the present application.
目标数据为用户拖拽的数据,可以是任意支持拖拽的数据,也可以称为拖拽数据,本申请实施例对此不作限定。The target data is data dragged by the user, which can be any data that supports dragging, and can also be called dragging data, which is not limited in the embodiment of the present application.
第一设备为接收目标数据的设备,也可以理解为拖入目标数据的设备。第二设备可以理解为中间设备,即不拖出数据也不拖入数据。第三设备为发送目标数据设备,也可以理解为拖出目标数据的设备。The first device is the device that receives the target data, and can also be understood as the device that drags in the target data. The second device can be understood as an intermediate device, which does not drag data out or import data. The third device is a device that sends target data, and can also be understood as a device that drags out target data.
可选地,第一设备和第三设备可以部署安卓系统,可以称为安卓设备。第二设备可以部署Windows系统。 Optionally, the first device and the third device may deploy the Android system and may be called Android devices. The second device can deploy Windows system.
示例性地,在图2所示的示例中,第一设备可以为平板103、第二设备为电脑101、第三设备为手机102。在图5所示的示例中,第一设备可以为手机102、第二设备为电脑101、第三设备为平板103。Illustratively, in the example shown in FIG. 2 , the first device may be a tablet 103 , the second device may be a computer 101 , and the third device may be a mobile phone 102 . In the example shown in FIG. 5 , the first device may be a mobile phone 102 , the second device may be a computer 101 , and the third device may be a tablet 103 .
第一设备通过请求目标数据的信息请求目标数据,该消息可以先发送至第一设备,再由第二设备发送至第三设备。The first device requests the target data by requesting information about the target data. The message may be sent to the first device first, and then sent by the second device to the third device.
本申请提供的数据传输方法,可以支持用户将数据从第一设备经过第二设备拖拽至第三设备,可以提高数据传输效率,减少用户的操作,提高用户体验。The data transmission method provided by this application can support users to drag data from the first device through the second device to the third device, which can improve data transmission efficiency, reduce user operations, and improve user experience.
结合第一方面,在第一方面的某些实现方式中,第一设备接收来自第三设备的目标数据,包括:第一设备建立与第三设备的数据传输通道;第一设备通过数据传输通道接收来自第三设备的目标数据。Combined with the first aspect, in some implementations of the first aspect, the first device receives the target data from the third device, including: the first device establishes a data transmission channel with the third device; the first device uses the data transmission channel Receive target data from a third device.
本申请提供的数据传输方法,第一设备和第三设备直接建立数据传输通道。利用传输通道传输数据,不需要第二设备中转数据,更加高效,有利于进一步提供数据传输效率。In the data transmission method provided by this application, the first device and the third device directly establish a data transmission channel. Using a transmission channel to transmit data does not require a second device to transfer data, which is more efficient and helps further improve data transmission efficiency.
结合第一方面,在第一方面的某些实现方式中,在第一设备通过数据传输通道接收来自第三设备的目标数据之后,方法还包括:第一设备拆除数据传输通道。In conjunction with the first aspect, in some implementations of the first aspect, after the first device receives the target data from the third device through the data transmission channel, the method further includes: the first device removes the data transmission channel.
本申请提供的数据传输方法,当数据传输后,第一设备可以拆除数据传输通道,在需要传输数据时再建立,有利于节省第一设备的功耗,同时可以避免资源浪费。In the data transmission method provided by this application, after the data is transmitted, the first device can dismantle the data transmission channel and establish it again when data needs to be transmitted, which is beneficial to saving the power consumption of the first device and avoiding waste of resources.
结合第一方面,在第一方面的某些实现方式中,第一设备接收来自第三设备的目标数据,包括:第一设备通过第二设备接收来自第三设备的目标数据。In conjunction with the first aspect, in some implementations of the first aspect, the first device receiving the target data from the third device includes: the first device receiving the target data from the third device through the second device.
第一设备通过第二设备接收来自第三设备的目标数据,也就是说,第一设备可以从第二设备获取目标数据,第二设备的目标数据是第三设备发送的。The first device receives the target data from the third device through the second device, that is, the first device can obtain the target data from the second device, and the target data of the second device is sent by the third device.
本申请提供的数据传输方法,第一设备可以从第二设备获取目标数据,第二设备的目标数据是第三设备发送的,可以复用现有的数据传输方法,改动最小,有利于应用推广。With the data transmission method provided by this application, the first device can obtain target data from the second device, and the target data of the second device is sent by the third device. The existing data transmission method can be reused with minimal changes, which is conducive to application promotion. .
结合第一方面,在第一方面的某些实现方式中,在通过第二设备向第三设备发送请求目标数据的信息之前,方法还包括:第一设备判断鼠标将目标数据的标识拖入的区域是否为预设区域;通过第二设备向第三设备发送请求目标数据的信息,包括:在目标数据的标识拖入的区域为预设区域的情况下,第一设备通过第二设备向第三设备发送请求目标数据的信息。In connection with the first aspect, in some implementations of the first aspect, before sending the information requesting the target data to the third device through the second device, the method further includes: the first device determines that the mouse drags the identifier of the target data into Whether the area is a preset area; sending information requesting target data to the third device through the second device, including: in the case that the area dragged into by the identifier of the target data is a preset area, the first device sends the request to the third device through the second device. Three devices send messages requesting target data.
预设区域为第一设备提供的允许拖入数据的区域,可以根据应用程序的不同而不同,本申请实施例对此不作限定。The preset area is an area provided by the first device that allows data to be dragged in, and may vary according to different applications, and is not limited in this embodiment of the present application.
若目标数据的标识拖入的区域为预设区域,可以说明拖拽操作完成,第一设备可以通过第二设备向第三设备发送请求目标数据的信息。若目标数据的标识拖入的区域不是预设区域,可以说明拖拽操作失败,第一设备不需要请求目标数据。If the area to which the target data identifier is dragged is a preset area, it means that the drag operation is completed, and the first device can send information requesting the target data to the third device through the second device. If the area to which the target data identifier is dragged is not a preset area, it may indicate that the drag operation failed and the first device does not need to request the target data.
本申请提供的数据传输方法,在目标数据的标识拖入的区域为预设区域的情况下,通过第二设备向第三设备请求目标数据,有利于在预设区域中显示拖拽数据。The data transmission method provided by this application, when the area into which the target data identifier is dragged is a preset area, requests the target data from the third device through the second device, which is beneficial to displaying the drag data in the preset area.
结合第一方面,在第一方面的某些实现方式中,目标数据包括以下至少一项:文本数据、图像数据、文档数据、邮件数据、压缩包数据、音乐数据或者视频数据。In conjunction with the first aspect, in some implementations of the first aspect, the target data includes at least one of the following: text data, image data, document data, email data, compressed package data, music data or video data.
第二方面,提供了一种数据传输方法,包括:第三设备检测到用户的第一操作,第一操作用于通过鼠标将目标数据的标识从第三设备经第二设备移动至第一设备,第三设备与第二设备支持键鼠穿越,第二设备与第一设备支持键鼠穿越;第三设备响应于第一操作, 通过第二设备接收来自第一设备的请求目标数据的信息;第三设备向第一设备发送目标数据。In a second aspect, a data transmission method is provided, including: a third device detects a user's first operation, and the first operation is used to move an identification of target data from the third device to the first device through the second device through the mouse. , the third device and the second device support keyboard and mouse traversal, and the second device and the first device support keyboard and mouse traversal; the third device responds to the first operation, Information requesting target data from the first device is received through the second device; and the third device sends the target data to the first device.
结合第二方面,在第二方面的某些实现方式中,第三设备向第一设备发送目标数据,包括:第三设备建立与第一设备的数据传输通道;第三设备通过数据传输通道向第一设备发送目标数据。Combined with the second aspect, in some implementations of the second aspect, the third device sends the target data to the first device, including: the third device establishes a data transmission channel with the first device; the third device transmits the target data to the first device through the data transmission channel. The first device sends the target data.
结合第二方面,在第二方面的某些实现方式中,在第三设备通过数据传输通道向第一设备发送目标数据之后,方法还包括:第三设备拆除数据传输通道。Combined with the second aspect, in some implementations of the second aspect, after the third device sends the target data to the first device through the data transmission channel, the method further includes: the third device removes the data transmission channel.
结合第二方面,在第二方面的某些实现方式中,第三设备向第一设备发送目标数据,包括:第三设备通过第二设备向第一设备发送目标数据。Combined with the second aspect, in some implementations of the second aspect, the third device sends the target data to the first device, including: the third device sends the target data to the first device through the second device.
结合第二方面,在第二方面的某些实现方式中,在通过第二设备接收来自第一设备的请求目标数据的信息之前,方法还包括:第三设备响应于第一操作,获取目标数据标识的通用资源标志符(universal resource identifier,URI);第三设备将URI对应的数据确定为目标数据。In conjunction with the second aspect, in some implementations of the second aspect, before receiving the information requesting the target data from the first device through the second device, the method further includes: in response to the first operation, the third device obtains the target data. The identified universal resource identifier (URI); the third device determines the data corresponding to the URI as the target data.
当第三设备检测到第一操作时,可以先获取目标数据标识的URI,以便于基于URI确定目标数据。When the third device detects the first operation, it may first obtain the URI identified by the target data, so as to determine the target data based on the URI.
结合第二方面,在第二方面的某些实现方式中,目标数据包括以下至少一项:文本数据、图像数据、文档数据、邮件数据、压缩包数据、音乐数据或者视频数据。Combined with the second aspect, in some implementations of the second aspect, the target data includes at least one of the following: text data, image data, document data, email data, compressed package data, music data or video data.
第三方面,提供了一种数据传输方法,包括:第二设备检测到用户的第一操作,第一操作用于通过鼠标将目标数据的标识从第三设备经第二设备移动至第一设备,第三设备与第二设备支持键鼠穿越,第二设备与第一设备支持键鼠穿越;第二设备响应于第一操作,接收来自第一设备的请求目标数据的信息;第二设备向第三设备发送请求目标数据的信息。In a third aspect, a data transmission method is provided, including: the second device detects a first operation of the user, and the first operation is used to move the identification of the target data from the third device to the first device through the second device through the mouse. , the third device and the second device support keyboard and mouse traversal, and the second device and the first device support keyboard and mouse traversal; in response to the first operation, the second device receives information requesting target data from the first device; the second device sends The third device sends a message requesting the target data.
本申请提供的数据传输方法,第二设备接收请求目标数据的信息后,向第三设备发送请求目标数据的信息,有利于第一设备和第三设备完成通信。In the data transmission method provided by this application, after the second device receives the information requesting the target data, it sends the information requesting the target data to the third device, which is helpful for the first device and the third device to complete communication.
结合第三方面,在第三方面的某些实现方式中,在第二设备向第三设备发送请求目标数据的信息之前,方法还包括:第二设备响应于第一操作,将移动状态确定为从第三设备移动至第一设备;第二设备向第三设备发送请求目标数据的信息,包括:第二设备基于请求目标数据的信息和移动状态,向第三设备发送请求目标数据的信息。In conjunction with the third aspect, in some implementations of the third aspect, before the second device sends the information requesting the target data to the third device, the method further includes: in response to the first operation, the second device determines the movement status as Move from the third device to the first device; the second device sends the information requesting the target data to the third device, including: the second device sends the information requesting the target data to the third device based on the information requesting the target data and the movement status.
移动状态也可以称为拖拽状态,本申请实施例对此不作限定。移动状态可以为拖拽完成、拖拽至第一设备、拖拽至第二设备或者拖拽至第三设备等等。The moving state may also be called a dragging state, which is not limited in the embodiments of the present application. The moving status can be dragging completed, dragging to the first device, dragging to the second device, or dragging to the third device, etc.
若移动状态为拖拽至第一设备,则表示目标数据是从第三设备移动至第一设备。若移动状态为拖拽至第三设备,则表示目标数据是从第一设备移动至第三设备。若移动状态为拖拽至第二设备,则表示目标数据是从第一设备或者第三设备移动至第二设备。若移动状态为拖拽完成,则表示移动操作完成。If the movement state is dragging to the first device, it means that the target data is moved from the third device to the first device. If the movement state is dragging to the third device, it means that the target data is moved from the first device to the third device. If the movement state is dragging to the second device, it means that the target data is moved from the first device or the third device to the second device. If the moving status is dragging completed, it means the moving operation is completed.
第二设备可以基于请求目标数据的信息和移动状态,向第三设备发送请求目标数据的信息以实现第一设备和第三设备通信。The second device may send the information requesting the target data to the third device based on the information requesting the target data and the movement status to implement communication between the first device and the third device.
结合第三方面,在第三方面的某些实现方式中,方法还包括:第二设备接收来自第三设备的目标数据;第二设备向第一设备发送目标数据。Combined with the third aspect, in some implementations of the third aspect, the method further includes: the second device receives target data from the third device; and the second device sends the target data to the first device.
结合第三方面,在第三方面的某些实现方式中,目标数据包括以下至少一项:文本数据、图像数据、文档数据、邮件数据、压缩包数据、音乐数据或者视频数据。 Combined with the third aspect, in some implementations of the third aspect, the target data includes at least one of the following: text data, image data, document data, email data, compressed package data, music data or video data.
第四方面,提供了一种终端设备,包括:处理模块和收发模块。其中,处理模块用于:检测到用户的第一操作,第一操作用于通过鼠标将目标数据的标识从第三设备经第二设备移动至,第三设备与第二设备支持键鼠穿越,第二设备与支持键鼠穿越;收发模块用于:响应于第一操作,通过第二设备向第三设备发送请求目标数据的信息;接收来自第三设备的目标数据。In the fourth aspect, a terminal device is provided, including: a processing module and a transceiver module. Wherein, the processing module is used to: detect the user's first operation, the first operation is used to move the identification of the target data from the third device to the second device through the mouse, the third device and the second device support keyboard and mouse traversal, The second device supports keyboard and mouse traversal; the transceiver module is configured to: in response to the first operation, send information requesting target data to the third device through the second device; and receive target data from the third device.
结合第四方面,在第四方面的某些实现方式中,上述处理模块还用于:建立与第三设备的数据传输通道;上述收发模块还用于:通过数据传输通道接收来自第三设备的目标数据。In connection with the fourth aspect, in some implementations of the fourth aspect, the above-mentioned processing module is also used to: establish a data transmission channel with the third device; the above-mentioned transceiver module is also used to: receive data from the third device through the data transmission channel. target data.
结合第四方面,在第四方面的某些实现方式中,上述处理模块还用于:拆除数据传输通道。Combined with the fourth aspect, in some implementations of the fourth aspect, the above processing module is also used to: remove the data transmission channel.
结合第四方面,在第四方面的某些实现方式中,上述收发模块还用于:通过第二设备接收来自第三设备的目标数据。In conjunction with the fourth aspect, in some implementations of the fourth aspect, the above-mentioned transceiver module is further configured to: receive target data from the third device through the second device.
结合第四方面,在第四方面的某些实现方式中,上述处理模块还用于:判断鼠标将目标数据的标识拖入的区域是否为预设区域;上述收发模块还用于:在目标数据的标识拖入的区域为预设区域的情况下,通过第二设备向第三设备发送请求目标数据的信息。Combined with the fourth aspect, in some implementations of the fourth aspect, the above-mentioned processing module is also used to: determine whether the area into which the mark of the target data is dragged by the mouse is a preset area; the above-mentioned transceiver module is also used to: in the target data When the area dragged into by the identifier is a preset area, information requesting target data is sent to the third device through the second device.
结合第四方面,在第四方面的某些实现方式中,目标数据包括以下至少一项:文本数据、图像数据、文档数据、邮件数据、压缩包数据、音乐数据或者视频数据。Combined with the fourth aspect, in some implementations of the fourth aspect, the target data includes at least one of the following: text data, image data, document data, email data, compressed package data, music data or video data.
第五方面,提供了一种终端设备,包括:处理模块和收发模块。其中,处理模块用于:检测到用户的第一操作,第一操作用于通过鼠标将目标数据的标识从经第二设备移动至第一设备,与第二设备支持键鼠穿越,第二设备与第一设备支持键鼠穿越;收发模块用于:响应于第一操作,通过第二设备接收来自第一设备的请求目标数据的信息;向第一设备发送目标数据。In the fifth aspect, a terminal device is provided, including: a processing module and a transceiver module. Wherein, the processing module is used to: detect the user's first operation, the first operation is used to move the identification of the target data from the second device to the first device through the mouse, and the second device supports keyboard and mouse traversal, and the second device The first device supports keyboard and mouse traversal; the transceiver module is configured to: in response to the first operation, receive information requesting target data from the first device through the second device; and send the target data to the first device.
结合第五方面,在第五方面的某些实现方式中,上述处理模块还用于:建立与第一设备的数据传输通道;上述收发模块还用于:通过数据传输通道向第一设备发送目标数据。Combined with the fifth aspect, in some implementations of the fifth aspect, the above-mentioned processing module is also used to: establish a data transmission channel with the first device; the above-mentioned transceiver module is also used to: send the target to the first device through the data transmission channel. data.
结合第五方面,在第五方面的某些实现方式中,上述处理模块还用于:拆除数据传输通道。Combined with the fifth aspect, in some implementations of the fifth aspect, the above processing module is also used to: dismantle the data transmission channel.
结合第五方面,在第五方面的某些实现方式中,上述收发模块还用于:通过第二设备向第一设备发送目标数据。In conjunction with the fifth aspect, in some implementations of the fifth aspect, the above-mentioned transceiver module is also used to: send target data to the first device through the second device.
结合第五方面,在第五方面的某些实现方式中,上述处理模块还用于:响应于第一操作,获取目标数据标识的通用资源标志符URI;将URI对应的数据确定为目标数据。In conjunction with the fifth aspect, in some implementations of the fifth aspect, the above processing module is further configured to: in response to the first operation, obtain the universal resource identifier URI identified by the target data; and determine the data corresponding to the URI as the target data.
结合第五方面,在第五方面的某些实现方式中,目标数据包括以下至少一项:文本数据、图像数据、文档数据、邮件数据、压缩包数据、音乐数据或者视频数据。Combined with the fifth aspect, in some implementations of the fifth aspect, the target data includes at least one of the following: text data, image data, document data, email data, compressed package data, music data or video data.
第六方面,提供了一种终端设备,包括:处理模块和收发模块。其中,处理模块用于:检测到用户的第一操作,第一操作用于通过鼠标将目标数据的标识从第三设备经移动至第一设备,第三设备与支持键鼠穿越,与第一设备支持键鼠穿越;收发模块用于:响应于第一操作,接收来自第一设备的请求目标数据的信息;向第三设备发送请求目标数据的信息。In a sixth aspect, a terminal device is provided, including: a processing module and a transceiver module. Wherein, the processing module is used to: detect the user's first operation, the first operation is used to move the identification of the target data from the third device to the first device through the mouse, the third device supports keyboard and mouse traversal, and the first device The device supports keyboard and mouse traversal; the transceiver module is configured to: in response to the first operation, receive information requesting target data from the first device; and send information requesting target data to the third device.
结合第六方面,在第六方面的某些实现方式中,上述处理模块还用于:响应于第一操作,将移动状态确定为从第三设备移动至第一设备;上述收发模块还用于:基于请求目标数据的信息和移动状态,向第三设备发送请求目标数据的信息。 In conjunction with the sixth aspect, in some implementations of the sixth aspect, the above-mentioned processing module is further configured to: in response to the first operation, determine the movement state as moving from the third device to the first device; the above-mentioned transceiver module is also configured to: : Based on the information and movement status of the requested target data, send the information requesting the target data to the third device.
结合第六方面,在第六方面的某些实现方式中,上述收发模块还用于:接收来自第三设备的目标数据;向第一设备发送目标数据。Combined with the sixth aspect, in some implementations of the sixth aspect, the above-mentioned transceiver module is also used to: receive target data from the third device; and send the target data to the first device.
结合第六方面,在第六方面的某些实现方式中,目标数据包括以下至少一项:文本数据、图像数据、文档数据、邮件数据、压缩包数据、音乐数据或者视频数据。Combined with the sixth aspect, in some implementations of the sixth aspect, the target data includes at least one of the following: text data, image data, document data, email data, compressed package data, music data or video data.
第七方面,本申请提供了一种终端设备,包括处理器,该处理器与存储器耦合,可用于执行存储器中的指令,以实现上述任一方面中任一种可能实现方式中的方法。可选地,该装置还包括存储器。可选地,该装置还包括收发器,处理器与收发器耦合。In a seventh aspect, the present application provides a terminal device, including a processor, which is coupled to a memory and can be used to execute instructions in the memory to implement the method in any of the possible implementation manners of any of the above aspects. Optionally, the device further includes memory. Optionally, the device further includes a transceiver, and the processor is coupled to the transceiver.
第八方面,本申请提供了一种处理器,包括:输入电路、输出电路和处理电路。处理电路用于通过输入电路接收信号,并通过输出电路发射信号,使得处理器执行上述任一方面中任一种可能实现方式中的方法。In an eighth aspect, the present application provides a processor, including: an input circuit, an output circuit and a processing circuit. The processing circuit is configured to receive signals through the input circuit and transmit signals through the output circuit, so that the processor performs the method in any of the possible implementations of any of the above aspects.
在具体实现过程中,上述处理器可以为芯片,输入电路可以为输入管脚,输出电路可以为输出管脚,处理电路可以为晶体管、门电路、触发器和各种逻辑电路等。输入电路所接收的输入的信号可以是由例如但不限于接收器接收并输入的,输出电路所输出的信号可以是例如但不限于输出给发射器并由发射器发射的,且输入电路和输出电路可以是同一电路,该电路在不同的时刻分别用作输入电路和输出电路。本申请对处理器及各种电路的具体实现方式不做限定。In the specific implementation process, the above-mentioned processor can be a chip, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, a gate circuit, a flip-flop, and various logic circuits. The input signal received by the input circuit may be received and input by, for example, but not limited to, the receiver, and the signal output by the output circuit may be, for example, but not limited to, output to and transmitted by the transmitter, and the input circuit and the output A circuit may be the same circuit that functions as an input circuit and an output circuit at different times. This application does not limit the specific implementation methods of the processor and various circuits.
第九方面,本申请提供了一种处理装置,包括处理器和存储器。该处理器用于读取存储器中存储的指令,并可通过接收器接收信号,通过发射器发射信号,以执行上述任一方面中任一种可能实现方式中的方法。In a ninth aspect, the present application provides a processing device, including a processor and a memory. The processor is used to read instructions stored in the memory, and can receive signals through a receiver and transmit signals through a transmitter to execute the method in any of the possible implementations of any of the above aspects.
可选地,处理器为一个或多个,存储器为一个或多个。Optionally, there are one or more processors and one or more memories.
可选地,存储器可以与处理器集成在一起,或者存储器与处理器分离设置。Alternatively, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
在具体实现过程中,存储器可以为非瞬时性(non-transitory)存储器,例如只读存储器(read only memory,ROM),其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型以及存储器与处理器的设置方式不做限定。In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated on the same chip as the processor, or can be set in different On the chip, this application does not limit the type of memory and the arrangement of the memory and the processor.
应理解,相关的数据交互过程例如发送指示信息可以为从处理器输出指示信息的过程,接收能力信息可以为处理器接收输入能力信息的过程。具体地,处理输出的数据可以输出给发射器,处理器接收的输入数据可以来自接收器。其中,发射器和接收器可以统称为收发器。It should be understood that the relevant data interaction process, for example, sending instruction information may be a process of outputting instruction information from the processor, and receiving capability information may be a process of the processor receiving input capability information. Specifically, the data output by the processing can be output to the transmitter, and the input data received by the processor can come from the receiver. Among them, the transmitter and receiver can be collectively called a transceiver.
上述第九方面中的处理装置可以是一个芯片,该处理器可以通过硬件来实现也可以通过软件来实现,当通过硬件实现时,该处理器可以是逻辑电路、集成电路等;当通过软件来实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现,该存储器可以集成在处理器中,可以位于该处理器之外,独立存在。The processing device in the ninth aspect can be a chip, and the processor can be implemented by hardware or software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software. When implemented, the processor can be a general-purpose processor, which is implemented by reading the software code stored in the memory. The memory can be integrated in the processor, or can be located outside the processor and exist independently.
第十方面,本申请提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序(也可以称为代码,或指令)当其在计算机上运行时,使得计算机执行上述任一方面中任一种可能实现方式中的方法。In a tenth aspect, the present application provides a computer-readable storage medium that stores a computer program (which can also be called code, or instructions) that when run on a computer causes the computer to execute any of the above. A method in any of the possible implementations.
第十一方面,本申请提供了一种计算机程序产品,计算机程序产品包括:计算机程序(也可以称为代码,或指令),当计算机程序被运行时,使得计算机执行上述任一方面中任一种可能实现方式中的方法。 In an eleventh aspect, the present application provides a computer program product. The computer program product includes: a computer program (which can also be called a code, or an instruction). When the computer program is run, it causes the computer to execute any one of the above aspects. possible implementation methods.
附图说明Description of drawings
图1是一种跨设备传输照片的示意图;Figure 1 is a schematic diagram of transferring photos across devices;
图2是本申请实施例提供的一种跨设备传输照片的示意图;Figure 2 is a schematic diagram of transmitting photos across devices according to an embodiment of the present application;
图3是本申请实施例提供的另一种跨设备传输照片的示意图;Figure 3 is a schematic diagram of another cross-device photo transmission provided by an embodiment of the present application;
图4是本申请实施例提供的又一种跨设备传输照片的示意图;Figure 4 is a schematic diagram of yet another cross-device photo transmission provided by an embodiment of the present application;
图5是本申请实施例提供的一种跨设备传输文件失败的示意图;Figure 5 is a schematic diagram of a cross-device file transfer failure provided by an embodiment of the present application;
图6是本申请实施例提供的一种PC的软件结构框图;Figure 6 is a software structure block diagram of a PC provided by an embodiment of the present application;
图7是本申请实施例提供的一种安卓设备的软件结构框图;Figure 7 is a software structure block diagram of an Android device provided by an embodiment of the present application;
图8是本申请实施例提供的一种键鼠连接的方法的示意性流程图;Figure 8 is a schematic flow chart of a keyboard and mouse connection method provided by an embodiment of the present application;
图9是本申请实施例提供的一种鼠标穿越的检测方法的示意性流程图;Figure 9 is a schematic flow chart of a mouse crossing detection method provided by an embodiment of the present application;
图10是本申请实施例提供的一种屏幕坐标系的建立示意图;Figure 10 is a schematic diagram of establishing a screen coordinate system provided by an embodiment of the present application;
图11是本申请实施例提供的一种数据传输方法的示意性流程图;Figure 11 is a schematic flow chart of a data transmission method provided by an embodiment of the present application;
图12是本申请实施例提供的一种获取数据的方法的示意性流程图;Figure 12 is a schematic flow chart of a method for obtaining data provided by an embodiment of the present application;
图13是本申请实施例提供的另一种获取数据的方法的示意性流程图;Figure 13 is a schematic flow chart of another method of obtaining data provided by an embodiment of the present application;
图14是本申请实施例提供的一种终端设备的示意图;Figure 14 is a schematic diagram of a terminal device provided by an embodiment of the present application;
图15是本申请实施例提供的另一种终端设备的示意图。Figure 15 is a schematic diagram of another terminal device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图,对本申请中的技术方案进行描述。The technical solutions in this application will be described below with reference to the accompanying drawings.
为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。In order to facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as “first” and “second” are used to distinguish the same or similar items with basically the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the number and execution order, and words such as "first" and "second" do not limit the number and execution order.
需要说明的是,本申请中,“示例性地”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性地”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性地”或者“例如”等词旨在以具体方式呈现相关概念。It should be noted that in this application, words such as "exemplarily" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design described herein as "exemplary" or "such as" is not intended to be construed as preferred or advantageous over other embodiments or designs. Rather, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a concrete manner.
此外,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a、b和c中的至少一项(个),可以表示:a,或b,或c,或a和b,或a和c,或b和c,或a、b和c,其中a,b,c可以是单个,也可以是多个。In addition, "at least one" means one or more, and "plurality" means two or more. "And/or" describes the association of associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A, B can be singular or plural. The character "/" generally indicates that the related objects are in an "or" relationship. "At least one of the following" or similar expressions thereof refers to any combination of these items, including any combination of a single item (items) or a plurality of items (items). For example, at least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.
为了满足用户工作和学习的需求,多个终端设备之间可以支持键鼠穿越,以实现跨设备协同。例如,用户的电脑、手机以及平板连接后,可以共用电脑的鼠标和键盘,也就是说,用户可以通过电脑的鼠标和键盘控制手机以及平板。比如,用户可以通过鼠标将手机或者平板的文件、文本以及图片等数据拖拽至电脑,或者,用户可以通过鼠标将电脑的文件、文本以及图片等数据拖拽至手机或者电脑。 In order to meet the needs of users for work and study, multiple terminal devices can support keyboard and mouse traversal to achieve cross-device collaboration. For example, after the user's computer, mobile phone and tablet are connected, they can share the computer's mouse and keyboard. In other words, the user can control the mobile phone and tablet through the computer's mouse and keyboard. For example, users can use the mouse to drag files, text, pictures and other data from their mobile phones or tablets to their computers, or users can use their mouse to drag files, texts, pictures and other data from their computers to their mobile phones or computers.
示例性地,图1示出了一种跨设备传输照片的示意图。如图1中的a所示,通信系统包括电脑101、手机102以及平板103。其中,电脑101的操作系统为Windows系统,手机102以及平板103的操作系统为安卓(Android)系统。电脑101与手机102之间可以实现键鼠穿越,电脑101与平板103之间可以实现键鼠穿越,也就是说,电脑101、手机102以及平板103可以共用鼠标和键盘。在这种情况下,电脑101可以称为源端设备或者发送端,手机102和平板103可以称为对端设备或者接收端,但本申请实施例并不限于此。Exemplarily, FIG. 1 shows a schematic diagram of transmitting photos across devices. As shown in a in Figure 1, the communication system includes a computer 101, a mobile phone 102 and a tablet 103. Among them, the operating system of the computer 101 is Windows system, and the operating system of mobile phone 102 and tablet 103 is Android system. Keyboard and mouse travel can be realized between the computer 101 and the mobile phone 102, and keyboard and mouse travel can be realized between the computer 101 and the tablet 103. That is to say, the computer 101, the mobile phone 102 and the tablet 103 can share the mouse and keyboard. In this case, the computer 101 can be called the source device or the sending end, and the mobile phone 102 and the tablet 103 can be called the peer device or the receiving end, but the embodiment of the present application is not limited thereto.
电脑101的键鼠穿越至手机102或平板103后,可以实现跨屏协同。也就是说,用户可以使用鼠标对手机102或平板103进行点击、拖动或者双击等操作,可以使用键盘在手机102或平板103上输入信息。After the keyboard and mouse of the computer 101 travel to the mobile phone 102 or tablet 103, cross-screen collaboration can be achieved. That is to say, the user can use the mouse to click, drag, or double-click on the mobile phone 102 or tablet 103, and can use the keyboard to input information on the mobile phone 102 or tablet 103.
电脑101的键鼠穿越至手机102或平板103后,还可以实现跨设备穿越文件、照片以及音乐等内容,也就是说,用户可以将手机102或平板103中的文件、照片以及音乐等内容拖拽至电脑101,也可以将电脑101中的文件、照片以及音乐等内容拖拽至手机102或平板103。可以理解的是,本申请实施例并不只限于文件、照片以及音乐等内容。After the computer 101's keyboard and mouse travel to the mobile phone 102 or tablet 103, it can also realize cross-device transfer of files, photos, music and other content. That is to say, the user can drag files, photos, music and other content from the mobile phone 102 or tablet 103. Drag it to the computer 101, or drag files, photos, music and other content in the computer 101 to the mobile phone 102 or tablet 103. It can be understood that the embodiments of the present application are not limited to content such as documents, photos, and music.
如图1中的a所示,当用户对手机102的主界面进行截图时,手机102响应于用户截图的操作,进行截图,并在界面的左下角显示图片。用户可以通过鼠标将该图片拖拽至电脑101的桌面。电脑101检测到用户拖拽图片至电脑101的主界面的操作时,响应于该操作,可以显示图1中的b。如图1中的b所示,电脑101可以显示图片的拖拽图标,相应地,手机102的界面右下角的图片消失。当电脑101检测到用户取消对图片的拖拽操作时,响应于该操作,可以将该图片保存至文件管理器,并显示文件管理器的界面,即显示图1中的c。如图1中的c所示,电脑101将图片保存文件管理器,并将该图片的命名默认为20220405_1,显示图片的格式为png,显示图片的大小为302.08千字节(Kilobyte,kb),以及显示保存图片的时间“刚刚”。As shown in a in Figure 1, when the user takes a screenshot of the main interface of the mobile phone 102, the mobile phone 102 takes a screenshot in response to the user's operation of taking a screenshot, and displays the picture in the lower left corner of the interface. The user can drag the picture to the desktop of the computer 101 through the mouse. When the computer 101 detects the user's operation of dragging the picture to the main interface of the computer 101, b in Figure 1 may be displayed in response to the operation. As shown in b in Figure 1, the computer 101 can display the drag icon of the picture, and accordingly, the picture in the lower right corner of the interface of the mobile phone 102 disappears. When the computer 101 detects that the user cancels the dragging operation on the picture, in response to the operation, the picture can be saved to the file manager and the interface of the file manager is displayed, that is, c in Figure 1 is displayed. As shown in c in Figure 1, the computer 101 saves the image to the file manager and names the image as 20220405_1 by default. The format of the displayed image is png and the size of the displayed image is 302.08 kilobytes (Kilobyte, kb). As well as showing the time the picture was saved was "just now".
在上述通信系统中,若用户将手机102的截图传输至平板103,只能先通过鼠标将手机102的数据拖拽至电脑101,再通过鼠标将数据从电脑101拖拽至平板103,不能将手机的数据直接传输至平板,降低数据传输效率,且操作繁琐,不利于用户体验。In the above communication system, if the user transfers a screenshot of the mobile phone 102 to the tablet 103, he can only drag the data from the mobile phone 102 to the computer 101 through the mouse, and then drag the data from the computer 101 to the tablet 103 through the mouse. The data from the mobile phone is directly transmitted to the tablet, which reduces the data transmission efficiency and makes the operation cumbersome, which is not conducive to the user experience.
有鉴于此,本申请实施例提供了一种数据传输方法,可以提高数据传输效率,减少用户的操作,提高用户体验。也就是说,用户可以通过鼠标将手机102的数据经电脑101直接拖拽至平板103,也可以将平板103的数据经电脑101直接拖拽至手机102,不需要先将数据拖入电脑101,在拖拽至平板103。In view of this, embodiments of the present application provide a data transmission method, which can improve data transmission efficiency, reduce user operations, and improve user experience. That is to say, the user can use the mouse to drag the data from the mobile phone 102 directly to the tablet 103 via the computer 101, or the user can directly drag the data from the tablet 103 to the mobile phone 102 via the computer 101. There is no need to drag the data into the computer 101 first. Drag to Tablet 103.
为了更好地理解本申请实施例,首先对本申请实施例使用的场景进行介绍。In order to better understand the embodiments of the present application, the scenarios used in the embodiments of the present application are first introduced.
图2示出了一种跨设备传输照片的示意图。如图2所示,用户将手机102的图片拖拽至平板103的主界面。如图2中的a所示,当用户对手机102的主界面进行截图时,手机102响应于用户截图的操作,进行截图,并在界面的左下角显示图片。用户可以通过鼠标经过电脑101将该图片拖拽至平板103的主界面。电脑101检测到用户拖拽图片至电脑101的主界面的操作时,响应于该操作,可以显示图2中的b。如图2中的b所示,电脑101可以显示拖拽图标A,相应地,手机102的界面右下角的图片消失。电脑101检测到用户拖拽至平板103的操作,响应于该操作,可以显示图2中的c。如图2中的c所示,平板103可以显示拖拽图标B。当平板103检测到用户取消对图片的拖拽操作时,响应于该操作,可以将该图片保存至文件管理器,并显示文件管理器的界面,即显示图2中的d。如 图2中的d所示,平板103将图片保存文件管理器,并将该图片的命名默认为20220405_1,显示图片的格式为png以及显示图片的大小为302.08千字节(Kilobyte,kb)。Figure 2 shows a schematic diagram of transferring photos across devices. As shown in Figure 2, the user drags the picture on the mobile phone 102 to the main interface of the tablet 103. As shown in a in Figure 2, when the user takes a screenshot of the main interface of the mobile phone 102, the mobile phone 102 takes a screenshot in response to the user's operation of taking a screenshot, and displays the picture in the lower left corner of the interface. The user can drag the picture to the main interface of the tablet 103 through the computer 101 using the mouse. When the computer 101 detects the user's operation of dragging the picture to the main interface of the computer 101, b in Figure 2 may be displayed in response to the operation. As shown in b in Figure 2, the computer 101 can display the drag icon A, and accordingly, the picture in the lower right corner of the interface of the mobile phone 102 disappears. The computer 101 detects the user's drag operation to the tablet 103, and in response to the operation, c in Figure 2 can be displayed. As shown in c in Figure 2, the tablet 103 may display the drag icon B. When the tablet 103 detects that the user cancels the drag operation on the picture, in response to the operation, the picture can be saved to the file manager and the interface of the file manager is displayed, that is, d in Figure 2 is displayed. like As shown in d in Figure 2, the tablet 103 saves the image to the file manager and names the image as 20220405_1 by default, the format of the displayed image is png and the size of the displayed image is 302.08 kilobytes (Kilobyte, kb).
需要说明的是,文件管理器可以支持任意类型的数据,故平板103可以用于保存拖拽至主界面的图片、音乐以及文件等数据。It should be noted that the file manager can support any type of data, so the tablet 103 can be used to save data such as pictures, music, and files dragged to the main interface.
图3示出了另一种跨设备传输照片的示意图。如图3所示,用户将手机102的图片拖拽至平板103的聊天界面。如图3中的a所示,当用户对手机102的主界面进行截图时,手机102响应于用户截图的操作,进行截图,并在界面的左下角显示图片。用户可以通过鼠标经过电脑101将该图片拖拽至平板103的聊天界面。电脑101检测到用户拖拽图片至电脑101的主界面的操作时,响应于该操作,可以显示图3中的b。如图3中的b所示,电脑101可以显示拖拽图标A,相应地,手机102的界面右下角的图片消失。电脑101检测到用户拖拽至平板103的操作,响应于该操作,可以显示图3中的c。如图3中的c所示,平板103可以在聊天界面显示拖拽图标B。当平板103检测到用户取消对图片的拖拽操作时,响应于该操作,可以将该图片显示在聊天界面,即显示图3中的d。如图3中的d所示,平板103显示在聊天界面。Figure 3 shows another schematic diagram of transferring photos across devices. As shown in Figure 3, the user drags the picture on the mobile phone 102 to the chat interface of the tablet 103. As shown in a in Figure 3, when the user takes a screenshot of the main interface of the mobile phone 102, the mobile phone 102 takes a screenshot in response to the user's operation of taking a screenshot, and displays the picture in the lower left corner of the interface. The user can drag the picture to the chat interface of the tablet 103 through the computer 101 with the mouse. When the computer 101 detects the user's operation of dragging the picture to the main interface of the computer 101, b in Figure 3 may be displayed in response to the operation. As shown in b in Figure 3, the computer 101 can display the drag icon A, and accordingly, the picture in the lower right corner of the interface of the mobile phone 102 disappears. The computer 101 detects the user's drag operation to the tablet 103, and in response to the operation, c in Figure 3 can be displayed. As shown in c in Figure 3, the tablet 103 can display the drag icon B on the chat interface. When the tablet 103 detects that the user cancels the drag operation on the picture, in response to the operation, the picture can be displayed on the chat interface, that is, d in Figure 3 is displayed. As shown in d in Figure 3, tablet 103 is displayed on the chat interface.
需要说明的是,聊天应用可以支持图片、文件等类型的数据,可以允许数据传输。It should be noted that the chat application can support data of image, file and other types, and can allow data transmission.
图4示出了又一种跨设备传输照片的示意图。如图4所示,用户将手机102的图片拖拽至平板103的图库应用中。如图4中的a所示,当用户对手机102的主界面进行截图时,手机102响应于用户截图的操作,进行截图,并在界面的左下角显示图片。用户可以通过鼠标经过电脑101将该图片拖拽至平板103的图库应用。电脑101检测到用户拖拽图片至电脑101的主界面的操作时,响应于该操作,可以显示图4中的b。如图4中的b所示,电脑101可以显示拖拽图标A,相应地,手机102的界面右下角的图片消失。电脑101检测到用户拖拽至平板103的操作,响应于该操作,可以显示图4中的c。如图4中的c所示,平板103可以在图库应用显示拖拽图标B。当平板103检测到用户取消对图片的拖拽操作时,响应于该操作,可以将该图片保存至图库应用,即显示图4中的d。如图4中的d所示,平板103可以在图库应用中显示该图片。Figure 4 shows yet another schematic diagram of transferring photos across devices. As shown in Figure 4, the user drags pictures from the mobile phone 102 to the gallery application of the tablet 103. As shown in a in Figure 4, when the user takes a screenshot of the main interface of the mobile phone 102, the mobile phone 102 takes a screenshot in response to the user's operation of taking a screenshot, and displays the picture in the lower left corner of the interface. The user can drag the picture to the gallery application of the tablet 103 through the computer 101 with the mouse. When the computer 101 detects the user's operation of dragging the picture to the main interface of the computer 101, b in Figure 4 may be displayed in response to the operation. As shown in b in Figure 4, the computer 101 can display the drag icon A, and accordingly, the picture in the lower right corner of the interface of the mobile phone 102 disappears. The computer 101 detects the user's drag operation to the tablet 103, and in response to the operation, c in Figure 4 can be displayed. As shown in c in Figure 4 , the tablet 103 can display the drag icon B in the gallery application. When the tablet 103 detects that the user cancels the drag operation on the picture, in response to the operation, the picture can be saved to the gallery application, that is, d in Figure 4 is displayed. As shown in d in Figure 4, the tablet 103 can display the picture in the gallery application.
需要说明的是,图库应用只支持图片数据的传输,不允许其他数据的传输。It should be noted that the gallery application only supports the transmission of image data and does not allow the transmission of other data.
若用户将文件拖拽至图库应用,图库应用不支持文件格式,图库应用不保存拖拽的数据,拖拽失败。If the user drags a file to the gallery application, the gallery application does not support the file format, the gallery application does not save the dragged data, and the drag and drop fails.
示例性地,图5示出了一种跨设备传输文件失败的示意图。如图5中的a所示,平板103显示文件管理器的界面,该界面包括2个文档,其中,一个文档是会议流程,一个文档是会议内容。电脑101显示主界面,手机102显示图库应用的界面,该界面包括5张图片,该5张图标包括照片1、照片2、照片3、照片4以及照片5。若用户将平板103中的会议文档经电脑101拖拽至手机102的图库应用中,平板103检测到用户拖拽文档拖出屏幕,且拖至电脑101的操作时,响应于该操作,可以显示图2中的b。如图2中的b所示,平板103显示的界面只包括会议流程文档,电脑101可以显示拖拽图标A。电脑101检测到用户拖拽文档拖出屏幕,且拖至手机102的操作,响应于该操作,可以显示图5中的c。如图5中的c所示,手机102可以在图库应用显示拖拽图标B。当手机102检测到用户取消对文档的拖拽操作时,响应于该操作,判断文档是否为图库应用可支持数据类型,文档不符合图库应用支持数据类型,可以拒绝接收文档,可以显示图4中的d。如图4中的d 所示,平板103、电脑101以及手机102显示拖拽操作前的初始界面,不发生任何改变。Exemplarily, FIG. 5 shows a schematic diagram of a file transfer failure across devices. As shown in a in Figure 5 , tablet 103 displays a file manager interface, which includes two documents, one of which is the meeting process and the other is the meeting content. The computer 101 displays the main interface, and the mobile phone 102 displays the interface of the gallery application. The interface includes 5 pictures, and the 5 icons include photo 1, photo 2, photo 3, photo 4 and photo 5. If the user drags a meeting document on the tablet 103 to the gallery application of the mobile phone 102 via the computer 101, and the tablet 103 detects the user's operation of dragging the document out of the screen and onto the computer 101, in response to the operation, it can be displayed b in Figure 2. As shown in b in Figure 2 , the interface displayed by the tablet 103 only includes the meeting process document, and the computer 101 can display the drag icon A. The computer 101 detects the user's operation of dragging the document out of the screen and onto the mobile phone 102. In response to the operation, c in Figure 5 can be displayed. As shown in c in Figure 5, the mobile phone 102 can display the drag icon B in the gallery application. When the mobile phone 102 detects that the user cancels the drag operation on the document, in response to the operation, it determines whether the document is a data type supported by the gallery application. If the document does not meet the data type supported by the gallery application, the document can be refused to be received, and the document can be displayed as shown in Figure 4 d. As shown in d in Figure 4 As shown, the tablet 103, the computer 101 and the mobile phone 102 display the initial interface before the drag operation without any changes.
需要说明的是,上述拖拽图标B可以根据拖拽数据的数据类型的不同而不同。数据类型与拖拽图标B的对应关系可以是预设的。It should be noted that the above drag icon B may vary according to the data type of the drag data. The corresponding relationship between the data type and the drag icon B may be preset.
为了实现上述功能,本申请实施例提供了数据传输的具体实现方式。In order to realize the above functions, embodiments of the present application provide specific implementation methods of data transmission.
本申请实施例提供的方法可以适用于键鼠穿越的通信系统,且通信系统包括3个设备。其中,通信系统中可以包括个人计算机(personal computer)和安卓设备。其中,安卓设备包括安卓设备1以及安卓设备2,例如上述图1所述的通信系统100,PC为电脑101、手机102可以为安卓设备1、平板103可以为安卓设备2,但本申请实施例并不限于此。个人计算机(personal computer),可以是台式机、笔记本电脑(如上述101)、小型笔记本电脑、平板电脑以及超级本等设备。个人计算机的软件系统为windows系统。安卓设备为部署安卓系统的设备,例如,手机(如上述手机102)、平板(如上述手机103)等等。The method provided by the embodiment of the present application can be applied to a communication system with keyboard and mouse traversal, and the communication system includes three devices. Among them, the communication system can include personal computers and Android devices. Among them, the Android device includes Android device 1 and Android device 2, such as the communication system 100 described in Figure 1 above. The PC is the computer 101, the mobile phone 102 can be the Android device 1, and the tablet 103 can be the Android device 2. However, in the embodiment of this application It is not limited to this. A personal computer can be a desktop computer, a laptop computer (such as 101 above), a small laptop computer, a tablet computer, an ultrabook and other devices. The software system of the personal computer is the windows system. Android devices are devices that deploy the Android system, such as mobile phones (such as the above-mentioned mobile phone 102), tablets (such as the above-mentioned mobile phone 103), and so on.
为了能够更好地理解本申请实施例,下面对本申请实施例的PC、安卓设备1以及安卓设备1的软件结构进行介绍。In order to better understand the embodiment of the present application, the PC, the Android device 1 and the software structure of the Android device 1 in the embodiment of the present application are introduced below.
示例性地,图6示出了一种PC的软件结构框图。如图6所示,PC包括业务层、能力层以及驱动层。Exemplarily, FIG. 6 shows a software structure block diagram of a PC. As shown in Figure 6, PC includes business layer, capability layer and driver layer.
业务层包括应用程序、人机交互(user interface,UI)界面实现模块、键鼠业务模块以及拖拽模块。其中,应用程序包括图库、聊天以及文件管理器等应用程序。UI界面实现模块用于为用户提供可视化界面。例如,UI界面实现模块可以显示上述图1所示的主界面等等。键鼠业务模块用于调用键盘虚拟化能力模块以实现键鼠穿越。拖拽模块用于调用拖拽框架以监测用户的拖拽操作。The business layer includes applications, human-computer interaction (user interface, UI) interface implementation modules, keyboard and mouse business modules, and drag-and-drop modules. Among them, applications include applications such as gallery, chat, and file managers. The UI interface implementation module is used to provide users with a visual interface. For example, the UI interface implementation module can display the main interface shown in Figure 1 above, and so on. The keyboard and mouse business module is used to call the keyboard virtualization capability module to realize keyboard and mouse traversal. The drag module is used to call the drag framework to monitor the user's drag operation.
能力层包括拖拽框架、通信模块(magic link)、PC管家框架、键盘虚拟化能力模块、音频系统以及存储系统。其中,拖拽框架用于支持用户的拖拽操作。通信模块用于与安卓设备通信。键盘虚拟化能力模块用于获取键鼠事件以及键鼠事件的传输。PC管家框架用于管理PC管家选项。音频系统用于管理高性能音频的播放。存储系统用于数据的存储。The capability layer includes the drag-and-drop framework, communication module (magic link), PC manager framework, keyboard virtualization capability module, audio system and storage system. Among them, the drag and drop framework is used to support the user's drag and drop operation. The communication module is used to communicate with Android devices. The keyboard virtualization capability module is used to obtain keyboard and mouse events and transmit keyboard and mouse events. PC housekeeper framework is used to manage PC housekeeper options. The audio system manages the playback of high-performance audio. Storage systems are used for data storage.
驱动层包括蓝牙驱动、音频驱动、wifi驱动以及人机接口设备(human interface device,HID)驱动。The driver layer includes Bluetooth driver, audio driver, wifi driver and human interface device (HID) driver.
图7示出了一种安卓设备的软件结构框图。如图7所示,安卓设备包括应用程序层、应用程序框架层、安卓运行时和系统库以及内核层。Figure 7 shows a software structure block diagram of an Android device. As shown in Figure 7, the Android device includes the application layer, application framework layer, Android runtime and system libraries, and kernel layer.
应用程序层包括键鼠业务模块、UI界面实现模块、拖拽模块、键鼠虚拟化能力模块、通信模块(magic link)以及应用程序。其中,UI界面实现模块用于为用户提供可视化界面。例如,UI界面实现模块用于显示主界面和应用程序的界面等。拖拽模块用于调用拖拽框架以监测用户的拖拽操作。键鼠虚拟化能力模块用于提供键鼠虚拟化能力,即获取键鼠事件以及键鼠事件的传输。通信模块用于提供设备间连接通道以及数据能力传输。应用程序包括图库、聊天以及文件管理器等应用程序。The application layer includes keyboard and mouse business modules, UI interface implementation modules, drag and drop modules, keyboard and mouse virtualization capability modules, communication modules (magic link) and applications. Among them, the UI interface implementation module is used to provide users with a visual interface. For example, the UI interface implementation module is used to display the main interface and application interface. The drag module is used to call the drag framework to monitor the user's drag operation. The keyboard and mouse virtualization capability module is used to provide keyboard and mouse virtualization capabilities, that is, to obtain keyboard and mouse events and to transmit keyboard and mouse events. The communication module is used to provide connection channels between devices and data capability transmission. Applications include applications such as gallery, chat, and file managers.
应用程序框架层包括拖拽框架、多屏框架、输入管理模块以及存储系统。其中,拖拽框架用于提供键鼠穿越时的拖拽能力。输入管理模块用于提供键鼠事件上报。存储系统用于存储数据。多屏框架用于提供键鼠多屏操作。The application framework layer includes drag-and-drop framework, multi-screen framework, input management module and storage system. Among them, the drag frame is used to provide drag capabilities when the keyboard and mouse traverse. The input management module is used to provide keyboard and mouse event reporting. Storage systems are used to store data. The multi-screen framework is used to provide multi-screen operation with keyboard and mouse.
安卓运行时和系统库包括核心库、虚拟机、表面管理器、媒体库以及三维图形处理库。安卓系统运行时负责安卓系统的调度和管理。核心库包含两部分:一部分是Java语言需要 调用的功能函数,另一部分是安卓的核心库。应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的Java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。系统库可以包含多个功能的模块,例如:表面管理器,媒体库以及三维图形处理库等。Android runtime and system libraries include core libraries, virtual machines, surface managers, media libraries, and 3D graphics processing libraries. The Android system runtime is responsible for the scheduling and management of the Android system. The core library contains two parts: one part is required by the Java language The function function called, the other part is the core library of Android. The application layer and application framework layer run in virtual machines. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection and other functions. The system library can contain modules with multiple functions, such as surface manager, media library, and 3D graphics processing library.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了二维图层和三维图层的融合。媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:JPG,PNG等。三维图形处理库用于实现三维图形绘图,图像渲染,合成和图层处理等。The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support multiple audio and video encoding formats, such as JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, composition and layer processing.
内核层是硬件和软件之间的层。内核层用于驱动硬件,使得硬件工作。内核层包括蓝牙驱动、音频驱动、wifi驱动、虚拟输入驱动(Uinput driver)以及HID驱动。其中,虚拟输入驱动用于注入输入事件。The kernel layer is the layer between hardware and software. The kernel layer is used to drive the hardware and make the hardware work. The kernel layer includes Bluetooth driver, audio driver, wifi driver, virtual input driver (Uinput driver) and HID driver. Among them, the virtual input driver is used to inject input events.
为了更好的理解本申请实施例,本申请实施例结合上述图5和图6所涉及的模块对本申请实施例提供的方法进行具体介绍。In order to better understand the embodiment of the present application, the embodiment of the present application specifically introduces the method provided by the embodiment of the present application in conjunction with the modules involved in the above-mentioned Figures 5 and 6.
PC与安卓设备连接成功之后,PC与安卓设备进行数据传输之前,可以先确定键鼠是否连接成功,在连接成功的情况下,进行数据传输。After the PC and the Android device are successfully connected, before data transmission between the PC and the Android device, you can first determine whether the keyboard and mouse are successfully connected. If the connection is successful, the data can be transferred.
示例性地,图8示出了一种键鼠连接的方法800的示意性流程图。如图8所示,该方法800可以应用于包括PC和安卓设备的通信系统,例如,上述通信系统100,但本申请实施例并不限于此。PC的软件架构图可以如图6所示,安卓设备的软件架构图可以如图7所示,本申请实施例并不限于此。Exemplarily, FIG. 8 shows a schematic flow chart of a keyboard and mouse connection method 800. As shown in FIG. 8 , the method 800 can be applied to communication systems including PCs and Android devices, such as the above-mentioned communication system 100 , but the embodiments of the present application are not limited thereto. The software architecture diagram of the PC can be shown in Figure 6, and the software architecture diagram of the Android device can be shown in Figure 7. The embodiments of the present application are not limited thereto.
该方法800可以包括如下步骤:The method 800 may include the following steps:
S801、PC的键鼠业务模块与安卓设备的键鼠业务模块建立传输连接。S801. The keyboard and mouse business module of the PC establishes a transmission connection with the keyboard and mouse business module of the Android device.
PC与安卓设备连接之后,PC的键鼠业务模块与安卓设备的键鼠业务模块可以建立传输连接。其中,安卓设备为安卓设备1或者安卓设备2,本申请实施例对此不作限定。After the PC is connected to the Android device, the keyboard and mouse business module of the PC and the keyboard and mouse business module of the Android device can establish a transmission connection. Wherein, the Android device is Android device 1 or Android device 2, which is not limited in the embodiment of the present application.
S802、PC的键鼠业务模块向安卓设备的键鼠业务模块发送开启键鼠服务的指示信息,对应地,安卓设备的键鼠业务模块接收开启键鼠服务的指示信息。S802. The keyboard and mouse business module of the PC sends the instruction information for starting the keyboard and mouse service to the keyboard and mouse business module of the Android device. Correspondingly, the keyboard and mouse business module of the Android device receives the instruction information for starting the keyboard and mouse service.
开启键鼠服务的指示信息用于指示安卓设备的键鼠业务模块开启键鼠服务。The instruction information for enabling the keyboard and mouse service is used to instruct the keyboard and mouse business module of the Android device to enable the keyboard and mouse service.
键鼠服务也就是键鼠穿越选项,开启键鼠服务的指示信息也就是说指示安卓设备的键鼠业务模块开启键鼠穿越选项。The keyboard and mouse service is also the keyboard and mouse traversal option. The instruction information to enable the keyboard and mouse service means instructing the keyboard and mouse business module of the Android device to enable the keyboard and mouse traversal option.
S803、安卓设备的键鼠业务模块基于开启键鼠服务的指示信息,判断是否支持键鼠服务。S803. The keyboard and mouse business module of the Android device determines whether the keyboard and mouse service is supported based on the instruction information for enabling the keyboard and mouse service.
键鼠服务也就是键鼠穿越选项,键鼠服务的开启和关闭由用户确定。安卓设备的键鼠业务模块判断是否支持键鼠服务,也就是安卓设备的键鼠业务模块判断用户是否勾选、选中或者开启了键鼠穿越选项。The keyboard and mouse service is also the keyboard and mouse traversal option. The opening and closing of the keyboard and mouse service is determined by the user. The keyboard and mouse business module of the Android device determines whether the keyboard and mouse service is supported, that is, the keyboard and mouse business module of the Android device determines whether the user has checked, selected, or enabled the keyboard and mouse traversal option.
若用户勾选、选中或者开启了键鼠穿越选项,安卓设备的键鼠业务模块可以支持键鼠服务。若用户未勾选、未选中或者关闭了键鼠穿越选项,安卓设备的键鼠业务模块不支持键鼠服务,不可以进行键鼠穿越。If the user checks, selects or enables the keyboard and mouse traversal option, the keyboard and mouse business module of the Android device can support the keyboard and mouse service. If the user has not checked, unchecked, or turned off the keyboard and mouse traversal option, the keyboard and mouse business module of the Android device does not support the keyboard and mouse service, and keyboard and mouse traversal cannot be performed.
S804、在支持键鼠服务的情况下,安卓设备的键鼠业务模块向安卓设备的键鼠虚拟化能力模块发送键鼠服务开启的指示信息,对应地,安卓设备的键鼠虚拟化能力模块接收该键鼠服务开启的指示信息。 S804. When the keyboard and mouse service is supported, the keyboard and mouse business module of the Android device sends the instruction information for starting the keyboard and mouse service to the keyboard and mouse virtualization capability module of the Android device. Correspondingly, the keyboard and mouse virtualization capability module of the Android device receives Instructions for starting the keyboard and mouse service.
S805、安卓设备的键鼠虚拟化能力模块基于该键鼠服务开启的指示信息,注册虚拟输入(Uinput)。S805. The keyboard and mouse virtualization capability module of the Android device registers a virtual input (Uinput) based on the instruction information for starting the keyboard and mouse service.
Uinput用于注入键鼠事件。Uinput is used to inject keyboard and mouse events.
S806、安卓设备的键鼠虚拟化能力模块向安卓设备的键鼠业务模块发送注册结果A,对应地,安卓设备的键鼠业务模块接收该注册结果A。S806. The keyboard and mouse virtualization capability module of the Android device sends the registration result A to the keyboard and mouse business module of the Android device. Correspondingly, the keyboard and mouse business module of the Android device receives the registration result A.
注册结果A可以用于表示注册Uinput是否成功。注册结果可以为成功或者失败。在一种实施例中,成功和失败可以用二进制标识表示。例如,1表示成功,0表示失败。The registration result A can be used to indicate whether the registration of Uinput is successful. The registration result can be success or failure. In one embodiment, success and failure may be represented by binary identifiers. For example, 1 indicates success and 0 indicates failure.
S807、安卓设备的键鼠虚拟化能力模块基于该键鼠服务开启的指示信息,安卓设备的键鼠虚拟化能力模块向安卓设备的多屏框架模块发送注册光标位置监听的指示信息,对应地,安卓设备的多屏框架模块接收该注册光标位置监听的指示信息,并注册光标位置监听。S807. Based on the instruction information of starting the keyboard and mouse service, the keyboard and mouse virtualization capability module of the Android device sends the instruction information of registering cursor position monitoring to the multi-screen framework module of the Android device. Correspondingly, The multi-screen framework module of the Android device receives the instruction information for registering cursor position monitoring and registers cursor position monitoring.
多屏框架模块注册光标位置监听后,可以监听光标的位置。After the multi-screen framework module registers cursor position monitoring, it can monitor the cursor position.
需要说明的是,安卓设备的键鼠虚拟化能力模块基于键鼠服务开启的指示信息,注册Uinput和发送注册光标位置监听的指示信息之间的先后顺序不作限定,也就是说,本申请实施例不限定上述S805和S808的执行顺序。It should be noted that the keyboard and mouse virtualization capability module of the Android device is based on the instruction information for starting the keyboard and mouse service. The order between registering Uinput and sending the instruction information for registering cursor position monitoring is not limited. That is to say, the embodiment of the present application The execution order of the above S805 and S808 is not limited.
S808、安卓设备的键鼠虚拟化能力模块向安卓设备的键鼠业务模块发送注册结果B,对应地,安卓设备的键鼠业务模块接收该注册结果B。S808. The keyboard and mouse virtualization capability module of the Android device sends the registration result B to the keyboard and mouse business module of the Android device. Correspondingly, the keyboard and mouse business module of the Android device receives the registration result B.
注册结果B可以用于表示注册光标位置监听是否成功。注册结果可以为成功或者失败。在一种实施例中,成功和失败可以用二进制标识表示。例如,1表示成功,0表示失败。Registration result B can be used to indicate whether the registration for cursor position monitoring is successful. The registration result can be success or failure. In one embodiment, success and failure may be represented by binary identifiers. For example, 1 indicates success and 0 indicates failure.
S809、在支持键鼠服务的情况下,安卓设备的键鼠业务模块向安卓设备的拖拽管理模块发送注册拖拽监听的指示信息,对应地,安卓设备的键鼠虚拟化能力模块接收该注册拖拽监听的指示信息。S809. When the keyboard and mouse service is supported, the keyboard and mouse business module of the Android device sends instruction information for registering drag and drop monitoring to the drag and drop management module of the Android device. Correspondingly, the keyboard and mouse virtualization capability module of the Android device receives the registration. Instructions for drag monitoring.
需要说明的是,在支持键鼠服务的情况下,安卓设备的键鼠业务模块发送键鼠服务开启的指示信息和发送注册拖拽监听的指示信息之间的先后顺序不作限定,也就是说,本申请实施例不限定上述S804和S809的执行顺序。It should be noted that when the keyboard and mouse service is supported, the order in which the keyboard and mouse business module of the Android device sends the instruction information for starting the keyboard and mouse service and the instruction information for registering drag and drop monitoring is not limited. That is to say, The embodiment of the present application does not limit the execution order of the above S804 and S809.
S810、安卓设备的拖拽管理模块向安卓设备的多屏框架模块发送注册拖拽监听的指示信息,对应地,安卓设备的多屏框架模块接收该注册拖拽监听的指示信息。S810. The drag management module of the Android device sends the instruction information for registering drag and drop monitoring to the multi-screen framework module of the Android device. Correspondingly, the multi-screen framework module of the Android device receives the instruction information for registering drag and drop monitoring.
S811、安卓设备的键鼠业务模块保存处理结果A,其中,处理结果A包括键鼠服务是否开启、注册Uinput是否成功以及注册光标位置监听是否成功的结果。S811. The keyboard and mouse business module of the Android device saves the processing result A, where the processing result A includes the results of whether the keyboard and mouse service is enabled, whether the Uinput registration is successful, and whether the cursor position monitoring registration is successful.
示例性地,处理结果A可以包括键鼠服务开启、注册Uinput成功以及注册光标位置监听成功。For example, the processing result A may include that the keyboard and mouse service is started, Uinput is successfully registered, and cursor position monitoring is successfully registered.
S812、安卓设备的键鼠业务模块向PC的键鼠业务模块发送处理结果A,对应地,PC的键鼠业务模块接收处理结果A。S812. The keyboard and mouse business module of the Android device sends the processing result A to the keyboard and mouse business module of the PC. Correspondingly, the keyboard and mouse business module of the PC receives the processing result A.
S813、PC的键鼠业务模块向PC的键鼠虚拟化能力模块发送开启键鼠服务的指示信息,对应地,PC的键鼠业务模块接收开启键鼠服务的指示信息。S813. The keyboard and mouse business module of the PC sends instruction information to enable the keyboard and mouse service to the keyboard and mouse virtualization capability module of the PC. Correspondingly, the keyboard and mouse business module of the PC receives the instruction information to enable the keyboard and mouse service.
上述S802与S813是PC的键鼠业务模块并行发送的,故上述S802~S812与S813~S818是并行执行的。The above-mentioned S802 and S813 are sent in parallel by the keyboard and mouse business module of the PC, so the above-mentioned S802~S812 and S813~S818 are executed in parallel.
S814、PC的键鼠虚拟化能力模块基于开启键鼠服务的指示信息,注册键鼠事件监听。S814. The PC's keyboard and mouse virtualization capability module registers keyboard and mouse event monitoring based on the instruction information for starting the keyboard and mouse service.
PC的键鼠虚拟化能力模块注册键鼠事件监听,可以监听到键鼠事件。例如,PC的键鼠虚拟化能力模块可以监听到键盘的按压操作以及鼠标的移动、点击、拖拽等操作。 The PC's keyboard and mouse virtualization capability module registers keyboard and mouse event monitoring, and can monitor keyboard and mouse events. For example, the PC's keyboard and mouse virtualization capability module can monitor keyboard presses and mouse movements, clicks, drags, and other operations.
S815、PC的键鼠虚拟化能力模块基于开启键鼠服务的指示信息,设置键鼠事件拦截。S815. The keyboard and mouse virtualization capability module of the PC sets keyboard and mouse event interception based on the instruction information to enable the keyboard and mouse service.
当键鼠穿越后,键鼠事件在PC侧拦截,键鼠事件的响应由安卓设备执行,故PC的键鼠虚拟化能力模块设置键鼠事件拦截以便于键鼠穿越后拦截键鼠事件。When the keyboard and mouse travel through, the keyboard and mouse events are intercepted on the PC side, and the response to the keyboard and mouse events is executed by the Android device. Therefore, the keyboard and mouse virtualization capability module of the PC sets up the keyboard and mouse event interception to intercept the keyboard and mouse events after the keyboard and mouse travel through.
本申请实施例不限定上述S814和S815的执行顺序。The embodiment of the present application does not limit the execution order of the above S814 and S815.
S816、PC的键鼠虚拟化能力模块保存处理结果B,其中,处理结果B包括注册键鼠件是否成功以及设置键鼠事件拦截是否成功的结果。S816. The keyboard and mouse virtualization capability module of the PC saves the processing result B, where the processing result B includes the results of whether the registration of the keyboard and mouse software is successful and whether the setting of keyboard and mouse event interception is successful.
示例性性地,处理结果B可以包括注册键鼠件成功以及设置键鼠事件拦截成功。For example, the processing result B may include successful registration of keyboard and mouse components and success in setting keyboard and mouse event interception.
S818、PC的键鼠虚拟化能力模块向PC的键鼠业务模块发送处理结果B,对应地,PC的键鼠业务模块接收该处理结果B。S818. The keyboard and mouse virtualization capability module of the PC sends the processing result B to the keyboard and mouse business module of the PC. Correspondingly, the keyboard and mouse business module of the PC receives the processing result B.
S818、PC的键鼠业务模块向安卓设备的键鼠业务模块发送处理结果B,对应地,安卓设备的键鼠业务模块接收处理结果B。S818. The keyboard and mouse business module of the PC sends the processing result B to the keyboard and mouse business module of the Android device. Correspondingly, the keyboard and mouse business module of the Android device receives the processing result B.
S819、PC的键鼠业务模块和安卓设备的键鼠业务模块均可以将处理结果A与处理结果B进行比较,确定键鼠是否连接成功。S819, the keyboard and mouse business module of the PC and the keyboard and mouse business module of the Android device can compare the processing result A with the processing result B to determine whether the keyboard and mouse connection is successful.
若处理结果A与处理结果B中的结果均为成功,则PC的键鼠业务模块和安卓设备的键鼠业务模块可以确定键鼠连接成功。若处理结果A与处理结果B中的结果中存在至少一个结果为失败,则PC的键鼠业务模块和安卓设备的键鼠业务模块可以确定键鼠连接未成功。If the results in processing result A and processing result B are both successful, the keyboard and mouse business module of the PC and the keyboard and mouse business module of the Android device can determine that the keyboard and mouse connection is successful. If at least one of the results in processing result A and processing result B is a failure, the keyboard and mouse business module of the PC and the keyboard and mouse business module of the Android device can determine that the keyboard and mouse connection is unsuccessful.
若PC的键鼠业务模块和安卓设备的键鼠业务模块键鼠连接未成功,则均恢复初始化状态,即重新执行上述注册过程。If the keyboard and mouse business module of the PC and the keyboard and mouse business module of the Android device are not successfully connected, both will return to the initialization state, that is, the above registration process will be re-executed.
本申请实施例提供的键鼠连接的方法,在数据传输之间,不同设备之间进行键鼠连接,以便为后续数据传输作准备,有利于数据传输的顺利进行。The keyboard and mouse connection method provided by the embodiment of the present application enables keyboard and mouse connection between different devices during data transmission to prepare for subsequent data transmission, which is conducive to the smooth progress of data transmission.
需要说明的是,PC与两个安卓设备进行键鼠连接,进行键鼠连接的方式相同,均为上述方法800所示的过程。It should be noted that the keyboard and mouse connection between a PC and two Android devices is done in the same way, which is the process shown in method 800 above.
通过上述方法800确定键鼠连接成功之后,PC和安卓设备可以进行数据传输。After confirming that the keyboard and mouse connection is successful through the above method 800, the PC and the Android device can transmit data.
在介绍数据传输之前,先介绍一种检测鼠标穿越的方法,PC和/或安卓设备可以基于该方法监听鼠标穿越。Before introducing data transmission, let us first introduce a method for detecting mouse traversal. PC and/or Android devices can monitor mouse traversal based on this method.
示例性地,图9示出了一种鼠标穿越的检测方法900的示意性流程图。如图9所示,该方法900可以包括如下步骤:Exemplarily, FIG. 9 shows a schematic flow chart of a mouse crossing detection method 900. As shown in Figure 9, the method 900 may include the following steps:
S901、PC的键盘虚拟化能力模块获取鼠标位置。S901. The keyboard virtualization capability module of the PC obtains the mouse position.
鼠标位置也就是鼠标在屏幕中的坐标。PC的键盘虚拟化能力模块可以在屏幕中创建二维坐标系,鼠标在二维坐标系的坐标即为鼠标位置。鼠标位置可以用(XRaw,YRaw)表示,但本申请实施例并不限于此。The mouse position is the coordinates of the mouse on the screen. The PC's keyboard virtualization capability module can create a two-dimensional coordinate system on the screen. The coordinates of the mouse in the two-dimensional coordinate system are the mouse positions. The mouse position can be represented by (XRaw, YRaw), but the embodiment of the present application is not limited to this.
示例性地,图10示出了一种屏幕坐标系的建立示意图。如图10所示,屏幕OABC以O点为原点、OA所在直线为X轴、OC所在直线为Y轴建立坐标系。屏幕分辨率为1920*1080,线段OA的长度等于线段CB的长度等于1920,线段OC的长度等于线段AB的长度等于1080,则在坐标系中,O点的坐标为(0,0),A点的坐标为(1920,0),B点的坐标为(1920,1080),C点的坐标为(0,1080)。鼠标位置为鼠标在坐标系的坐标,例如鼠标位置可以为(1920,960)。Exemplarily, FIG. 10 shows a schematic diagram of establishing a screen coordinate system. As shown in Figure 10, screen OABC establishes a coordinate system with point O as the origin, the straight line where OA is located as the X-axis, and the straight line where OC is located as the Y-axis. The screen resolution is 1920*1080, the length of line segment OA is equal to the length of line segment CB, which is equal to 1920, the length of line segment OC is equal to the length of line segment AB, which is equal to 1080, then in the coordinate system, the coordinates of point O are (0,0), A The coordinates of point B are (1920,0), the coordinates of point B are (1920,1080), and the coordinates of point C are (0,1080). The mouse position is the coordinates of the mouse in the coordinate system. For example, the mouse position can be (1920,960).
S902、PC的键盘虚拟化能力模块检测到鼠标移动时,获取鼠标位移。 S902. When the PC's keyboard virtualization capability module detects mouse movement, it obtains the mouse displacement.
鼠标位移也就是鼠标移动的距离。鼠标位移可以用(Lx,Ly)表示。Lx与Ly可以为正值,也可以为负值,本申请实施例对此不作限定。Mouse displacement is the distance the mouse moves. Mouse displacement can be expressed as (Lx, Ly). Lx and Ly may be positive values or negative values, which are not limited in the embodiments of the present application.
S903、PC的键盘虚拟化能力模块基于鼠标位置和鼠标位移,计算鼠标移动后的位置。S903. The keyboard virtualization capability module of the PC calculates the position of the mouse after movement based on the mouse position and mouse displacement.
鼠标移动后的位置可以通过(curX,curY)表示。鼠标移动后的位置可以通过下列公式表示:curX=XRaw+Lx;curY=YRaw+Ly。The position of the mouse after movement can be expressed by (curX, curY). The position of the mouse after movement can be expressed by the following formula: curX=XRaw+Lx; curY=YRaw+Ly.
S904、PC的键盘虚拟化能力模块判断鼠标移动后的位置是否超出屏幕。S904. The keyboard virtualization capability module of the PC determines whether the position of the mouse after movement exceeds the screen.
若curX小于屏幕在X轴的最小值或者大于屏幕在X轴的最大值,PC的键盘虚拟化能力模块可以确定鼠标超出屏幕。若curY小于屏幕在Y轴的最小值或者大于屏幕在Y轴的最大值,PC的键盘虚拟化能力模块可以确定鼠标超出屏幕。If curX is less than the minimum value of the screen on the X-axis or greater than the maximum value of the screen on the X-axis, the PC's keyboard virtualization capability module can determine that the mouse exceeds the screen. If curY is less than the minimum value of the screen on the Y-axis or greater than the maximum value of the screen on the Y-axis, the PC's keyboard virtualization capability module can determine that the mouse exceeds the screen.
若鼠标移动后的位置超出屏幕,则可以确定鼠标穿越,即执行S905。若鼠标移动后的位置未超出屏幕,则可以将鼠标移动后的位置确定为当前位置,并继续获取鼠标移动,即执行S902。If the moved position of the mouse exceeds the screen, the mouse crossing can be determined, that is, S905 is executed. If the position of the mouse after movement does not exceed the screen, the position after movement of the mouse can be determined as the current position, and the mouse movement continues to be obtained, that is, S902 is executed.
S905、若鼠标移动后的位置超出屏幕,则PC的键盘虚拟化能力模块可以确定鼠标穿越。S905. If the position of the mouse after movement exceeds the screen, the keyboard virtualization capability module of the PC can determine the mouse traversal.
PC还可以确定鼠标的穿越方向,例如,穿越方向为左穿越、右穿越、上穿越、或者下穿越。The PC can also determine the crossing direction of the mouse, for example, the crossing direction is left crossing, right crossing, up crossing, or down crossing.
示例性地,在上述图10所示的示例中,若curX小于0,则PC可以确定鼠标的穿越方向为左穿越。若curX大于1920,则PC可以确定鼠标的穿越方向为右穿越。若curY小于0,则PC的键盘虚拟化能力模块可以确定鼠标的穿越方向为上穿越。若curX大于1080,则PC可以确定鼠标的穿越方向为下穿越。Illustratively, in the example shown in FIG. 10 above, if curX is less than 0, the PC can determine that the crossing direction of the mouse is left crossing. If curX is greater than 1920, the PC can determine that the mouse's crossing direction is right crossing. If curY is less than 0, the PC's keyboard virtualization capability module can determine that the mouse's traversing direction is up. If curX is greater than 1080, the PC can determine that the mouse's crossing direction is downward crossing.
本申请实施例提供的鼠标穿越的检测方法,可以通过鼠标位置和鼠标位移确定鼠标是否超出屏幕,并确定穿越方向,有利于提高检测鼠标穿越的准确性。The mouse crossing detection method provided by the embodiment of the present application can determine whether the mouse exceeds the screen through the mouse position and mouse displacement, and determine the crossing direction, which is beneficial to improving the accuracy of detecting mouse crossing.
下面将介绍本申请实施例提供的数据传输方法。The data transmission method provided by the embodiment of this application will be introduced below.
示例性地,图11示出了一种数据传输方法1100的示意性流程图。该方法1100可以应用于包括PC和安卓设备的通信系统,其中,安卓设备包括安卓设备1和安卓设备2。例如,上述通信系统100,PC为电脑101、但本申请实施例并不限于此。PC的软件架构图可以如图6所示,安卓设备的软件架构图可以如图7所示,本申请实施例并不限于此。Exemplarily, FIG. 11 shows a schematic flow chart of a data transmission method 1100. The method 1100 can be applied to a communication system including a PC and an Android device, where the Android device includes Android device 1 and Android device 2 . For example, in the above communication system 100, the PC is the computer 101, but the embodiment of the present application is not limited thereto. The software architecture diagram of the PC can be shown in Figure 6, and the software architecture diagram of the Android device can be shown in Figure 7. The embodiments of the present application are not limited thereto.
该方法1100可以包括如下步骤:The method 1100 may include the following steps:
S1101、安卓设备1的应用程序检测到用户拖出数据的操作。S1101. The application of Android device 1 detects the user's operation of dragging out data.
应用程序可以为图库、聊天或者文件管理器中的至少一个,但本申请实施例并不限于图库、聊天或者文件管理器。用户拖出数据的操作可以为用户通过鼠标拖拽数据的操作。用户拖出的数据可以为图片、文件、文本、压缩包、邮件、音乐以及视频等等,可以理解的是,用户拖出的数据可以为支持拖拽的任意数据,本申请实施例对此不作限定。The application program may be at least one of a gallery, a chat, or a file manager, but the embodiment of the present application is not limited to the gallery, a chat, or a file manager. The operation of the user dragging out the data may be the operation of the user dragging the data through the mouse. The data dragged out by the user can be pictures, files, texts, compressed packages, emails, music, videos, etc. It can be understood that the data dragged out by the user can be any data that supports drag and drop, and the embodiments of this application do not do this. limited.
安卓设备1可以是上述手机102或者平板103,本申请实施例对此不作限定。The Android device 1 may be the above-mentioned mobile phone 102 or tablet 103, which is not limited in the embodiment of the present application.
示例性地,在上述图5所示的示例中,安卓设备1可以是平板103,应用程序可以是文件管理器,文件管理器检测到用户拖出文档的操作。Illustratively, in the example shown in FIG. 5 above, the Android device 1 may be a tablet 103, the application may be a file manager, and the file manager detects the user's operation of dragging out a document.
S1102、安卓设备1的应用程序响应于用户拖出数据的操作,向安卓设备1拖拽框架发送数据拖出的信息,对应地,安卓设备1拖拽框架接收数据拖出的信息。S1102. In response to the user's operation of dragging out data, the application program of Android device 1 sends data dragging information to the dragging framework of Android device 1. Correspondingly, the dragging framework of Android device 1 receives the data dragging information.
S1103、安卓设备1拖拽框架基于数据拖出的信息向安卓设备1拖拽模块发送数据拖 出的信息,对应地,安卓设备1拖拽模块接收该数据拖出的信息。S1103. The drag and drop framework of Android device 1 sends data drag to the drag and drop module of Android device 1 based on the information of data drag. Correspondingly, the drag module of Android device 1 receives the information dragged out by the data.
S1104、安卓设备1拖拽模块基于数据拖出的信息,获取拖出的数据的通用资源标志符(universal resource identifier,URI)。S1104. The Android device 1 drag and drop module obtains the universal resource identifier (URI) of the dragged data based on the information dragged out.
URI用于表示要操作的数据。URI is used to represent the data to be operated on.
S1105、安卓设备1的应用程序接收到用户拖出屏幕的操作。S1105. The application of Android device 1 receives the user's operation of dragging out of the screen.
安卓设备1的应用程序可以基于上述方法900确定用户是否将数据拖出屏幕。The application of Android device 1 may determine whether the user drags data off the screen based on the above method 900 .
S1106、安卓设备1的应用程序向PC的拖拽模块发送拖出屏幕的指令,对应地,PC的拖拽模块接收拖出屏幕的指令。S1106. The application program of Android device 1 sends a drag-out instruction to the drag module of the PC. Correspondingly, the drag module of the PC receives the instruction to drag out the screen.
PC可以为上述电脑101,但本申请实施例并不限于此。The PC may be the above-mentioned computer 101, but the embodiment of the present application is not limited thereto.
拖出屏幕的指令用于告知PC的拖拽模块数据已拖入PC。拖出屏幕的指令可以用标识位表示,但本申请实施例并不限于此。例如,拖出屏幕的指令可以包括标识位1以用于表示数据已拖入PC。The command of dragging out of the screen is used to inform the PC's drag module that the data has been dragged into the PC. The instruction to drag out of the screen can be expressed by an identification bit, but the embodiment of the present application is not limited to this. For example, the instruction to drag out the screen may include an identification bit 1 to indicate that the data has been dragged into the PC.
需要说明的是,S1106是一种简化的写法,安卓设备1的应用程序与PC的拖拽模块不能直接通信,安卓设备1的应用程序可以将拖出屏幕的指令发送至安卓设备1的拖拽框架,由安卓设备1的拖拽框架传输至安卓设备1的拖拽模块,再由安卓设备1的拖拽模块将拖出屏幕的指令发送至安卓设备1的通信模块。安卓设备1的通信模块接收拖出屏幕的指令后,可以传输至PC的通信模块,最后由PC的通信模块将拖出屏幕的指令发送至PC的拖拽模块。It should be noted that S1106 is a simplified way of writing. The application program of Android device 1 cannot communicate directly with the drag and drop module of PC. The application program of Android device 1 can send the drag-and-drop command of Android device 1 to the drag-and-drop module of Android device 1. The frame is transmitted from the drag frame of Android device 1 to the drag module of Android device 1, and then the drag module of Android device 1 sends the instruction of dragging out of the screen to the communication module of Android device 1. After the communication module of the Android device 1 receives the instruction of dragging out of the screen, it can transmit it to the communication module of the PC. Finally, the communication module of the PC sends the instruction of dragging out of the screen to the drag module of the PC.
S1107、PC的拖拽模块基于拖出屏幕的指令,可以记录拖拽状态。S1107. The drag-and-drop module of the PC can record the drag-and-drop status based on the command of dragging out of the screen.
拖拽状态可以为拖拽完成、拖拽至PC、拖拽至安卓设备1或者拖拽至安卓设备2中的任一个。The dragging status can be any one of dragging completed, dragging to PC, dragging to Android device 1 or dragging to Android device 2.
PC的拖拽模块基于拖出屏幕的指令,可以将拖拽状态记录为拖拽至PC。若PC的拖拽模块检测到用户拖入数据的操作,可以将拖拽状态记录(或者更新)为拖拽完成。若PC的拖拽模块检测到用户拖出屏幕的操作,可以将拖拽状态记录(或者更新)为拖拽至安卓设备2。The drag-and-drop module of PC is based on the command of dragging out of the screen, and can record the drag-and-drop status as drag-and-drop to PC. If the drag-and-drop module of the PC detects the user's operation of dragging in data, the drag-and-drop status can be recorded (or updated) as drag-and-drop completion. If the drag module of the PC detects the user's dragging operation out of the screen, the drag status can be recorded (or updated) as drag to Android device 2.
S1108、PC的拖拽模块检测到用户拖出屏幕的操作。S1108. The drag module of the PC detects the user's drag operation out of the screen.
S1109、PC的拖拽模块响应于用户拖出屏幕的操作,可以更新拖拽状态。S1109. The drag and drop module of the PC can update the drag and drop status in response to the user's dragging operation out of the screen.
PC的拖拽模块响应于用户拖出屏幕的操作,可以将拖拽状态更新为拖拽至安卓设备2。In response to the user's dragging operation out of the screen, the PC's drag module can update the drag status to drag to Android device 2.
S1110、PC的拖拽模块向安卓设备2的拖拽模块发送拖出屏幕的指示信息,对应地,安卓设备2的拖拽模块接收拖出屏幕的指示信息。S1110. The drag module of the PC sends the instruction information of dragging out of the screen to the drag module of the Android device 2. Correspondingly, the drag module of the Android device 2 receives the instruction information of dragging out of the screen.
需要说明的是,S1110是一种简化的写法,PC的拖拽模块向安卓设备2的拖拽模块不可以直接通信,PC的拖拽模块可以先将拖出屏幕的指示信息发送至PC的通信模块,然后由PC的通信模块将拖出屏幕的指示信息发送至安卓设备2的通信模块,最后由安卓设备2的通信模块将拖出屏幕的指示信息发送至安卓设备2的拖拽模块。It should be noted that S1110 is a simplified way of writing. The drag and drop module of the PC cannot directly communicate with the drag and drop module of the Android device 2. The drag and drop module of the PC can first send the instruction information of dragging out of the screen to the communication of the PC. module, then the communication module of the PC sends the instruction information for dragging out of the screen to the communication module of Android device 2, and finally the communication module of Android device 2 sends the instruction information for dragging out of the screen to the drag module of Android device 2.
在上述图2、图3、图4或者图5所示的示例中,若安卓设备1为手机102,则安卓设备2为平板103;若安卓设备1为平板103,则安卓设备2为手机102,但本申请实施例并不限于此。In the above examples shown in Figure 2, Figure 3, Figure 4 or Figure 5, if Android device 1 is a mobile phone 102, then Android device 2 is a tablet 103; if Android device 1 is a tablet 103, then Android device 2 is a mobile phone 102 , but the embodiment of the present application is not limited to this.
S1111、安卓设备2的拖拽模块基于拖出屏幕的指示信息,调用安卓设备2的拖拽框架提供的接口发起拖拽,并根据拖出数据对应的图像(bitmap)绘制图标。 S1111. Based on the instruction information of dragging out of the screen, the drag module of Android device 2 calls the interface provided by the drag framework of Android device 2 to initiate dragging, and draws an icon according to the image (bitmap) corresponding to the dragged out data.
安卓设备2的拖拽模块调用拖拽框架可以支持拖拽功能。安卓设备2的拖拽模块可以根据拖出数据对应的图像(bitmap)在鼠标所在位置显示图标。The drag and drop module of Android device 2 calls the drag and drop framework to support the drag and drop function. The drag-and-drop module of Android device 2 can display an icon at the mouse location based on the image (bitmap) corresponding to the dragged data.
安卓设备2的拖拽模块可以预设多个数据类型与其对应的bitmap。例如,数据类型可以包括图片、文件、文本、视频以及音乐等类型。The drag and drop module of Android device 2 can preset multiple data types and their corresponding bitmaps. For example, data types may include pictures, files, text, videos, and music.
安卓设备2的拖拽模块基于拖出屏幕的指示信息,可以确定拖出数据的数据类型,并基于数据类型确定bitmap。安卓设备2的拖拽模块可以基于bitmap在鼠标所在位置显示图标。The drag and drop module of Android device 2 can determine the data type of the dragged data based on the instruction information of dragging out of the screen, and determine the bitmap based on the data type. The drag and drop module of Android device 2 can display icons at the mouse location based on bitmap.
图标可以为图2、图3、图4或者图5中的拖拽图标B,但本申请实施例并不限于此。The icon may be the drag icon B in Figure 2, Figure 3, Figure 4 or Figure 5, but the embodiment of the present application is not limited thereto.
S1112、安卓设备2的拖拽框架块判断是否拖入到可拖入区域。S1112. The drag frame block of Android device 2 determines whether it is dragged into the draggable area.
可拖入区域是指允许拖入数据的区域。若用户将数据拖入到可拖入区域,应用程序可以在可拖入区域显示拖入的数据。若用户将数据未拖入到可拖入区域,应用程序不允许拖入数据,用户的拖拽操作失败。The draggable area refers to the area that allows data to be dragged in. If the user drags data into the draggable area, the application can display the dragged data in the draggable area. If the user does not drag the data into the draggable area, the application does not allow the data to be dragged in, and the user's drag operation fails.
S1113、若拖入到可拖入区域,安卓设备2的拖拽框架向安卓设备2的应用程序发送业务回调的信息,对应地,安卓设备2的应用程序接收该业务回调的信息。安卓设备2的应用程序基于业务回调的信息,进行业务回调,也就是执行拖入之后的业务。S1113. If dragged into the draggable area, the dragging framework of Android device 2 sends business callback information to the application program of Android device 2. Correspondingly, the application program of Android device 2 receives the business callback information. The application of Android device 2 performs business callback based on the business callback information, that is, executes the business after being dragged in.
本申请实施例提供的数据传输方法,可以支持用户从安卓设备1经PC拖拽至安卓设备2,实现跨多个设备的数据传输,不需要先从安卓设备1拖拽至PC,再从PC拖拽至安卓设备2,减少了PC的中转,有利于提高数据传输的效率,且有利于避免操作繁琐,提高用户体验。The data transmission method provided by the embodiment of the present application can support users to drag and drop from Android device 1 to Android device 2 via PC, realizing data transmission across multiple devices. There is no need to drag and drop from Android device 1 to PC first, and then from PC to Android device 1. Dragging and dropping to an Android device 2 reduces PC transfers, helps improve the efficiency of data transmission, avoids cumbersome operations, and improves user experience.
若用户将拖出的数据从安卓设备1经PC拖入至安卓设备2,安卓设备2可以从安卓设备1中获取数据。本申请实施例提供了两种获取数据的方法。If the user drags the dragged data from Android device 1 to Android device 2 via PC, Android device 2 can obtain the data from Android device 1. The embodiments of this application provide two methods of obtaining data.
第一种获取数据的方法,安卓设备1先将数据发送至PC,PC再将数据发送至安卓设备2。The first method of obtaining data is that Android device 1 first sends the data to the PC, and the PC then sends the data to Android device 2.
示例性地,图12示出了一种获取数据的方法1200的示意性流程图。如图12所示,该方法1200包括如下步骤:By way of example, FIG. 12 shows a schematic flowchart of a method 1200 for obtaining data. As shown in Figure 12, the method 1200 includes the following steps:
S1201、安卓设备2的应用程序检测到用户拖入数据的操作。S1201. The application of Android device 2 detects the user's operation of dragging in data.
应用程序可以为图库、聊天或者文件管理器中的至少一个,但本申请实施例并不限于图库、聊天或者文件管理器。安卓设备1的应用程序和安卓设备2的应用程序可以相同,也可以不同,本申请实施例对此不作限定。The application program may be at least one of a gallery, a chat, or a file manager, but the embodiment of the present application is not limited to the gallery, a chat, or a file manager. The application program of Android device 1 and the application program of Android device 2 may be the same or different, and this is not limited in the embodiment of the present application.
示例性地,在上述图3所示的示例中,安卓设备2的应用程序为聊天应用。Illustratively, in the above example shown in Figure 3, the application program of the Android device 2 is a chat application.
S1202、安卓设备2的应用程序响应于用户拖入数据的操作,向安卓设备2的拖拽模块发送请求数据的信息,对应地,安卓设备2的拖拽模块接收该请求数据的信息。S1202. In response to the user's operation of dragging in data, the application program of Android device 2 sends information requesting data to the drag module of Android device 2. Correspondingly, the drag module of Android device 2 receives the information requesting data.
请求数据的信息用于向安卓设备2的拖拽模块请求拖入的数据。The information for requesting data is used to request the dragged-in data from the drag-and-drop module of Android device 2.
需要说明的是,安卓设备2的应用程序响应于用户拖入数据的操作,可以先向安卓设备2的拖拽框架发送请求数据的信息,再由安卓设备2的拖拽框架将请求数据的信息发送至安卓设备2的拖拽模块。It should be noted that in response to the user's operation of dragging in data, the application program of Android device 2 can first send the information requesting data to the drag and drop framework of Android device 2, and then the drag and drop framework of Android device 2 will send the information requesting data. Drag and drop module sent to Android device 2.
S1203、安卓设备2的拖拽模块基于请求数据的信息,向PC的拖拽模块发送请求数据的信息,对应地,PC的拖拽模块接收该请求数据的信息。S1203. Based on the information of the requested data, the drag and drop module of the Android device 2 sends the information of the requested data to the drag and drop module of the PC. Correspondingly, the drag and drop module of the PC receives the information of the requested data.
需要说明的是,安卓设备2的拖拽模块基于请求数据的信息,可以先向安卓设备2的 通信模块发送请求数据的信息,再由安卓设备2的通信模块向PC的通信模块发送请求数据的信息,最后由PC的通信模块向PC的拖拽模块发送请求数据的信息。It should be noted that based on the requested data information, the drag and drop module of Android device 2 can first request the The communication module sends information requesting data, and then the communication module of the Android device 2 sends the information requesting data to the communication module of the PC. Finally, the communication module of the PC sends the information requesting data to the drag module of the PC.
S1204、PC的拖拽模块基于请求数据的信息,根据拖拽状态确定是否为跨PC的拖拽操作。S1204. Based on the information of the request data, the drag and drop module of the PC determines whether it is a cross-PC drag and drop operation according to the drag and drop status.
在上述方法900中,拖拽状态为拖拽至安卓设备2,PC的拖拽模块可以确定拖拽操作为跨PC的拖拽操作。In the above method 900, the dragging state is dragging to the Android device 2, and the dragging module of the PC can determine that the dragging operation is a cross-PC dragging operation.
S1205、PC的拖拽模块向安卓设备1的拖拽模块发送请求数据的信息,对应地,安卓设备1的拖拽模块接收该请求数据的信息。S1205. The drag and drop module of the PC sends information requesting data to the drag and drop module of Android device 1. Correspondingly, the drag and drop module of Android device 1 receives the information requesting data.
需要说明的是,PC的拖拽模块可以先向PC的通信模块发送请求数据的信息,再由PC的通信模块向安卓设备1的通信模块发送请求数据的信息,最后由安卓设备1的通信模块向安卓设备1的拖拽模块发送请求数据的信息。It should be noted that the drag and drop module of the PC can first send the information requesting data to the communication module of the PC, and then the communication module of the PC sends the information requesting the data to the communication module of the Android device 1, and finally the communication module of the Android device 1 Send a message requesting data to the drag and drop module of Android device 1.
S1206、安卓设备1的拖拽模块基于请求数据的信息,根据数据的URI确定拖拽数据。S1206. The drag and drop module of Android device 1 determines the drag and drop data based on the URI of the data based on the information of the requested data.
拖拽数据可以是一串二进制的字符串,但本申请实施例并不限于此。The drag data may be a binary string, but the embodiment of the present application is not limited to this.
S1207、安卓设备1的拖拽模块向PC的拖拽模块发送拖拽数据,对应地,PC的拖拽模块接收该拖拽数据。S1207. The drag and drop module of Android device 1 sends drag and drop data to the drag and drop module of the PC. Correspondingly, the drag and drop module of the PC receives the drag and drop data.
可以理解的是,安卓设备1的拖拽模块可以先向PC的通信模块发送拖拽数据,再由PC的通信模块向安卓设备2的通信模块发送拖拽数据,最后由安卓设备2的通信模块向安卓设备2的拖拽模块发送拖拽数据。It can be understood that the drag and drop module of Android device 1 can first send drag and drop data to the communication module of the PC, and then the communication module of the PC sends the drag and drop data to the communication module of Android device 2, and finally the communication module of Android device 2 Send drag data to the drag module of Android device 2.
S1208、PC的拖拽模块基于拖拽数据,保存拖拽数据。S1208. The drag and drop module of the PC is based on the drag and drop data and saves the drag and drop data.
S1209、PC的拖拽模块向安卓设备2的通信模块发送拖拽数据,对应地,安卓设备2的通信模块接收拖拽数据。S1209. The drag and drop module of the PC sends the drag and drop data to the communication module of the Android device 2. Correspondingly, the communication module of the Android device 2 receives the drag and drop data.
可以理解的是,PC的拖拽模块可以先向PC的通信模块发送拖拽数据,再由PC的通信模块向安卓设备2的通信模块发送拖拽数据。It can be understood that the drag and drop module of the PC can first send the drag and drop data to the communication module of the PC, and then the communication module of the PC sends the drag and drop data to the communication module of the Android device 2 .
S1210、安卓设备2的通信模块向安卓设备2的拖拽模块发送数据接收成功的信息,对应地,安卓设备2的拖拽模块接收该数据接收成功的信息。S1210. The communication module of the Android device 2 sends the data reception success message to the drag and drop module of the Android device 2. Correspondingly, the drag and drop module of the Android device 2 receives the data reception success message.
数据接收成功的信息用于表示安卓设备2的通信模块已成功接收通信数据。The information of successful data reception is used to indicate that the communication module of the Android device 2 has successfully received the communication data.
数据接收成功的信息还可以包括拖拽数据,以便于安卓设备2的拖拽模块得到拖拽数据。The information of successful data reception may also include drag and drop data, so that the drag and drop module of the Android device 2 can obtain the drag and drop data.
S1211、安卓设备2的拖拽模块基于数据接收成功的信息,向应用程序发送拖拽数据,对应地,应用程序发送拖拽数据。S1211. The drag-and-drop module of Android device 2 sends drag-and-drop data to the application program based on the information that data reception is successful. Correspondingly, the application program sends drag-and-drop data.
应用程序还可以在界面中显示拖拽数据。Applications can also display drag data in the interface.
S1212、安卓设备2的拖拽模块基于数据接收成功的信息,还可以向PC的拖拽模块发送数据接收成功的信息,对应地,PC的拖拽模块接收数据接收成功的信息。S1212. Based on the information of successful data reception, the drag-and-drop module of the Android device 2 can also send the information of successful data reception to the drag-and-drop module of the PC. Correspondingly, the drag-and-drop module of the PC receives the information of successful data reception.
本申请实施例不限定S1211和S1212的执行顺序。The embodiment of the present application does not limit the execution order of S1211 and S1212.
S1213、PC的拖拽模块基于数据接收成功的信息,清除拖拽数据。S1213. The drag and drop module of the PC clears the drag and drop data based on the information that data reception is successful.
PC的拖拽模块基于数据接收成功的信息,清除拖拽数据,还可以更新拖拽状态,将拖拽状态更新为拖拽完成。The PC drag and drop module clears the drag and drop data based on the information of successful data reception, and can also update the drag and drop status to drag and drop completed.
本申请实施例提供的获取数据的方法,安卓设备2请求获取拖入的数据时,安卓设备1可以先将数据传输至PC,再由PC传输至安卓设备2,采用PC进行数据中转,相当于先 将数据从安卓设备1拖入PC,在将数据从PC拖入安卓设备2,可以复用现有的数据传输方法,改动最小,有利于应用推广。According to the method of obtaining data provided by the embodiment of this application, when Android device 2 requests to obtain the dragged-in data, Android device 1 can first transmit the data to the PC, and then transmit the data from the PC to Android device 2, using the PC for data transfer, which is equivalent to First Drag data from Android device 1 to PC, and then drag data from PC to Android device 2. You can reuse the existing data transmission method with minimal changes, which is conducive to application promotion.
可选地,若安卓设备2的通信模块未成功接收拖拽数据,可以向PC的拖拽模块再次请求数据,PC的拖拽模块可以基于保存的数据向安卓设备2的通信模块发送数据,可以节省获取数据的步骤,有利于提高数据传输效率。Optionally, if the communication module of Android device 2 fails to receive drag and drop data, it can request data again from the drag and drop module of PC. The drag and drop module of PC can send data to the communication module of Android device 2 based on the saved data. Saving the steps to obtain data will help improve data transmission efficiency.
可以理解的是,若用户从安卓设备2拖出数据经PC拖入至安卓设备1,同样可以使用上述方法1200,只要将安卓设备1更改为安卓设备2,将安卓设备2更改为安卓设备1即可。It can be understood that if the user drags data from Android device 2 to Android device 1 via PC, the above method 1200 can also be used, as long as Android device 1 is changed to Android device 2, and Android device 2 is changed to Android device 1 That’s it.
第二种获取数据的方法,安卓设备1直接将数据发送至安卓设备2,也就是说,数据不经过PC。In the second method of obtaining data, Android device 1 directly sends data to Android device 2, that is, the data does not pass through the PC.
示例性地,图13示出了一种获取数据的方法1300的示意性流程图。如图13所示,该方法1300可以包括上述S1201~S1205,还可以包括如下步骤:By way of example, FIG. 13 shows a schematic flowchart of a method 1300 for obtaining data. As shown in Figure 13, the method 1300 may include the above-mentioned S1201 to S1205, and may also include the following steps:
S1301、安卓设备1的拖拽模块基于请求数据的信息,向安卓设备1的通信模块发送建立传输通道的指示信息,对应地,安卓设备1的通信模块接收该建立传输通道的指示信息。S1301. Based on the request data information, the drag module of Android device 1 sends instruction information for establishing a transmission channel to the communication module of Android device 1. Correspondingly, the communication module of Android device 1 receives the instruction information for establishing a transmission channel.
建立传输通道的指示信息用于指示安卓设备1的通信模块与安卓设备2的通信模块建立传输通道。The instruction information for establishing a transmission channel is used to instruct the communication module of Android device 1 and the communication module of Android device 2 to establish a transmission channel.
S1302、安卓设备1的通信模块基于建立传输通道的指示信息,与安卓设备2的通信模块之间建立数据传输通道。S1302. The communication module of Android device 1 establishes a data transmission channel with the communication module of Android device 2 based on the instruction information for establishing a transmission channel.
S1303、在数据传输通道建立之后,安卓设备1的拖拽模块向安卓设备1的通信模块发送拖拽数据,对应地,安卓设备1的通信模块接收拖拽数据。S1303. After the data transmission channel is established, the drag and drop module of Android device 1 sends drag and drop data to the communication module of Android device 1. Correspondingly, the communication module of Android device 1 receives the drag and drop data.
S1304、安卓设备1的通信模块通过数据传输通道向安卓设备2的通信模块发送拖拽数据,对应地,安卓设备2的通信模块接收拖拽数据。S1304. The communication module of Android device 1 sends drag and drop data to the communication module of Android device 2 through the data transmission channel. Correspondingly, the communication module of Android device 2 receives the drag and drop data.
S1305、安卓设备2的通信模块向安卓设备2的拖拽模块发送数据接收成功的信息,对应地,安卓设备2的拖拽模块接收该数据接收成功的信息。S1305. The communication module of the Android device 2 sends the data reception success message to the drag and drop module of the Android device 2. Correspondingly, the drag and drop module of the Android device 2 receives the data reception success message.
数据接收成功的信息用于表示安卓设备2的通信模块已成功接收通信数据。The information of successful data reception is used to indicate that the communication module of the Android device 2 has successfully received the communication data.
数据接收成功的信息还可以包括拖拽数据,以便于安卓设备2的拖拽模块得到拖拽数据。The information of successful data reception may also include drag and drop data, so that the drag and drop module of the Android device 2 can obtain the drag and drop data.
S1306、安卓设备2的拖拽模块基于数据接收成功的信息,向应用程序发送拖拽数据,对应地,应用程序发送拖拽数据。S1306. The drag-and-drop module of Android device 2 sends drag-and-drop data to the application program based on the information that data reception is successful. Correspondingly, the application program sends drag-and-drop data.
应用程序还可以在界面中显示拖拽数据。Applications can also display drag data in the interface.
S1307、安卓设备2的拖拽模块基于数据接收成功的信息,还可以向PC的拖拽模块发送数据接收成功的信息,对应地,PC的拖拽模块接收数据接收成功的信息。S1307. Based on the information of successful data reception, the drag-and-drop module of Android device 2 can also send the information of successful data reception to the drag-and-drop module of the PC. Correspondingly, the drag-and-drop module of the PC receives the information of successful data reception.
本申请实施例不限定S1306和S1307的执行顺序。The embodiment of the present application does not limit the execution order of S1306 and S1307.
S1308、PC的拖拽模块基于数据接收成功的信息,更新拖拽状态。S1308. The drag and drop module of the PC updates the drag and drop status based on the information of successful data reception.
PC的拖拽模块基于数据接收成功的信息,将拖拽状态更新为拖拽完成。Based on the information of successful data reception, the PC's drag and drop module updates the drag and drop status to drag and drop completed.
S1309、PC的拖拽模块向安卓设备1的拖拽模块发送拖拽完成消息,对应地,安卓设备1的拖拽模块接收该拖拽完成消息。S1309. The drag and drop module of the PC sends a drag and drop completion message to the drag and drop module of the Android device 1. Correspondingly, the drag and drop module of the Android device 1 receives the drag and drop completion message.
拖拽完成消息用于指示拖拽已完成。 The drag completion message is used to indicate that the drag has been completed.
S1310、安卓设备1的拖拽模块基于拖拽完成消息,向安卓设备1的通信模块发送拆除通道的指示信息,对应地,安卓设备1的通信模块接收该拆除通道的指示信息,并基于该拆除通道的指示信息,拆除数据传输通道。S1310. Based on the drag completion message, the drag module of Android device 1 sends the instruction information of the disassembly channel to the communication module of Android device 1. Correspondingly, the communication module of Android device 1 receives the instruction information of the dismantling channel, and dismantles the instruction information based on the disassembly. Channel indication information, remove the data transmission channel.
拆除通道的指示信息用于指示安卓设备1的通信模块拆除通道。The instruction information to remove the channel is used to instruct the communication module of the Android device 1 to remove the channel.
本申请实施例提供的获取数据的方法,安卓设备2请求获取拖入的数据时,安卓设备1可以通过安卓设备1和安卓设备2之间数据传输通道将数据传输至安卓设备2,无需PC进行数据中转,刻意减少数据的传输过程,提高数据传输效率。According to the method of obtaining data provided by the embodiment of this application, when Android device 2 requests to obtain the dragged-in data, Android device 1 can transmit the data to Android device 2 through the data transmission channel between Android device 1 and Android device 2, without the need for a PC. Data transfer deliberately reduces the data transmission process and improves data transmission efficiency.
上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。The size of the serial numbers of the above processes does not mean the order of execution. The execution order of each process should be determined by its functions and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
上文中结合图1至图13,详细描述了本申请实施例提供的方法,下面将结合图14和图15,详细描述本申请实施例提供的设备。The method provided by the embodiment of the present application is described in detail above with reference to Figures 1 to 13. The device provided by the embodiment of the present application will be described in detail below with reference to Figures 14 and 15.
图14示出了本申请实施例提供的一种终端设备1400的示意图。该终端设备1400包括:处理模块1410和收发模块1420。Figure 14 shows a schematic diagram of a terminal device 1400 provided by an embodiment of the present application. The terminal device 1400 includes: a processing module 1410 and a transceiver module 1420.
在一种可能的实现方式中,该终端设备1400可以执行上述实施例中安卓设备2的执行的步骤。In a possible implementation, the terminal device 1400 can perform the steps performed by the Android device 2 in the above embodiment.
其中,处理模块1410用于:检测到用户的第一操作,第一操作用于通过鼠标将目标数据的标识从第三设备经第二设备移动至,第三设备与第二设备支持键鼠穿越,第二设备与支持键鼠穿越;收发模块1420用于:响应于第一操作,通过第二设备向第三设备发送请求目标数据的信息;接收来自第三设备的目标数据。Among them, the processing module 1410 is used to: detect the user's first operation, the first operation is used to move the identification of the target data from the third device to the second device through the mouse, and the third device and the second device support keyboard and mouse traversal. , the second device supports keyboard and mouse traversal; the transceiver module 1420 is configured to: in response to the first operation, send information requesting target data to the third device through the second device; and receive target data from the third device.
在另一种可能的实现方式中,该终端设备1400可以执行上述实施例中安卓设备1的执行的步骤。In another possible implementation, the terminal device 1400 can perform the steps performed by the Android device 1 in the above embodiment.
其中,处理模块1410用于:检测到用户的第一操作,第一操作用于通过鼠标将目标数据的标识从经第二设备移动至第一设备,与第二设备支持键鼠穿越,第二设备与第一设备支持键鼠穿越;收发模块1420用于:响应于第一操作,通过第二设备接收来自第一设备的请求目标数据的信息;向第一设备发送目标数据。Among them, the processing module 1410 is used to: detect the user's first operation, the first operation is used to move the identification of the target data from the second device to the first device through the mouse, and the second device supports keyboard and mouse traversal, and the second The device and the first device support keyboard and mouse traversal; the transceiver module 1420 is configured to: in response to the first operation, receive information requesting target data from the first device through the second device; and send the target data to the first device.
在又一种可能的实现方式中,该终端设备1400可以执行上述实施例中PC的执行的步骤。In another possible implementation, the terminal device 1400 can perform the steps performed by the PC in the above embodiment.
其中,处理模块1410用于:检测到用户的第一操作,第一操作用于通过鼠标将目标数据的标识从第三设备经移动至第一设备,第三设备与支持键鼠穿越,与第一设备支持键鼠穿越;收发模块1420用于:响应于第一操作,接收来自第一设备的请求目标数据的信息;向第三设备发送请求目标数据的信息。Among them, the processing module 1410 is used to: detect the user's first operation, the first operation is used to move the identification of the target data from the third device to the first device through the mouse, the third device supports keyboard and mouse traversal, and the third device A device supports keyboard and mouse traversal; the transceiver module 1420 is configured to: in response to the first operation, receive information requesting target data from the first device; and send information requesting target data to a third device.
应理解,这里的终端设备1400以功能模块的形式体现。这里的术语“模块”可以指应用特有集成电路(application specific integrated circuit,ASIC)、电子电路、用于执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、合并逻辑电路和/或其它支持所描述的功能的合适组件。在一个可选的例子中,本领域技术人员可以理解,终端设备1400可以具体为上述方法实施例中的安卓设备2、PC或者安卓设备1,或者,上述方法实施例中安卓设备2、PC或者安卓设备1的功能可以集成在终端设备1400中,终端设备1400可以用于执行上述方法实施例中与安卓设备2、PC或者安卓设备1对应的各个流程和/或步骤,为避免重复,在此不再赘述。 It should be understood that the terminal device 1400 here is embodied in the form of a functional module. The term "module" as used herein may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group of processors) for executing one or more software or firmware programs. processor, etc.) and memory, merged logic circuitry, and/or other suitable components to support the described functionality. In an optional example, those skilled in the art can understand that the terminal device 1400 can be specifically the Android device 2, PC or Android device 1 in the above method embodiment, or the Android device 2, PC or Android device 1 in the above method embodiment. The functions of the Android device 1 can be integrated in the terminal device 1400, and the terminal device 1400 can be used to perform various processes and/or steps corresponding to the Android device 2, PC or Android device 1 in the above method embodiments. To avoid duplication, here No longer.
上述终端设备1400具有实现上述方法实施例中安卓设备2、PC或者安卓设备1执行的相应步骤的功能;上述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。The above terminal device 1400 has the function of implementing the corresponding steps performed by the Android device 2, PC or Android device 1 in the above method embodiment; the above functions can be implemented by hardware, or can also be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
在本申请的实施例中,图14中的终端设备1400也可以是芯片或者芯片系统,例如:片上系统(system on chip,SoC)。In this embodiment of the present application, the terminal device 1400 in Figure 14 may also be a chip or a chip system, such as a system on chip (SoC).
图15是本申请实施例提供的另一种终端设备1500的示意性框图。该终端设备1500包括处理器1510、收发器1520和存储器1530。其中,处理器1510、收发器1520和存储器1530通过内部连接通路互相通信,该存储器1530用于存储指令,该处理器1520用于执行该存储器1530存储的指令,以控制该收发器1520发送信号和/或接收信号。Figure 15 is a schematic block diagram of another terminal device 1500 provided by an embodiment of the present application. The terminal device 1500 includes a processor 1510, a transceiver 1520 and a memory 1530. Among them, the processor 1510, the transceiver 1520 and the memory 1530 communicate with each other through internal connection paths. The memory 1530 is used to store instructions, and the processor 1520 is used to execute the instructions stored in the memory 1530 to control the transceiver 1520 to send signals and /or receive a signal.
应理解,终端设备1500可以具体为上述方法实施例中的安卓设备2、PC或者安卓设备1,或者,上述方法实施例中安卓设备2、PC或者安卓设备1的功能可以集成在终端设备1500中,终端设备1500可以用于执行上述方法实施例中与安卓设备2、PC或者安卓设备1对应的各个步骤和/或流程。可选地,该存储器1530可以包括只读存储器和随机存取存储器,并向处理器提供指令和数据。存储器的一部分还可以包括非易失性随机存取存储器。例如,存储器还可以存储设备类型的信息。该处理器1510可以用于执行存储器中存储的指令,并且该处理器执行该指令时,该处理器可以执行上述方法实施例中与终端设备对应的各个步骤和/或流程。It should be understood that the terminal device 1500 can be specifically the Android device 2, PC or Android device 1 in the above method embodiment, or the functions of the Android device 2, PC or Android device 1 in the above method embodiment can be integrated into the terminal device 1500. , the terminal device 1500 can be used to execute various steps and/or processes corresponding to the Android device 2, PC or Android device 1 in the above method embodiment. Optionally, the memory 1530 may include read-only memory and random access memory and provide instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store device type information. The processor 1510 can be used to execute instructions stored in the memory, and when the processor executes the instructions, the processor can execute various steps and/or processes corresponding to the terminal device in the above method embodiment.
应理解,在本申请实施例中,该处理器1510可以是中央处理单元(central processingunit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that in this embodiment of the present application, the processor 1510 may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), or application specific integrated circuits (ASICs). ), field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器执行存储器中的指令,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述。During the implementation process, each step of the above method can be completed by instructions in the form of hardware integrated logic circuits or software in the processor. The steps of the methods disclosed in conjunction with the embodiments of the present application can be directly implemented by a hardware processor for execution, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other mature storage media in this field. The storage medium is located in the memory, and the processor executes the instructions in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
本申请还提供了一种计算机可读存储介质,该计算机可读存储介质用于存储计算机程序,该计算机程序用于实现上述方法实施例中安卓设备2、PC或者安卓设备1对应的方法。This application also provides a computer-readable storage medium, which is used to store a computer program. The computer program is used to implement the method corresponding to the Android device 2, PC or Android device 1 in the above method embodiment.
本申请还提供了一种芯片系统,该芯片系统用于支持上述方法实施例中安卓设备2、PC或者安卓设备1实现本申请实施例所示的功能。This application also provides a chip system, which is used to support the Android device 2, PC or Android device 1 in the above method embodiment to implement the functions shown in the embodiment of this application.
本申请还提供了一种计算机程序产品,该计算机程序产品包括计算机程序(也可以称为代码,或指令),当该计算机程序在计算机上运行时,该计算机可以执行上述方法实施例所示的安卓设备2、PC或者安卓设备1对应的方法。This application also provides a computer program product. The computer program product includes a computer program (which can also be called a code, or an instruction). When the computer program is run on a computer, the computer can execute the steps shown in the above method embodiments. Corresponding method for Android device 2, PC or Android device 1.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的模块及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。 Those of ordinary skill in the art can appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each specific application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be described again here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or modules, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。In addition, each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module.
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code. .
以上所述,仅为本申请的具体实施方式,但本申请实施例的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请实施例揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请实施例的保护范围之内。因此,本申请实施例的保护范围应所述以权利要求的保护范围为准。 The above are only specific implementation modes of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any person familiar with the technical field can easily think of changes within the technical scope disclosed in the embodiments of the present application. or replacement, all should be covered by the protection scope of the embodiments of this application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.

Claims (19)

  1. 一种数据传输方法,其特征在于,包括:A data transmission method, characterized by including:
    第一设备检测到用户的第一操作,所述第一操作用于通过鼠标将目标数据的标识从第三设备经第二设备移动至所述第一设备,所述第三设备与所述第二设备支持键鼠穿越,所述第二设备与所述第一设备支持键鼠穿越;The first device detects the user's first operation, which is used to move the identification of the target data from the third device to the first device through the second device through the mouse, and the third device and the third device The second device supports keyboard and mouse traversal, and the second device and the first device support keyboard and mouse traversal;
    所述第一设备响应于所述第一操作,通过所述第二设备向所述第三设备发送请求所述目标数据的信息;In response to the first operation, the first device sends information requesting the target data to the third device through the second device;
    所述第一设备接收来自所述第三设备的所述目标数据。The first device receives the target data from the third device.
  2. 根据权利要求1所述的方法,其特征在于,所述第一设备接收来自所述第三设备的所述目标数据,包括:The method of claim 1, wherein the first device receiving the target data from the third device includes:
    所述第一设备建立与所述第三设备的数据传输通道;The first device establishes a data transmission channel with the third device;
    所述第一设备通过所述数据传输通道接收来自所述第三设备的所述目标数据。The first device receives the target data from the third device through the data transmission channel.
  3. 根据权利要求2所述的方法,其特征在于,在所述第一设备通过所述数据传输通道接收来自所述第三设备的所述目标数据之后,所述方法还包括:The method according to claim 2, characterized in that, after the first device receives the target data from the third device through the data transmission channel, the method further includes:
    所述第一设备拆除所述数据传输通道。The first device removes the data transmission channel.
  4. 根据权利要求1所述的方法,其特征在于,所述第一设备接收来自所述第三设备的所述目标数据,包括:The method of claim 1, wherein the first device receiving the target data from the third device includes:
    所述第一设备通过所述第二设备接收来自所述第三设备的所述目标数据。The first device receives the target data from the third device through the second device.
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,在所述通过所述第二设备向所述第三设备发送请求所述目标数据的信息之前,所述方法还包括:The method according to any one of claims 1 to 4, characterized in that, before sending the information requesting the target data to the third device through the second device, the method further includes:
    所述第一设备判断所述鼠标将所述目标数据的标识拖入的区域是否为预设区域;The first device determines whether the area into which the mouse drags the identification of the target data is a preset area;
    所述通过所述第二设备向所述第三设备发送请求所述目标数据的信息,包括:The sending of information requesting the target data through the second device to the third device includes:
    在所述目标数据的标识拖入的区域为所述预设区域的情况下,所述第一设备通过所述第二设备向所述第三设备发送请求所述目标数据的信息。When the area into which the identifier of the target data is dragged is the preset area, the first device sends information requesting the target data to the third device through the second device.
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述目标数据包括以下至少一项:The method according to any one of claims 1 to 5, characterized in that the target data includes at least one of the following:
    文本数据、图像数据、文档数据、邮件数据、压缩包数据、音乐数据或者视频数据。Text data, image data, document data, email data, compressed package data, music data or video data.
  7. 一种数据传输方法,其特征在于,包括:A data transmission method, characterized by including:
    第三设备检测到用户的第一操作,所述第一操作用于通过鼠标将目标数据的标识从所述第三设备经第二设备移动至第一设备,所述第三设备与所述第二设备支持键鼠穿越,所述第二设备与所述第一设备支持键鼠穿越;The third device detects the user's first operation, which is used to move the identification of the target data from the third device to the first device through the second device through the mouse, and the third device and the third device The second device supports keyboard and mouse traversal, and the second device and the first device support keyboard and mouse traversal;
    所述第三设备响应于所述第一操作,通过所述第二设备接收来自所述第一设备的请求所述目标数据的信息;In response to the first operation, the third device receives, through the second device, information requesting the target data from the first device;
    所述第三设备向所述第一设备发送所述目标数据。The third device sends the target data to the first device.
  8. 根据权利要求7所述的方法,其特征在于,所述第三设备向所述第一设备发送所述目标数据,包括:The method of claim 7, wherein the third device sends the target data to the first device, including:
    所述第三设备建立与所述第一设备的数据传输通道;The third device establishes a data transmission channel with the first device;
    所述第三设备通过所述数据传输通道向所述第一设备发送所述目标数据。The third device sends the target data to the first device through the data transmission channel.
  9. 根据权利要求8所述的方法,其特征在于,在所述第三设备通过所述数据传输通 道向所述第一设备发送所述目标数据之后,所述方法还包括:The method according to claim 8, characterized in that when the third device uses the data transmission channel After sending the target data to the first device, the method further includes:
    所述第三设备拆除所述数据传输通道。The third device removes the data transmission channel.
  10. 根据权利要求7所述的方法,其特征在于,所述第三设备向所述第一设备发送所述目标数据,包括:The method of claim 7, wherein the third device sends the target data to the first device, including:
    所述第三设备通过所述第二设备向所述第一设备发送所述目标数据。The third device sends the target data to the first device through the second device.
  11. 根据权利要求7至10中任一项所述的方法,其特征在于,在通过所述第二设备接收来自所述第一设备的请求所述目标数据的信息之前,所述方法还包括:The method according to any one of claims 7 to 10, characterized in that, before receiving the information requesting the target data from the first device through the second device, the method further includes:
    所述第三设备响应于所述第一操作,获取所述目标数据标识的通用资源标志符URI;In response to the first operation, the third device obtains the universal resource identifier URI identified by the target data;
    所述第三设备将所述URI对应的数据确定为所述目标数据。The third device determines the data corresponding to the URI as the target data.
  12. 根据权利要求7至11中任一项所述的方法,其特征在于,所述目标数据包括以下至少一项:The method according to any one of claims 7 to 11, characterized in that the target data includes at least one of the following:
    文本数据、图像数据、文档数据、邮件数据、压缩包数据、音乐数据或者视频数据。Text data, image data, document data, email data, compressed package data, music data or video data.
  13. 一种数据传输方法,其特征在于,包括:A data transmission method, characterized by including:
    第二设备检测到用户的第一操作,所述第一操作用于通过鼠标将目标数据的标识从第三设备经所述第二设备移动至第一设备,所述第三设备与所述第二设备支持键鼠穿越,所述第二设备与所述第一设备支持键鼠穿越;The second device detects the user's first operation, which is used to move the identification of the target data from the third device to the first device through the second device through the mouse, and the third device is connected to the first device. The second device supports keyboard and mouse traversal, and the second device and the first device support keyboard and mouse traversal;
    所述第二设备响应于所述第一操作,接收来自所述第一设备的请求所述目标数据的信息;In response to the first operation, the second device receives information from the first device requesting the target data;
    所述第二设备向所述第三设备发送请求所述目标数据的信息。The second device sends information requesting the target data to the third device.
  14. 根据权利要求13所述的方法,其特征在于,在所述第二设备向所述第三设备发送请求所述目标数据的信息之前,所述方法还包括:The method according to claim 13, characterized in that, before the second device sends the information requesting the target data to the third device, the method further includes:
    所述第二设备响应于所述第一操作,将移动状态确定为从所述第三设备移动至所述第一设备;The second device determines the movement state as moving from the third device to the first device in response to the first operation;
    所述第二设备向所述第三设备发送请求所述目标数据的信息,包括:The second device sends information requesting the target data to the third device, including:
    所述第二设备基于所述请求所述目标数据的信息和所述移动状态,向所述第三设备发送请求所述目标数据的信息。The second device sends information requesting the target data to the third device based on the information requesting the target data and the movement status.
  15. 根据权利要求13或14所述的方法,其特征在于,所述方法还包括:The method according to claim 13 or 14, characterized in that the method further includes:
    所述第二设备接收来自所述第三设备的所述目标数据;The second device receives the target data from the third device;
    所述第二设备向所述第一设备发送所述目标数据。The second device sends the target data to the first device.
  16. 根据权利要求13至15中任一项所述的方法,其特征在于,所述目标数据包括以下至少一项:The method according to any one of claims 13 to 15, characterized in that the target data includes at least one of the following:
    文本数据、图像数据、文档数据、邮件数据、压缩包数据、音乐数据或者视频数据。Text data, image data, document data, email data, compressed package data, music data or video data.
  17. 一种终端设备,其特征在于,包括:处理器,所述处理器与存储器耦合,所述存储器用于存储计算机程序,当所述处理器调用所述计算机程序时,使得所述终端设备执行如权利要求1至6、执行如权利要求7至12或者执行如权利要求13至16中任一项所述的方法。A terminal device, characterized in that it includes: a processor, the processor is coupled to a memory, the memory is used to store a computer program, and when the processor calls the computer program, the terminal device is caused to execute as follows: Claims 1 to 6, performing claims 7 to 12 or performing the method according to any one of claims 13 to 16.
  18. 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序包括用于实现如权利要求1至6、如权利要求7至12或者如权利要求13至16中任一项所述的方法的指令。 A computer-readable storage medium, characterized in that it is used to store a computer program, and the computer program includes a computer program for implementing any one of claims 1 to 6, claims 7 to 12, or claims 13 to 16. instructions for the method described.
  19. 一种计算机程序产品,其特征在于,所述计算机程序产品中包括计算机程序代码,当所述计算机程序代码在计算机上运行时,使得计算机实现如权利要求1至6、如权利要求7至12或者如权利要求13至16中任一项所述的方法。 A computer program product, characterized in that the computer program product includes computer program code. When the computer program code is run on a computer, the computer implements claims 1 to 6, claims 7 to 12, or A method as claimed in any one of claims 13 to 16.
PCT/CN2023/113203 2022-09-02 2023-08-15 Data transmission method and terminal device WO2024046117A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211071845.0A CN117692551A (en) 2022-09-02 2022-09-02 Data transmission method and terminal equipment
CN202211071845.0 2022-09-02

Publications (1)

Publication Number Publication Date
WO2024046117A1 true WO2024046117A1 (en) 2024-03-07

Family

ID=90100393

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/113203 WO2024046117A1 (en) 2022-09-02 2023-08-15 Data transmission method and terminal device

Country Status (2)

Country Link
CN (1) CN117692551A (en)
WO (1) WO2024046117A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150061972A1 (en) * 2013-09-02 2015-03-05 Samsung Electronics Co., Ltd. Method and apparatus for providing service by using screen mirroring
CN111158543A (en) * 2019-12-24 2020-05-15 华为技术有限公司 File processing method, electronic equipment, system and storage medium
CN114077411A (en) * 2020-08-11 2022-02-22 华为技术有限公司 Data transmission method and device
CN114356195A (en) * 2020-09-28 2022-04-15 华为技术有限公司 File transmission method and related equipment
CN114579016A (en) * 2020-11-30 2022-06-03 华为技术有限公司 Method for sharing input equipment, electronic equipment and system
CN114885442A (en) * 2022-03-25 2022-08-09 华为技术有限公司 Input device connection method, device and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150061972A1 (en) * 2013-09-02 2015-03-05 Samsung Electronics Co., Ltd. Method and apparatus for providing service by using screen mirroring
CN111158543A (en) * 2019-12-24 2020-05-15 华为技术有限公司 File processing method, electronic equipment, system and storage medium
CN114077411A (en) * 2020-08-11 2022-02-22 华为技术有限公司 Data transmission method and device
CN114356195A (en) * 2020-09-28 2022-04-15 华为技术有限公司 File transmission method and related equipment
CN114579016A (en) * 2020-11-30 2022-06-03 华为技术有限公司 Method for sharing input equipment, electronic equipment and system
CN114885442A (en) * 2022-03-25 2022-08-09 华为技术有限公司 Input device connection method, device and system

Also Published As

Publication number Publication date
CN117692551A (en) 2024-03-12

Similar Documents

Publication Publication Date Title
US11494010B2 (en) Touch support for remoted applications
JP3546705B2 (en) Method and apparatus for associating annotation data with application window, system, and storage medium storing program for controlling association of annotation data with application window
US10735377B2 (en) System for remotely controlling electronic device and method of operating the same
US9519451B2 (en) Communication system and information processing device
TWI601055B (en) A unified extensible firmware interface (uefi) basic input/output system (bios)-controlled computing device and method and non-transitory medium thereof
US7624192B2 (en) Framework for user interaction with multiple network devices
CN110750197B (en) File sharing method, device and system, corresponding equipment and storage medium
MX2013003515A (en) Instant remote rendering.
MX2013003427A (en) Cross-environment redirection.
US10416783B2 (en) Causing specific location of an object provided to a device
WO2022161432A1 (en) Display control method and apparatus, and electronic device and medium
US20230342104A1 (en) Data Transmission Method and Device
EP2775671B1 (en) Method and apparatus for sending and receiving messages
WO2024046117A1 (en) Data transmission method and terminal device
WO2023246031A1 (en) Data sharing method, system and apparatus, terminal device and storage medium
JP2016110343A (en) Information processing device, information processing method in information processing device, and program
CN113268187B (en) Method, device and equipment for displaying pictures in aggregation manner
WO2024046139A1 (en) Keyboard/mouse crossing method and terminal device
WO2024066992A1 (en) Multi-device networking system and method, and terminal devices
CN115525382A (en) Remote assistance method and device and terminal equipment
CN117687557A (en) Key mouse traversing method and terminal equipment
CN114510909A (en) Data selection method based on terminal equipment and electronic equipment
CN115756696A (en) Information processing method, device, equipment and medium
CN115827135A (en) Cloud desktop processing method and system, electronic device and readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23859151

Country of ref document: EP

Kind code of ref document: A1