File sharing method, device and mobile device
Technical field
The present invention relates to data sharing field, more particularly to a kind of file sharing method, device and mobile device.
Background technology
With the development that science and technology is at full speed, various mobile devices are constantly abundant and facilitate popular life.Due to profit
There is the advantages such as convenient and swift, saving resource with utilizing mobile devices to process information so that mobile device turns into life or the work of people
An indispensable part in work.
Wherein, user can be logged on internet some websites by the browser in mobile device, by required application
Installation kit download to the local of mobile device and then install.For example, user downloads the peace for the list Games Software that apotheosizes from APP websites
Dress bag, then after the installation kit of the locally-installed list Games Software that apotheosizes, user can be played with starting to play.
And if the user desired that this application is shared with into friend at one's side, he can tell the title of friend's application with
And download site, so that the friend can log in browser to search the website, and then download the installation kit of the application.When
So, the friend can also be scanned by mobile device and be illustrated in the two dimension on the application shown in the mobile device of the user
Code, so as to download the installation kit of the application.
But the method for above-mentioned shared file, it is very troublesome, bring inconvenience to user.Such as:User pushes away software
Recommend to after friend, friend is difficult just to settle download in a short time, and downloads file and can also produce surfing flow;And user exists
When downloading the file of larger byte number, to save flow, just downloaded when often selection has wlan network, if run into temporarily
When can not surf the Net in the case of, it is impossible to realize sharing files immediately.
The content of the invention
Based on above mentioned problem, the embodiment of the invention discloses a kind of file sharing method, device and mobile device, with altogether
On the premise of enjoying file reception end and need not installing any software or plug-in unit for possessing file-sharing function, by not producing network flow
The mode of amount is quickly shared file, so as to improve the usage experience of user.Technical scheme is as follows:
In a first aspect, the embodiments of the invention provide a kind of file sharing method, suitable for the first mobile device, the side
Method includes:
Obtain the shared instruction for file to be shared;
After the network share function on of first mobile device, the second mobile device with asking network share
Carry out network connection;
The network request based on browser that second mobile device is sent is intercepted and captured and redirected, file to be shared is made
For request results corresponding to the network request and send to second mobile device.
Preferably, before second mobile device with request network share carries out network connection, methods described is also wrapped
Include:
Start the network share function of first mobile device.
Preferably, during application is in opening, it is used to indicate altogether based on what the application was sent when detecting
When enjoying the operation of file, the shared instruction for being directed to file to be shared is obtained, wherein, the file to be shared is the application
Corresponding file.
Preferably, when detecting the operation for indicating shared file, obtain described for the shared of file to be shared
Instruction;
As request results corresponding to the network request and sent using file to be shared to second mobile device
Before, methods described also includes:
File selection interface is shown, shared file is needed with instruction user selection, wherein, in the file selection page
The sharable file stored comprising first mobile device;
Using the shared file of the needs selected by the user as file to be shared.
Preferably, after the shared instruction for file to be shared is obtained, methods described also includes:
Obtain the shared installation webpage of file to be shared;Wherein, it is common comprising being treated described in sensing in the shared installation webpage
Enjoy the download link of file;
Accordingly, it is described as request results corresponding to the network request and to send file to be shared to described second
Mobile device, including:
The shared installation webpage as request results corresponding to the network request and is sent to the described second movement
Equipment;
Formed in the download link based on the shared installation webpage for receiving the second mobile device transmission
After download request, file to be shared corresponding to the download request is sent to second mobile device.
Preferably, during application is in opening, it is used to indicate altogether based on what the application was sent when detecting
When enjoying the operation of file, the shared instruction for being directed to file to be shared is obtained, wherein, the file to be shared is the application
Corresponding file;
Accordingly, the shared installation webpage for obtaining file to be shared, including:
Shared installation webpage built-in in advance in the application is obtained, wherein, include sensing in the shared installation webpage
The download link of the file to be shared.
Preferably, when detecting the operation for indicating shared file, obtain described for the shared of file to be shared
Instruction;
Accordingly, the shared installation webpage for obtaining file to be shared, including:
File selection interface is shown, shared file is needed with instruction user selection, wherein, in the file selection page
The sharable file stored comprising first mobile device;
Using the shared file of the needs selected by the user as file to be shared, and generate and be directed to the text to be shared
The shared installation webpage of part, wherein, include the download link for pointing to the file to be shared in the shared installation webpage.
Preferably, the network request based on browser intercepted and captured and redirected second mobile device and send, bag
Include:
Intercept and capture the network request based on browser that second mobile device is sent;
Judge whether the network request is first network request set in advance;
When judging that the network request is asked for first network set in advance, the network request is reset
To processing.
Preferably, when the current user name of the operating system of first mobile device has administrator right, pass through
The regular mode of iptables in the operating system of first mobile device is set, intercepts and captures and redirects described second and move
The network request based on browser that dynamic equipment is sent.
Preferably, the regular process of the iptables in the operating system of first mobile device is set, including:
Net based on browser of the increase to second mobile device in the iptables of first mobile device
The target first port of network request is monitored and moved what is intercepted by described the second of first mobile device
The network request based on browser that dynamic equipment is sent is redirected to the rule of the predetermined second port of first mobile device
Then;
Accordingly, the network request based on browser intercepted and captured and redirected second mobile device and send, bag
Include:
The target first port of the network request based on browser of second mobile device is monitored, and intercepts and captures warp
The network request based on browser that second mobile device of first mobile device is sent is crossed, and then will be intercepted
Network request be redirected to the second port of first mobile device, with by the second port by the network request
Corresponding request results are simultaneously sent to second mobile device.
Preferably, when the current user name of the operating system of first mobile device has administrator right, pass through
The mode for the kernel module that carry is write, intercept and capture and redirect the network based on browser that second mobile device is sent
Request.
Preferably, the process for the kernel module that the carry is write, including:
The kernel module write using netfilter frameworks is mounted in the operating system of first mobile device
In core, a hook points are set up to realize in IP layers in the network architecture, wherein, intercepted by the hook points by described the
The target port of one mobile device is the network request of second mobile device of predetermined first port, and can be by described in
Purpose IP in network request is revised as the IP address of first mobile device and destination interface is revised as into first shifting
The predetermined second port of dynamic equipment;
Accordingly, the network request based on browser intercepted and captured and redirected second mobile device and send, bag
Include:
Intercepted by the hook points by the target port of first mobile device as described in the first port
The network request based on browser that second mobile device is sent, and the purpose IP address in the network request is revised as institute
The IP address of the first mobile device is stated, destination interface is revised as the second port of first mobile device, to pass through
Second port is stated to send request results corresponding to the network request to second mobile device.
Preferably, when the current user name of the operating system of first mobile device does not have administrator right, institute
Stating method also includes:
After the shared instruction for file to be shared is obtained, displaying includes the IP address of first mobile device itself
With the page of access mode, to indicate that user is in the browser of second mobile device corresponding to second mobile device
Address field in input first mobile device IP address;Accordingly, it is described intercept and capture and redirect it is described second movement set
The network request based on browser that preparation is sent, including:
By WEB modules built-in in first mobile device obtain second mobile device based on browser
Network request.
Preferably, second mobile device with request network share carries out network connection, including:
Instruction user selects sharable second mobile device from the second mobile device of request network share;
Network connection is carried out with selected sharable second mobile device.
Preferably, after second mobile device with request network share carries out network connection, methods described is also wrapped
Include:
Instruction user selects sharable second mobile device from the second equipment in network connection state;
The network request based on browser intercepted and captured and redirected second mobile device and send, including:
Intercept and capture the network request based on browser that second mobile device is sent;
Judge whether second mobile device is sharable second mobile device, if it is, redirecting described second
The network request based on browser that mobile device is sent.
Preferably, network share function possessed by first mobile device includes:WLAN hot spot function, blueteeth network
At least one of sharing functionality and USB network sharing functionality.
Preferably, the network share function of starting in first mobile device, including:
WLAN hot spot function is judged whether, if it is, starting the WLAN hot spot function;Otherwise,
Blueteeth network sharing functionality is judged whether, if it is, starting the blueteeth network sharing functionality;Otherwise, open
Move the USB network sharing functionality.
Preferably, the shared installation webpage of corresponding one of the file to be shared, wherein, the shared installation webpage, which includes, to be referred to
To the download link at least one operating system of file to be shared, each download link direction needle is for one kind operation system
The file to be shared of system;
Accordingly,
It is described to send file to be shared corresponding to the download request to second mobile device, including:
According to the download request, the first operating system that second mobile device is run is determined;
Sent to second mobile device corresponding to the download request, be directed to treating altogether for first operating system
Enjoy file;
Or
The file to be shared corresponds at least one shared installation webpage, wherein, each shared installation webpage, which includes, to be pointed to
File to be shared is directed to a kind of download link of operating system;
Accordingly, it is described as request results corresponding to the network request and to send the shared installation webpage to institute
The second mobile device is stated, including:
According to the network request, the first operating system that second mobile device is run is determined;
Will corresponding to first operating system share installation webpage as request results corresponding to the network request simultaneously
Send to second mobile device.
Second aspect, the embodiment of the present invention additionally provide a kind of file sharing device, described suitable for the first mobile device
File sharing device includes:
Shared instruction acquisition module, for obtaining the shared instruction for file to be shared;
Network connecting module, for after the network share function on of first mobile device, with asking network
The second shared mobile device carries out network connection;
Network request processing module, the net based on browser sent for intercepting and capturing and redirecting second mobile device
Network is asked;
Document processing module to be shared, for file to be shared is concurrent as request results corresponding to the network request
Deliver to second mobile device.
Preferably, the file sharing device also includes:
Network share function activation module, for ask network share the second mobile device carry out network connection it
Before, the network share function of startup first mobile device.
Preferably, the shared instruction acquisition module, including:
First shared instruction acquiring unit, during being in opening in application, answered when detecting based on described
With sending when being used to indicate the operation of shared file, the shared instruction for file to be shared is obtained, wherein, it is described to be shared
File is file corresponding to the application.
Preferably, the shared instruction acquisition module, including:
Second shared instruction acquiring unit, for when detecting the operation for indicating shared file, obtaining for treating
The shared instruction of shared file;
Described device also includes:
File determining module to be shared, for using file to be shared as request results corresponding to the network request simultaneously
Send to before second mobile device, show file selection interface, shared file is needed with instruction user selection, its
In, include the sharable file that first mobile device is stored in the file selection page;By selected by the user
The file that the needs selected are shared is as file to be shared.
Preferably, the file sharing device also includes:
Shared installation webpage acquisition module, for after the shared instruction for file to be shared is obtained, obtaining and treating altogether
Enjoy the shared installation webpage of file;Wherein, the download link for pointing to the file to be shared is included in the shared installation webpage;
Accordingly, the document processing module to be shared, including:
Shared installation webpage transmitting element, for using the shared installation webpage as request corresponding to the network request
As a result and send to second mobile device;
Document handling unit to be shared, for receiving that second mobile device sends based on the shared installation
After the download request that the download link of webpage is formed, send to second mobile device and treated altogether corresponding to the download request
Enjoy file.
Preferably, the shared instruction acquisition module, including:
First shared instruction acquiring unit, during being in opening in application, answered when detecting based on described
With sending when being used to indicate the operation of shared file, the shared instruction for file to be shared is obtained, wherein, it is described to be shared
File is file corresponding to the application;
Accordingly, the shared installation webpage acquisition module, including:
First shared installation webpage acquiring unit, for after the shared instruction for file to be shared is obtained, obtaining
Shared installation webpage built-in in advance in the application;Wherein, the sensing text to be shared is included in the shared installation webpage
The download link of part.
Preferably, the shared instruction acquisition module, including:
Second shared instruction acquiring unit, for when detecting the operation for indicating shared file, obtaining for treating
The shared instruction of shared file;
Accordingly, the shared installation webpage acquisition module, including:
Second shared installation webpage acquiring unit, after obtaining the shared instruction for file to be shared, displaying text
Part selection interface, file to be shared is selected with instruction user, wherein, set in the file selection page comprising the described first movement
The standby sharable file stored;After file to be shared is chosen, generation is for the shared of the file to be shared
Webpage is installed;Wherein, the download link for pointing to the file to be shared is included in the shared installation webpage.
Preferably, the network request processing module, including:
Network request intercepts and captures unit, the network request based on browser sent for intercepting and capturing second mobile device;
Judging unit, for judging whether the network request is first network request set in advance;
Network request redirects unit, judges that the network request is asked for first network set in advance for working as
When, the network request is redirected into processing.
Preferably, the network request processing module, the current use for the operating system when first mobile device
When name in an account book has administrator right, the regular side of the iptables in operating system by setting first mobile device
Formula, intercept and capture and redirect the network request based on browser that second mobile device is sent.
Preferably, the network request processing module is used for as the active user of the operating system of first mobile device
Name is when having administrator right, by way of the kernel module that carry is write, intercepts and captures and redirects described second and move and set
The network request based on browser that preparation is sent.
Preferably, the file sharing device also includes:
Page presentation module, for after the shared instruction for file to be shared is obtained, displaying to move comprising described first
The IP address of dynamic equipment itself and the page of access mode, to indicate that user is described second corresponding to second mobile device
The IP address of input first mobile device in address field in the browser of mobile device;
The network request processing module is used for when the current user name of the operating system of first mobile device does not have
When having administrator right, by WEB modules built-in in first mobile device obtain second mobile device based on
The network request of browser.
Preferably, the network connecting module, including:
Selecting unit, sharable second is selected to move from the second mobile device of request network share for instruction user
Dynamic equipment;
Network connection unit, for carrying out network connection with selected sharable second mobile device.
Preferably, the file sharing device also includes:
Selecting module, for ask network share the second mobile device carry out network connection after, instruction user from
Sharable second mobile device is selected in the second equipment in network connection state;
The network request processing module, including:
Network request intercepts and captures unit, the network request based on browser sent for intercepting and capturing second mobile device;
Network request processing unit, for judging whether second mobile device is sharable second mobile device,
If it is, redirect the network request based on browser that second mobile device is sent.
Preferably, network share function possessed by first mobile device includes:WLAN hot spot function, blueteeth network
At least one of sharing functionality and USB network sharing functionality.
Preferably, the network share function activation module is used to judge whether WLAN hot spot function, if it is, opening
Move the WLAN hot spot function;Otherwise, it is determined whether blueteeth network sharing functionality be present, if it is, starting the blueteeth network
Sharing functionality;Otherwise, the USB network sharing functionality is started.
Preferably, the shared installation webpage of corresponding one of the file to be shared, wherein, the shared installation webpage, which includes, to be referred to
To the download link at least one operating system of file to be shared, and each download link direction needle operates for one kind
The file to be shared of system;
The document handling unit to be shared, including:
Operating system determination subelement, for passing through the shared installation webpage receiving second mobile device
After the download request that download link is sent, according to the download request, the first behaviour that second mobile device is run is determined
Make system;
File transmission sub-unit to be shared, for being sent to second mobile device corresponding to the download request, pin
For the file to be shared of first operating system;
Or
The file to be shared corresponds at least one shared installation webpage, wherein, each shared installation webpage, which includes, to be pointed to
File to be shared is directed to a kind of download link of operating system;
The shared installation webpage transmitting element, including:
Operating system determination subelement, for according to the network request, determining the of the second mobile device operation
One operating system;
Shared installation webpage transmission sub-unit, for installation webpage will to be shared corresponding to first operating system as institute
State request results corresponding to network request and send to second mobile device.
The third aspect, the embodiment of the present invention additionally provide a kind of mobile device, including:What the embodiment of the present invention was provided appoints
One file sharing device.
In this programme, the second mobile device need not install any software for possessing file-sharing function before shared file
Or plug-in unit, and the first mobile device can intercept and capture the network request based on browser and the redirection of the second mobile device transmission,
And then sent file to be shared as request results corresponding to network request to the second mobile device, realize in shared file
On the premise of receiving terminal need not install any software or plug-in unit for possessing file-sharing function, by the side for not producing network traffics
Formula is quickly shared file, so as to improve the usage experience of user.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
A kind of the first flow chart for file sharing method that Fig. 1 is provided by the embodiment of the present invention;
A kind of second of flow chart of file sharing method that Fig. 2 is provided by the embodiment of the present invention;
A kind of the third flow chart for file sharing method that Fig. 3 is provided by the embodiment of the present invention;
A kind of 4th kind of flow chart of file sharing method that Fig. 4 is provided by the embodiment of the present invention;
A kind of structural representation for file sharing device that Fig. 5 is provided by the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made
Embodiment, belong to the scope of protection of the invention.
In order to shared file receiving terminal need not install it is any possess the software or plug-in unit of file-sharing function on the premise of,
File is quickly shared by way of not producing network traffics, so as to improve the usage experience of user, the embodiment of the present invention provides
A kind of file sharing method, device and mobile device.
A kind of file sharing method that the embodiment of the present invention is provided is introduced first below.
Wherein, a kind of file sharing method that the embodiment of the present invention is provided is applied to first with network share function
Mobile device, wherein, network share function possessed by first mobile device includes:WLAN hot spot function, blueteeth network are common
Enjoy at least one of function and USB network sharing functionality.It is understood that in actual applications, first mobile device
Can be mobile phone, notebook computer, tablet personal computer etc..
Also, the functional software for realizing file sharing method can be sharing functionality module built-in in a certain application,
Can be present in by card format in a certain application, can also be certainly in the first mobile device be used for text is provided
The client software of part sharing functionality, this is all rational.In order to make it easy to understand, illustrate:First mobile device is apple
Mobile phone, the mobile phone are mounted with the list game application that apotheosizes, while can the in store list game that apotheosizes under some specific file
The installation kit of application;When user wishes to apotheosize list game recommdation to friend and helps friend to install the list game application that apotheosizes
When, the installation kit of the list game application that apotheosizes is file to be shared, wherein, realize the functional software of the sharing method of the installation kit
Can be the sharing functionality module to apotheosize in list game application, can also be present in by card format apotheosize list game should
In, it is, of course, also possible to be separated with the list game application that apotheosizes, the client that another is used to provide file-sharing is soft
Part, this is all rational.
As shown in figure 1, a kind of file sharing method, can include:
S101, obtain the shared instruction for file to be shared;
When needing the file-sharing of the first mobile device into the second mobile device, hold the use of the first mobile device
Family can carry out specific operation to send shared instruction, so that first mobile device can be obtained for text to be shared
The shared instruction of part.
For example:Functional software for realizing file sharing method is sharing functionality module built-in in a certain application
Or be present in by card format for the situation in a certain application, during application is in opening, when detecting base
When the operation for indicating shared file that the application is sent, the shared instruction for file to be shared is obtained, wherein, this is treated
Shared file is the file corresponding to the application;Such as:Hold the first mobile device user click on be shown in opened should
After the button of " one-key sharing " in a certain page, first mobile device obtains the shared finger for file to be shared
Order, wherein, the file to be shared is installation kit corresponding to the application in opening, is not limited thereto certainly.
For example:Functional software for realizing file sharing method is to be used to carry in the first mobile device
For the situation of the client software of file-sharing function, when detecting the operation for indicating shared file, pin is obtained
Treat the shared instruction of shared file;For example, after user clicks on the button of " key is shared " in client software, first shifting
Dynamic equipment obtains the shared instruction for file to be shared, is not limited thereto certainly.
It should be noted that for the sake of security, for indicating that the button of shared file can be following after being pressed
Heavy, and after pressing again, button will upspring, while by the closing of the network share function of first mobile device.
S102, after the network share function on of first mobile device, the second movement with asking network share
Equipment carries out network connection;
After first mobile device starts network share function, hold the second mobile device user can by this
Two mobile devices can scan first mobile device, and then ask network share, and first mobile device can be with request
Second mobile device of network share carries out network connection.
It will be appreciated by persons skilled in the art that first mobile device is obtaining the shared finger for file to be shared
, can be with the network share function of automatic start itself after order.It is of course also possible to obtaining the shared instruction for file to be shared
Afterwards, the page for the manually opened network share function of instruction user is shown, with the manually operated startup network of instruction user oneself
Sharing functionality.Wherein, network share function to manually boot process different according to different types, such as:In Samsung mobile phone
In, user selects " setting " at interface, selection " wireless and network ", further selects " network sharing and portable focus ",
It is then turned on " portable WLAN hot spot ".
It should be noted that network share function possessed by first mobile device can include:WLAN hot spot function,
At least one of blueteeth network sharing functionality and USB network sharing functionality.
Wherein, use habit and convenience based on user, the network share function in first mobile device is started,
It can include:
WLAN hot spot function is judged whether, if it is, starting the WLAN hot spot function;Otherwise,
Blueteeth network sharing functionality is judged whether, if it is, starting the blueteeth network sharing functionality;Otherwise, start
The USB network sharing functionality.
It will be appreciated by persons skilled in the art that the above-mentioned selecting sequence on heterogeneous networks sharing functionality as just
Example, the restriction to the embodiment of the present invention should not be formed.
S103, intercept and capture and redirect the network request based on browser of second mobile device transmission;
Wherein, after the second mobile device and the first mobile device network connection, user can be in the second mobile device
The arbitrary address information of input in the address field of browser, and the second mobile device is after the address information is detected, Ke Yisheng
Into corresponding network request, and the network request based on browser generated is sent to first mobile device;And this first
Mobile device can be intercepted and captured and redirect the network request based on browser of second mobile device transmission, and then will subsequently treat
Shared file is as request results corresponding to the network request and is sent to second mobile device.Wherein it is possible to understand,
The network request can be:HTTP request or FTP requests, are not limited thereto certainly;The arbitrary address information can be real
The network address of necessary being in border, such as:Www.kingsoft.com, kingsoft.com etc. or random word
Symbol, such as:1st, a etc., this is all rational.
It will be appreciated by persons skilled in the art that the current user name of the operating system of the first mobile device can be tool
There is administrator right, or not with administrator right.Wherein, the current user name of the operating system of the first mobile device
Whether there is administrator right, by cause corresponding intercepting and capturing and redirect second mobile device transmission based on browser
The mode of network request is different.
For example, can for the current user name of the operating system of the first mobile device has administrator right
By the iptables in the operating system by setting first mobile device it is regular in a manner of, intercept and capture and redirect this second
The network request based on browser that mobile device is sent, it can also be intercepted and captured by way of the kernel module that carry is write
And redirect the network request based on browser of second mobile device transmission.
It will be appreciated by persons skilled in the art that for set iptables rule realize intercept and capture and redirect and
Speech, because operating system aspect is all to service end(The first mobile device such as shared end)Network request(Such as include
The TCP requests of HTTP request, FTP requests etc.)Iptables filterings will be first passed through, therefore, can be in first mobile device
Iptables in increase the target first port of the network request based on browser of second mobile device is monitored,
And the network request based on browser for sending second mobile device by first mobile device intercepted
It is redirected to the rule of the predetermined second port of first mobile device;And the kernel module for being write by carry
For mode is intercepted and captured and redirected, the kernel module write using netfilter frameworks can be mounted to first movement
In the operating system nucleus of equipment, a hook points are set up to realize in the IP layers in the network architecture, wherein, pass through the hook points
The network request for second mobile device of predetermined first port by the target port of first mobile device is intercepted,
And the purpose IP in the network request can be revised as the IP address of first mobile device and destination interface is revised as this
The predetermined second port of first mobile device.
Based on above-mentioned set-up mode, for the iptables's in the operating system by setting first mobile device
The mode of rule, it is specific to cut for intercepting and capturing and redirecting the network request based on browser that second mobile device is sent
The process for obtaining and redirecting can be as follows:
The target first port of the network request based on browser of second mobile device is monitored, and is intercepted and captured by this
The network request based on browser that second mobile device of first mobile device is sent, and then please by the network intercepted
Seek the second port for being redirected to first mobile device, with by the second port by request results corresponding to the network request
And send to second mobile device.
Based on above-mentioned set-up mode, for by way of the kernel module that carry is write, intercepting and capturing and redirecting institute
For the network request based on browser for stating the transmission of the second mobile device, specific simultaneously redirection process of intercepting and capturing can include:
Second movement by the target port of first mobile device for the first port is intercepted by the hook points
The network request based on browser that equipment is sent, and the purpose IP address in the network request is revised as first movement and set
Standby IP address, destination interface are revised as the second port of first mobile device, with by the second port by the network
Request results corresponding to request are sent to second mobile device.
Wherein, it will be appreciated by persons skilled in the art that the target first port can be 80 ports, and second end
Mouth can be other ports that can send data content different from 80 ports.
It should be noted that for the first mobile device operating system current user name do not have administrator right and
Speech, after the shared instruction for file to be shared is obtained, first mobile device can show the IP address comprising itself
With the page of access mode, with indicate the second mobile device corresponding to address field of the user in the browser of the second mobile device
The interior IP address for inputting first mobile device, accordingly, built-in WEB modules can automated to respond in the first mobile device, with
The network request based on browser of second mobile device is obtained by WEB modules built-in in first mobile device, is entered
And carry out the forwarding step of follow-up shared installation webpage.
It should be noted that iptables is IOS and the IP packet filtration systems integrated based on linux kernel, its
In, using the operating system of linux kernel have at present Android, Access Linux, Android, LiMo, Maemo,
The operating systems such as Mobilinux, Moblin, MotoMagx, Openmoko, WebOS, Qt Extended, Ubuntu Mobile;
Also, above-mentioned intercepting and capturing simultaneously redirect the mode of the network request based on browser of second mobile device transmission as just showing
Example, should not form the restriction to the embodiment of the present invention.
S104, file to be shared as request results corresponding to the network request and is sent to second mobile device.
After it will intercept and capture and redirect the network request based on browser of the second mobile device transmission, this can be treated altogether
File is enjoyed to send to the second mobile device as request results corresponding to the network request and by corresponding port, and second moves
Dynamic equipment can be saved in particular memory location under the instruction in user after receiving the file to be shared or be installed to second
In mobile device, it is achieved thereby that file is shared.
It should be noted that it is the visitor for providing file-sharing function for the functional software for realizing file sharing method
For the situation of family end software, in order to determine file to be shared, asked using file to be shared as corresponding to the network request
Seek result and send to before second mobile device, methods described can also include:File selection interface is shown, to indicate to use
Family selection needs shared file, wherein, stored in this document selection page comprising first mobile device sharable
File;Using the shared file of the needs selected by the user as file to be shared.It will be appreciated by persons skilled in the art that
As long as the step of determining file to be shared as request results corresponding to the network request and sends extremely using file to be shared
Can before the step of second mobile device, certainly, in order to provide the usage experience that user operates continuity, it can obtain
The step of determining file to be shared is immediately performed after the step of taking the shared instruction for file to be shared, and is operated from user
Angle for, after the button that user clicks on for indicating shared file, mobile device will show file selection interface, with
The shared file of instruction user selection needs, and the file shared needed for user's selection.
In this programme, the second mobile device need not install any software for possessing file-sharing function before shared file
Or plug-in unit, and the first mobile device can intercept and capture the network request based on browser and the redirection of the second mobile device transmission,
And then sent file to be shared as request results corresponding to network request to the second mobile device, realize in shared file
On the premise of receiving terminal need not install any software or plug-in unit with file-sharing function, by the side for not producing network traffics
Formula is quickly shared file, so as to improve the usage experience of user.Also, by using this programme, additionally it is possible to reach following effect
Fruit:(1)Either as shared machine the first mobile device still the second mobile device as client computer without shifting
Dynamic network and internet realize that file transmits;(2)One key clicking operation is simple, how is concerned about how to set focus without user
Focus is accessed, the file of correlation how is obtained from shared machine;(3)Support more people while share;(4)It is shared to realize that speed is fast;
(5)It is adapted to the popularization of freeware to propagate;(6)Network need not be searched for and find installation source;(7)It is existing in shared machine due to obtaining
Installation file, without user differentiate installation software whether safety;(8)Without route or AP;(9)Machine and visitor need not be shared
Family machine is in the same network segment;(10)Without PC as transfer;(11)Without link cable;(12)Number is exchanged without storage card
According to.
It should be noted that may be run due to the operating system of first mobile device operation with the second mobile device
Operating system is different, and therefore, for same application, the installation kit that both should install is different, for example, the first movement is set
Received shipment row IOS systems(The handheld equipment operating system developed by Apple Inc.), and the second mobile device operation Android systems
System, now, for file to be shared is the installation kit of application, the first mobile device needs the installation suitable for IOS systems
Bag, and the second mobile device needs the installation kit suitable for android system, therefore, in order to realize the first mobile device for the
Two mobile devices provide the file for meeting operating system, and first mobile device can be prestored needed for different operating system
File, and then the file for meeting operating system needed for the second mobile device is transmitted as file to be shared.
Further, in order to improve redirection efficiency, intercept and capture and redirect second mobile device transmission based on clear
Look at the network request of device, can include:
Intercept and capture the network request based on browser of second mobile device transmission;
Judge whether the network request is first network request set in advance;
When judging that the network request is asked for first network set in advance, the network request is redirected into place
Reason.
It should be noted that first network request can be set according to actual conditions, do not limit herein;Also, work as
Judge the network request for first network set in advance request when, first mobile device can be this second movement set
It is standby that content corresponding to the network request is downloaded from network and feeds back to second mobile device.
Further, according to the actual requirements specific second mobile device can be selected to carry out file-sharing, selection course
It can occur during network connection, can also occur after network connection.Wherein, occur for selection course in net
Situation during network connection, with asking the second mobile device of network share to carry out network connection, it can include:
Instruction user selects sharable second mobile device from the second mobile device of request network share;
Network connection is carried out with selected sharable second mobile device.
And for selection course occurs in the case of after network connection,
After the second mobile device with asking network share carries out network connection, this document sharing method can also wrap
Include:
Instruction user selects sharable second mobile device from the second equipment in network connection state;
Accordingly, intercept and capture and redirect the network request based on browser of second mobile device transmission, can include:
Intercept and capture the network request based on browser of second mobile device transmission;
Judge whether second mobile device is sharable second mobile device, if it is, redirecting second movement
The network request based on browser that equipment is sent.
It should be noted that the equipment mark of the second mobile device of request network connection can be shown by tabular form
Know or the device identification of the second equipment in network connection state, and instruction user chooses required device identification, so as to complete
The selection of paired sharable second mobile device;It is of course also possible to shown by the form for being distributed display device thumbnail
The second mobile device of network connection or the second equipment in network connection state are asked, and user can pass through slide
, as sharable second mobile device, it can also pass through in the second mobile device corresponding to slide in glide direction
The mode for clicking on thumbnail selects sharable second mobile device, such as:Receive user A slip gesture instruction(Point to
The left side)Afterwards, the equipment B for being shown in left side is sharable equipment;Receive user A slip gesture instruction(Point to the right)
Afterwards, the equipment C for being shown in right side is sharable equipment.
Certainly, when carrying out network connection as a specific embodiment, the first mobile device and the second mobile device, first
Equipment can generate password, and the second mobile device is by inputting password, by verifying that rear can access the net of the first mobile device
Network, so as to ensure the security of network connection.
Based on above method embodiment, the embodiment of the present invention additionally provides a kind of file sharing method, to be selected in user
File to be shared is sent when downloading file to be shared, so as to further improve the usage experience of user.
Likewise, a kind of file sharing method for being provided of the embodiment of the present invention is applied to the with network share function
One mobile device, wherein, network share function possessed by first mobile device includes:WLAN hot spot function, blueteeth network
At least one of sharing functionality and USB network sharing functionality.It is understood that in actual applications, first movement is set
Standby can be mobile phone, notebook computer, tablet personal computer etc..
Also, the functional software for realizing file sharing method can be sharing functionality module built-in in a certain application,
Can be present in by card format in a certain application, can also be certainly in the first mobile device be used for text is provided
The client software of part sharing functionality, this is all rational.
As shown in Fig. 2 a kind of file sharing method, can include:
S201, obtain the shared instruction for file to be shared;
In the embodiment of the present invention, in step S201 and above-described embodiment, step S101 is similar, and therefore not to repeat here.
S202, obtain the shared installation webpage of file to be shared;
Wherein, after acquisition is directed to the shared instruction of file to be shared, the shared installation of file to be shared can be obtained
Webpage, wherein, the shared installation webpage includes the download link for pointing to file to be shared.
It should be noted that it is sharing functionality built-in in a certain application for the functional software for realizing file sharing method
Module is present in for the situation in a certain application by card format, obtains the shared installation webpage of file to be shared, can
With including:Shared installation webpage built-in in advance in being applied;And for realizing the functional software of file sharing method as peace
For the situation for the client software for providing file-sharing function in the first mobile device, because targeted is treated
The All Files that the range of choice of shared file can be stored by the first mobile device, therefore, obtain being total to for file to be shared
Installation webpage is enjoyed, can be included:File selection interface is shown, shared file is needed with instruction user selection, wherein, this document
The sharable file stored in the selection page comprising first mobile device;By the shared text of the needs selected by the user
Part generates the shared installation webpage for file to be shared as file to be shared.
Further, it is necessary to which explanation, can be directed in acquisition the step of the shared installation webpage for obtaining file to be shared
It is immediately performed after the shared instruction of file to be shared, is not limited thereto certainly, as long as ensures to send altogether to the second mobile device
Obtained before enjoying installation webpage, such as:Can follow-up intercepting and capturing and redirect second mobile device transmission based on
Performed after the step of network request of browser, can also be in the follow-up network share function of starting first mobile device
The step of after perform.
Certainly, for realizing that the functional software of file sharing method is for providing text in the first mobile device
, can be after the step of obtaining the shared instruction for file to be shared for the situation of the client software of part sharing functionality
The step of being immediately performed the shared installation webpage for obtaining file to be shared, and for the angle of user's operation, clicked in user
After button for indicating shared file, mobile device will show file selection interface, be needed with instruction user selection shared
File, and user selection needed for share file so that user have operation continuity usage experience.
S203, after the network share function on of first mobile device, the second movement with asking network share
Equipment carries out network connection;
S204, intercept and capture and redirect the network request based on browser of second mobile device transmission;
In the embodiment of the present invention, in step S203- steps S204 and above-described embodiment, step S102- steps S103 is similar,
Therefore not to repeat here.
S205, set the shared installation webpage as request results corresponding to the network request and transmission to second movement
It is standby;
, can be by altogether after completing to intercept and capture and redirect the network request based on browser of second mobile device transmission
Installation webpage is enjoyed to send to second mobile device as request results corresponding to the network request and by corresponding port, from
And second mobile device can receive and show the shared installation webpage.
S206, receive the download that the download link based on the shared installation webpage of second mobile device transmission is formed
Request;
After received shared installation webpage is shown in the second mobile device, user can click on the shared installation
Download link in webpage, and second mobile device forms the download chain after the operation for clicking on the download link is detected
Download request corresponding to connecing simultaneously is sent to first mobile device;And first mobile device can receive second movement and set
The download request that the download link based on the shared installation webpage that preparation is sent is formed, and then carry out follow-up file to be shared
Transmission.
It will be appreciated by persons skilled in the art that when do not received in predetermined amount of time second mobile device transmission
During the download request that the download link based on the shared installation webpage is formed, show that the user of the second mobile device selects difference
File to be shared in the mind is carried, now, first mobile device is that second mobile device downloads the network request pair from network
The content answered simultaneously feeds back to second mobile device.
S207, file to be shared corresponding to the download request is sent to second mobile device.
, can after the download request that second mobile device is sent by the download link of the shared installation webpage is received
To send file to be shared corresponding to the download request to second mobile device, and the second mobile device is treated altogether receiving this
Particular memory location can be saved under the instruction of user after enjoying file or is installed in the second mobile device, so as to realize by
File-sharing in first mobile device is to second mobile device.
In this programme, the second mobile device need not install any plug-in unit for possessing file-sharing function before shared file
Or software, and the first mobile device can be intercepted and captured and redirect network request of the second mobile device transmission based on browser, enter
And as request results corresponding to the network request and send shared installation webpage to second mobile device, and receiving
After the download request that the download link based on the shared installation webpage that second mobile device is sent is formed, to second movement
Equipment sends file to be shared corresponding to the download request, realizes to install in shared file receiving terminal and any possesses file
On the premise of the software or plug-in unit of sharing functionality, file is quickly shared by way of not producing network traffics, also, in user
File to be shared is sent during demand file to be shared, further increases the usage experience of user.
It should be noted that may be run due to the operating system of first mobile device operation with the second mobile device
Operating system is different, and therefore, for same application, the installation kit that both should install is different, for example, the first movement is set
Received shipment row IOS systems(The handheld equipment operating system developed by Apple Inc.), and the second mobile device operation Android systems
System, now, for file to be shared is the installation kit of application, the first mobile device needs the installation suitable for IOS systems
Bag, and the second mobile device needs the installation kit suitable for android system, therefore, in order to realize the first mobile device for the
Two mobile devices provide the file for meeting operating system, and first mobile device can be prestored needed for different operating system
File, and the download link in shared installation webpage corresponding to offer different operating system.
For example, file to be shared can correspond to a shared installation webpage, wherein, shared installation webpage, which includes, to be pointed to
The download link at least one operating system of file to be shared, and each download link direction needle is for one kind operation system
The file to be shared of system;
Accordingly, file to be shared corresponding to the download request is sent to second mobile device, can included:
According to the download request, the first operating system that second mobile device is run is determined;
The text to be shared of first operating system is sent corresponding to the download request, is directed to second mobile device
Part.
For example, file to be shared corresponds at least one shared installation webpage, wherein, each shared installation webpage includes
That points to file to be shared is directed to a kind of download link of operating system;
Accordingly, the shared installation webpage as request results corresponding to the network request and is sent to second movement
Equipment, it can include:
According to the network request, the first operating system that second mobile device is run is determined;
Installation webpage will be shared corresponding to first operating system as request results corresponding to the network request and to send
To second mobile device.
Further, in order to improve redirection efficiency, intercept and capture and redirect second mobile device transmission based on clear
Look at the network request of device, can include:
Intercept and capture the network request based on browser of second mobile device transmission;
Judge whether the network request is first network request set in advance;
When judging that the network request is asked for first network set in advance, the network request is redirected into place
Reason.
Wherein, first network request can be set according to actual conditions, not limited herein;It should be noted that should
First network request can be set according to actual conditions, not limited herein;Also, work as and judge that the network request is not advance
During the first network request of setting, first mobile device can be that second mobile device downloads the network request from network
Corresponding content simultaneously feeds back to second mobile device.
Further, according to the actual requirements specific second mobile device can be selected to carry out file-sharing, selection course
It can occur during network connection, can also occur after network connection.Wherein, occur for selection course in net
Situation during network connection, with asking the second mobile device of network share to carry out network connection, it can include:
Instruction user selects sharable second mobile device from the second mobile device of request network share;
Network connection is carried out with selected sharable second mobile device.
And for selection course occurs in the case of after network connection,
After the second mobile device with asking network share carries out network connection, this document sharing method can also wrap
Include:
Instruction user selects sharable second mobile device from the second equipment in network connection state;
Accordingly, intercept and capture and redirect the network request based on browser of second mobile device transmission, can include:
Intercept and capture the network request based on browser of second mobile device transmission;
Judge whether second mobile device is sharable second mobile device, if it is, redirecting second movement
The network request based on browser that equipment is sent.
It should be noted that the equipment mark of the second mobile device of request network connection can be shown by tabular form
Know or the device identification of the second equipment in network connection state, and instruction user chooses required device identification, so as to complete
The selection of paired sharable second mobile device;It is of course also possible to shown by the form for being distributed display device thumbnail
The second mobile device of network connection or the second equipment in network connection state are asked, and user can pass through slide
, as sharable second mobile device, it can also pass through in the second mobile device corresponding to slide in glide direction
The mode for clicking on thumbnail selects sharable second mobile device, such as:Receive user A slip gesture instruction(Point to
The left side)Afterwards, the equipment B for being shown in left side is sharable equipment;Receive user A slip gesture instruction(Point to the right)
Afterwards, the equipment C for being shown in right side is sharable equipment.
Certainly, when carrying out network connection as a specific embodiment, the first mobile device and the second mobile device, first
Equipment can generate password, and the second mobile device is by inputting password, by verifying that rear can access the net of the first mobile device
Network, so as to ensure the security of network connection.
With reference to specific application example, a kind of file sharing method introduction provided the embodiment of the present invention.
It should be noted that the functional software for realizing this document sharing method is using built-in sharing functionality module in 1,
Wherein, the mobile phone A has WLAN hot spot function, and has administrator right.
As shown in figure 3, a kind of file sharing method, can include:
S301, application 1 be in opening during, when mobile phone A detect based on this using 1 send be used for refer to
When showing the operation of shared file, the shared instruction for installation kit to be shared is obtained;
When needing this sharing to another equipment using 1 installation kit, user, which can click on, is shown in this using in 1
After the button of " one-key sharing " in a certain page, so as to which the mobile phone A can obtain the shared instruction for installation kit to be shared,
Wherein, the installation kit to be shared applies installation kit corresponding to 1 for this.
S302, obtain this and apply shared installation webpage built-in in advance in 1;
Wherein, after obtaining and being directed to the shared instruction of installation kit to be shared, this can be obtained using built-in in advance in 1
Installation webpage is shared, wherein, the shared installation webpage is directed at least one operating system comprising sensing installation kit to be shared
Download link.
S303, when judging that the mobile phone A has WLAN hot spot function, start the WLAN hot spot function of the mobile phone A;
S304, with asking the mobile phone B of network share to carry out network connection;
After mobile phone A starts WLAN hot spot function, mobile phone B can scan the mobile phone A, and then ask network share so that
The mobile phone A can be with asking the mobile phone B of network share to carry out network connection.If mobile phone A starts WLAN hot spot function, set
There is checking password, then mobile phone B needs to input the identifying code when asking network share, and correctly rear mobile phone A can be with hand for identifying code
Machine B carries out network connection.
S305, by setting the regular mode of the iptables in the operating system of the mobile phone A, intercept and capture and redirect this
The network request based on browser that mobile phone B is sent;
S306, the shared installation webpage as request results corresponding to the network request and is sent to the mobile phone B;
Wherein, after mobile phone A and mobile phone B network connection, user can input in the address field of the browser of mobile phone B to be appointed
The address information of meaning, and mobile phone B can generate corresponding network request after the address information is detected, and sent out to the mobile phone A
Send the network request based on browser generated;And the mobile phone A can be by setting in the operating system of the mobile phone A
Iptables regular mode, intercept and capture and redirect the network request based on browser of mobile phone B transmission, and then this is total to
Installation webpage is enjoyed as request results corresponding to the network request and is sent to the mobile phone B.Wherein it is possible to understand, the net
Network is asked:HTTP request or FTP requests, are not limited thereto certainly.
S307, receive the download request that download link of the mobile phone B based on the shared installation webpage is formed;
S308, according to the download request, determine the first operating system that the mobile phone B is run;
S309, the installation to be shared of first operating system is sent corresponding to the download request, is directed to the mobile phone B
Bag.
After received shared installation webpage is shown in mobile phone B, user can be clicked in the shared installation webpage
The download link for meeting mobile phone B and running the first operating system, and the mobile phone B detecting click on download link operation
Afterwards, form download request corresponding to the download link and send to the mobile phone A;And the mobile phone A can receive mobile phone B transmission
The download request that is formed of download link based on the shared installation webpage, and according to the download request, determine the mobile phone B institute
First operating system of operation, and then send corresponding to the download request to the mobile phone B, be directed to treating for first operating system
Shared installation kit, and mobile phone B can be saved in particular memory position after receiving the installation kit to be shared under the instruction in user
Put or be installed in the mobile phone B, so as to realize file-sharing.
It can be seen that in this programme, realize to install in shared file receiving terminal and any possess the soft of file-sharing function
On the premise of part or plug-in unit, file is quickly shared by way of not producing network traffics, also, in user's request text to be shared
Shared file is sent during part, further increases the usage experience of user.
With reference to another specific application example, a kind of file sharing method provided the embodiment of the present invention is situated between
Continue.
It should be noted that the functional software for realizing this document sharing method is literary for sharing in mobile phone A
The client software of part, wherein, the mobile phone A has WLAN hot spot function, and has administrative power authority.
As shown in figure 4, a kind of file sharing method, can include:
S401, when detecting the operation for indicating shared file, obtain the shared instruction for file to be shared;
When needing the file-sharing that mobile phone A is stored to another equipment, user clicks on the client for shared file
After the button for holding " one-key sharing " in software, the mobile phone A obtains the shared instruction for file to be shared.
S402, file selection interface is shown, shared file is needed with instruction user selection;
Wherein, the sharable file stored in this document selection page comprising the mobile phone A.
S403, after user selects to need shared file, at least one shared installation of the generation for file to be shared
Webpage;
Wherein, each shared installation webpage includes the download chain for being directed to a kind of operating system for pointing to file to be shared
Connect.
S404, when judging that the mobile phone A has WLAN hot spot function, start the WLAN hot spot function of the mobile phone A;
S405, with asking the mobile phone B of network share to carry out network connection;
After mobile phone A starts WLAN hot spot function, mobile phone B can scan the mobile phone A, and then ask network share, and be somebody's turn to do
Mobile phone A can be with asking the mobile phone B of network share to carry out network connection.If mobile phone A starts WLAN hot spot function, it is provided with
Password is verified, then mobile phone B needs to input the identifying code when asking network share, and correctly rear mobile phone A can be with mobile phone B for identifying code
Carry out network connection.
S406, by way of carry writes kernel module, intercept and capture and redirect the base of second mobile device transmission
In the network request of browser;
S407, according to the network request, determine the first operating system that second mobile device is run;
S408, will corresponding to first operating system share installation webpage as request results corresponding to the network request simultaneously
Send to the mobile phone B;
Wherein, after mobile phone A and mobile phone B network connection, user can input in the address field of the browser of mobile phone B to be appointed
The address information of meaning, and mobile phone B can generate corresponding network request after the address information is detected, and sent out to the mobile phone A
Send the network request based on browser generated;And the mobile phone A can be cut by way of the kernel module that carry is write
Obtain and redirect the network request based on browser of mobile phone B transmission, and according to the network request, determine that second movement is set
First operating system of received shipment row, so it is corresponding as the network request using installation webpage is shared corresponding to first operating system
Request results and send to the mobile phone B.Wherein it is possible to understand, the network request can be:HTTP request or FTP please
Ask, be not limited thereto certainly.
S409, receive the download request that the mobile phone B is sent by the download link of the shared installation webpage;
S410, file to be shared corresponding to the download request is sent to the mobile phone B.
After received shared installation webpage is shown in mobile phone B, user can be clicked in the shared installation webpage
Download link, and the mobile phone B detect click on download link operation after, form download request corresponding to the download link
And send to the mobile phone A;And the mobile phone A can receive the download link based on the shared installation webpage of mobile phone B transmission
The download request formed, and then file to be shared corresponding to the download request is sent to the mobile phone B, and mobile phone B is receiving
Particular memory location can be saved in after the installation kit to be shared under the instruction of user or is installed in the mobile phone B, so as to real
Existing file-sharing.
It can be seen that by using this programme, realize to install in shared file receiving terminal and any possess file-sharing work(
On the premise of the software or plug-in unit of energy, file is quickly shared by way of not producing network traffics, also, treat in user's request
Shared file is sent during shared file, further increases the usage experience of user.
Corresponding to embodiment of the method corresponding to above-mentioned shared end, the embodiments of the invention provide a kind of file sharing device,
Suitable for the first mobile device.
Embodiment one, as shown in figure 5, the file sharing device can include:
Shared instruction acquisition module 510, for obtaining the shared instruction for file to be shared;
Network connecting module 520, for after the network share function on of first mobile device, with asking net
The second shared mobile device of network carries out network connection;
Network request processing module 530, for intercepting and capturing and redirecting, second mobile device sends based on browser
Network request;
Document processing module 540 to be shared, for using file to be shared as request results corresponding to the network request
And send to second mobile device.
In this programme, the second mobile device need not install any software for possessing file-sharing function before shared file
Or plug-in unit, and the first mobile device can intercept and capture the network request based on browser and the redirection of the second mobile device transmission,
And then sent file to be shared as request results corresponding to network request to the second mobile device, realize in shared file
On the premise of receiving terminal need not install any software or plug-in unit for possessing file-sharing function, by the side for not producing network traffics
Formula is quickly shared file, so as to improve the usage experience of user.
Wherein, the file sharing device provided based on the embodiment of the present invention one, the text that the embodiment of the present invention two is provided
Part sharing means can also include:Network share function activation module, in the second mobile device with asking network share
Before carrying out network connection, start the network share function of first mobile device.
Wherein, the file sharing device that embodiment one or embodiment two are provided is directed to, the shared instruction obtains mould
Block 510, it can include:
First shared instruction acquiring unit, during being in opening in application, answered when detecting based on described
With sending when being used to indicate the operation of shared file, the shared instruction for file to be shared is obtained, wherein, it is described to be shared
File is file corresponding to the application.
Wherein, the file sharing device that embodiment one or embodiment two are provided is directed to, the shared instruction obtains mould
Block 510, it can include:
Second shared instruction acquiring unit, for when detecting the operation for indicating shared file, obtaining for treating
The shared instruction of shared file;
Described device can also include:
File determining module to be shared, for using file to be shared as request results corresponding to the network request simultaneously
Send to before second mobile device, show file selection interface, shared file is needed with instruction user selection, its
In, include the sharable file that first mobile device is stored in the file selection page;By selected by the user
The file that the needs selected are shared is as file to be shared.
Further, on the basis of embodiment one or embodiment two, in embodiment three provided by the present invention, the text
Part sharing means can also include:
Shared installation webpage acquisition module, for after the shared instruction for file to be shared is obtained, obtaining and treating altogether
Enjoy the shared installation webpage of file;Wherein, the download link for pointing to the file to be shared is included in the shared installation webpage;
Accordingly, the document processing module to be shared 540, can include:
Shared installation webpage transmitting element, for using the shared installation webpage as request corresponding to the network request
As a result and send to second mobile device;
Document handling unit to be shared, for receiving that second mobile device sends based on the shared installation
After the download request that the download link of webpage is formed, send to second mobile device and treated altogether corresponding to the download request
Enjoy file.
Wherein, the file sharing device that embodiment three is provided is directed to, the shared instruction acquisition module, can be wrapped
Include:
First shared instruction acquiring unit, during being in opening in application, answered when detecting based on described
With sending when being used to indicate the operation of shared file, the shared instruction for file to be shared is obtained, wherein, it is described to be shared
File is file corresponding to the application;
Accordingly, the shared installation webpage acquisition module, can include:
First shared installation webpage acquiring unit, for after the shared instruction for file to be shared is obtained, obtaining
Shared installation webpage built-in in advance in the application;Wherein, the sensing text to be shared is included in the shared installation webpage
The download link of part.
Wherein, it is directed to the file sharing device that embodiment three is provided, the shared instruction acquisition module 510 can be with
Including:
Second shared instruction acquiring unit, for when detecting the operation for indicating shared file, obtaining for treating
The shared instruction of shared file;
Accordingly, the shared installation webpage acquisition module, can include:
Second shared installation webpage acquiring unit, after obtaining the shared instruction for file to be shared, displaying text
Part selection interface, file to be shared is selected with instruction user, wherein, set in the file selection page comprising the described first movement
The standby sharable file stored;After file to be shared is chosen, generation is for the shared of the file to be shared
Webpage is installed;Wherein, the download link for pointing to the file to be shared is included in the shared installation webpage.
Wherein, the file sharing device that embodiment one, embodiment two or embodiment three are provided is directed to, the network please
Processing module 530 is sought, can be included:
Network request intercepts and captures unit, the network request based on browser sent for intercepting and capturing second mobile device;
Judging unit, for judging whether the network request is first network request set in advance;
Network request redirects unit, judges that the network request is asked for first network set in advance for working as
When, the network request is redirected into processing.
Wherein, the file sharing device that embodiment one, embodiment two or embodiment three are provided is directed to, the network please
Processing module 530 is asked to be used to, when the current user name of the operating system of first mobile device has administrator right, lead to
The iptables crossed in the operating system that first mobile device is set regular mode, intercept and capture and redirect described second
The network request based on browser that mobile device is sent.
Wherein, the file sharing device that embodiment one, embodiment two or embodiment three are provided is directed to, the network please
Processing module 530 is asked to intercept and capture by way of carry writes kernel module and redirect the second mobile device hair
The network request based on browser sent.
Wherein, the file sharing device that embodiment one, embodiment two or embodiment three are provided is directed to, can also be wrapped
Include:
Page presentation module, for after the shared instruction for file to be shared is obtained, displaying to move comprising described first
The IP address of dynamic equipment itself and the page of access mode, to indicate that user is described second corresponding to second mobile device
The IP address of input first mobile device in address field in the browser of mobile device;
The current user name of operating system of the network request processing module 530 for working as first mobile device is not
During with administrator right, the base of second mobile device is obtained by WEB modules built-in in first mobile device
In the network request of browser.
Wherein, the file sharing device that embodiment one, embodiment two or embodiment three are provided is directed to, the network connects
Connection module 520, it can include:
Selecting unit, sharable second is selected to move from the second mobile device of request network share for instruction user
Dynamic equipment;
Network connection unit, for carrying out network connection with selected sharable second mobile device.
Further, the file sharing device that embodiment one, embodiment two or embodiment three are provided is directed to, may be used also
With including:
Selecting module, for ask network share the second mobile device carry out network connection after, instruction user from
Sharable second mobile device is selected in the second equipment in network connection state;
The network request processing module 530, can include:
Network request intercepts and captures unit, the network request based on browser sent for intercepting and capturing second mobile device;
Network request processing unit, for judging whether second mobile device is sharable second mobile device,
If it is, redirect the network request based on browser that second mobile device is sent.
Wherein, the file sharing device that embodiment two is provided, network possessed by first mobile device are directed to
Sharing functionality includes:At least one of WLAN hot spot function, blueteeth network sharing functionality and USB network sharing functionality.
Wherein, the network share function activation module, for judging whether WLAN hot spot function, if it is, opening
Move the WLAN hot spot function;Otherwise,
Blueteeth network sharing functionality is judged whether, if it is, starting the blueteeth network sharing functionality;Otherwise, open
Move the USB network sharing functionality.
Wherein, the file sharing device that embodiment three is provided, described corresponding one shared peace of file to be shared are directed to
Webpage is filled, wherein, the shared installation webpage includes the download chain at least one operating system for pointing to file to be shared
Connect, and each download link direction needle is for a kind of file to be shared of operating system;
The document handling unit to be shared, can include:
Operating system determination subelement, for passing through the shared installation webpage receiving second mobile device
After the download request that download link is sent, according to the download request, the first behaviour that second mobile device is run is determined
Make system;
File transmission sub-unit to be shared, for being sent to second mobile device corresponding to the download request, pin
For the file to be shared of first operating system;
Or the file to be shared corresponds at least one shared installation webpage, wherein, each shared installation webpage includes
That points to file to be shared is directed to a kind of download link of operating system;
The shared installation webpage transmitting element, can include:
Operating system determination subelement, for according to the network request, determining the of the second mobile device operation
One operating system;
Shared installation webpage transmission sub-unit, for installation webpage will to be shared corresponding to first operating system as institute
State request results corresponding to network request and send to second mobile device.
Further, the embodiment of the present invention additionally provides a kind of mobile device, and the mobile device is the first mobile device,
It can include:Any one file sharing device suitable for the first mobile device that the embodiment of the present invention is provided.
For system embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, it is related
Part illustrates referring to the part of embodiment of the method.
It should be noted that herein, such as first and second or the like relational terms are used merely to a reality
Body or operation make a distinction with another entity or operation, and not necessarily require or imply and deposited between these entities or operation
In any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant are intended to
Nonexcludability includes, so that process, method, article or equipment including a series of elements not only will including those
Element, but also the other element including being not expressly set out, or it is this process, method, article or equipment also to include
Intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that
Other identical element also be present in process, method, article or equipment including the key element.
Can one of ordinary skill in the art will appreciate that realizing that all or part of step in above method embodiment is
To instruct the hardware of correlation to complete by program, described program can be stored in computer read/write memory medium,
The storage medium designated herein obtained, such as:ROM/RAM, magnetic disc, CD etc..
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent substitution and improvements made within the spirit and principles in the present invention etc., are all contained in protection scope of the present invention
It is interior.