A method and system for file transmission based on image recognition
By identifying pictures containing file paths and determining the terminal device where the file is located by the image recognition method, the problem of difficult files being transferred across terminals in the prior art is solved, and flexible file transfer without hardware peripherals or login applications is realized.
Patent Information
- Application Number
- CN202110969303.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-23
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2041-08-23
AI Technical Summary
The prior art has difficulty in realizing file transfer across terminals without the need for mobile hard disk peripherals or login applications, especially when terminal devices are not accessible or the display/screen is not available.
Using an image recognition method, the file path is identified and the terminal device where the file is located is realized by obtaining a picture containing the file path.
It realizes file transfer without hardware peripherals or login applications, and is flexible in operation, suitable for various terminal devices without human operation of terminal devices.
Smart Images

Figure CN113849461B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of wireless communication and image recognition, and more specifically, to a method and system for completing file transmission based on image recognition. Background Art
[0002] The storage and movement of data are the cornerstones of all technology industries. All current technologies require data storage, whether it is code, data, or files, and they all need a carrier. Since paper documents or other physical documents are inconvenient to store, difficult to move, and slow to move, the mobility of data across time and locations has become one of the characteristics of the information age and one of the driving forces for the development of information technology.
[0003] Nowadays, people's daily life and work are also inseparable from electronic products. One of the important reasons is that electronic products can store and carry the files we need. However, when transferring files between different devices, it usually requires the support of external devices such as USB cables or external hard drives. In the absence of external devices such as hard drives, ordinary users mostly rely entirely on software developed by various service providers to achieve file transfer. For example, to transfer files between computer A and computer B or mobile phone C, in addition to using an external hard drive, most of the remaining methods require computer A to log in to a certain application, and then computer B or mobile phone C also needs to log in to the same application, and then transfer files through the application software. If one account can only be logged in to one terminal, then at least 2 accounts are required to complete file transfer, which is very cumbersome. If the computer or mobile phone is not around, file transfer cannot be completed either. In addition, the existing methods for cross-terminal file transfer basically rely on manual operations on both the terminal where the file is located and the terminal used to store the file to achieve the ability to move files across terminals. And when manually operating both terminals, basically, people look at the monitor or screen to enter the file directory and then perform operations such as copying, dragging, and pasting the file to achieve file movement. If faced with a source file terminal that cannot be accessed or is inconvenient to access, or even in the case where the source file terminal has no monitor or screen, ordinary users simply cannot operate cross-terminal file movement.
[0004] Therefore, in order to achieve cross-terminal file transfer without the need for external hard drive devices or logging in to application programs, it is desirable to provide an improved file transfer method and system. Summary of the Invention
[0005] The Summary of the Invention is provided to introduce some concepts that will be further described in the following Detailed Description in a simplified form. The Summary of the Invention is not intended to identify the key features or essential features of the claimed subject matter, nor is it intended to be used to help determine the scope of the claimed subject matter.
[0006] The present invention provides a method and system for file transfer based on image recognition. The present invention uses an image recognition method to identify the file path included in a picture, and obtains the file from the file path locally or downloads the file from the file path of the terminal device where the source file is located through a network (e.g., local area network SSH) to complete the transfer of the file between terminal devices.
[0007] According to an aspect of the present invention, there is provided a file transfer method, the method comprising:
[0008] Obtaining a picture containing the file path of the source file, wherein the picture is a picture taken in real time or an existing picture stored in the local machine;
[0009] Identifying the included file path from the obtained picture and converting the identified file path into a text format;
[0010] Determining whether the terminal device where the source file is located is the local machine;
[0011] In response to the terminal device where the source file is located being the local machine, directly uploading the source file from the local machine to the cloud;
[0012] In response to the terminal device where the source file is located not being the local machine,
[0013] Determining the terminal device where the source file is located from one or more accessible terminal devices in the network based on the identified file path;
[0014] Establishing a connection with the determined terminal device; and
[0015] Obtaining the source file from the file path of the determined terminal device.
[0016] According to an embodiment of the present invention, determining whether the terminal device where the source file is located is the local machine further includes:
[0017] In response to the obtained picture being an existing picture stored in the local machine, determining that the terminal device where the source file is located is the local machine; and
[0018] In response to the obtained picture being a picture taken in real time, determining that the terminal device where the source file is located is not the local machine.
[0019] According to a further embodiment of the present invention, determining whether the terminal device where the source file is located is the local machine further includes:
[0020] Searching for the identified file path in the local machine to check whether the source file exists,
[0021] If it exists, determining that the terminal device where the source file is located is the local machine, and
[0022] If not, it is determined that the terminal device where the source file is located is not the local device.
[0023] According to a further embodiment of the present invention, determining the terminal device where the source file is located from one or more terminal devices accessible in the network based on the identified file path further includes:
[0024] Traversing other IP addresses within the local area network and connecting to the terminal devices associated with these IP addresses one by one to determine whether the source file is stored in the terminal device, and
[0025] Designating one of the one or more terminal devices storing the source file as the terminal device where the source file is located.
[0026] According to a further embodiment of the present invention, determining the terminal device where the source file is located from one or more terminal devices accessible in the network based on the identified file path further includes:
[0027] Determining the terminal device associated with the IP address specified by the user as the terminal device where the source file is located.
[0028] According to another aspect of the present invention, there is provided a file transfer system, the system includes:
[0029] A picture acquisition module, the picture acquisition module is configured to acquire a picture containing the file path of the source file, where the picture is a real-time captured picture or an existing picture stored in the local device;
[0030] A path recognition module, the path recognition module is configured to recognize the contained file path from the acquired picture and convert the recognized file path into a text format;
[0031] A source file device determination module, the source file device determination module is configured to:
[0032] Based on the identified file path, determine the terminal device where the source file is located from one or more terminal devices accessible in the local device or the network;
[0033] A file download module, the file download module is configured to establish a connection with the determined terminal device and download the source file from the file path of the determined terminal device in response to determining that the terminal device where the source file is located is not the local device;
[0034] A file upload module, the file upload module is configured to:
[0035] Directly upload the source file from the local device to the cloud in response to determining that the terminal device where the source file is located is the local device; and
[0036] In response to determining that the terminal device where the source file is located is not the local device, upload the downloaded source file to the cloud.
[0037] According to an embodiment of the present invention, the source file device determination module is further configured to:
[0038] In response to the acquired picture being an existing picture stored on the local device, determine that the terminal device where the source file is located is the local device; and
[0039] In response to the acquired picture being a picture taken in real time, determine that the terminal device where the source file is located is not the local device.
[0040] According to a further embodiment of the present invention, the source file device determination module is further configured to:
[0041] Search for the identified file path on the local device to check whether the source file exists,
[0042] If it exists, determine that the terminal device where the source file is located is the local device, and
[0043] If it does not exist, determine that the terminal device where the source file is located is not the local device.
[0044] According to a further embodiment of the present invention, the source file device determination module is further configured to:
[0045] In response to determining that the terminal device where the source file is located is not the local device,
[0046] Traverse other IP addresses within the local area network and connect to the terminal devices associated with these IP addresses one by one to determine whether the source file is stored in the terminal device, and
[0047] Designate one of the one or more terminal devices storing the source file as the terminal device where the source file is located.
[0048] According to a further embodiment of the present invention, the source file device determination module is further configured to:
[0049] In response to determining that the terminal device where the source file is located is not the local device, determine the terminal device associated with the IP address specified by the user as the terminal device where the source file is located.
[0050] Compared with the solutions in the prior art, the method and system for file transmission based on image recognition provided by the present invention have at least the following advantages:
[0051] (1) Lower cost, no need for external hard drives or data cables, saving hardware resources and the trouble of carrying them around;
[0052] (2) Wider coverage, enabling file transfer across various types of terminal devices (such as PCs, mobile phones, set-top boxes, servers, etc.), and facilitating the mobile interaction of file data. As long as the communication protocols of each terminal device are unified or can interact with each other, this greatly improves the device utilization rate and breaks down the barriers between devices;
[0053] (3) More flexible operation, allowing files to be transferred to each other without logging in to the application. This is very beneficial in cases where the terminal device cannot see the ordinary user interface and thus cannot complete operations such as dragging, clicking on files, and operating applications; and
[0054] (4) More intelligent, enabling file download with only unilateral device operation. For example: To obtain a certain file on the PC side using the mobile phone, simply use the mobile phone to take a picture, and the picture contains the file path. The picture can be the file path presented on the PC monitor or the file path written by hand on a paper page, etc. Subsequently, the file stored in the file path is automatically downloaded from the PC side to the mobile phone without the need to operate on the PC, and even without touching the PC.
[0055] These and other features and advantages will become apparent by reading the following detailed description and referring to the associated drawings. It should be understood that the foregoing general description and the following detailed description are illustrative only and do not limit the various aspects claimed. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to understand in detail the manner in which the above-described features of the present invention are used, the above briefly outlined content can be described more specifically with reference to the various embodiments, some of which are shown in the drawings. However, it should be noted that the drawings only show certain typical aspects of the present invention and should not be considered to limit its scope, as the description may allow other equally effective aspects.
[0057] Figure 1 is an example architecture diagram of a system for completing file transfer based on image recognition according to an embodiment of the present invention.
[0058] Figure 2 is an overall flowchart of a method for completing file transfer based on image recognition according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0059] The present invention will be described in detail below with reference to the drawings, and the features of the present invention will be further revealed in the following specific description.
[0060] Figure 1 is an example architecture diagram of a system 100 for completing file transfer based on image recognition according to an embodiment of the present invention. As Figure 1As shown in the figure, the system 100 of the present invention includes: an image acquisition module 101, a path recognition module 102, a source file device determination module 103, a file download module 104, and a file upload module 105. The system 100 can be implemented on a terminal device in the form of a mini-program or an application.
[0061] The image acquisition module 101 can acquire a live-shot image or an existing image stored on the local device in response to a file transfer request. In some cases, the image acquisition module 101 can pop up an option for taking a picture or entering the photo album in response to a file transfer request from the user. Among them, in response to the user clicking the option for taking a picture, a picture containing file path information is taken on-site through the camera (for example, taking a picture of a display or a paper page containing file path information), and in response to the user clicking the option for entering the photo album, the photo album is entered for the user to select a picture containing file path information (for example, a screenshot). After acquiring a live-shot image or an existing image stored on the local device, the path recognition module 102 can use image recognition to recognize the contained file path from the picture and convert the recognized file path into a text format. For example, the path recognition module 102 can use image text recognition (such as optical character recognition (OCR)) to recognize the contained file path from the picture. If the file path cannot be recognized from the picture, the user can be prompted to take a picture again or reselect a picture from the photo album.
[0062] The source file device determination module 103 can determine the terminal device where the source file is located from one or more terminal devices accessible on the local device or the network based on the recognized file path. In some cases, the source file device determination module 103 can determine whether the terminal device where the source file is located is the local device or other terminal devices accessible on the network according to the acquisition method of the picture. If the acquired picture is an existing image stored on the local device (for example, a screenshot), the source file device determination module 103 can determine that the terminal device where the source file is located is the local device. If the acquired picture is a live-shot picture taken on-site, the source file device determination module 103 can determine that the terminal device where the source file is located is other terminal devices accessible on the network (for example, other IP devices within a local area network). In other cases, the source file device determination module 103 can first search for the recognized file path on the local device to check whether the file exists. If it exists, it is determined that the terminal device where the source file is located is the local device. If it does not exist, it is determined that the terminal device where the source file is located is other terminal devices accessible on the network.
[0063] In response to determining that the terminal device where the source file is located is the local device, the file upload module 105 can directly upload the source file obtained from the local file path to the cloud. In response to determining that the terminal device where the source file is located is another terminal device accessible in the network, the file download module 104 can download the source file obtained from the file path of that terminal device to the local device by establishing a connection with the terminal device where the source file is located. In some aspects, in the case where it is determined that the terminal device where the source file is located is another terminal device accessible in the network, the source file device determination module 103 can automatically traverse other IP addresses within the local area network and connect to these IP devices one by one to search for the file path to check whether the source file exists, and then determine one of the one or more IP devices storing the source file as the terminal device where the source file is located. If there are more than one IP devices storing the file, the user can be prompted to specify one of them as the terminal device where the source file is located. In other aspects, in the case where it is determined that the terminal device where the source file is located is another terminal device accessible in the network, the source file device determination module 103 can determine the terminal device associated with the IP address manually input or specified by the user as the terminal device where the source file is located. If the specified IP address is a local area network IP (private IP) address, a connection is established with the terminal device through local area network SSH for communication. If the specified IP address is a wide area network IP (public IP) address, a connection is established with the terminal device through the wide area network IP (or domain name) and port mapping for communication. In some cases, if the IP device requires password unlocking, password input is required when attempting to establish a connection with the IP device to complete the security verification. After downloading the source file to the local device through the file download module 104, the file upload module 105 can upload the downloaded source file to the cloud for storage.
[0064] Those skilled in the art can understand that the system of the present invention and its various modules can be implemented in hardware form or software form, and the modules can be combined or combined in any suitable manner.
[0065] Figure 2 is the overall flowchart of the method 200 for completing file transmission based on image recognition according to an embodiment of the present invention. As Figure 2As shown, the system 100 can obtain an image containing file path information by running the image acquisition module 101, where the image can be a real-time captured image or an existing image stored locally. After obtaining the image, the path recognition module 102 can use optical character recognition (such as optical character recognition (OCR)) to recognize the file path from the image and convert it into text format. Subsequently, the source file device determination module 103 can determine whether the terminal device where the source file is located is the local machine or other terminal devices accessible in the network according to the acquisition method of the image (screenshot or real-time captured image). If it is determined that the terminal device where the source file is located is the local machine, the file upload module 105 can directly upload the source file in the local machine to the cloud. If it is determined that the terminal device where the source file is located is other terminal devices accessible in the network, the source file device determination module 103 can prompt the user to specify the IP address of the terminal device where the source file is located. If the user does not make a specification, it will automatically traverse other IP addresses within the local area network and connect to these IP devices one by one to determine whether the source file is stored in the IP device, and then specify one of the one or more IP devices storing the source file as the terminal device where the source file is located, and establish a connection with it through SSH in the local area network. After establishing the connection, the source file is downloaded to the local machine via the ssh command for uploading. If the user specifies the IP address of the terminal device where the source file is located, for example, by manual input, the file download module 104 can directly establish a connection with the terminal device associated with the IP address to download the source file to the local machine. Subsequently, the file upload module 105 can upload the downloaded file to the cloud for storage.
[0066] In one scenario, the system 100 is implemented in the form of an application (APP) on the mobile phone side, and the source file to be uploaded is stored on the PC side (IP address: 192.168.1.4) under the same local area network, and the file path is "E:\Image Recognition Path\FileName.docx".
[0067] In response to a file transfer request from a user, the picture acquisition module 101 can open the mobile phone camera to take a picture containing the file path, where the taken picture is a paper page with "E:\Image Recognition Path\File Name.docx" written by hand. Subsequently, the path recognition module 102 can use optical character recognition to recognize the contained file path string from the picture captured by the camera. Since the picture is taken in real time, the source file device determination module 103 can determine that the terminal device where the source file is located is other terminal devices accessible in the network, and prompt the user to specify an IP address. The user can manually enter the IP address "192.168.1.4" and password for specification. If the user does not make a specification, a global local area network IP segment scan can be performed, and then the IPs are traversed in turn and it is searched whether the file "E:\Image Recognition Path\File Name.docx" exists in the IP device. If the result of the traversal search is that there are multiple IP devices storing this file, the user is prompted to specify one of these IP devices. After specifying the IP device, the file "E:\Image Recognition Path\File Name.docx" stored at the IP address "192.168.1.4" is downloaded to the mobile phone where the APP is located through the ssh command. Subsequently, the file is uploaded to the cloud for storage.
[0068] The foregoing has described examples of various aspects of the claimed subject matter. Of course, it is not possible to describe every conceivable combination of components or methods for purposes of depicting the claimed subject matter, but one of ordinary skill in the art should recognize that many further combinations and permutations of the claimed subject matter are possible. Thus, the disclosed subject matter is intended to cover all such alterations, modifications, and variations that fall within the spirit and scope of the appended claims.
Claims
1. A file transfer method, characterized in that, The method includes: Obtaining a picture containing the file path of the source file, where the picture is a picture taken in real time or an existing picture stored on the local machine; Identifying the contained file path from the obtained picture and converting the identified file path into a text format; Determining whether the terminal device where the source file is located is the local machine; In response to the terminal device where the source file is located being the local machine, directly uploading the source file from the local machine to the cloud; In response to the terminal device where the source file is located not being the local machine, Determining the terminal device where the source file is located from one or more terminal devices accessible on the network based on the identified file path; Establishing a connection with the determined terminal device; and Obtaining the source file from the file path of the determined terminal device.
2. The method according to claim 1, characterized in that, Determining whether the terminal device where the source file is located is the local machine further includes: In response to the obtained picture being an existing picture stored on the local machine, determining that the terminal device where the source file is located is the local machine; and In response to the obtained picture being a picture taken in real time, determining that the terminal device where the source file is located is not the local machine.
3. The method according to claim 1, characterized in that, Determining whether the terminal device where the source file is located is the local machine further includes: Searching for the identified file path on the local machine to check whether the source file exists, If it exists, determining that the terminal device where the source file is located is the local machine, and If it does not exist, determining that the terminal device where the source file is located is not the local machine.
4. The method according to claim 1, characterized in that, Determining the terminal device where the source file is located from one or more terminal devices accessible on the network based on the identified file path further includes: Traversing other IP addresses within the local area network and connecting to the terminal devices associated with these IP addresses one by one to determine whether the source file is stored in the terminal device, and Designating one of the one or more terminal devices storing the source file as the terminal device where the source file is located.
5. The method according to claim 1, characterized in that, Determining the terminal device where the source file is located from one or more terminal devices accessible on the network based on the identified file path further includes: Determining the terminal device associated with the IP address specified by the user as the terminal device where the source file is located.
6. A file transfer system, characterized in that, The system includes: A picture acquisition module configured to acquire a picture containing the file path of the source file, where the picture is a picture taken in real time or an existing picture stored on the local machine; A path identification module configured to identify the contained file path from the obtained picture and convert the identified file path into a text format; A source file device determination module configured to: Determine the terminal device where the source file is located from the local machine or one or more terminal devices accessible on the network based on the identified file path; A file download module configured to establish a connection with the determined terminal device and download the source file from the file path of the determined terminal device in response to determining that the terminal device where the source file is located is not the local machine; A file upload module configured to: In response to determining that the terminal device where the source file is located is the local device, directly upload the source file from the local device to the cloud; and In response to determining that the terminal device where the source file is located is not the local device, upload the downloaded source file to the cloud.
7. The system according to claim 6, characterized in that, The source file device determination module is further configured to: In response to the acquired picture being an existing picture stored on the local device, determine that the terminal device where the source file is located is the local device; and In response to the acquired picture being a picture taken in real time, determine that the terminal device where the source file is located is not the local device.
8. The system according to claim 6, wherein, The source file device determination module is further configured to: Search for the identified file path on the local device to check whether the source file exists, If it exists, determine that the terminal device where the source file is located is the local device, and If it does not exist, determine that the terminal device where the source file is located is not the local device.
9. The system according to claim 6, wherein, The source file device determination module is further configured to: In response to determining that the terminal device where the source file is located is not the local device, Traverse other IP addresses within the local area network and connect to the terminal devices associated with these IP addresses one by one to determine whether the source file is stored in the terminal device, and Designate one of the one or more terminal devices storing the source file as the terminal device where the source file is located.
10. The system according to claim 6, wherein, The source file device determination module is further configured to: In response to determining that the terminal device where the source file is located is not the local device, determine the terminal device associated with the IP address specified by the user as the terminal device where the source file is located.
Citation Information
Patent Citations
File transmission method, system and device
CN103685707A
Method, terminal and system for transmitting files
CN103840859A