Disclosure of Invention
An object of the present application is to provide a file transmission method and device based on bluetooth transmission, which solve the problem in the prior art that the display mode at the terminal is not convenient for selecting the transmission object during bluetooth transmission, which easily results in error transmission.
According to an aspect of the present application, there is provided a file transfer method based on bluetooth transmission, the method including:
the first terminal searches at least one second terminal supporting Bluetooth transmission in an effective transmission distance through Bluetooth scanning;
the first terminal acquires the geographic position information and the identification information of the at least one second terminal;
the first terminal determines a target terminal from the at least one second terminal according to the geographical position information and the identification information of the at least one second terminal;
the first terminal sends a transmission request based on Bluetooth transmission to the target terminal, wherein the transmission request is used for requesting to send a file to be transmitted, and the transmission request comprises identification information of the first terminal and identification information of the file to be transmitted.
Further, the determining, by the first terminal, a target terminal from the at least one second terminal according to the geographic location information and the identification information of the at least one second terminal includes:
the first terminal establishes a search map comprising the at least one second terminal according to the geographic position information and the identification information of the at least one second terminal;
and the first terminal determines the target terminal from the at least one second terminal according to the search map.
Further, the establishing, by the first terminal, a search map including the at least one second terminal according to the geographic location information and the identification information of the at least one second terminal includes:
and the first terminal establishes the search map by taking the geographical position of the first terminal as a center and the effective transmission distance as a radius, wherein the search map comprises the geographical position information and the identification information of the at least one second terminal.
Further, the determining, by the first terminal, a target terminal from the at least one second terminal according to the geographic location information and the identification information of the at least one second terminal includes:
the first terminal determines a list to be matched comprising the at least one second terminal according to the geographic position information and the identification information of the at least one second terminal;
and the first terminal selects the target terminal from the list to be matched.
Further, the method comprises:
the first terminal sorts the list to be matched according to the geographic position information of the at least one second terminal and/or historical matching information between the first terminal and the second terminal;
and the second terminal selects the target terminal from the sorted list to be matched.
Further, after the first terminal sends the transmission request based on bluetooth transmission to the target terminal, the method includes:
and the first terminal transmits the file to be transmitted to the target terminal or cancels the transmission of the file to be transmitted based on a feedback result of the target terminal, wherein the feedback result is determined by the target terminal according to the transmission request based on the Bluetooth transmission sent by the first terminal.
Further, the identification information of the second terminal includes any one of:
user name information of a user corresponding to the second terminal and image information uploaded by the user;
and the identity identification information and the equipment image information of the second terminal.
According to another aspect of the present application, there is provided a file transfer method based on bluetooth transmission, the method including:
the method comprises the steps that a target terminal sends geographic position information and identification information of the target terminal to a first terminal through Bluetooth scanning search operation based on the first terminal;
the target terminal receives a transmission request based on Bluetooth transmission and sent by the first terminal, wherein the transmission request is used for requesting to send a file to be transmitted, and the transmission request comprises identification information of the first terminal and identification information of the file to be transmitted;
and the target terminal determines whether to receive the file to be transmitted or not and sends a feedback result to the first terminal.
Further, before the target terminal determines whether to receive the file to be transmitted, the method further includes:
the target terminal establishes a search map comprising at least one terminal according to the geographical position information and the identification information of the at least one terminal comprising the first terminal;
the target terminal determines whether to receive the file to be transmitted or not, and the method comprises the following steps:
and the target terminal determines to receive the file to be transmitted based on the search map.
Further, the searching map includes identification information of the first terminal, and the target terminal determines to receive the file to be transmitted based on the searching map, including:
and the target terminal carries out message prompt on the search map based on the transmission request based on the Bluetooth transmission sent by the first terminal, wherein the position of the message prompt is the position of the identification information of the first terminal in the search map.
Further, the identification information of the target terminal includes at least any one of:
user name information of a user corresponding to the target terminal and image information uploaded by the user;
and the identity identification information and the equipment image information of the target terminal.
According to still another aspect of the present application, there is also provided a terminal for file transfer based on bluetooth transfer, wherein the terminal includes:
one or more processors; and
a memory storing computer readable instructions that, when executed, cause the processor to perform the operations of the method as previously described.
According to another aspect of the present application, there is also provided a computer readable medium having stored thereon computer readable instructions executable by a processor to implement a file transfer method based on bluetooth transmission as described above.
Compared with the prior art, the method and the device have the advantages that the first terminal searches for at least one second terminal supporting Bluetooth transmission in the effective transmission distance through Bluetooth scanning; the first terminal acquires the geographic position information and the identification information of the at least one second terminal; the first terminal determines a target terminal from the at least one second terminal according to the geographical position information and the identification information of the at least one second terminal; the first terminal sends a transmission request based on Bluetooth transmission to the target terminal, wherein the transmission request is used for requesting to send a file to be transmitted, and the transmission request comprises identification information of the first terminal and identification information of the file to be transmitted. Therefore, the target terminal for receiving the file is more accurately and easily judged, and the error transmission is avoided.
Detailed Description
The present application is described in further detail below with reference to the attached figures.
In a typical configuration of the present application, the terminal, the device serving the network, and the trusted party each include one or more processors (e.g., Central Processing Units (CPUs)), input/output interfaces, network interfaces, and memory.
The Memory may include volatile Memory in a computer readable medium, Random Access Memory (RAM), and/or nonvolatile Memory such as Read Only Memory (ROM) or flash Memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, Phase-Change RAM (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 technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, magnetic cassette tape, magnetic tape storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
Fig. 1 shows a schematic flow chart of a file transmission method based on bluetooth transmission at a first terminal, the method comprising: step S11 to step S14.
In step S11, the first terminal searches for at least one second terminal supporting bluetooth transmission within an effective transmission range through bluetooth scanning.
Specifically, the first terminal is a terminal that sends a file, and when the file is transmitted based on bluetooth, a bluetooth scan is first opened at the first terminal, and at least one second terminal that supports bluetooth transmission within an effective transmission distance of the bluetooth is scanned and searched. Wherein, effective transmission distance is the maximum transmission distance that can reach when carrying out data transmission based on the bluetooth. For example, when there is an obstacle, the effective transmission distance of bluetooth is N meters, that is, when the distance exceeds N meters, data transmission based on bluetooth cannot be performed. In an embodiment, the first terminal a opens the bluetooth scan, scans the terminals B, C, and D which have started the bluetooth function in the effective transmission distance, and when the first terminal a performs file transmission, it may select the terminal from the scanned terminals B, C, and D as a terminal for receiving the file.
It should be noted that the first terminal and the second terminal include, but are not limited to, any mobile electronic product capable of performing human-computer interaction with a user through a touch panel, such as a smart phone, a Personal Digital Assistant (PDA), and the like, and the mobile electronic product may employ any operating system, such as an android operating system, an apple (iOS) operating system, and the like.
In step S12, the first terminal obtains the geographic location information and the identification information of the at least one second terminal.
Specifically, when the first terminal opens the bluetooth for scanning and searching, the geographical location information and the identification information of at least one second terminal within the effective transmission distance are simultaneously acquired, wherein the geographical location information includes latitude and longitude information, and the identification information is used for identifying different second terminals, such as name information and image information. The first terminal carries out scanning search through Bluetooth so as to acquire the geographic position information and the identification information of at least one second terminal.
In step S13, the first terminal determines a target terminal from the at least one second terminal according to the geographic location information and the identification information of the at least one second terminal.
Specifically, the first terminal opens the bluetooth for scanning, scans one or more second terminals, and needs to select a target object from the scanned one or more second terminals as a terminal for receiving a file, so that a user can accurately select the target terminal for receiving the file by obtaining the geographic position information and the identification information of all the second terminals, thereby avoiding misdelivery.
In step S14, the first terminal sends a transmission request based on bluetooth transmission to the target terminal, where the transmission request is used to request to send a file to be transmitted, and the transmission request includes identification information of the first terminal and identification information of the file to be transmitted.
Specifically, after the target terminal is selected, the first terminal selects a file to be transmitted, and sends a transmission request based on bluetooth transmission to the target terminal, so as to establish bluetooth connection with the target terminal and perform file transmission. The transmission request comprises identification information of the first terminal and identification information of the file to be transmitted, so that the target terminal judges whether to establish Bluetooth connection with the first terminal according to the identification information of the first terminal and judges whether to receive the file to be transmitted according to the identification information of the file to be transmitted.
In an embodiment of the present application, in step S13, the first terminal establishes a search map including the at least one second terminal according to the geographic location information and the identification information of the at least one second terminal; and the first terminal determines the target terminal from the at least one second terminal according to the search map. Here, a search map may be established on the first terminal, and the search map displays at least one second terminal obtained by the first terminal through bluetooth scanning, so as to show a more intuitive search result for the user, thereby facilitating the user to select a target terminal from the at least one second terminal on the search map. Specifically, when the search map is created, the following method may be used:
and the first terminal establishes the search map by taking the geographical position of the first terminal as a center and the effective transmission distance as a radius, wherein the search map comprises the geographical position information and the identification information of the at least one second terminal. The method comprises the steps of establishing a search map with the position of a first terminal as a center through a positioning function, displaying identification information of at least one scanned second terminal on the search map at a position corresponding to geographical position information in the search map with the position of the first terminal as the center and effective Bluetooth transmission distance as a radius circle, so that a user can more accurately and easily judge a target terminal, and after the target terminal is selected from at least one second terminal on the search map, clicking the identification information of the target terminal on the search map to send a transmission request to transmit files.
In another embodiment of the present application, when the first terminal determines the target terminal from the at least one second terminal according to the geographic location information and the identification information of the at least one second terminal, the first terminal may further select the target terminal in a form of a list, specifically:
the first terminal determines a list to be matched comprising the at least one second terminal according to the geographic position information and the identification information of the at least one second terminal; and the first terminal selects the target terminal from the list to be matched. The first terminal scans and searches at least one second terminal, acquires geographic position information and identification information of all the scanned second terminals, stores the geographic position information and the identification information in the list to be matched, and displays the identification information and the geographic position information of all the second terminals in the list to be matched, so that a user can conveniently select a target terminal from the list according to the identification information and the geographic position information displayed in the list to be matched. Further, each second terminal in the list to be matched may be sorted to select a target terminal from the sorted list, specifically: the first terminal sorts the list to be matched according to the geographic position information of the at least one second terminal and/or historical matching information between the first terminal and the second terminal; and the second terminal selects the target terminal from the sorted list to be matched. Here, the sorting may be performed according to the obtained geographic position information of each second terminal, for example, the sorting is performed according to the distance from the position of the first terminal, the closest sorting to the position of the first terminal is in the front, and the farthest sorting is in the back. Furthermore, the second terminal can be sorted according to history matching information, namely if the second terminal is matched with the first terminal through history Bluetooth, the second terminal can be sorted according to history matching times or sorted according to history matching time; the geographical position information of the second terminal and the historical matching information can be combined to be sorted, so that a user can select the target terminal from the list to be matched more accurately.
In an embodiment of the present application, after the first terminal sends a transmission request based on bluetooth transmission to the target terminal, the first terminal transmits the file to be transmitted to the target terminal or cancels transmission of the file to be transmitted based on a feedback result of the target terminal, where the feedback result is determined by the target terminal according to the transmission request based on bluetooth transmission sent by the first terminal. The first terminal sends a transmission request based on Bluetooth transmission to the target terminal, the target terminal judges whether Bluetooth connection is established with the first terminal according to the received transmission request, receives a file to be transmitted, and feeds a feedback result of the judgment back to the first terminal, so that the first terminal determines whether to start transmitting the file to be transmitted to the target terminal or cancel the transmission of the file to be transmitted.
In an embodiment of the present application, the identification information of the second terminal includes any one of: user name information of a user corresponding to the second terminal and image information uploaded by the user; and the identity identification information and the equipment image information of the second terminal. Here, the user name information of the user corresponding to the second terminal is, for example, a nickname of the user using the second terminal, and the identification information of the second terminal is, for example, machine number information or model information of the second terminal. The Bluetooth of each terminal can be provided with head portrait information and a user name, the head portrait and the nickname of the user can be preferably adopted, and the default head portrait is the image and the machine number of the corresponding terminal. For example, in the display manner shown in fig. 2, on the established search map, the circle with the position of the first terminal as the center and the effective transmission distance as the radius is displayed, the identification information and the position information marks of the plurality of second terminals are displayed on the search map, where the identification information may be image information and a nickname uploaded by a user, such as a user with a nickname "Ann" and head portrait information of the user, or may be image information of a device, and if a certain type of mobile terminal is used, an image and the type of the mobile terminal are displayed.
Fig. 3 is a flowchart illustrating a file transmission method based on bluetooth transmission at a target terminal according to another aspect of the present application, where the method includes:
and step S21, the target terminal sends the geographical position information and the identification information of the target terminal to the first terminal based on the searching operation of the first terminal through Bluetooth scanning.
Specifically, the target terminal is a terminal device which receives a transmission request based on bluetooth transmission sent by the first terminal, the target terminal opens the bluetooth, receives a search operation of the first terminal through bluetooth scanning, and sends geographic position information and identification information of the target terminal to the first terminal, so that information of the target terminal is provided to facilitate the first terminal to select, and a bluetooth connection relation is accurately established with the target terminal.
Step S22, the target terminal receives a transmission request based on bluetooth transmission sent by the first terminal, where the transmission request is used to request to send a file to be transmitted, and the transmission request includes identification information of the first terminal and identification information of the file to be transmitted.
Specifically, the target terminal and the first terminal perform bluetooth matching, so that a transmission request sent by the first terminal is received based on bluetooth, the transmission request is used for sending a file to be transmitted, which is transmitted through bluetooth, and the transmission request carries identification information of the first terminal and identification information of the file to be transmitted.
Step S23, the target terminal determines whether to receive the file to be transmitted, and sends a feedback result to the first terminal.
Specifically, the target terminal determines whether bluetooth matching is performed with the first terminal according to the identification information of the first terminal carried by the transmission request, and determines whether to receive the file according to the identification information of the file to be transmitted, for example, the target terminal wants to receive a picture instead of a music file, and if the displayed identification information of the file to be transmitted is that the data format information of the music file is not the identification information of the picture (for example, the identification information with a jpg format as a suffix), the target terminal may refuse to receive the file to be transmitted.
In an embodiment of the application, before the target terminal determines whether to receive the file to be transmitted, the target terminal establishes a search map including at least one terminal according to geographic position information and identification information of the at least one terminal including the first terminal; therefore, when the target terminal determines whether to receive the file to be transmitted, the target terminal can determine to receive the file to be transmitted based on the search map. Here, the target terminal may also establish a search map, where the search map includes at least one terminal including the first terminal, for example, the target terminal searches for the first terminal a and the other terminals B, C through bluetooth search, and the established search map is established according to the geographic location information and the identification information of the first terminal a and the other terminals B, C, and the identification information of the first terminal a and the other terminals B, C and the current geographic location information are displayed on the search map, so that the target terminal can directly operate on the search map and select whether to receive the file to be transmitted sent by the first terminal. Specifically, the search map includes identification information of the first terminal, and when the target terminal determines to receive the file to be transmitted based on the search map, the target terminal may perform message prompting on the search map based on the transmission request based on bluetooth transmission sent by the first terminal, where a position of the message prompting is a position of the identification information of the first terminal in the search map. Here, when the first terminal sends a transmission request to the target terminal, the target terminal receiving the file receives a prompt of sending the file with the head portrait of the first terminal sending the file, for example, on a search map of the target terminal, the head portrait of the first terminal performs message prompting in a mode of jumping or alternating on and off, and the like, so that the target terminal checks the identification information of the first terminal of the message prompting according to the message prompting, judges whether to perform bluetooth matching with the first terminal sending the message prompting, and judges whether to receive the file to be transmitted according to the identification information of the file to be transmitted after the bluetooth matching is established.
In an embodiment of the present application, the identification information of the target terminal includes at least any one of: user name information of a user corresponding to the target terminal and image information uploaded by the user; and the identity identification information and the equipment image information of the target terminal. Here, the user name information of the user corresponding to the target terminal is, for example, a nickname of the user using the target terminal, and the identification information of the target terminal is, for example, machine number information or model information of the target terminal. The Bluetooth of each terminal can be provided with head portrait information and a user name, the head portrait and the nickname of the user can be preferably adopted, and the default head portrait is the image and the machine number of the corresponding terminal. Therefore, when the first terminal sends the transmission request on the search map of the target terminal, the head portrait of the first terminal jumps, so that the user corresponding to the target terminal can conveniently receive the information of the transmission request in time and can feed back the Bluetooth matching in time.
In correspondence with the method described above, the present application also provides a terminal, which includes modules or units capable of executing the method steps described in fig. 1 or fig. 3 or various embodiments, and these modules or units can be implemented by hardware, software or a combination of hardware and software, and the present application is not limited thereto. For example, in an embodiment of the present application, there is also provided a first terminal, where the first terminal includes:
one or more processors; and
a memory storing computer readable instructions that, when executed, cause the processor to perform the operations of the method of figure 1 as previously described.
For example, the computer readable instructions, when executed, cause the one or more processors to:
searching at least one terminal supporting Bluetooth transmission in an effective transmission distance through Bluetooth scanning;
acquiring geographic position information and identification information of the at least one terminal;
determining a target terminal from the at least one terminal according to the geographical position information and the identification information of the at least one terminal;
and sending a transmission request based on Bluetooth transmission to the target terminal, wherein the transmission request is used for requesting to send a file to be transmitted, and the transmission request comprises the identification information of the first terminal and the identification information of the file to be transmitted.
Fig. 4 shows a schematic structural diagram of a first terminal provided according to another aspect of the present application, the first terminal including: the system comprises a scanning device 11, an obtaining device 12, a determining device 13 and a sending request device 14, wherein the scanning device 11 is used for searching at least one second terminal supporting Bluetooth transmission in an effective transmission distance through Bluetooth scanning; the obtaining device 12 is configured to obtain geographic location information and identification information of the at least one second terminal; the determining device 13 is configured to determine a target terminal from the at least one second terminal according to the geographic location information and the identification information of the at least one second terminal; the sending request device 14 is configured to send a transmission request based on bluetooth transmission to the target terminal, where the transmission request is used to request to send a file to be transmitted, and the transmission request includes identification information of the first terminal and identification information of the file to be transmitted.
It should be noted that the content executed by the scanning device 11, the obtaining device 12, the determining device 13 and the sending request device 14 is the same as or corresponding to the content in the above steps S11, S12, S13 and S14, respectively, and for brevity, the description is omitted here.
In an embodiment of the present application, according to yet another aspect of the present application, there is also provided a target terminal, including:
one or more processors; and
a memory storing computer readable instructions that, when executed, cause the processor to perform the operations of the method of fig. 3 as previously described.
For example, the computer readable instructions, when executed, cause the one or more processors to:
sending the geographic position information and the identification information of the target terminal to a first terminal based on the searching operation of the first terminal through Bluetooth scanning;
receiving a transmission request based on Bluetooth transmission sent by the first terminal, wherein the transmission request is used for requesting to send a file to be transmitted, and the transmission request comprises identification information of the first terminal and identification information of the file to be transmitted;
and determining whether to receive the file to be transmitted or not, and sending a feedback result to the first terminal.
Fig. 5 is a schematic diagram illustrating a structure of a target terminal provided according to another aspect of the present application, the target terminal including: the system comprises a sending device 21, a receiving device 22 and a feedback device 23, wherein the sending device 21 is used for sending the geographical position information and the identification information of a target terminal to a first terminal based on the searching operation of the first terminal through Bluetooth scanning; the receiving device 22 is configured to receive a transmission request based on bluetooth transmission sent by the first terminal, where the transmission request is used to request to send a file to be transmitted, and the transmission request includes identification information of the first terminal and identification information of the file to be transmitted; the feedback device 23 is configured to determine whether to receive the file to be transmitted, and send a feedback result to the first terminal.
It should be noted that the content executed by the sending device 21, the receiving device 22 and the feedback device 23 is the same as or corresponding to the content in the above steps S21, S22 and S23, and for brevity, will not be described again.
Furthermore, according to another aspect of the present application, there is provided a computer readable medium having stored thereon computer readable instructions executable by a processor to implement the aforementioned file transfer method based on bluetooth transmission.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
It should be noted that the present application may be implemented in software and/or a combination of software and hardware, for example, implemented using Application Specific Integrated Circuits (ASICs), general purpose computers or any other similar hardware devices. In one embodiment, the software programs of the present application may be executed by a processor to implement the steps or functions described above. Likewise, the software programs (including associated data structures) of the present application may be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Additionally, some of the steps or functions of the present application may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
In addition, some of the present application may be implemented as a computer program product, such as computer program instructions, which when executed by a computer, may invoke or provide methods and/or techniques in accordance with the present application through the operation of the computer. Program instructions which invoke the methods of the present application may be stored on a fixed or removable recording medium and/or transmitted via a data stream on a broadcast or other signal-bearing medium and/or stored within a working memory of a computer device operating in accordance with the program instructions. An embodiment according to the present application comprises an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform a method and/or a solution according to the aforementioned embodiments of the present application.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the apparatus claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.