CN103532802A - Method and device for network sharing, and terminal equipment - Google Patents

Method and device for network sharing, and terminal equipment Download PDF

Info

Publication number
CN103532802A
CN103532802A CN201310473168.XA CN201310473168A CN103532802A CN 103532802 A CN103532802 A CN 103532802A CN 201310473168 A CN201310473168 A CN 201310473168A CN 103532802 A CN103532802 A CN 103532802A
Authority
CN
China
Prior art keywords
network
interface card
virtual
network interface
shared
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201310473168.XA
Other languages
Chinese (zh)
Inventor
王巍
孙鹏
赵全国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiaomi Inc
Original Assignee
Xiaomi Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201310473168.XA priority Critical patent/CN103532802A/en
Publication of CN103532802A publication Critical patent/CN103532802A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a method and a device for network sharing, and terminal equipment. The method comprises the following steps of receiving an instruction of network sharing; creating a visual Wi-Fi network card according to the instruction of the network sharing; using configuration information to configure the created visual Wi-Fi network card. The method for network sharing provided by the invention has the advantages that the visual Wi-Fi network card is established locally on the terminal equipment and is configured according to the configuration information, so that a usable Wi-Fi network is provided for the terminal equipment.

Description

Method, device and terminal equipment that a kind of network is shared
Technical field
The disclosure relates to communication technical field, more specifically, relates to a kind of shared method of network, device and terminal equipment.
Background technology
Along with the development of intelligent terminal (such as mobile phone, panel computer etc.) technology, increasing user brings into use intelligent terminal online, and this provides a great convenience for user.
At present user uses the approach of intelligent terminal online mainly to comprise two kinds: a kind of is 2G(Second Generation by operator, Generation Mobile Telecommunication System technology)/3G(3rd-generation, 3G (Third Generation) Moblie technology) network is surfed the Net, another kind is by Wi-Fi(wireless fidelity, Wireless Fidelity) online, when having Wi-Fi wireless signal, just can by the 2G/3G network of operator, not surf the Net, saved traffic fee.Wi-Fi wireless signal is also to be provided by wired network, as long as connect a wireless router, just wire signal can be converted to Wi-Fi wireless signal.
Yet, the high network speed of first kind of way rate is slow, and the second way has the restriction of Wi-Fi Hotspot, if do not have wireless routing or environment of living in that Wi-Fi Hotspot is not provided, user just can not surf the Net by Wi-Fi, so these two kinds of modes are not well positioned to meet user's demand.
Summary of the invention
In view of this, object of the present disclosure is to provide a kind of shared method of network, device and terminal equipment, can meet user's online demand.
On the one hand, the disclosure provides a kind of network shared method, and the method comprises the following steps:
Receive the shared instruction of network;
The instruction shared according to described network creates virtual wi-fi network interface card;
Use configuration information to be configured the virtual wi-fi network interface card creating.
The shared method of network that the disclosure provides, by creating and according to configuration information configuration virtual Wi-Fi network interface card terminal equipment is local, thereby provides available Wi-Fi network for terminal equipment.
As technique scheme preferably, described configuration information for obtain in advance or Real-time Obtaining.
As technique scheme preferably, described use configuration information is configured and comprises the virtual wi-fi network interface card creating: use configuration information to configure IP address, subnet mask, DNS and the default gateway of described virtual wi-fi network interface card; The virtual wi-fi network interface card configuring to operating system registration.
As technique scheme preferably, described after according to described network, shared instruction creates virtual wi-fi network interface card, described method also comprises: return to virtual wi-fi network interface card and create successful message.
As technique scheme preferably, described method also comprises: receive and close the shared instruction of network; According to described, close the shared instruction of network by the virtual wi-fi network interface card unloading creating.
As technique scheme preferably, after described use configuration information is configured the virtual wi-fi network interface card creating or shared instruction unloads the virtual wi-fi network interface card creating according to described disconnection network, described method also comprises: upgrade network connection state.
As technique scheme preferably, after upgrading network connection state, described method also comprises: to application program, send the notice that network connection state changes.
On the other hand, the disclosure also provides a kind of network shared method, and described method comprises:
Send the shared instruction of network, the terminal that indication receives the shared instruction of described network creates virtual wi-fi network interface card;
Send the configuration information of virtual wi-fi network interface card, indicate described terminal according to described configuration information, the virtual wi-fi network interface card creating to be configured;
For the virtual wi-fi network interface card configuring starts network address translation services.
The shared method of network that the disclosure provides, by PC, bring in the ICP/IP protocol stack of realizing virtual wi-fi network interface card in terminal equipment, transmitting-receiving Ethernet data bag, at PC, hold by carrying out network address translation, the access of terminal equipment becomes the access to netwoks of similar this ordinary procedure of PC helper module the most at last, thereby provides available Wi-Fi network for terminal equipment.
As technique scheme preferably, the configuration information of described transmission virtual wi-fi network interface card comprises: the configuration information that sends virtual wi-fi network interface card after receiving the successful message of establishment virtual wi-fi network interface card that terminal returns.
As technique scheme preferably, described method also comprises:
The shared instruction of network is closed in transmission, closes the terminal of the shared instruction of network by the virtual wi-fi network interface card unloading creating described in indication receives; For the virtual wi-fi network interface card of unloading is closed network address translation services.
On the other hand, the disclosure also provides a kind of network shared device, and described device comprises:
The first receiver module, for receiving the shared instruction of network;
Create network interface card module, for shared instruction creates virtual wi-fi network interface card according to described network;
Configuration module, for being used configuration information to be configured the virtual wi-fi network interface card creating.
As technique scheme preferably, described configuration information for obtain in advance or Real-time Obtaining.
As technique scheme preferably, described establishment network interface card module comprises:
Creating unit, for being used the unix_open order of LINUX system to create TAP equipment;
The first registering unit, for registering the I/O event of described TAP equipment.
As technique scheme preferably, described configuration module comprises:
Dispensing unit, for being used configuration information to configure IP address, subnet mask, DNS and the default gateway of described virtual wi-fi network interface card;
The second registering unit, for the virtual wi-fi network interface card configuring to operating system registration.
As technique scheme preferably, described device also comprises:
Return to module, for returning to virtual wi-fi network interface card, create successful message.
As technique scheme preferably, described device also comprises:
The second receiver module, closes the shared instruction of network for receiving;
Unload module, for closing the shared instruction of network by the virtual wi-fi network interface card unloading creating described in basis.
As technique scheme preferably, described device also comprises:
Update module, for upgrading network connection state.
As technique scheme preferably, described device also comprises:
The first sending module, for sending to application program the notice that network connection state changes.
On the other hand, the disclosure also provides a kind of network shared device, and described device comprises:
The second sending module, for sending the shared instruction of network, the terminal that indication receives the shared instruction of described network creates virtual wi-fi network interface card;
The 3rd sending module, for sending the configuration information of virtual wi-fi network interface card, indicates described terminal according to described configuration information, the virtual wi-fi network interface card creating to be configured;
Start module, be used to the virtual wi-fi network interface card configuring to start network address translation services.
As technique scheme preferably, described the 3rd sending module for sending the configuration information of virtual wi-fi network interface card after receiving the successful message of establishment virtual wi-fi network interface card that terminal returns.
As technique scheme preferably, described device also comprises:
The 4th sending module, closes the shared instruction of network for sending, and closes the terminal of the shared instruction of network by the virtual wi-fi network interface card unloading creating described in indication receives;
Closing module, is used to the virtual wi-fi network interface card of unloading to close network address translation services.
On the other hand, the disclosure also provides a kind of terminal equipment, described terminal equipment includes memory, and one or more than one program, the above program of one of them or one is stored in memory, and is configured to carry out described one or above program package containing for carrying out the instruction of following operation by one or above processor:
Receive the shared instruction of network;
The instruction shared according to described network creates virtual wi-fi network interface card;
Use configuration information to be configured the virtual wi-fi network interface card creating.
Further feature of the present disclosure and advantage will be set forth in the following description, and, partly from specification, become apparent, or understand by implementing the disclosure.Object of the present disclosure and other advantages can be realized and be obtained by specifically noted structure in the specification write, claims and accompanying drawing.
Should be understood that, it is only exemplary that above general description and details are hereinafter described, and can not limit the disclosure.Below by drawings and Examples, technical scheme of the present disclosure is described in further detail.
Accompanying drawing explanation
Accompanying drawing is used to provide further understanding of the disclosure, and forms a part for specification, is used from the explanation disclosure with embodiment mono-of the present disclosure, does not form restriction of the present disclosure.In the accompanying drawings:
Fig. 1 is the exemplary process diagram that the network that provides of the disclosure is shared method;
Fig. 2 is the exemplary process diagram that the network that provides of the disclosure is shared another embodiment of method;
Fig. 3 is the exemplary process diagram that the network that provides of the disclosure is shared another embodiment of method;
Fig. 4 is the exemplary process diagram that the network that provides of the disclosure is shared another embodiment of method;
Fig. 5 is the exemplary process diagram that the network that provides of the disclosure is shared another embodiment of method;
Fig. 6 is the exemplary configurations schematic diagram of the embodiment of the network sharing device that provides of the disclosure;
Fig. 7 is the exemplary configurations schematic diagram of an embodiment of the establishment network interface card module in the network sharing device that provides of the disclosure;
Fig. 8 is the exemplary configurations schematic diagram of an embodiment of the configuration module in the network sharing device that provides of the disclosure;
Fig. 9 is the exemplary configurations schematic diagram of another embodiment of the network sharing device that provides of the disclosure;
Figure 10 is the exemplary configurations schematic diagram of another embodiment of the network sharing device that provides of the disclosure;
Figure 11 is the exemplary configurations schematic diagram of another embodiment of the network sharing device that provides of the disclosure;
Figure 12 is the exemplary operation flow process schematic diagram of network sharing device in the disclosure;
Figure 13 is another exemplary operation flow process schematic diagram of network sharing device in the disclosure;
Figure 14 is the exemplary configurations schematic diagram of a kind of terminal equipment of providing of the disclosure.
By above-mentioned accompanying drawing, the embodiment that the disclosure is clear and definite has been shown, will there is more detailed description hereinafter.These accompanying drawings and text description are not in order to limit the scope of disclosure design by any mode, but by reference to specific embodiment for those skilled in the art illustrate concept of the present disclosure.
Embodiment
For making object of the present disclosure, technical scheme and advantage clearer, below in conjunction with execution mode and accompanying drawing, the disclosure is described in further details.At this, exemplary embodiment of the present disclosure and explanation thereof are used for explaining the disclosure, but not as to restriction of the present disclosure.
Disclosure embodiment provides a kind of network shared method, below in conjunction with accompanying drawing, the disclosure is elaborated.
In one embodiment, as shown in Figure 1, the shared method of network comprises the following steps:
In step S101, receive the shared instruction of network; The method that the present embodiment provides is for terminal equipment.
In step S102, the instruction shared according to described network creates virtual wi-fi network interface card.
In step S103, use configuration information to be configured the virtual wi-fi network interface card creating.
Wherein, this configuration information is by the PC(personal computer that is connected with cable network, PC) end provides, and terminal equipment can receive the configuration information that PC end sends in real time, also can from PC end, obtain configuration information in advance.
In another embodiment, described use configuration information is configured according to described configuration information the virtual wi-fi network interface card creating is configured and is comprised the virtual wi-fi network interface card creating:
According to using described configuration information to configure IP subnet mask, gateway address, the DNS of described virtual wi-fi network interface card;
The virtual wi-fi network interface card configuring to operating system registration.
In another embodiment, described according to after the shared instruction establishment virtual wi-fi network interface card of described network, described method also comprises: return to virtual wi-fi network interface card and create successful message.
In another embodiment, described method also comprises:
Receive and disconnect the shared instruction of network;
The instruction shared according to described disconnection network unloads the virtual wi-fi network interface card creating.
In another embodiment, after described use configuration information is configured the virtual wi-fi network interface card creating or shared instruction unloads the virtual wi-fi network interface card creating according to described disconnection network, described method also comprises: upgrade network connection state.
In another embodiment, after upgrading network connection state, described method also comprises:
To application program, send the notice that network connection state changes.
The shared method of network that the disclosure provides, by creating and according to configuration information configuration virtual Wi-Fi network interface card terminal equipment is local, thereby provides available Wi-Fi network for terminal equipment.Due to the many APP(Application that are arranged in terminal equipment, third party application in terminal equipment) use all based on data, connects or Wi-Fi connects, the method providing due to the disclosure can provide available Wi-Fi network for terminal equipment, therefore can meet well the demand of the APP in terminal equipment.
Another embodiment that is illustrated in figure 2 the shared method of network that the disclosure provides, comprising:
In step S201, send the shared instruction of network, the terminal that indication receives the shared instruction of described network creates virtual wi-fi network interface card; The method that the present embodiment provides is held for PC.
In step S202, send the configuration information of virtual wi-fi network interface card, indicate described terminal according to described configuration information, the virtual wi-fi network interface card creating to be configured;
In step S203, for the virtual wi-fi network interface card configuring starts network address translation services.
In another embodiment, the configuration information that sends virtual wi-fi network interface card comprises: the configuration information that sends virtual wi-fi network interface card after receiving the successful message of establishment virtual wi-fi network interface card that terminal returns.
In another embodiment, described method also comprises:
The shared instruction of network is closed in transmission, closes the terminal of the shared instruction of network by the virtual wi-fi network interface card unloading creating described in indication receives;
For the virtual wi-fi network interface card of unloading is closed network address translation services.
The shared method of network that the disclosure provides, by PC, bring in the ICP/IP protocol stack of realizing virtual wi-fi network interface card in terminal equipment, transmitting-receiving Ethernet data bag, at PC, hold by carrying out network address translation, the access of terminal equipment becomes the access to netwoks of this ordinary procedure of PC helper module the most at last, thereby provides available Wi-Fi network for terminal equipment.
Another embodiment that is illustrated in figure 3 the shared method of network that the disclosure provides, it is example that the terminal equipment of take is initiated network sharing request, comprises the following steps:
In step S301, terminal equipment detects with PC end by USB(Universal Serial Bus, USB) line is connected.
In step S302, terminal equipment is initiated the shared request of network to PC end.
Can be that terminal equipment detects with after PC end is connected by USB line and initiates the shared request of network from trend PC end, can be also that user selects the corresponding function of terminal equipment to come to hold the shared request of initiation network to PC.
In step S303, PC termination is received after the shared request of network, to terminal equipment, is sent the shared instruction of network.
In step S304, according to the network receiving, shared instruction creates virtual wi-fi network interface card to terminal equipment.
For example create the method for virtual wi-fi network interface card: (TAP equipment is the virtual network device in operating system to use LINUX system command unix_open to create TAP equipment, operation second layer packet is as ethernet data frame), register the IO event of this tap equipment.
In step S305, terminal equipment returns to virtual wi-fi network interface card to PC end and creates successful message.
In step S306, PC end is sent to terminal equipment by the configuration information of this virtual wi-fi network interface card.
In step S307, terminal equipment is configured the virtual wi-fi network interface card creating according to the configuration information receiving, comprise, the IP address of configuration virtual Wi-Fi network interface card, subnet mask, default gateway (this default gateway points to the IP of PC end NAT service simulation) and DNS (Domain Name System, domain name system), consistent thereby guarantee that the DNS of terminal equipment uses with PC end system.
In step S308, terminal equipment registers to operating system the virtual wi-fi network interface card that this configures.
What the ordinary procedure in this step assurance terminal equipment was seen is that common Wi-Fi network connects.
In step S309, the virtual wi-fi network interface card startup NAT(Network Address Translation of PC end for configuring, network address translation) service.
After above-mentioned steps S308, terminal equipment can also be carried out following operation: informing network connection management is served this shared network successful connection, so that network state is upgraded in network connection management service.For example can be shown as PC shared network.
The APP network state of terminal equipment in can also notification terminal equipment changes.Due to the possible Sampling network connection status automatically of the APP in terminal equipment, therefore can automatically forbid a lot of functions, such as downloading etc.So the effect of this step is that proactive notification APP network state changes.
Another embodiment that is illustrated in figure 4 the shared method of network that the disclosure provides, the PC of take end initiatively sends network shared instruction as example, comprises the following steps:
In step S401, PC end detects and is connected with terminal equipment by USB line.
In step S402, PC end sends the shared instruction of network to terminal equipment.
In step S403, according to the network receiving, shared instruction creates virtual wi-fi network interface card to terminal equipment.
In step S404, PC end is by the configuration information of this virtual wi-fi network interface card and be sent to terminal equipment.
In step S405, terminal equipment is configured the virtual wi-fi network interface card creating according to the configuration information receiving, and comprises IP address, subnet mask, default gateway and the DNS of configuration virtual Wi-Fi network interface card.
In step S406, terminal equipment registers to operating system the virtual wi-fi network interface card that this configures, and informing network connection management serves this shared network successful connection, so that network state is upgraded in network connection management service, and the APP network state in notification terminal equipment changes.
In step S407, PC end is served for the virtual wi-fi network interface card configuring starts NAT.
Another embodiment that the network that being illustrated in figure 5 the disclosure provides is shared, in this embodiment, the process of shared network is closed in the shared network successful connection of having described terminal equipment and PC end afterwards, comprises the following steps:
In step S501, PC end is closed the shared instruction of network to the terminal equipment transmission of shared network.
In step S502, terminal equipment after receiving this instruction unloads the virtual wi-fi network interface card creating.
In step S503, terminal equipment informing network connection management is served this shared network and is stopped, so that network state is upgraded in network connection management service, and the APP network state in notification terminal equipment changes.
In step S504, PC end is that the virtual wi-fi network interface card of unloading is closed NAT network service.
In the above-described embodiments, PC end adopts corresponding data channel to receive and dispatch Ethernet data bag according to the system of terminal equipment.
The disclosure also provides a kind of network shared device, and as shown in Figure 6, described device comprises:
The first receiver module 601, for receiving the shared instruction of network;
Create network interface card module 602, for shared instruction creates virtual wi-fi network interface card according to described network;
Configuration module 603, for being used configuration information to be configured the virtual wi-fi network interface card creating.
Wherein, described configuration information for obtain in advance or Real-time Obtaining.
As shown in Figure 7, creating network interface card module 602 comprises:
Creating unit 6021, for being used the unix_open order of LINUX system to create TAP equipment;
The first registering unit 6022, for registering the I/O event of described TAP equipment.
As shown in Figure 8, described configuration module 603 comprises:
Dispensing unit 6031, for being used configuration information to configure IP address, subnet mask, DNS and the default gateway of described virtual wi-fi network interface card;
The second registering unit 6032, for the virtual wi-fi network interface card configuring to operating system registration.
As shown in Figure 9, described device also comprises:
Return to module 604, for returning to virtual wi-fi network interface card, create successful message.
As shown in Figure 9, described device also comprises:
The second receiver module 605, closes the shared instruction of network for receiving;
Unload module 606, for closing the shared instruction of network by the virtual wi-fi network interface card unloading creating described in basis.
As shown in Figure 9, described device also comprises:
Update module 607, for upgrading network connection state.
As shown in Figure 9, described device also comprises:
The first sending module 608, for sending to application program the notice that network connection state changes.
The disclosure also provides a kind of network shared device, and as shown in figure 10, described device comprises:
The second sending module 1001, for sending the shared instruction of network, the terminal that indication receives the shared instruction of described network creates virtual wi-fi network interface card;
The 3rd sending module 1002, for sending the configuration information of virtual wi-fi network interface card, indicates described terminal according to described configuration information, the virtual wi-fi network interface card creating to be configured;
Start module 1003, be used to the virtual wi-fi network interface card configuring to start network address translation services.
Wherein, described the 3rd sending module 1002 for sending the configuration information of virtual wi-fi network interface card after receiving the successful message of establishment virtual wi-fi network interface card that terminal returns.
As shown in figure 11, described device also comprises:
The 4th sending module 1004, closes the shared instruction of network for sending, and closes the terminal of the shared instruction of network by the virtual wi-fi network interface card unloading creating described in indication receives;
Closing module 1005, is used to the virtual wi-fi network interface card of unloading to close network address translation services.
Device shown in Fig. 6 is for example the PC shared network service unit for mobile phone terminal, and the device shown in Figure 10 is for example held for PC.Below by the course of work of two devices of a concrete example explanation.
When opening network is shared, the communication process between the PC shared network service unit of mobile phone terminal and PC end as shown in figure 12:
In step S1201, PC end is sent and creates the order of virtual wi-fi network interface card to mobile phone by MDB interface;
In step S1202, mobile phone terminal is used LINUX system command unix_open to create TAP equipment;
In step S1203, register the I/O event of this TAP equipment;
In step S1204, PC end provides configuration parameter, and notice mobile phone terminal completes the parameter configuration of virtual wi-fi network interface card;
In step S1205, mobile phone terminal arranges IP, subnet mask and the default gateway (this gateway address points to the IP of PC end NAT service simulation) of Microsoft Loopback Adapter;
In step S1206, mobile phone terminal arranges DNS, thereby it is consistent to guarantee that the DNS of mobile phone terminal uses with PC end system;
In step S1207, mobile phone terminal is to Android ccf layer registration virtual wi-fi, thereby that guarantee that ordinary procedure sees is common Wi-Fi;
In step S1208, the PC shared network service unit informing network connection management service unit of mobile phone terminal upgrades network state;
In step S1209, it is that PC shares online that the network connection management service unit of mobile phone terminal upgrades network connection state;
In step S1210, the network connection management service unit of mobile phone terminal notice APP network connection state changes;
In step S1211, PC end starts NAT service (being realized by the slirp storehouse of increasing income).
Close network while sharing, the communication process of the PC shared network service unit of mobile phone terminal between holding with PC as shown in figure 13:
In step S1301, PC end is sent and is closed the order of PC shared network by MDB interface;
In step S1302, the PC shared network service unit of mobile phone terminal unloads virtual wi-fi network interface card after receiving order;
In step S1303, the PC shared network service unit informing network connection management service unit of mobile phone terminal upgrades network connection state;
In step S1304, it is that PC shares online that the network connection management service unit of mobile phone terminal upgrades network connection state;
In step S1305, the network connection management service unit of mobile phone terminal notice APP network connection state changes;
In step S1306, PC end is closed NAT network service.
The disclosure also provides a kind of terminal equipment.Referring to Figure 14, this terminal equipment can be for the shared method of network of implementing to provide in above-described embodiment.Wherein, this terminal can be mobile phone, panel computer pad, Wearable mobile device (as intelligent watch) etc.Preferred:
Terminal equipment 700 can comprise communication unit 110, includes the memory 120 of one or more computer-readable recording mediums, input unit 130, display unit 140, transducer 150, voicefrequency circuit 160, WiFi (wireless fidelity, Wireless Fidelity) module 170, include the parts such as or above processor 180 of processing core and power supply 190.It will be understood by those skilled in the art that the terminal equipment structure shown in Figure 14 does not form the restriction to terminal equipment, can comprise the parts more more or less than diagram, or combine some parts, or different parts are arranged.Wherein:
Communication unit 110 can be used for receiving and sending messages or communication process in, the reception of signal and transmission, this communication unit 110 can be RF(Radio Frequency, radio frequency) circuit, router, modulator-demodulator, etc. network communication equipment.Especially, when communication unit 110 is RF circuit, after the downlink information of base station is received, transfer to one or above processor 180 processing; In addition, by relating to up data, send to base station.Conventionally, RF circuit as communication unit includes but not limited to antenna, at least one amplifier, tuner, one or more oscillator, subscriber identity module (SIM) card, transceiver, coupler, LNA(Low Noise Amplifier, low noise amplifier), duplexer etc.In addition, communication unit 110 can also be by radio communication and network and other devices communicatings.Described radio communication can be used arbitrary communication standard or agreement, include but not limited to GSM (Global System of Mobile communication, global system for mobile communications), GPRS (General Packet Radio Service, general packet radio service), CDMA (Code Division Multiple Access, code division multiple access), WCDMA (Wideband Code Division Multiple Access, Wideband Code Division Multiple Access (WCDMA)), LTE (Long Term Evolution, Long Term Evolution), Email, SMS (Short Messaging Service, Short Message Service) etc.Memory 120 can be used for storing software program and module, and processor 180 is stored in software program and the module of memory 120 by operation, thereby carries out various function application and data processing.Memory 120 can mainly comprise storage program district and storage data field, wherein, and the application program (such as sound-playing function, image player function etc.) that storage program district can storage operation system, at least one function is required etc.; The data (such as voice data, phone directory etc.) that create according to the use of terminal equipment 700 etc. can be stored in storage data field.In addition, memory 120 can comprise high-speed random access memory, can also comprise nonvolatile memory, for example at least one disk memory, flush memory device or other volatile solid-state parts.Correspondingly, memory 120 can also comprise Memory Controller, so that the access of processor 180 and 130 pairs of memories 120 of input unit to be provided.
Input unit 130 can be used for receiving numeral or the character information of input, and generation is controlled relevant keyboard, mouse, action bars, optics or the input of trace ball signal with user's configuration and function.Preferably, input unit 130 can comprise touch-sensitive surperficial 131 and other input equipments 132.Touch-sensitive surperficial 131, also referred to as touch display screen or Trackpad, can collect user or near touch operation (using any applicable object or near the operations of annex on touch-sensitive surperficial 131 or touch-sensitive surperficial 131 such as finger, stylus such as user) thereon, and drive corresponding jockey according to predefined formula.Optionally, touch-sensitive surperficial 131 can comprise touch detecting apparatus and two parts of touch controller.Wherein, touch detecting apparatus detects user's touch orientation, and detects the signal that touch operation is brought, and sends signal to touch controller; Touch controller receives touch information from touch detecting apparatus, and converts it to contact coordinate, then gives processor 180, and the order that energy receiving processor 180 is sent is also carried out.In addition, can adopt the polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave to realize touch-sensitive surperficial 131.Except touch-sensitive surperficial 131, input unit 130 can also comprise other input equipments 132.Preferably, other input equipments 132 can include but not limited to one or more in physical keyboard, function key (controlling button, switch key etc. such as volume), trace ball, mouse, action bars etc.
Display unit 140 can be used for showing the information inputted by user or the various graphical user interface of the information that offers user and terminal equipment 700, and these graphical user interface can consist of figure, text, icon, video and its combination in any.Display unit 140 can comprise display floater 141, optionally, can adopt the forms such as LCD (Liquid Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) to configure display floater 141.Further, touch-sensitive surperficial 131 can cover display floater 141, when touch-sensitive surperficial 131 detect thereon or near touch operation after, send processor 180 to determine the type of touch event, corresponding vision output is provided according to the type of touch event with preprocessor 180 on display floater 141.Although in Figure 14, touch-sensitive surperficial 131 with display floater 141 be as two independently parts realize input and input function, in certain embodiments, can by touch-sensitive surperficial 131 and display floater 141 integrated and realize input and output function.
Terminal equipment 700 also can comprise at least one transducer 150, such as optical sensor, motion sensor and other transducers.Preferably, optical sensor can comprise ambient light sensor and proximity transducer, and wherein, ambient light sensor can regulate according to the light and shade of ambient light the brightness of display floater 141, proximity transducer can, when terminal equipment 700 moves in one's ear, cut out display floater 141 and/or backlight.A kind of as motion sensor; Gravity accelerometer can detect the size of the acceleration that (is generally three axles) in all directions; when static, can detect size and the direction of gravity, can be used for identifying application (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, knock) of mobile phone attitude etc.; As for terminal equipment 700 other transducers such as configurable gyroscope, barometer, hygrometer, thermometer, infrared ray sensor also, do not repeat them here.
Voicefrequency circuit 160, loud speaker 161, microphone 162 can provide the audio interface between user and terminal equipment 700.Voicefrequency circuit 160 can be transferred to loud speaker 161 by the signal of telecommunication after the voice data conversion receiving, and is converted to voice signal exports by loud speaker 161; On the other hand, microphone 162 is converted to the signal of telecommunication by the voice signal of collection, after being received by voicefrequency circuit 160, be converted to voice data, after again voice data output processor 180 being processed, through RF circuit 110, to send to such as another terminal equipment, or export voice data to memory 120 to further process.Voicefrequency circuit 160 also may comprise earphone jack, so that communicating by letter of peripheral hardware earphone and terminal equipment 700 to be provided.
In order to realize radio communication, on this terminal equipment, can dispose wireless communication unit 170, this wireless communication unit 170 can be WiFi module.WiFi belongs to short range wireless transmission technology, terminal equipment 700 by wireless communication unit 170 can help that user sends and receive e-mail, browsing page and access streaming video etc., it provides wireless broadband internet access for user.Although Figure 14 shows wireless communication unit 170, be understandable that, it does not belong to must forming of terminal equipment 700, completely can be as required in not changing the essential scope of invention and omit.
Processor 180 is control centres of terminal equipment 700, utilize the various piece of various interface and the whole mobile phone of connection, by moving or carry out software program and/or the module being stored in memory 120, and call the data that are stored in memory 120, carry out various functions and the deal with data of terminal equipment 700, thereby mobile phone is carried out to integral monitoring.Optionally, processor 180 can comprise one or more processing cores; Preferably, processor 180 can integrated application processor and modem processor, and wherein, application processor is mainly processed operating system, user interface and application program etc., and modem processor is mainly processed radio communication.Be understandable that, above-mentioned modem processor also can not be integrated in processor 180.
Terminal equipment 700 also comprises that the power supply 190(powering to all parts is such as battery), preferably, power supply can be connected with processor 180 logics by power-supply management system, thereby realizes the functions such as management charging, electric discharge and power managed by power-supply management system.Power supply 190 can also comprise the random component such as one or more direct current or AC power, recharging system, power failure detection circuit, power supply changeover device or inverter, power supply status indicator.
Although not shown, terminal equipment 700 can also comprise camera, bluetooth module etc., does not repeat them here.Specifically in the present embodiment, the display unit of terminal equipment is touch-screen display, terminal equipment also includes memory, and one or more than one program, the above program of one of them or one is stored in memory, and is configured to carry out described one or above program package containing for carrying out the instruction of following operation by one or above processor:
Receive the shared instruction of network;
The instruction shared according to described network creates virtual wi-fi network interface card;
Use configuration information to be configured the virtual wi-fi network interface card creating.
In addition, typically, the mobile terminal described in the disclosure can be various hand-held terminal devices, such as mobile phone, personal digital assistant (PDA) etc., and therefore protection range of the present disclosure should not be defined as the mobile terminal of certain particular type.
In addition, according to method of the present disclosure, can also be implemented as the computer program of being carried out by CPU.When this computer program is carried out by CPU, carry out the above-mentioned functions limiting in method of the present disclosure.
In addition, said method step and system unit also can utilize controller and realize for storing the computer readable storage devices of the computer program that makes controller realize above-mentioned steps or Elementary Function.
In addition, should be understood that, computer readable storage devices as herein described (for example, memory) can be volatile memory or nonvolatile memory, or can comprise volatile memory and nonvolatile memory.And nonrestrictive, nonvolatile memory can comprise read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory as an example.Volatile memory can comprise random access memory (RAM), and this RAM can serve as External Cache memory.As an example and nonrestrictive, RAM can obtain in a variety of forms, such as synchronous random access memory (DRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate SDRAM (DDR SDRAM), enhancing SDRAM (ESDRAM), synchronization link DRAM (SLDRAM) and direct RambusRAM (DRRAM).The memory device of disclosed aspect is intended to include but not limited to the memory of these and other suitable type.
Those skilled in the art will also understand is that, in conjunction with the described various illustrative logical blocks of disclosure herein, module, circuit and algorithm steps, may be implemented as electronic hardware, computer software or both combinations.For this interchangeability of hardware and software is clearly described, with regard to the function of various exemplary components, square, module, circuit and step, it has been carried out to general description.This function is implemented as software or is implemented as hardware and depends on concrete application and the design constraint that imposes on whole system.Those skilled in the art can realize described function in every way for every kind of concrete application, but this realization determines should not be interpreted as causing departing from the scope of the present disclosure.
In conjunction with the described various illustrative logical blocks of disclosure herein, module and circuit, can utilize the following parts that are designed to carry out function described here to realize or carry out: general processor, digital signal processor (DSP), application-specific integrated circuit (ASIC) (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete nextport hardware component NextPort or any combination of these parts.General processor can be microprocessor, but alternatively, processor can be any conventional processors, controller, microcontroller or state machine.Processor also may be implemented as the combination of computing equipment, and for example, the combination of DSP and microprocessor, multi-microprocessor, one or more microprocessor are in conjunction with DSP core or any other this configuration.
Step in conjunction with the described method of disclosure herein or algorithm can directly be included in the software module of carrying out in hardware, by processor or in the two combination.Software module can reside in the storage medium of RAM memory, flash memory, ROM memory, eprom memory, eeprom memory, register, hard disk, removable dish, CD-ROM or any other form known in the art.Exemplary storage medium is coupled to processor, make processor can be from this storage medium reading information or to this storage medium writing information.In an alternative, described storage medium can be integral to the processor together.Processor and storage medium can reside in ASIC.ASIC can reside in user terminal.In an alternative, processor and storage medium can be used as discrete assembly and reside in user terminal.
In one or more exemplary design, described function can realize in hardware, software, firmware or its combination in any.If realized in software, described function can be transmitted on computer-readable medium or by computer-readable medium as one or more instructions or code storage.Computer-readable medium comprises computer-readable storage medium and communication media, and this communication media comprises and contributes to computer program to be sent to from a position any medium of another position.Storage medium can be can be by any usable medium of universal or special computer access.As an example and nonrestrictive, this computer-readable medium can comprise RAM, ROM, EEPROM, CD-ROM or other optical disc memory apparatus, disk storage device or other magnetic storage apparatus, or can for carry or file layout be instruction or data structure required program code and can be by any other medium of universal or special computer or universal or special processor access.In addition, any connection can suitably be called computer-readable medium.For example, if use coaxial cable, optical fiber cable, twisted-pair feeder, digital subscriber line (DSL) or such as the wireless technology of infrared ray, radio and microwave come from website, server or other remote source send software, above-mentioned coaxial cable, optical fiber cable, twisted-pair feeder, DSL or include the definition at medium such as the wireless technology of infrared first, radio and microwave.As used herein, disk and CD comprise compact disk (CD), laser disk, CD, digital versatile disc (DVD), floppy disk, Blu-ray disc, disk rendering data magnetically conventionally wherein, and cd-rom using laser optics ground rendering data.The combination of foregoing also should be included in the scope of computer-readable medium.
Although disclosed content shows exemplary embodiment of the present disclosure above, it should be noted that under the prerequisite of the scope of the present disclosure that does not deviate from claim restriction, can carry out multiple change and modification.According to the function of the claim to a method of disclosed embodiment described herein, step and/or action, need not carry out with any particular order.In addition, although element of the present disclosure can be with individual formal description or requirement, also it is contemplated that a plurality of, unless be clearly restricted to odd number.
Above-described embodiment; object of the present disclosure, technical scheme and beneficial effect are further described; institute is understood that; the foregoing is only embodiment of the present disclosure; and be not used in and limit protection range of the present disclosure; all within spirit of the present disclosure and principle, any modification of making, be equal to replacement, improvement etc., within all should being included in protection range of the present disclosure.

Claims (23)

1. the shared method of network, is characterized in that, described method comprises:
Receive the shared instruction of network;
The instruction shared according to described network creates virtual wi-fi network interface card;
Use configuration information to be configured the virtual wi-fi network interface card creating.
2. method according to claim 1, is characterized in that, described configuration information for obtain in advance or Real-time Obtaining.
3. method according to claim 1, is characterized in that, describedly according to the shared instruction of described network, creates virtual wi-fi network interface card and comprises:
Use the unix_open order of LINUX system to create TAP equipment;
Register the I/O event of described TAP equipment.
4. method according to claim 1, is characterized in that, described use configuration information is configured and comprises the virtual wi-fi network interface card creating:
Use configuration information to configure IP address, subnet mask, DNS and the default gateway of described virtual wi-fi network interface card;
The virtual wi-fi network interface card configuring to operating system registration.
5. method according to claim 1, is characterized in that, described according to after the shared instruction establishment virtual wi-fi network interface card of described network, described method also comprises: return to virtual wi-fi network interface card and create successful message.
6. method according to claim 1, is characterized in that, described method also comprises:
The shared instruction of network is closed in reception;
According to described, close the shared instruction of network by the virtual wi-fi network interface card unloading creating.
7. according to the method described in claim 1 or 6, it is characterized in that, after described use configuration information is configured the virtual wi-fi network interface card creating or shared instruction unloads the virtual wi-fi network interface card creating according to described disconnection network, described method also comprises: upgrade network connection state.
8. method according to claim 7, is characterized in that, after upgrading network connection state, described method also comprises:
To application program, send the notice that network connection state changes.
9. the shared method of network, is characterized in that, described method comprises:
Send the shared instruction of network, the terminal that indication receives the shared instruction of described network creates virtual wi-fi network interface card;
Send the configuration information of virtual wi-fi network interface card, indicate described terminal according to described configuration information, the virtual wi-fi network interface card creating to be configured;
For the virtual wi-fi network interface card configuring starts network address translation services.
10. method according to claim 9, is characterized in that, the configuration information of described transmission virtual wi-fi network interface card comprises: the configuration information that sends virtual wi-fi network interface card after receiving the successful message of establishment virtual wi-fi network interface card that terminal returns.
11. methods according to claim 9, is characterized in that, described method also comprises:
The shared instruction of network is closed in transmission, closes the terminal of the shared instruction of network by the virtual wi-fi network interface card unloading creating described in indication receives;
For the virtual wi-fi network interface card of unloading is closed network address translation services.
12. 1 kinds of devices that network is shared, is characterized in that, described device comprises:
The first receiver module, for receiving the shared instruction of network;
Create network interface card module, for shared instruction creates virtual wi-fi network interface card according to described network;
Configuration module, for being used configuration information to be configured the virtual wi-fi network interface card creating.
13. devices according to claim 12, is characterized in that, described configuration information for obtain in advance or Real-time Obtaining.
14. devices according to claim 12, is characterized in that, described establishment network interface card module comprises:
Creating unit, for being used the unix_open order of LINUX system to create TAP equipment;
The first registering unit, for registering the I/O event of described TAP equipment.
15. devices according to claim 12, is characterized in that, described configuration module comprises:
Dispensing unit, for being used configuration information to configure IP address, subnet mask, DNS and the default gateway of described virtual wi-fi network interface card;
The second registering unit, for the virtual wi-fi network interface card configuring to operating system registration.
16. devices according to claim 12, is characterized in that, described device also comprises:
Return to module, for returning to virtual wi-fi network interface card, create successful message.
17. devices according to claim 12, is characterized in that, described device also comprises:
The second receiver module, closes the shared instruction of network for receiving;
Unload module, for closing the shared instruction of network by the virtual wi-fi network interface card unloading creating described in basis.
18. according to the device described in claim 12 or 17, it is characterized in that, described device also comprises:
Update module, for upgrading network connection state.
19. devices according to claim 18, is characterized in that, described device also comprises:
The first sending module, for sending to application program the notice that network connection state changes.
20. 1 kinds of devices that network is shared, is characterized in that, described device comprises:
The second sending module, for sending the shared instruction of network, the terminal that indication receives the shared instruction of described network creates virtual wi-fi network interface card;
The 3rd sending module, for sending the configuration information of virtual wi-fi network interface card, indicates described terminal according to described configuration information, the virtual wi-fi network interface card creating to be configured;
Start module, be used to the virtual wi-fi network interface card configuring to start network address translation services.
21. devices according to claim 20, is characterized in that, described the 3rd sending module for sending the configuration information of virtual wi-fi network interface card after receiving the successful message of establishment virtual wi-fi network interface card that terminal returns.
22. devices according to claim 20, is characterized in that, described device also comprises:
The 4th sending module, closes the shared instruction of network for sending, and closes the terminal of the shared instruction of network by the virtual wi-fi network interface card unloading creating described in indication receives;
Closing module, is used to the virtual wi-fi network interface card of unloading to close network address translation services.
23. 1 kinds of terminal equipments, it is characterized in that, described terminal equipment includes memory, and one or more than one program, the above program of one of them or one is stored in memory, and is configured to carry out described one or above program package containing for carrying out the instruction of following operation by one or above processor:
Receive the shared instruction of network;
The instruction shared according to described network creates virtual wi-fi network interface card;
Use configuration information to be configured the virtual wi-fi network interface card creating.
CN201310473168.XA 2013-10-11 2013-10-11 Method and device for network sharing, and terminal equipment Pending CN103532802A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310473168.XA CN103532802A (en) 2013-10-11 2013-10-11 Method and device for network sharing, and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310473168.XA CN103532802A (en) 2013-10-11 2013-10-11 Method and device for network sharing, and terminal equipment

Publications (1)

Publication Number Publication Date
CN103532802A true CN103532802A (en) 2014-01-22

Family

ID=49934500

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310473168.XA Pending CN103532802A (en) 2013-10-11 2013-10-11 Method and device for network sharing, and terminal equipment

Country Status (1)

Country Link
CN (1) CN103532802A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108462701A (en) * 2018-02-12 2018-08-28 武汉卡比特信息有限公司 A kind of shared cell phone network connecting internet system and method for exempting from hot spot
CN110072234A (en) * 2017-10-31 2019-07-30 西安中兴新软件有限责任公司 Control the method and device of Wireless Fidelity connection
CN110312266A (en) * 2018-03-20 2019-10-08 成都鼎桥通信技术有限公司 The method and apparatus that the multisystem of terminal realizes WIFI communication
CN112511344A (en) * 2020-11-18 2021-03-16 深圳创维-Rgb电子有限公司 Master-slave equipment network sharing method and device and Internet of things equipment
CN113242261A (en) * 2021-06-10 2021-08-10 Oppo广东移动通信有限公司 Method and device for sharing data network, electronic equipment and storage medium
CN113595777A (en) * 2021-07-23 2021-11-02 上海商米科技集团股份有限公司 Network sharing method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120265861A1 (en) * 2011-04-15 2012-10-18 Realtek Semiconductor Corp. Method for sharing access to a wireless lan access point
CN102833877A (en) * 2012-08-06 2012-12-19 Tcl集团股份有限公司 Wi-Fi (wireless fidelity) sharing method and system
CN103220283A (en) * 2013-04-08 2013-07-24 北京小米科技有限责任公司 Method, equipment and system for network sharing
CN103297467A (en) * 2012-02-29 2013-09-11 宇龙计算机通信科技(深圳)有限公司 Information sharing method and system based on wifi network and terminal device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120265861A1 (en) * 2011-04-15 2012-10-18 Realtek Semiconductor Corp. Method for sharing access to a wireless lan access point
CN103297467A (en) * 2012-02-29 2013-09-11 宇龙计算机通信科技(深圳)有限公司 Information sharing method and system based on wifi network and terminal device
CN102833877A (en) * 2012-08-06 2012-12-19 Tcl集团股份有限公司 Wi-Fi (wireless fidelity) sharing method and system
CN103220283A (en) * 2013-04-08 2013-07-24 北京小米科技有限责任公司 Method, equipment and system for network sharing

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110072234A (en) * 2017-10-31 2019-07-30 西安中兴新软件有限责任公司 Control the method and device of Wireless Fidelity connection
CN108462701A (en) * 2018-02-12 2018-08-28 武汉卡比特信息有限公司 A kind of shared cell phone network connecting internet system and method for exempting from hot spot
CN110312266A (en) * 2018-03-20 2019-10-08 成都鼎桥通信技术有限公司 The method and apparatus that the multisystem of terminal realizes WIFI communication
CN112511344A (en) * 2020-11-18 2021-03-16 深圳创维-Rgb电子有限公司 Master-slave equipment network sharing method and device and Internet of things equipment
CN112511344B (en) * 2020-11-18 2023-12-08 深圳创维-Rgb电子有限公司 Master-slave equipment network sharing method and device and Internet of things equipment
CN113242261A (en) * 2021-06-10 2021-08-10 Oppo广东移动通信有限公司 Method and device for sharing data network, electronic equipment and storage medium
CN113595777A (en) * 2021-07-23 2021-11-02 上海商米科技集团股份有限公司 Network sharing method and system
CN113595777B (en) * 2021-07-23 2024-01-23 上海商米科技集团股份有限公司 Network sharing method and system

Similar Documents

Publication Publication Date Title
CN103501333B (en) Method, device and terminal equipment for downloading files
CN103634717B (en) A kind of method, device and the terminal device of the control of utilization earphone
CN103543913A (en) Terminal device operation method and device, and terminal device
CN105490919A (en) Message withdrawal method and device
CN103874018A (en) Access point information sharing method and device
CN103731810A (en) Access point sharing method and device
CN103607713A (en) Method, apparatus, device and system for network access
CN103532802A (en) Method and device for network sharing, and terminal equipment
CN103929796A (en) Access point sharing method and device
CN103747130B (en) A kind of control method of terminal equipment and device
CN103683437B (en) A kind of charger and terminal equipment
CN103702028A (en) Method and device for controlling shooting and terminal equipment
CN103699309B (en) A kind of method for recording of synchronization video, device and mobile terminal
CN103713943B (en) Native terminal operating system based application function realization method and device
CN104301504A (en) Message viewing method and device and mobile terminal
CN103763112A (en) User identity protection method and apparatus
WO2018049894A1 (en) Data transmission method and device
CN103338193B (en) Method, system and device for initial media equipment
CN104954159A (en) Network information statistics method and device
CN103873883A (en) Video playing method and device and terminal equipment
CN103631580A (en) Method and device for generating theme icon
CN103687063A (en) Network connecting method, network connecting device and terminal equipment
CN103607431B (en) Mobile terminal resource processing method, device and equipment
CN103634468A (en) Method, device and terminal equipment for processing alarm clock
CN103699577B (en) A kind of page display accelerated method, device and mobile terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20140122