File transmission method and device

A file transfer and file technology, applied in the network field, can solve the problem of high risk of data leakage, achieve the effect of easy guarantee of security and reduce the risk of data leakage

Inactive Publication Date: 2017-06-27
ALIBABA GRP HLDG LTD
4 Cites 7 Cited by

AI-Extracted Technical Summary

Problems solved by technology

[0006] The embodiment of the present application provides a file transfer method and device to solve the problem of hi...
View more

Abstract

The application discloses a file transmission method and device which are used for solving a problem of a relatively high data leakage risk of a mode of transmitting images between mobile devices by a cloud disk in the prior art. A first client and a second client are positioned in the same local area network. The method comprises the steps that: the first client acquires address information of a built-in server of the first client in the local area network; the first client generates a DOI including the address information according to the address information, so that the second client sends a file to the built-in server by scanning the DOI; and the first client acquires the file received by the built-in server.

Application Domain

Network topologiesTransmission

Technology Topic

File transferLocal area network +1

Image

  • File transmission method and device
  • File transmission method and device
  • File transmission method and device

Examples

  • Experimental program(1)

Example Embodiment

[0035] In order to make the purpose, technical solutions, and advantages of the present application clearer, the technical solutions of the present application will be described clearly and completely in conjunction with specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
[0036] As mentioned above, the prior art has security problems. In addition, the prior art also has other problems. For example, the process of transmitting pictures needs to consume the paid network traffic of the mobile devices of both users; when the amount of data of the pictures is large, the transmission takes more time; the cloud disk itself may require users to pay extra for use; and so on. The solution of the present application can partially or fully solve the problems mentioned in the background art and the listed problems. The solution of this application is described below.
[0037] In the embodiments of the present application, for the two devices that transmit files, for ease of description, the device that receives the file is called the "first device", and the device that sends the file is called the "second device". The first device and/or the second device can be mobile devices, such as mobile phones, tablets, laptops, smart watches, smart bracelets, mobile stations in vehicles, etc.; the first device and/or the second device can also be non-mobile devices , Such as personal computers (PC), large and medium-sized computers, computer clusters, etc.
[0038] The listed devices are only examples and do not constitute a limitation to the application. For example, in the example of the background art, the first device and the second device are both mobile phones.
[0039] Further, the first client is mounted on the first device, and the second client is mounted on the second device. Generally, the first client and the second client belong to the same application (App).
[0040] figure 1 A schematic flow diagram of a file transmission method provided by an embodiment of this application, the first client and the second client are in the same local area network (that is, the first device and the second device are in the same local area network), figure 1 The process in which takes the first client as the execution subject and can include the following steps:
[0041] S101: The first client obtains address information of the built-in server of the first client in the local area network.
[0042] In the embodiment of the present application, the local area network may be a wireless local area network, such as a wireless fidelity (Wireless Fidelity, WiFi) network, a Worldwide Interoperability for Microwave Access (WiMAX) network, etc.; the local area network may also be through a network cable , Cable, or optical fiber interconnected wired LAN.
[0043] In the embodiment of the present application, the built-in server of the first client may be established in advance, or may be established in real time when step S101 is performed. The built-in server can be established in at least one application on the first device, or not dependent on the application, but in the operating system of the first device, or even in the driver of at least one hardware of the first device .
[0044] The built-in server can at least provide data transmission services within the local area network. This application does not limit the transfer protocol on which the data transfer service is based, and it can be Hyper Text Transfer Protocol (HTTP), File Transfer Protocol (FTP), or Simple File Transfer Protocol ( TrivialFile Transfer Protocol, TFTP) etc. Taking HTTP as an example, the built-in server may specifically be an HTTP server (HTTPServer).
[0045] In the embodiment of the present application, the address information of the built-in server in the local area network may be automatically allocated by the local area network, or automatically configured by the first client, or manually configured by the user in advance.
[0046] The address information may include the local area network IP address and port number. In addition, if the first client has a domain name in the local area network, the address information may include the domain name and port number. For ease of use, the address information is generally expressed in the form of Uniform Resource Locator (URL). For example, the address information of a built-in server of a certain first client can be expressed as follows:
[0047] "Http://192.168,0.100:15000".
[0048] Among them, "192.168, 0.100" is the LAN IP address of the built-in server, and "15000" is the port number of the built-in server.
[0049] It should be noted that URL is an example of the representation form of address information and is not a limitation of this application. In practical applications, other representation forms can also be used to represent address information, such as Extensible Markup Language (Extensible Markup Language, XML) etc.
[0050] S102: The first client generates a Digital Object Unique Identifier (DOI) that includes the address information according to the address information, so that the second client scans the DOI and sends The built-in server sends the file.
[0051] In the embodiments of this application, DOI includes but is not limited to: two-dimensional code, barcode, character code, network domain name, etc. The following embodiments mainly take the DOI as a two-dimensional code as an example.
[0052] In the embodiment of the present application, the file may be a picture or other files such as a video, document, music, or application installation package.
[0053] In the embodiment of this application, after the first client generates the DOI, the DOI can be displayed immediately through the first client directly; the DOI can be displayed in other ways after outputting, for example, by printing it out on the physical object and displaying it through Some applications are released, and so on.
[0054] Further, the second client can scan the displayed DOI, parse the address information contained in the DOI, and then establish a connection with the built-in server according to the address information, and send files to the built-in server through the connection. The file is the file to be transmitted by the second client to the first client, and the function of scanning the DOI can be supported by the second device or a corresponding hardware device connected to the second device, such as a camera.
[0055] It should be noted that in figure 1 During the execution of the process, the second client does not necessarily have to be in the same local area network as the first client. The second client can be in the same local area network as the first client only when it needs to perform certain specific actions (for example, scanning the DOI code, sending a file).
[0056] S103: The first client obtains the file received by the built-in server.
[0057] In the embodiment of the present application, since the built-in server is located in the first client and is a component of the first client, "the built-in server receives a file" also means "the first client receives a file".
[0058] After obtaining the file sent by the second client, the first client can perform further actions on the file. For example, saving the file to a specific location (such as saving to a local album, etc.), using a specific application (such as opening with a picture viewer or web browser, etc.) to open the file, or generating a preview interface of the file, and so on. These actions can be continued to be executed by the built-in server, or can be executed by other programs on the first client.
[0059] by figure 1 In the method, the first client and the second client can be respectively located on two mobile devices to transfer files. The picture is a type of file. The two mobile devices do not need to access the Internet, nor do they need to be connected to a cloud disk server. When the third-party server interacts, only the LAN can be used to complete the picture transmission between mobile devices. Compared with the Internet, the security of the LAN is easier to guarantee and can reduce the risk of data leakage. Therefore, the background technology can be partially or completely solved. Problem in.
[0060] Not only that, because the file transfer process is based on a local area network, it will not consume the paid network traffic of the mobile devices of both users. Generally speaking, the transmission bandwidth provided by the local area network to users is greater than or even far greater than the paid network bandwidth of the Internet. Therefore, it can also reduce the time-consuming file transmission. The solution of this application also does not require the use of cloud disks, and therefore, there is no need for users to pay extra for using cloud disks.
[0061] In practical applications, in addition to the cloud disk-based image transmission method mentioned in the background technology, the prior art also has an instant messaging application-based image transmission method. However, the latter generally requires user equipment to access the Internet and pass The Internet performs picture transmission, so there are also problems similar to the cloud disk-based picture transmission method, which will not be repeated here. In addition, the existing technology also has image transmission methods based on Bluetooth or infrared, but this type of method requires the support of dedicated hardware modules and communication protocols such as Bluetooth technology and infrared technology, and may require users to configure complex technical parameters and implement costs. Compared with this type of method, the solution of the present application does not need to add dedicated hardware modules and communication protocols, and does not require users to configure complex technical parameters, so the implementation cost is lower.
[0062] based on figure 1 In the method, the examples of this application also provide some specific implementation schemes and extension schemes of the method, which are described below.
[0063] In the embodiment of the present application, in order to reduce the resource consumption of the first client, the built-in server of the first client may not always be kept in a started state, but can be started based on user operations when files need to be transferred. In this case, for step S102, before the first client obtains the address information of the built-in server of the first client in the local area network, it may also execute: the first client starts the first The client's built-in server. It should be noted that if the address information of the built-in server in the local area network has been pre-configured, the first client can also perform step S101 before the built-in server is started. Accordingly, the built-in server only needs to be connected to the second client Just start the built-in server before establishing a connection.
[0064] Further, for the convenience of users, the built-in server may also have a corresponding operation interface (which can be saved as corresponding operation interface information), and the operation interface may include: an interface for displaying on the first client (for example, using A control interface for starting the built-in server, etc.), and/or an interface for displaying on the second client (for example, a file transfer interface for selecting a file to be transferred, etc.). The operation interface can contain corresponding operation prompt information and operation controls.
[0065] This application does not limit the construction method of the operation interface. Generally, a web view (webview) based on HyperText Markup Language (HTML), Cascading Style Sheets (CSS), and at least one scripting language (for example, javascript, python, etc.) can be used. Solutions to build the operation interface.
[0066] Taking the operation interface as a file transfer interface as an example, for step S102, after the DOI containing the address information is generated, the first client can also execute: provide the file transfer interface information to the second client to facilitate all The second client terminal displays a file transmission interface for sending the file according to the file transmission interface information. Thereby, the operating convenience of the second client user can be improved.
[0067] In the embodiments of the present application, the aforementioned local area network may be a wireless local area network or a wired local area network. Considering that users generally use more mobile devices to transmit pictures, and mobile devices adopt wireless communication methods, in actual applications, the solution of this application may be more used in wireless local area network scenarios.
[0068] At present, the WiFi network is the most widely used wireless local area network, which can be seen almost everywhere in daily life. The widespread use of the WiFi network can bring great convenience to the practical application of the solution of this application. Following the example in the background technology, in business operations, businesses generally provide free WiFi networks for users to use. Based on the solution of this application and the WiFi network, users can conveniently share pictures or other files other than pictures.
[0069] The above mainly uses the first client as the method execution subject to explain the solution of the application. In order to further help understanding, based on the same idea, the embodiment of this application also provides a schematic flowchart of another file transmission method, such as figure 2 Shown.
[0070] The first client and the second client are in the same local area network, figure 2 The process in the second client is the execution subject, and may include the following steps:
[0071] S201: The second client scans the DOI generated by the first client, where the DOI includes address information of a built-in server in the first client in the local area network.
[0072] S202: The second client obtains the address information included in the DOI.
[0073] In this embodiment of the application, the second client scans the DOI and performs analysis to obtain the address information contained in the DOI.
[0074] S203: The second client sends a file to the built-in server according to the address information, so that the first client can obtain the file received by the built-in server.
[0075] In the embodiment of the present application, the file transfer between the second client and the built-in server relies on the local area network where the first client and the second client are located, without relying on the Internet. The second client also has a LAN IP address in the local area network, and the second client communicates with the built-in server through its own LAN IP address (and a certain port number).
[0076] figure 2 Method and figure 1 The method is essentially the same, but is described from a different perspective. Therefore, the technical effects of the two are also the same. figure 1 The technical effects of the method are described in detail, so I won’t repeat them here.
[0077] based on figure 2 The method in this application also provides some specific implementation schemes and extension schemes of the method, which are described below.
[0078] In the embodiment of the present application, for step S203, the second client sends a file to the built-in server according to the address information, which may specifically include: the second client sends a file through the The local area network establishes a connection with the built-in server; the second client sends a file to the built-in server through the connection.
[0079] When there are multiple second clients that need to transfer files to the first client in the local area network, it is not necessarily necessary that all the second clients establish connections with the built-in server. At least one second client establishes a connection with the built-in server. can. In this case, each second client that has not established a connection with the built-in server can send a file to the built-in server through the transfer of the second client that has established a connection with the built-in server.
[0080] In the embodiments of the present application, as mentioned earlier, for the convenience of users, the built-in server may have an interface for displaying on the second client. The interface is provided for the second client to use, and the interface may be a file. Transmission interface. In this case, for the aforementioned second client to send a file to the built-in server through the connection, it may specifically include: the second client obtains the first client through the connection Provide file transfer interface information; display the file transfer interface according to the file transfer interface information; determine the file selected by the user on the second client through the file transfer interface, and send the file to the built-in server .
[0081] The process in which the second client obtains the file transfer interface information from the first client is similar to the process of opening a webpage through a browser. In this analogy, the file transfer interface information is equivalent to the web page file itself or the source code of the web page, and the address information of the built-in server is equivalent to the web address of the web page.
[0082] The above describes the solution of the present application from the perspective of the first client and the second client. The embodiment of this application also provides a schematic diagram of the interaction process in the solution of this application in an actual application scenario to help understand the solution of this application as a whole. The interaction process is as image 3 Shown.
[0083] in image 3 In the application scenario, the aforementioned first client is mounted on mobile phone a, the aforementioned second client is mounted on mobile phone b, the aforementioned files are pictures, the aforementioned DOI is a two-dimensional code, and the aforementioned local area network is a WiFi network. In practical applications, the two ends of mobile phone a and mobile phone b interact. However, since the interaction process can involve the QR code generated by mobile phone a and the file transfer interface displayed on mobile phone b, in order to make the interaction process look at The logic is clearer, and the QR code and file transfer interface are also independently used as one end of the interactive process.
[0084] in image 3 In, mobile phone a and mobile phone b are in the same WiFi network.
[0085] Mobile phone a starts the built-in server, and generates and displays a QR code according to the address information of the built-in server in the WiFi network;
[0086] The mobile phone b scans the QR code and connects to the built-in server to generate a file transmission interface for selecting pictures to be transmitted, and then sends the pictures selected by the user to the built-in server;
[0087] The mobile phone a receives the picture and saves it in the local album, thus completing the picture sharing between the mobile phones.
[0088] The solution of the present application can be implemented based on existing mobile devices, without updating the hardware, and can be implemented from the software level. The embodiment of the application provides a schematic diagram of the software architecture for implementing the solution of the application, such as Figure 4 Shown.
[0089] in Figure 4 According to different functions, the software architecture can be divided into four layers: view layer, tool layer, and network layer.
[0090] In the view layer, a javascript+CSS+HTML solution is used to build the visual interface.
[0091] At the tool level, the DOI generator is used to generate DOI, and the FileSource module is used to perform processing actions such as saving the file received by the first client (which can be implemented by calling the corresponding application program interface).
[0092] At the network layer, HTTPServer is used to process the service of starting the built-in server, HTTPResponse is used to process the response of file transfer, HTTPConnection is used to establish a connection between the built-in server and the second client, and AsyncSocket is used to provide the Socket protocol for long connection to ensure The file transfer process is not interrupted.
[0093] It should be noted, Figure 4 The software architecture in is only an example. In practical applications, the layering method and the name of each module in the architecture can be different from Figure 4.
[0094] In order to facilitate the comparison of the difference between the solution of the prior art and the solution of this application, the following also provides a more intuitive schematic diagram of the principle of the solution, such as Figure 5 , Image 6 Shown.
[0095] Figure 5 Is a practical application scenario (using image 3 Scenario), a schematic diagram of the principle of the prior art solution. When using the existing technology, if mobile phone b wants to share pictures with mobile phone a, both mobile phones need to install cloud disk applications and both need to be connected to the Internet. Mobile phone b uploads the pictures to be shared in the local album of mobile phone b to the cloud disk server in the Internet through the cloud disk application on mobile phone b, and mobile phone a uses the cloud disk application on mobile phone a to upload the pictures shared by mobile phone b from the cloud Download it from the disk server and save it to the local photo album of mobile phone a.
[0096] Image 6 A practical application scenario provided by the embodiments of this application (using image 3 Schematic diagram of the principle of the solution of this application. Image 6 For the interaction process in image 3 I won’t go into details here.
[0097] The above is the file transmission method provided by the embodiment of the application. Based on the same idea, the embodiment of the application also provides a corresponding file transmission device, such as Figure 7 , Picture 8 Shown.
[0098] Figure 7 The examples provided for this application correspond to figure 1 Schematic diagram of the structure of the file transmission device of, the device is located on a first client, the first client and the second client are in the same local area network, the device may include:
[0099] The address information obtaining module 701 obtains the address information of the built-in server of the first client in the local area network;
[0100] The DOI generation module 702 generates a DOI including the address information according to the address information, so that the second client scans the DOI and sends a file to the built-in server;
[0101] The file obtaining module 703 obtains the file received by the built-in server.
[0102] Optionally, the device further includes:
[0103] The built-in server activation module 704 starts the built-in server of the first client before the address information obtaining module obtains the address information of the built-in server of the first client in the local area network, wherein the built-in server is established at At least one application on the first client.
[0104] Optionally, the device further includes:
[0105] The file transfer interface module 705, after the DOI generation module 702 generates the DOI containing the address information, provides file transfer interface information to the second client, so that the second client can follow the file transfer interface Information, showing the file transfer interface used to send the file.
[0106] Optionally, the address information includes a local area network IP address and port number.
[0107] Optionally, the file is a picture.
[0108] Optionally, the device further includes:
[0109] The file saving module 706 saves the file in the local photo album.
[0110] Optionally, the local area network is a WiFi network.
[0111] Optionally, the DOI is a two-dimensional code.
[0112] Picture 8 The examples provided for this application correspond to figure 2 A schematic diagram of the structure of the file transmission device of, the device is located on the second client, and the first client and the second client are in the same local area network. The device may include:
[0113] The DOI scanning module 801 scans the DOI generated by the first client, where the DOI includes address information of the built-in server in the first client in the local area network;
[0114] The address information obtaining module 802 obtains the address information contained in the DOI;
[0115] The file sending module 803 sends a file to the built-in server according to the address information, so that the first client can obtain the file received by the built-in server.
[0116] Optionally, the file sending module 803 establishes a connection with the built-in server through the local area network according to the address information, and sends the file to the built-in server through the connection.
[0117] Optionally, the file sending module 803 obtains the file transfer interface information provided by the first client through the connection, displays the file transfer interface according to the file transfer interface information, and determines that the user is on the file transfer interface through the file transfer interface. And send the file selected on the second client to the built-in server.
[0118] Optionally, the address information includes a local area network IP address and port number.
[0119] Optionally, the file is a picture.
[0120] Optionally, the local area network is a WiFi network.
[0121] Optionally, the DOI is a two-dimensional code.
[0122] The device provided in this application corresponds to the method provided in this application one-to-one. Therefore, the device also has similar technical effects to the method. Since the technical effects of the method have been described in detail above, therefore, The technical effects of the device will not be repeated here.
[0123] Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0124] The present invention is described with reference to flowcharts and/or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are generated In the process Figure one Process or multiple processes and/or boxes Figure one A device with functions specified in a block or multiple blocks.
[0125] These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device. The device is implemented in the process Figure one Process or multiple processes and/or boxes Figure one Function specified in a box or multiple boxes.
[0126] These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment. Instructions are provided to implement the process Figure one Process or multiple processes and/or boxes Figure one Steps of functions specified in a box or multiple boxes.
[0127] In a typical configuration, the computing device includes one or more processors (CPU), input/output interfaces, network interfaces, and memory.
[0128] The memory may include non-permanent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer readable media.
[0129] Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
[0130] It should also be noted that the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, product or equipment including a series of elements not only includes those elements, but also includes Other elements that are not explicitly listed, or include elements inherent to the process, method, commodity, or equipment. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, commodity or equipment that includes the element.
[0131] The above descriptions are only examples of this application and are not used to limit this application. For those skilled in the art, this application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in the scope of the claims of this application.

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.

Similar technology patents

A safety authentication method based on a Boeing aircraft wireless network

InactiveCN109788483AReduce risk of data breachesMore security and reliability
Owner:RUDONG INFORMATION TECH SERVICES SHANGHAI CO LTD

Medical commercial insurance method capable of improving commercial insurance claim settlement efficiency

PendingCN113536333AReduce risk of data breachesensure credible
Owner:ANHUI PROVINCIAL HOSPITAL

Hidden trace query method and device and medium

PendingCN114139204AReduce risk of data breaches
Owner:HANGZHOU ANHENG INFORMATION TECH CO LTD

System for realizing safe user data acquisition and authorization processing and method thereof

ActiveCN110188556AReduce risk of data breachesProtect user data
Owner:上海富数科技有限公司

Classification and recommendation of technical efficacy words

  • Reduce risk of data breaches

Hidden trace query method and device and medium

PendingCN114139204AReduce risk of data breaches
Owner:HANGZHOU ANHENG INFORMATION TECH CO LTD

System for realizing safe user data acquisition and authorization processing and method thereof

ActiveCN110188556AReduce risk of data breachesProtect user data
Owner:上海富数科技有限公司

A safety authentication method based on a Boeing aircraft wireless network

InactiveCN109788483AReduce risk of data breachesMore security and reliability
Owner:RUDONG INFORMATION TECH SERVICES SHANGHAI CO LTD

Medical commercial insurance method capable of improving commercial insurance claim settlement efficiency

PendingCN113536333AReduce risk of data breachesensure credible
Owner:ANHUI PROVINCIAL HOSPITAL
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products