WO2018010469A1 - Procédé et dispositif de transmission de données, et support de stockage - Google Patents

Procédé et dispositif de transmission de données, et support de stockage Download PDF

Info

Publication number
WO2018010469A1
WO2018010469A1 PCT/CN2017/081964 CN2017081964W WO2018010469A1 WO 2018010469 A1 WO2018010469 A1 WO 2018010469A1 CN 2017081964 W CN2017081964 W CN 2017081964W WO 2018010469 A1 WO2018010469 A1 WO 2018010469A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
terminal
data
preview
request
Prior art date
Application number
PCT/CN2017/081964
Other languages
English (en)
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 WO2018010469A1 publication Critical patent/WO2018010469A1/fr

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Definitions

  • the present invention relates to the field of communications, and in particular, to a data transmission method and apparatus, and a storage medium.
  • Some terminal devices have the function of sharing files in a LAN environment or directly sharing files through Wireless-Fidelity (Wi-Fi), so that users can share files conveniently without cost data. flow.
  • Wi-Fi Wireless-Fidelity
  • the basic process of sharing files through a LAN or Wi-Fi in a terminal device is as follows: 1) Make two terminal devices with the same application in the same LAN, or two terminal devices with the same application through Wi-Fi. Directly connected; 2) The user selects one or more files to be sent in the file stored locally by the terminal device as the sender, and clicks the send button; 3) the terminal device as the receiver passively receives the file of the sender.
  • the terminal device as the receiver can only passively receive the file, and the user experience is not good.
  • an embodiment of the present invention is to provide a data transmission method and apparatus, and a storage medium, so that a file receiver can actively acquire a file, thereby improving user experience.
  • the first aspect provides a data transmission method, the method comprising:
  • the first terminal sends a file preview request to the second terminal, where the file preview request is used to request previewing at least one file data stored by the second terminal;
  • the first terminal receives at least one file preview data sent by the second terminal according to the file preview request, and the file preview data can represent file data, and the size of each file preview data is smaller than the size of the corresponding file data. ;
  • the first terminal receives the at least one file data indicated by the file transmission indication sent by the second terminal according to the file transmission request.
  • the method before the sending, by the first terminal, the file preview request to the second terminal, the method further includes:
  • UDP User Datagram Protocol
  • the first terminal establishes a first Transmission Control Protocol (TCP) connection and a second TCP connection, where the first TCP connection and the second TCP connection have different port numbers;
  • TCP Transmission Control Protocol
  • the first terminal sends a file preview request to the second terminal, including:
  • the first terminal receives the at least one file preview data that is sent by the second terminal according to the file preview request, and includes:
  • the first terminal sends a file transmission request generated by the file transmission indication to the second terminal, including:
  • the receiving, by the first terminal, the at least one file data indicated by the file transmission indication sent by the second terminal, according to the file transmission request includes:
  • the file preview data includes at least a thumbnail of the previewed file data
  • the file preview request includes a file type and a thumbnail size of file data requesting preview
  • the first terminal receives the at least one file preview data that is sent by the second terminal according to the file preview request, and includes:
  • the first terminal receives a file name, a file type, a file size, and thumbnail encoded data of at least one previewed file data that is sent by the second terminal based on the file preview request.
  • the method further includes:
  • the first terminal displays the at least one file preview data to a user
  • the first terminal acquires a file transmission indication, including:
  • the first terminal acquires file preview data selected by the user from the at least one file preview data, and generates the file transmission indication according to at least one file preview data selected by the user.
  • the file transfer indication is used to indicate file data corresponding to at least one file preview data selected by the transfer user.
  • a second aspect provides a data transmission method, the method comprising:
  • the second terminal sends at least one file preview data to the first terminal based on the file preview request, where the file preview data can represent file data, and the size of each file preview data is smaller than the size of the corresponding file data;
  • the second terminal receives the first terminal to send a file transmission request; the file transmission request is generated by the first terminal based on a file transmission indication; and the file transmission indication is used to indicate that the transmission is selected from the at least one At least one file data represented by the file preview data;
  • the method before the second terminal receives the file preview request sent by the first terminal, the method further includes:
  • the second terminal establishes a first TCP connection and a second TCP connection with the first terminal, where the port numbers of the first TCP connection and the second TCP connection are different;
  • the second terminal receives the file preview request sent by the first terminal, including:
  • the second terminal sends the at least one file preview data to the first terminal according to the file preview request, including:
  • the second terminal sends at least one file preview data to the first terminal by using the file preview request and by using the first TCP connection;
  • the receiving, by the second terminal, the file transmission request by the first terminal includes:
  • the sending, by the second terminal, the at least one file data indicated by the file transmission indication to the first terminal, according to the file transmission request includes:
  • the second terminal sends the at least one file data indicated by the file transmission indication to the first terminal by using the second TCP connection based on the file transmission request.
  • the method before the second terminal sends the at least one file preview data to the first terminal, the method further includes:
  • the second terminal generates at least one file preview data characterizing at least one file data according to the file preview request.
  • the file preview data includes at least a thumbnail of the previewed file data
  • the file preview request includes a file type and a thumbnail size of file data requesting preview
  • the second terminal sends the at least one file preview data to the first terminal according to the file preview request, including:
  • the second terminal transmits a file name, a file type, a file size, and thumbnail encoded data of the at least one previewed file data to the first terminal based on the file preview request.
  • a third aspect provides a data transmission apparatus, the apparatus comprising:
  • a first sending module configured to send a file preview request to the second terminal, where the file preview request is used to request previewing at least one file data stored by the second terminal;
  • the first receiving module is configured to receive at least one file preview data that is sent by the second terminal according to the file preview request, where the file preview data can represent file data, and the size of each file preview data is smaller than the corresponding file data. the size of;
  • Obtaining a module configured to obtain a file transfer indication input by the user, where the file transfer indication is used to indicate that the at least one file data selected from the at least one file preview data is transmitted;
  • the first sending module is further configured to send, to the second terminal, a file transfer request generated based on the file transfer indication;
  • the first receiving module is further configured to receive the at least one file data indicated by the file transmission indication sent by the second terminal according to the file transmission request.
  • the first receiving module is further configured to receive a UDP broadcast message sent by the second terminal;
  • the device further includes: a first connection establishing module, configured to establish a first TCP connection and a second TCP connection with the second terminal, where the port numbers of the first TCP connection and the second TCP connection are different;
  • the first sending module is further configured to send the file preview request to the second terminal by using the first TCP connection, and send the second terminal according to the first TCP connection.
  • the file transfer request generated by the file transfer indication;
  • the first receiving module is further configured to receive, by using the first TCP connection, at least one file preview data that is sent by the second terminal based on the file preview request; and receive the second by using the second TCP connection The at least one file data indicated by the file transmission indication sent by the terminal based on the file transfer request.
  • the file preview data includes at least a thumbnail of the previewed file data
  • the file preview request includes a file type and a thumbnail size of file data requesting preview
  • the first receiving module is further configured to receive a file name, a file type, and a file of the file data of the at least one preview that is sent by the second terminal based on the file preview request.
  • Piece size and thumbnail encoded data are further configured to receive a file name, a file type, and a file of the file data of the at least one preview that is sent by the second terminal based on the file preview request.
  • the device further includes: a display module, configured to display the at least one file preview data to a user;
  • the acquiring module is further configured to acquire file preview data selected by the user from the at least one file preview data, and generate the file transmission indication according to at least one file preview data selected by the user, where the file transmission indication is used to indicate transmission The file data corresponding to at least one file preview data selected by the user.
  • a fourth aspect provides a data transmission apparatus, the apparatus comprising:
  • a second receiving module configured to receive a file preview request sent by the first terminal, where the file preview request is used to request previewing at least one file data stored by the data transmission device;
  • the second sending module is configured to send, according to the file preview request, at least one file preview data to the first terminal, where the file preview data can represent file data, and the size of each file preview data is smaller than the size of the corresponding file data.
  • the second receiving module is further configured to receive the first terminal to send a file transmission request; the file transmission request is generated by the first terminal based on a file transmission indication; and the file transmission indication is used to indicate transmission selection At least one file data characterized by the at least one file preview data;
  • the second sending module is further configured to send, according to the file transmission request, at least one file data indicated by the file transmission indication to the first terminal.
  • the second receiving module is further configured to receive a UDP broadcast message sent by the first terminal;
  • the device further includes: a second connection establishing module, configured to establish a first TCP connection and a second TCP connection with the first terminal, where the port numbers of the first TCP connection and the second TCP connection are different;
  • the second receiving module is further configured to receive the first through the first TCP connection. a file preview request sent by a terminal; receiving, by the first TCP connection, the first terminal to send a file transfer request;
  • the second sending module is further configured to send at least one file preview data to the first terminal by using the first TCP connection based on the file preview request; and based on the file transfer request and passing the second TCP
  • the connection transmits at least one file data indicated by the file transmission indication to the first terminal.
  • the apparatus further includes: a generating module, configured to generate, according to the file preview request, at least one file preview data that represents at least one file data.
  • the file preview data includes at least a thumbnail of the previewed file data
  • the file preview request includes a file type of the file data requesting the preview and a thumbnail size of the preview file;
  • the second sending module is further configured to send, to the first terminal, a file name, a file type, a file size, and thumbnail encoded data of the at least one previewed file data based on the file preview request.
  • the embodiment of the invention provides a data transmission method and device, and a storage medium.
  • the first terminal sends a file preview request to the second terminal, and receives the file preview data sent by the second terminal, so that the first terminal can select according to the file preview data.
  • the file data to be obtained is obtained, and the file data selected by the user is obtained from the second terminal, so that the file receiver can actively acquire the file, thereby improving the user experience.
  • FIG. 1 is a flowchart of Embodiment 1 of a data transmission method according to an embodiment of the present disclosure
  • Embodiment 2 is a flowchart of Embodiment 2 of a data transmission method according to an embodiment of the present invention
  • FIG. 3 is a flowchart of Embodiment 3 of a data transmission method according to an embodiment of the present disclosure
  • FIG. 4 is a schematic structural diagram of Embodiment 1 of a data transmission apparatus according to an embodiment of the present disclosure
  • FIG. 5 is a schematic structural diagram of Embodiment 2 of a data transmission apparatus according to an embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram of Embodiment 3 of a data transmission apparatus according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of Embodiment 4 of a data transmission apparatus according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of Embodiment 5 of a data transmission apparatus according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of Embodiment 6 of a data transmission apparatus according to an embodiment of the present invention.
  • terminal devices with wireless communication capabilities are being widely used, and terminal devices such as smart phones and tablet computers have gradually become an indispensable life and work tool for people.
  • terminal devices such as pictures and videos in communication
  • documents such as documents stored in the communication terminal device in the work.
  • the terminal device of the prior art only the terminal device storing the file actively initiates a file transfer request, and the file receiver can only passively receive.
  • file sharing methods are not flexible enough and the user experience is not good.
  • FIG. 1 is a flowchart of Embodiment 1 of a data transmission method according to an embodiment of the present invention. As shown in FIG. 1 , the data transmission method provided in this embodiment includes:
  • Step S101 The first terminal sends a file preview request to the second terminal, where the file preview request is used to request to preview at least one file data stored by the second terminal.
  • first terminal and second terminal two terminal devices that perform file data transmission are referred to as a first terminal and a second terminal, where the first terminal is a terminal device that requests to acquire file data, and the second terminal device stores file data.
  • Terminal Equipment The connection established between the first terminal and the second terminal may be any connection capable of file data transmission, such as TCP. Connection, or Wi-Fi direct connection, or mobile data connection.
  • the first terminal After the data transmission connection is established between the first terminal and the second terminal, the first terminal first sends a file preview request to the second terminal, where the file preview request is used to request previewing at least one file data stored by the second terminal. Since the file data stored in the second terminal may be more, and the files such as pictures and videos are generally large, the first terminal needs to selectively request the second terminal to send the file data required by the user. However, in this embodiment, the first terminal, that is, the receiving end of the file, is required to trigger the transmission of the file, but the first terminal and the user using the first terminal do not know which of the files stored in the second terminal are required by themselves. Therefore, the first terminal first needs to send a file preview request to the second terminal. The purpose of the file preview request is to pre-view the files stored in the second terminal to select the files to be transferred among the files stored in the second terminal.
  • the file preview request may request previewing all files stored in the second terminal, or may request previewing a portion of the files stored in the second terminal.
  • the file preview request may include attribute information of a file requesting preview, such as file type, file modification time, and the like.
  • the file type can be a picture, a video, a document, and the like. That is, the user using the first terminal can make the second terminal feed back different file preview data by configuring different file preview requests.
  • Step S102 The first terminal receives at least one file preview data sent by the second terminal, where the size of each file preview data is smaller than the size of the corresponding file data. That is, the first terminal receives at least one file preview data sent by the second terminal based on the file preview request, and the file preview data can represent file data, and the size of each file preview data is smaller than the corresponding file.
  • the size of the data
  • the second terminal parses the file, and knows which file data is required to be previewed by the first terminal, and generates a file that represents the file data of each required preview. Preview the data. Since the first terminal sends the file preview request for browsing the file data stored in the second terminal, and not for directly acquiring the data stored by the second terminal, the file preview data sent by the second terminal to the first terminal can be characterized. Second terminal The stored file data is also smaller in size than the data stored in the second terminal.
  • each file preview data includes partial data of file data stored in the corresponding second terminal, and the size of each file preview data is smaller than corresponding The size of the file data. It can be understood that the more data included in the file preview data, the more the corresponding file data can be reflected, but the size of the file preview data will increase accordingly. The larger the size of the file preview data, the longer the time required for the second terminal to send the file preview data to the first terminal, and the more network data traffic is occupied.
  • the first terminal can distinguish the file data that needs to be acquired after receiving the file preview data, and the size of the file preview data is as small as possible.
  • the first terminal can also specify the size of the required file preview data in the file preview request.
  • the size of the file preview data may be different for different types of file data, which will be described in detail in the following embodiments.
  • Step S103 The first terminal acquires a file transmission indication, where the file transmission indication is used to indicate that the at least one file data selected from the at least one file preview data is transmitted.
  • the first terminal After the first terminal receives the at least one file preview data sent by the second terminal, it can be known that the file data corresponding to the file preview data is stored in the second terminal. Further, the first terminal acquires a file transmission indication generated according to a preset rule or according to an instruction of the user, where the file transmission indication is used to indicate that the file data corresponding to the file preview data is selected from the at least one file preview data. Generally, the file transfer indication is input by the user according to the file preview data. When the user using the first terminal knows which file data is stored in the second terminal, the user using the first terminal can select the data through the file preview. Obtaining the file data, generating a file transmission indication, instructing the first terminal to obtain the file data selected by the user from the second terminal.
  • Step S104 The first terminal sends a file transmission request generated based on the file transmission indication to the second terminal.
  • the first terminal After acquiring the file transmission indication input by the user, the first terminal generates a file transmission request, and sends the file transmission request to the second terminal, where the file transmission request is used to request the second terminal to send at least the indication indicated by the file transmission indication.
  • a file of data A file of data.
  • Step S105 The first terminal receives the at least one file data indicated by the file transmission indication sent by the second terminal according to the file transmission request.
  • the second terminal may send the file data indicated in the file transfer request to the first terminal.
  • the file data here is the complete file data.
  • the first terminal sends the file preview request to the second terminal, and receives the file preview data sent by the second terminal, so that the first terminal can select the file data to be acquired according to the file preview data. And obtaining the file data selected by the user from the second terminal, so that the file receiver can actively acquire the file, thereby improving the user experience.
  • any data transmission connection can be established between the first terminal and the second terminal to implement data transmission.
  • Data can be transferred over a TCP connection.
  • the TCP connection is a connection applied to a local area network, and data transmission through a TCP connection is relatively reliable, and the transmission rate is high.
  • TCP connection can also be established through Wi-Fi Direct connection, which is similar to the method of establishing a TCP connection through a local area network.
  • the first terminal and the second terminal can perform UDP broadcast, and the first terminal and the second terminal can learn the existence of the other party through the UDP packets broadcasted by each other, thereby establishing a TCP connection.
  • the TCP connection here may be a TCP socket connection, wherein the TCP socket connection includes a source network protocol (IP) address, a destination IP address, a source port number, and a destination port number, and the TCP socket connection is based on TCP. Standard connection.
  • IP source network protocol
  • the two transmissions of the data and the file data are performed, so that two TCP connections can be established between the first terminal and the second terminal, which are respectively referred to as a first TCP connection and a second TCP connection.
  • the port numbers used by the first TCP connection and the second TCP connection are different and have been distinguished.
  • the first terminal sends a file preview request to the second terminal through the first TCP connection; and receives file preview data sent by the second terminal by using the first TCP connection; and sends a file transfer request to the second terminal by using the first TCP connection.
  • Receiving at least one file data sent by the second terminal through the second TCP connection that is, the first TCP connection is used to transmit messages and the second TCP connection is used to transmit data.
  • connection established between the first terminal and the second terminal is not limited to a TCP connection.
  • a server-client connection is established between the first terminal and the second terminal, and the data transmission method shown in FIG. 1 can also be completed.
  • the second terminal as the data transmitting end serves as a server
  • the first terminal as the data receiving end serves as a client.
  • the first terminal sends the file preview request and the received file preview data may adopt a JavaScript Object Notation (JSON) protocol, and the first terminal may send any file transfer request and receive file data using any protocol suitable for file transfer.
  • JSON JavaScript Object Notation
  • the data transmission method provided by the embodiment of the present invention does not limit the foregoing protocol, and any other transmission protocol may be used for data transmission between the first terminal and the second terminal.
  • the first terminal Due to the large number of files stored in the terminal device, the first terminal generally does not request the second terminal to send file preview data of all files stored by the second terminal. Therefore, the file preview request sent by the first terminal can define the attribute of the file preview data that needs to be acquired.
  • the file preview request sent by the first terminal includes a file type for requesting preview, and the file type herein may be any one or more of a picture, a video, and a document. Then, after the second terminal receives the file preview request, the stored file is filtered, and only the file preview data of the corresponding type is sent to the first terminal.
  • the file preview request sent by the first terminal includes other attributes such as the modification time and size of the file requesting the preview, and the second terminal filters out the suitable file after receiving the file preview request, and sends the corresponding file to the first terminal. Preview the data.
  • the file preview data sent by the second terminal to the first terminal may also be in various forms, such as a file name, a thumbnail, or the like of the previewed file data.
  • the file preview data is a preview of the file data (hereinafter referred to as a preview file)
  • the file preview request sent by the first terminal to the second terminal may include the type of the preview file and the size of the thumbnail of the preview file, for example,
  • the type of the preview file requested is a picture
  • the thumbnail size is 80 ⁇ 80 pixels
  • the type of the preview file is requested to be a video
  • the thumbnail size is 100 ⁇ 100 pixels.
  • the thumbnail of the preview file is to compress the corresponding picture file to the size specified by the thumbnail size, but the image in the thumbnail is the same as the original picture file.
  • the thumbnail of the preview file may be a thumbnail of the preview file by compressing any frame image of the video file to a size specified by the thumbnail size.
  • the first of the video files may be The frame image is compressed to the size specified by the thumbnail size as a thumbnail of the preview file.
  • the thumbnail of the preview file may be a size of a thumbnail of the preview file by compressing any page image of the document into a thumbnail size.
  • the first page image of the document may be Compress the size specified for the thumbnail size as a thumbnail of the preview file.
  • the first terminal can receive a plurality of file preview data, wherein each file preview data includes a name of the preview file, a file type, a file size, and thumbnail encoded data.
  • the first terminal decodes the received thumbnail encoded data to obtain a corresponding thumbnail.
  • the first terminal may also be in the At least one file preview data obtained is displayed on the display.
  • the user can browse a plurality of file preview data on the display screen of the first terminal, select a file preview data to be acquired, and generate a file transfer instruction.
  • the file preview data as a thumbnail of the preview file as an example
  • the first terminal receives the thumbnails of the plurality of preview files, By sequentially arranging a plurality of thumbnails on the display screen, the user can visually see a plurality of files stored by the second terminal.
  • the user can select a thumbnail corresponding to the desired file through the touch screen.
  • the user can also select the thumbnail corresponding to the obtained file by using the control button of the first terminal.
  • the user can select the corresponding thumbnail by voice input, gesture input, and the like.
  • the embodiment of the present invention further describes a first type of computer storage medium.
  • the first type of computer storage medium stores a computer program for performing the data transmission method shown in FIG. 1 in the embodiment of the present invention.
  • FIG. 2 is a flowchart of Embodiment 2 of a data transmission method according to an embodiment of the present invention. As shown in FIG. 2, the data transmission method provided in this embodiment includes:
  • Step S201 The second terminal receives a file preview request sent by the first terminal, where the file preview request is used to request to preview at least one file data stored by the second terminal.
  • Step S202 The second terminal sends at least one file preview data to the first terminal according to the file preview request, where the file preview data can represent file data, and the size of each file preview data is smaller than the corresponding file data. size.
  • Step S203 the second terminal receives the first terminal to send a file transmission request, and the file transmission request is used to request the second terminal to transmit at least one file data; specifically, the second terminal receives the first terminal to send a file transmission request;
  • the file transfer request is generated by the first terminal based on a file transfer indication; the file transfer indication is used to indicate that at least one file data selected from the at least one file preview data is transmitted.
  • Step S204 The second terminal sends the at least one file data to the first terminal. Specifically, the second terminal sends the at least one file indicated by the file transmission indication to the first terminal according to the file transmission request. data.
  • the data transmission method provided in this embodiment uses the second terminal as the file data sender as the execution subject, but the processing performed by the second terminal has been described in detail in the embodiment shown in FIG. I will not go into details here.
  • the second terminal needs to receive the UDP broadcast message sent by the first terminal before receiving the file preview request sent by the first terminal, thereby A TCP connection is established between the second terminal and the first terminal.
  • the process and method for establishing a TCP connection between the second terminal and the first terminal have been described in detail in the foregoing embodiments, and details are not described herein again.
  • the second terminal after receiving the file preview request sent by the first terminal, the second terminal further needs to generate at least one file preview data according to the information indicated in the file preview request.
  • the file preview request received by the second terminal may define an attribute of the file preview data that needs to be acquired.
  • the file preview request includes a file type for requesting preview, and the file type here may be any one or more of a picture, a video, and a document.
  • the second terminal receives the file preview request, the stored file will be filtered to generate only the file preview data of the corresponding type.
  • the file preview request includes other attributes such as the modification time and size of the file requesting the preview.
  • the second terminal will filter out the suitable file and generate only the corresponding file preview data.
  • the file preview data generated by the second terminal may be in various forms, such as a file name, a thumbnail, and the like of the preview file.
  • the file preview request sent by the first terminal to the second terminal may include requesting the type of the preview file and the size of the thumbnail of the preview file, for example, requesting the type of the preview file as a picture.
  • the thumbnail size is 80 ⁇ 80 pixels, or the type of the preview file is requested to be a video, and the thumbnail size is 100 ⁇ 100 pixels.
  • the second terminal receives the file preview request, the corresponding type of file data is filtered out, and the file data is encoded into thumbnails of corresponding sizes.
  • the thumbnail of the preview file is to compress the corresponding picture file to the size specified by the thumbnail size, but the image in the thumbnail is the same as the original picture file.
  • the thumbnail of the preview file may be a thumbnail of the preview file by compressing any frame image of the video file to a size specified by the thumbnail size.
  • the thumbnail may be viewed.
  • the first frame image of the frequency file is compressed to the size specified by the thumbnail size as a thumbnail of the preview file.
  • the thumbnail of the preview file may be a size of a thumbnail of the preview file by compressing any page image of the document into a thumbnail size.
  • the first page image of the document may be Compress the size specified for the thumbnail size as a thumbnail of the preview file.
  • the first terminal can receive a plurality of file preview data, wherein each file preview data includes a name of the preview file, a file type, a file size, and thumbnail encoded data.
  • the first terminal decodes the received thumbnail encoded data to obtain a corresponding thumbnail.
  • the embodiment of the present invention further describes a second type of computer storage medium.
  • the second type of computer storage medium stores a computer program for performing the data transmission method shown in FIG. 2 in the embodiment of the present invention.
  • FIG. 3 is a flowchart of Embodiment 3 of a data transmission method according to an embodiment of the present invention. As shown in FIG. 3, the data transmission method provided in this embodiment includes:
  • Step S301 a TCP connection is established between the first terminal and the second terminal.
  • the first terminal and the second terminal establish a TCP connection in the same local area network as an example.
  • a UDP broadcast is required between the first terminal and the second terminal, and the other party is discovered through the UDP packets broadcasted by each other.
  • the establishment of a TCP connection where the TCP connection can be a TCP socket connection.
  • two TCP connections can be established at the same time, wherein the first TCP connection is used to transmit a file preview request, a file preview data, and a file transfer request, and the first TCP connection can adopt a JSON protocol format.
  • the second TCP connection is used to transfer file data.
  • the first TCP connection and the second TCP connection use different port numbers.
  • Step S302 the first terminal sends a thumbnail to the second terminal by using the first TCP connection. begging.
  • the file preview data is taken as a thumbnail of the preview file, and then the file preview request sent by the first terminal to the second terminal is actually a thumbnail sending request.
  • the thumbnail send request can be in the JSON protocol format, including the file type and thumbnail size of the request preview.
  • the file preview request may be, for example: ⁇ "MSGType”: “1”, “FileType”: “Video”, “Size”: “80x80” ⁇ .
  • MSGType indicates the type of information
  • a value of "1” indicates that this information is a file preview request.
  • “FileType” indicates the file type
  • “Video” indicates that the file type is video.
  • “Size” indicates the file size
  • “80x80” indicates that the thumbnail size is 80x80 pixels.
  • Step S303 the second terminal generates thumbnail preview data.
  • the second terminal parses the thumbnail sending file to obtain the thumbnail file type and size required by the first terminal. Then, a thumbnail of the corresponding file data is obtained through a system application code interface (API). The obtained thumbnail image is encoded to obtain thumbnail encoded data, and the encoding here may be any encoding method, such as Bsse64 encoding. Finally, the thumbnail file encoding data, file name, file size and other information are converted into a JSON protocol format to generate thumbnail preview data.
  • API system application code interface
  • the file preview data generated by the second terminal may be, for example: ⁇ "MSGType”: “2", “FileList”: [ ⁇ "FileName”: “video1.mp4", “FileIndex”: “1”, “FileType”: “ Video”, “FileSize”: “24258654”, “ThumbnailData”: “Thumbnail Base64 encoded data” ⁇ , ⁇ "FileName”: “video2.mp4", "FileIndex”: “2”, “FileType”: “Video” “FileSize”: “247585684", "ThumbnailData”: “Thumbnail Base64 encoded data” ⁇ ...] ⁇ .
  • “MSGType” indicates the type of information
  • a value of "2" indicates that this information is file preview data.
  • “FileList” indicates a file list. Since the file preview request sent by the first terminal requests one type of file preview data, and the second terminal may have a plurality of file data of a corresponding type, the file generated by the second terminal Multiple files will be included in the preview data The file preview data corresponding to the data.
  • "FileName” indicates the file name, and the values "video1.mp4" and “video2.mp4" indicate the name of the file data.
  • “FileIndex” represents a file index, and its values "1" and "2" indicate the sorting of file preview data in the list.
  • “FileType” indicates the file type, and its value “Video” indicates that the file type is video.
  • “FileSize” indicates the size of the file, and the values “24258654” and “247585684" indicate the number of bytes occupied by the file data.
  • “ThumbnailData” indicates thumbnail file data whose data "thumbnail Base64 encoded data” is filled with the data encoded by the thumbnail file.
  • Step S304 the second terminal sends the thumbnail preview data to the first terminal.
  • the second terminal sends the thumbnail preview data to the first terminal through the first TCP connection.
  • Step S305 the first terminal decodes the thumbnail preview data, and displays the thumbnail preview data to the user.
  • the first terminal acquires a thumbnail of each file data pair and displays it to the user on the display screen.
  • the user can know that the thumbnail is from the second terminal.
  • Step S306 the first terminal acquires a file transmission indication input by the user.
  • the user can select a thumbnail corresponding to the file data to be acquired by dragging, clicking, or the like on the display screen of the first terminal.
  • the user can also select the corresponding thumbnail by voice input, gesture input, and the like.
  • the thumbnail selected by the user is a file transmission indication input by the user, and the file transmission indicates that the user instructs the first terminal to acquire file data corresponding to the thumbnail selected by the user.
  • Step S307 the first terminal sends a file transmission request to the second terminal.
  • the first terminal sends a file transmission request to the second terminal by using the first TCP connection, and the file transmission request may be in a JSON protocol format.
  • the file transfer request may be, for example: ⁇ "MSGType”: “3", “FileList”: [ ⁇ "FileName”: “video1.mp4", “FileIndex”: “1”, “FileType”: “Video” “FileSize” : “24258654” ⁇ ] ⁇ .
  • MSGType indicates the type of information
  • a value of "3” indicates that the information is a file transfer request.
  • "FileList” represents a list of files, and the user may need to obtain a second end A plurality of file data stored in the end, so the file transfer request may include a transfer request of a plurality of file data, which is represented by a file list.
  • FileName indicates the file name
  • video1.mp4 indicates the name of the file data
  • FileIndex represents a file index whose value "1” indicates the sorting of the file preview data in the list.
  • FileType indicates the file type
  • Video indicates that the file type is video.
  • FileSize indicates the size of the file, and its value “24258654” indicates the number of bytes occupied by the file data.
  • Step S308 the second terminal sends the file data to the first terminal.
  • the second terminal determines the file data that the first terminal needs to acquire, and sends the file data to the first terminal through the second TCP connection.
  • the second terminal may send the file data to the first terminal by using the following protocol format: ⁇ HeadFlag> ⁇ NameLength> ⁇ Name> ⁇ Filesize> ⁇ Stream>.
  • ⁇ HeadFlag> is the packet header, occupying 4 bytes, and its value is 0xFFFFFFFF indicating the packet header.
  • ⁇ NameLength> is 1 byte, which is the length of the file character name.
  • ⁇ Name> is an N-byte file name.
  • ⁇ Filesize> is 8 bytes, indicating the file data size.
  • ⁇ Stream> is the file data stream.
  • FIG. 4 is a schematic structural diagram of Embodiment 1 of a data transmission apparatus according to an embodiment of the present invention. As shown in FIG. 4, the data transmission apparatus provided in this embodiment includes:
  • the first sending module 41 is configured to send a file preview request to the second terminal, where the file preview request is used to request previewing at least one file data stored by the second terminal.
  • the first receiving module 42 is configured to receive at least one file preview data that is sent by the second terminal according to the file preview request, where the file preview data can represent file data, and the size of each file preview data is smaller than the corresponding file. The size of the data.
  • the obtaining module 43 is configured to obtain a file transfer indication input by the user, where the file transfer indication is used to indicate that the at least one file data selected from the at least one file preview data is transmitted.
  • the first sending module 41 is further configured to send, according to the file transmission finger, the second terminal The file transfer request generated.
  • the first receiving module 42 is further configured to receive the at least one file data indicated by the file transmission indication sent by the second terminal according to the file transmission request.
  • the user of the data transmission device provided in this embodiment implements the processing of the data transmission method shown in FIG. 1 , and the implementation principle and technical effects thereof are similar, and details are not described herein again.
  • FIG. 5 is a schematic structural diagram of Embodiment 2 of a data transmission apparatus according to an embodiment of the present invention. As shown in FIG. 5, the data transmission apparatus provided in this embodiment further includes: a first connection establishment module 51.
  • the first receiving module 42 is further configured to receive the UDP broadcast message sent by the second terminal.
  • the first connection establishing module 51 is configured to establish a first TCP connection and a second TCP connection with the second terminal, where the port numbers of the first TCP connection and the second TCP connection are different.
  • the first sending module 41 is further configured to send the file preview request to the second terminal by using the first TCP connection; and send, according to the file transmission indication, the second terminal by using the first TCP connection.
  • the generated file transfer request is further configured to send the file preview request to the second terminal by using the first TCP connection; and send, according to the file transmission indication, the second terminal by using the first TCP connection.
  • the first receiving module 42 is further configured to receive, by using the first TCP connection, at least one file preview data that is sent by the second terminal based on the file preview request; and receive the second by using the second TCP connection.
  • the file preview data includes at least a thumbnail of the previewed file data;
  • the file preview request includes a file type and a thumbnail size of the file data requesting the preview.
  • the file type includes at least one of a picture, a video, and a document;
  • the first receiving module 42 is further configured to receive a file name and a file of the file data of the at least one preview sent by the second terminal based on the file preview request.
  • Type, file size, and thumbnail encoded data are examples of the file data.
  • FIG. 6 is a schematic structural diagram of Embodiment 3 of a data transmission apparatus according to an embodiment of the present disclosure, such as As shown in FIG. 6, the data transmission apparatus provided in this embodiment further includes, on the basis of FIG. 5, a display module 61 configured to display the at least one file preview data to a user.
  • the obtaining module 43 is further configured to acquire file preview data selected by the user from the at least one file preview data, and generate the file transmission indication according to at least one file preview data selected by the user, where the file transmission indication is used to indicate the transmission user The file data corresponding to at least one of the selected file preview data.
  • FIG. 7 is a schematic structural diagram of Embodiment 4 of a data transmission apparatus according to an embodiment of the present invention. As shown in FIG. 7, the data transmission apparatus provided in this embodiment includes:
  • the second receiving module 71 is configured to receive a file preview request sent by the first terminal, where the file preview request is used to request previewing at least one file data stored by the data transmission device.
  • the second sending module 72 is configured to send, according to the file preview request, at least one file preview data to the first terminal, where the file preview data can represent file data, and the size of each file preview data is smaller than the corresponding file data. size.
  • the second receiving module 71 is further configured to receive, by the first terminal, a file transmission request, where the file transmission request is generated by the first terminal based on a file transmission indication, and the file transmission indication is used to indicate that the transmission is selected At least one file data represented by the at least one file preview data.
  • the second sending module 72 is further configured to be configured to send, according to the file transmission request, at least one file data indicated by the file transmission indication to the first terminal.
  • the user of the data transmission device provided in this embodiment implements the processing of the data transmission method shown in FIG. 2, and the implementation principle and technical effects thereof are similar, and details are not described herein again.
  • FIG. 8 is a schematic structural diagram of Embodiment 5 of a data transmission apparatus according to an embodiment of the present invention. As shown in FIG. 8, the data transmission apparatus provided in this embodiment further includes: a second connection establishment module 81.
  • the second receiving module 71 is further configured to receive the UDP broadcast message sent by the first terminal.
  • the second connection establishing module 81 is configured to establish a first TCP connection and a second TCP connection with the first terminal, where the port numbers of the first TCP connection and the second TCP connection are different.
  • the second receiving module 71 is further configured to receive, by using the first TCP connection, a file preview request sent by the first terminal, and receive, by using the first TCP connection, the first terminal to send a file transfer request.
  • the second sending module 72 is further configured to send at least one file preview data to the first terminal by using the first TCP connection based on the file preview request; and based on the file transfer request and through the second TCP connection Transmitting, to the first terminal, at least one file data indicated by the file transmission indication.
  • FIG. 9 is a schematic structural diagram of Embodiment 6 of a data transmission apparatus according to an embodiment of the present invention.
  • the data transmission apparatus provided in this embodiment further includes: a generating module 91 configured to be configured according to FIG.
  • the file preview request generates at least one file preview data characterizing at least one file data.
  • the file preview data includes at least a thumbnail of the previewed file data.
  • the file preview request includes a file type of a file data requesting preview and a thumbnail size of a preview file, the file type including at least one of a picture, a video, and a document.
  • the second sending module 72 is further configured to send, to the first terminal, a file name, a file type, a file size, and thumbnail encoded data of the at least one previewed file data based on the file preview request.
  • the first sending module 41 and the second sending module 72 may be implemented by a transmitter or a transceiver; the first receiving module 42 and the second receiving module 71 may be implemented by a receiver or a transceiver;
  • the module 43, the first connection establishing module 51, the second connection establishing module 81, and the generating module 91 may be a Central Processing Unit (CPU), a Micro Processor Unit (MPU), and a digital signal processor (Digital). Signal Processor, DSP) or Field Programmable Gate Array (Field Programmable Gate Array, FPGA) and other implementations.
  • Display module 61 can be implemented by a display.
  • the embodiment of the present invention further provides a terminal device.
  • the first sending module 41 and the second sending module 72 may be a transmitter or a transceiver in the terminal device;
  • Module 42 and second receiving module 71 may be receivers or transceivers in the terminal device.
  • the obtaining module 43, the first connection establishing module 51, the second connection establishing module 81, and the generating module 91 can be implemented by a CPU, an MPU, a DSP, an FPGA, or the like of the terminal device.
  • the display module 61 can be implemented by a display of the terminal device.
  • the terminal device further includes a memory configured to store the program code, and the processor calls the program code stored in the memory to implement the data transmission method provided by the embodiment of the present invention.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the device is implemented in a flow chart A function specified in a block or blocks of a process or multiple processes and/or block diagrams.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • the first terminal sends the file preview request to the second terminal, and receives the file preview data sent by the second terminal, so that the first terminal can select the file data to be acquired according to the file preview data, and from the second terminal.
  • the file data selected by the user is obtained, so that the file receiver can actively acquire the file, thereby improving the user experience.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

La présente invention concerne, dans le mode de réalisation décrit, un procédé et un dispositif de transmission de données, ainsi qu'un support de stockage, faisant intervenir les étapes suivantes: un premier terminal envoie une demande de prévisualisation de fichier à un deuxième terminal, la demande de prévisualisation de fichier étant utilisée pour demander la prévisualisation d'au moins une donnée de fichier stockée dans le deuxième terminal; le premier terminal reçoit au moins une donnée de prévisualisation de fichier envoyée par le deuxième terminal d'après la demande de prévisualisation de fichier, les données de prévisualisation de fichier étant capables de représenter des données de fichier, la taille de chaque donnée de prévisualisation de fichier étant inférieure à celle d'une donnée de fichier correspondante; le premier terminal acquiert une indication de transmission de fichier, l'indication de transmission de fichier étant utilisée pour indiquer la transmission de la ou des données de fichier sélectionnées parmi les données de fichier représentées par au moins une donnée de prévisualisation de fichier; le premier terminal envoie au deuxième terminal une demande de transmission de fichier générée d'après l'indication de transmission de fichier; et le premier terminal reçoit la ou les données de fichier indiquées par l'indication de transmission de fichier envoyée par le deuxième terminal d'après la demande de transmission de fichier.
PCT/CN2017/081964 2016-07-15 2017-04-26 Procédé et dispositif de transmission de données, et support de stockage WO2018010469A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610556382.5 2016-07-15
CN201610556382.5A CN107634974A (zh) 2016-07-15 2016-07-15 一种数据传输方法及装置

Publications (1)

Publication Number Publication Date
WO2018010469A1 true WO2018010469A1 (fr) 2018-01-18

Family

ID=60951908

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/081964 WO2018010469A1 (fr) 2016-07-15 2017-04-26 Procédé et dispositif de transmission de données, et support de stockage

Country Status (2)

Country Link
CN (1) CN107634974A (fr)
WO (1) WO2018010469A1 (fr)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112055078A (zh) * 2020-09-02 2020-12-08 数字广东网络建设有限公司 一种数据传输方法、装置、计算机设备和存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109558551A (zh) * 2018-10-26 2019-04-02 东软集团股份有限公司 文件预览的方法、装置、存储介质和电子设备
CN112769848B (zh) * 2021-01-18 2022-12-20 中国民航信息网络股份有限公司 一种报文发送方法及装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050094672A1 (en) * 2003-10-30 2005-05-05 Curitel Communications, Inc. Mobile communication terminal, wireless communication system and method of previewing a moving image
CN103634362A (zh) * 2012-08-28 2014-03-12 金蝶软件(中国)有限公司 文件传送方法、文件服务器及文件传送系统
CN104573090A (zh) * 2015-01-29 2015-04-29 深圳市中兴移动通信有限公司 一种文件分享方法、装置及终端

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140219634A1 (en) * 2013-02-05 2014-08-07 Redux, Inc. Video preview creation based on environment
CN105451161B (zh) * 2015-11-06 2019-09-13 上海斐讯数据通信技术有限公司 基于安卓手机内置基站方式实现文件共享方法及系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050094672A1 (en) * 2003-10-30 2005-05-05 Curitel Communications, Inc. Mobile communication terminal, wireless communication system and method of previewing a moving image
CN103634362A (zh) * 2012-08-28 2014-03-12 金蝶软件(中国)有限公司 文件传送方法、文件服务器及文件传送系统
CN104573090A (zh) * 2015-01-29 2015-04-29 深圳市中兴移动通信有限公司 一种文件分享方法、装置及终端

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112055078A (zh) * 2020-09-02 2020-12-08 数字广东网络建设有限公司 一种数据传输方法、装置、计算机设备和存储介质
CN112055078B (zh) * 2020-09-02 2023-10-03 数字广东网络建设有限公司 一种数据传输方法、装置、计算机设备和存储介质

Also Published As

Publication number Publication date
CN107634974A (zh) 2018-01-26

Similar Documents

Publication Publication Date Title
RU2571595C2 (ru) Обратный канал пользовательского ввода для беспроводных дисплеев
US20150135240A1 (en) Video display terminal, video transmission terminal, video communication system, video display method, video transmission method, and computer-readable recording medium recording program
JP6275201B2 (ja) 文字送信方法、コンピュータプログラム、および、文字送信システム
KR20130138140A (ko) 이미지 댓글 공유 방법 및 장치
EP2933982B1 (fr) Procédé de transfert de flux multimédia et équipement utilisateur
TW201244432A (en) Graphics sharing method, system and terminal
WO2018010469A1 (fr) Procédé et dispositif de transmission de données, et support de stockage
WO2013167081A2 (fr) Procédé et système d'affichage multi-écrans
WO2017101298A1 (fr) Procédé et appareil d'entrée d'informations audio et vidéo, télévision réseau, et équipement d'utilisateur
WO2017028655A1 (fr) Procédé de réalisation d'une capture d'écran, terminal et boîtier décodeur
WO2015176648A1 (fr) Procédé et dispositif de transmission de données d'un terminal intelligent à un terminal de télévision
US11068148B2 (en) Information processing device
WO2015180051A1 (fr) Procédé et dispositif d'envoi de données
CN104601715A (zh) 一种基于二维码的文件共享方法、系统及移动终端
CN108667871B (zh) 基于p2p的传输方法和装置
WO2016177121A1 (fr) Procédé et dispositif de transmission de fichiers, et serveur d'application
CN103945165A (zh) 终端设备远程视频传输的处理方法和装置
WO2014056427A1 (fr) Procédé et appareil d'affichage d'images multiples, système de réseau domestique et terminal mobile
JP2010056966A (ja) 画像コンテンツ送信サーバ、画像表示装置、画像コンテンツ送信方法、及び、画像表示方法
WO2023273905A1 (fr) Procédé de synchronisation d'écran pour informations, émetteur, récepteur et support de stockage lisible par ordinateur
US10079864B2 (en) Communicating media data
WO2016177257A1 (fr) Procédé et dispositif de partage de données
CN111404977B (zh) 文档远程演示和观看方法以及终端设备
WO2017161651A1 (fr) Procédé de transmission de données, et premier terminal, second terminal et système
CN105306870A (zh) 文件的处理方法及装置

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: 17826808

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17826808

Country of ref document: EP

Kind code of ref document: A1