Summary of the invention
The technical problem to be solved in the present invention is, a kind of sharing files method based on radio communication and wireless communication terminal are provided, overcome in prior art the technology barrier setting up wireless connections when carrying out sharing files, meet the demand of user to equipment room fast sharing file.
The technical solution used in the present invention is, a kind of sharing files method based on radio communication, shares file between first terminal and the second terminal, and the flow process that first terminal performs comprises:
Generating the image in 2 D code that the device name of first terminal is corresponding, carrying out the device name scanning to obtain for setting up the first terminal that radio communication connects for the second terminal;
Answer the request of the second terminal to set up radio communication with the second terminal to be connected;
Connect based on the radio communication set up and carry out file transfer with the second terminal.
Further, the image in 2 D code that the device name of described generation first terminal is corresponding, comprising:
Be encrypted the device name of first terminal, the device name based on the first terminal after encryption generates image in 2 D code.
Further, the flow process that described first terminal performs, also comprises:
After end of file transfer, close radio communication and connect.
Further, the type that radio communication connects be WLAN (WirelessLocalAreaNetworks, WLAN) connect when, the flow process that described first terminal performs, also comprises:
Set up before radio communication is connected answering the request of the second terminal and the second terminal, first terminal opens WLAN hot spot function, and the device name of described first terminal is first terminal as title during WLAN hot spot.
The present invention also provides a kind of sharing files method based on radio communication, between first terminal and the second terminal, share file, and the flow process that the second terminal performs comprises:
Scanned by the image in 2 D code provided first terminal, obtain the device name of first terminal;
Based on the device name of first terminal, request is set up radio communication with first terminal and is connected;
Connect based on the radio communication set up and carry out file transfer with first terminal.
Further, the described image in 2 D code by providing first terminal scans, and obtains the device name of first terminal, comprising:
Scanned by the image in 2 D code provided first terminal, get corresponding data;
Described data deciphering is obtained to the device name of first terminal.
Further, the flow process that described second terminal performs, also comprises:
After end of file transfer, close radio communication and connect.
The present invention also provides a kind of wireless communication terminal, comprises first processor; We's wireless communication terminal is referred to as our terminal, and the other side's wireless communication terminal is referred to as distant terminal;
Described first processor, during for needing as user to carry out sharing files, triggering the image in 2 D code that the device name of the our terminal of generation is corresponding, carrying out the device name scanning to obtain for setting up the our terminal that radio communication connects for distant terminal; Answer the request of distant terminal and distant terminal to set up radio communication to be connected; Connect based on the radio communication set up and carry out file transfer with distant terminal.
Further, described first processor, for:
Be encrypted the device name of our terminal, the device name based on the our terminal after encryption generates image in 2 D code.
Further, when radio communication connect type be WLAN connect, described first processor, also for:
Set up before radio communication is connected answering the request of distant terminal and distant terminal, open WLAN hot spot function, the device name of described our terminal is our terminal as title during WLAN hot spot.
The present invention also provides a kind of wireless communication terminal, comprising: the second processor; The other side's wireless communication terminal is referred to as distant terminal;
Described second processor, for the image in 2 D code provided by scanning distant terminal, obtains the device name of distant terminal; Based on the device name of distant terminal, request is set up radio communication with distant terminal and is connected; Connect based on the radio communication set up and carry out file transfer with distant terminal.
Further, described second processor, for:
Scanned by the image in 2 D code provided distant terminal, get corresponding data;
Described data deciphering is obtained to the device name of distant terminal.
Adopt technique scheme, the present invention at least has following advantages:
Sharing files method based on radio communication of the present invention and wireless communication terminal, to create a file the radio link channel shared based on Quick Response Code, ingenious utilization creates Quick Response Code for user and masks establishment, adds the operations such as connection, and radio communication connection can be created targetedly with the transmission carrying out file, promote the ease for use of wireless communication terminal.
Embodiment
For further setting forth the present invention for the technological means reaching predetermined object and take and effect, below in conjunction with accompanying drawing and preferred embodiment, the present invention is described in detail as after.
First embodiment of the invention, a kind of sharing files method based on radio communication, file is shared between A terminal and B terminal, the A terminal of the embodiment of the present invention is similar to the first terminal of summary of the invention part, B terminal is similar to the second terminal of summary of the invention part, as shown in Figure 1, in the method, the flow process that A terminal performs comprises following concrete steps:
Step S101, generates the image in 2 D code that the device name of A terminal is corresponding, carries out the device name scanning to obtain for setting up the A terminal that radio communication connects for B terminal.
Concrete, in step S101, generate the image in 2 D code that the device name of A terminal is corresponding, comprise following handling process:
Be encrypted the device name of A terminal, the device name based on the A terminal after encryption generates image in 2 D code.
Step S102, answers the request of B terminal to set up radio communication with B terminal and is connected.
Concrete, the type that this radio communication connects comprises: WLAN connects, bluetooth connects and is connected with ZigBee.
When the type that radio communication connects be WLAN connect, set up before radio communication is connected answering the request of B terminal and B terminal, A terminal also needs unlatching WLAN hot spot function, and the device name of this A terminal is A terminal as title during WLAN hot spot.
Step S103, connects based on the radio communication set up and carries out file transfer with B terminal.
Concrete, between A terminal with B terminal based on the radio communication set up be connected carry out file transfer time, the transmitting-receiving for file can be two-way.
Preferably, the flow process of this A terminal execution of the present embodiment, also comprises:
Step S104, after end of file transfer, closes radio communication and connects.
In actual applications, connect create and the operation such as the request of file transfer and response to shield concrete radio communication, user is made to pass through to click file to be sent and the function selected by radio communication Connection Sharing, this file transfers out by the A terminal getting final product activated user use, now, the present embodiment can be designed to: when A terminal is for sending file to B terminal, trigger the flow process that A terminal performs.
As shown in Figure 2, in the method, the flow process that B terminal performs comprises:
Step S201, is scanned by the image in 2 D code provided A terminal, obtains the device name of A terminal;
Concrete, scanned by the image in 2 D code provided A terminal, get corresponding data;
If be not encrypted the device name of A terminal in step S101, then using the described data that obtain after described scanning directly as the device name of A terminal;
If be encrypted the device name of A terminal in step S101, then must obtain the device name of A terminal in step S101 to the described decrypt data obtained after scanning.
Step S202, based on the device name of A terminal, request is set up radio communication with A terminal and is connected;
Concrete, between B terminal with A terminal based on the radio communication set up be connected carry out file transfer time, the transmitting-receiving for file can be two-way.
Step S203, connects based on the radio communication set up and carries out file transfer with A terminal.
Preferably, the flow process of this B terminal execution of the present embodiment, also comprises:
Step S204, after end of file transfer, closes radio communication and connects.
Second embodiment of the invention, a kind of wireless communication terminal, corresponding to the functional role of the A terminal in the first embodiment, as shown in Figure 3, this wireless communication terminal comprises first processor 10; We's wireless communication terminal is referred to as our terminal, and the other side's wireless communication terminal is referred to as distant terminal;
First processor 10, during for needing as user to carry out sharing files, triggering the image in 2 D code that the device name of the our terminal of generation is corresponding, carrying out the device name scanning to obtain for setting up the our terminal that radio communication connects for distant terminal; Answer the request of distant terminal and distant terminal to set up radio communication to be connected; Connect based on the radio communication set up and carry out file transfer with distant terminal.
Preferably, first processor 10, for:
Be encrypted the device name of our terminal, the device name based on the our terminal after encryption generates image in 2 D code.
The type that this radio communication connects comprises: WLAN connects, bluetooth connects and is connected with ZigBee.
When radio communication connect type be WLAN connect, first processor 10, also for:
Set up before radio communication is connected answering the request of distant terminal and distant terminal, open WLAN hot spot function, the device name of described our terminal is our terminal as title during WLAN hot spot.
Third embodiment of the invention, a kind of wireless communication terminal, corresponding to the functional role of the B terminal in the first embodiment, coordinates the wireless communication terminal in the second embodiment to use.As shown in Figure 4, this wireless communication terminal, comprises the second processor 20; The other side's wireless communication terminal is referred to as distant terminal;
Second processor 20, for the image in 2 D code provided by scanning distant terminal, obtains the device name of distant terminal; Based on the device name of distant terminal, request is set up radio communication with distant terminal and is connected; Connect based on the radio communication set up and carry out file transfer with distant terminal.
Concrete, the second processor 20, for:
Scanned by the image in 2 D code provided distant terminal, get corresponding data;
If distant terminal is not encrypted its device name, then the second processor 20 using the described data that obtain after described scanning directly as the device name of distant terminal;
If distant terminal is encrypted its device name, then the second processor 20 must obtain the device name of distant terminal to the described decrypt data obtained after scanning.
Fourth embodiment of the invention, on the basis of above-described embodiment, the present embodiment based on wifi radio connection, 5 application examples introducing a technical solution of the present invention by reference to the accompanying drawings.
The sharing files method flow that mobile terminal device 1 in this application example and mobile terminal device 2 scan based on Quick Response Code, the operating procedure wherein needing user to participate in only in steps 101 and 104.
Step 101, user operation: share at needs or send on the mobile terminal device of file, choose file to be shared, click " Quick Response Code is shared (transmission) " function button, in triggered step 102, this mobile terminal is as the handling process of sending ending equipment;
Step 102, sending ending equipment daemon software operates: sending ending equipment creates function on backstage from building up wifi hotspot by the wifi hotspot of software transfer Android system, the title of the wifi hotspot set up is changed into the name of setting, coding is encrypted, generating feature character string by the name of pre-configured private key file to setting.
Step 103, sending ending equipment daemon software operates: sending ending equipment leads at backstage startup Quick Response Code encoding function, generates corresponding two-dimension code image, be presented on the screen of sending ending equipment based on the feature string obtained in step 102;
Step 104, user operation: receiving device clicks the corresponding button by user, opens " Quick Response Code is shared (reception) " function triggered step 105 and following consistency operation;
Step 105, consistency operation: receiving device backstage starts Quick Response Code scan function, the two-dimension code image that scanning sending ending equipment generates, through function process, returns the feature string information comprised in two-dimension code image;
Step 106, consistency operation: receiving device opens wifi function by the enableWifi () function calling Android system, carries out search sweep to the focus of current existence, hotspot list available near returning;
Step 107, consistency operation: receiving device is decrypted the feature string that Quick Response Code parses based on pre-configured decoding key, obtains the title that the wifi hotspot of sending ending equipment is corresponding;
Step 108, carries out matching ratio comparatively by the hotspot list obtained in title corresponding for the wifi hotspot of the sending ending equipment of acquisition and step 106, if find the character string of coupling, then jumps to step 109; If do not find the character string of mating, forward step 106 to, the focus of surrounding is carried out to the search of a new round.
Step 109, consistency operation: receiving device adds the focus of coupling automatically, successfully sets up wifi with transmitting terminal and is connected, and sends handshake to sending ending equipment, and request the other side sends file;
Step 110, consistency operation: listed files is sent to receiving device after receiving successful connection message that receiving device sends and sending the request of file by sending ending equipment together with end mark;
Step 111, consistency operation: receiving device receives the file that sending ending equipment is sent, if detect in the document flow sended over and include end mark, then representative reception file is complete, receiving device sends message to transmitting terminal, makes it close focus, and the disableWifi function of calling system closes wifi function simultaneously, restPose, whole flow process terminates;
Mobile terminal device, when carrying out sharing files operation, carries out complicated connection creation operation without the need to user, can realize sharing of file voluntarily by technique scheme.
This application example comprises: software transmitting terminal and receiving terminal two mobile device terminal and terminal with independent intellectual property right, is shared file between mobile device, provides one-stop service.Whole process does not need internet environment, and send channel by peculiar secret key encryption, the privacy of exchanging file both sides is greatly ensured.Transmitting terminal user only needs select File and clicks to send button, and remaining operation is completely performed on backstage by the software realizing this method, and equally, receiving terminal user also only needs to click to receive button, and remaining operation, also automatically performs.User need not be concerned about and creates file transfer passage, document transmission process, and is transmitted the details that rear mobile device restPoses.
The sharing files method based on radio communication of the embodiment of the present invention and wireless communication terminal, to create a file the radio link channel shared based on Quick Response Code, ingenious utilization creates Quick Response Code for user and masks establishment, adds the operations such as connection, and radio communication connection can be created targetedly with the transmission carrying out file, promote the ease for use of wireless communication terminal.
By the explanation of embodiment, should to the present invention for the technological means reaching predetermined object and take and effect be able to more deeply and concrete understanding, but appended diagram be only to provide with reference to and the use of explanation, be not used for being limited the present invention.