CN108600402A - A kind of internet access method, device, intelligent terminal and storage medium - Google Patents

A kind of internet access method, device, intelligent terminal and storage medium Download PDF

Info

Publication number
CN108600402A
CN108600402A CN201711483730.1A CN201711483730A CN108600402A CN 108600402 A CN108600402 A CN 108600402A CN 201711483730 A CN201711483730 A CN 201711483730A CN 108600402 A CN108600402 A CN 108600402A
Authority
CN
China
Prior art keywords
network interface
intelligent terminal
network
personal computer
functional configuration
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.)
Granted
Application number
CN201711483730.1A
Other languages
Chinese (zh)
Other versions
CN108600402B (en
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.)
Long Shang Technology (shanghai) Co Ltd
Original Assignee
Long Shang Technology (shanghai) Co Ltd
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 Long Shang Technology (shanghai) Co Ltd filed Critical Long Shang Technology (shanghai) Co Ltd
Priority to CN201711483730.1A priority Critical patent/CN108600402B/en
Publication of CN108600402A publication Critical patent/CN108600402A/en
Application granted granted Critical
Publication of CN108600402B publication Critical patent/CN108600402B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a kind of internet access method, device, intelligent terminal and storage mediums, wherein this method includes:When intelligent terminal detects that the network function for the network interface added is opened, judge whether the cable for being inserted in the network interface connect the intelligent terminal with personal computer;If so, and the intelligent terminal detect mobile communications network open, to the network interface carry out functional configuration;When the intelligent terminal detects that the functional configuration of the network interface is completed, the successful message that networks is sent to the personal computer;Wherein, the message is used to indicate the personal computer and is surfed the Internet by the mobile communications network of the intelligent terminal.The embodiment of the present invention can make intelligent terminal have the function of routing, can provide new approach for the online of personal computer, user-friendly personal computer is surfed the Internet.

Description

A kind of internet access method, device, intelligent terminal and storage medium
Technical field
The present invention relates to field of terminal technology more particularly to a kind of internet access method, device, intelligent terminal and storage mediums.
Background technology
With intelligent terminal family and Office Space application it is universal, the function of intelligent terminal is also more and more. For example, function of surfing the Net, user can access webpage or user by wireless modes such as WIFI can pass through mobile communications network Access webpage.Therefore, intelligent terminal can also getting online at any moment in the case of no WIFI.
In the prior art, although the function of intelligent terminal is more, intelligent terminal does not support personal computer to pass through The function that intelligent terminal is surfed the Internet.And in the case of no network, personal computer can not surf the Internet, can cause it is various not Just.
Invention content
The embodiment of the present invention provides a kind of internet access method, and intelligent terminal can be made to have the function of routing, is individual calculus The online of machine provides new approach, and user-friendly personal computer is surfed the Internet.
In a first aspect, an embodiment of the present invention provides a kind of internet access methods, including:
When intelligent terminal detects that the network function for the network interface added is opened, judge that the cable for being inserted in the network interface is It is no to connect the intelligent terminal with personal computer;
If so, and the intelligent terminal detect mobile communications network open, to the network interface carry out functional configuration;
When the intelligent terminal detects that the functional configuration of the network interface is completed, sends and network to the personal computer Successful message;Wherein, the message is used to indicate mobile communications network of the personal computer by the intelligent terminal It surfs the Internet.
Second aspect, the embodiment of the present invention additionally provide a kind of Internet device, including:
Judgment module, for when detecting that the network function for the network interface added is opened, judgement to be inserted in the network interface Whether cable connect intelligent terminal with personal computer;
Functional configuration module, for if so, and the intelligent terminal detect mobile communications network open, to the network interface Carry out functional configuration;Information sending module, for when detect the network interface functional configuration complete when, to the individual calculus Machine sends the successful message that networks;Wherein, the message is used to indicate shifting of the personal computer by the intelligent terminal Dynamic communication network is surfed the Internet.
The third aspect, the embodiment of the present invention additionally provide a kind of intelligent terminal, including:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors so that one or more of processing A kind of device internet access method provided in an embodiment of the present invention.
Fourth aspect, the embodiment of the present invention additionally provide a kind of computer readable storage medium, are stored thereon with computer Program, the program realize a kind of internet access method provided in an embodiment of the present invention when being executed by processor.
Technical solution provided in an embodiment of the present invention, by the additional network interface on intelligent terminal, and the net to adding Mouthful functional configuration is carried out, makes intelligent terminal have the function of routeing, and personal computer is made to pass through the mobile communication of intelligent terminal Network is surfed the Internet, and can provide new approach for the online of personal computer, user-friendly personal computer carries out Net.
Description of the drawings
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, of the invention other Feature, objects and advantages will become more apparent upon:
Fig. 1 is a kind of flow chart of internet access method provided by one embodiment of the present invention;
Fig. 2 is a kind of flow chart of internet access method provided by one embodiment of the present invention;
Fig. 3 is a kind of flow chart of internet access method provided by one embodiment of the present invention;
Fig. 4 is a kind of structure diagram of Internet device provided by one embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of intelligent terminal provided by one embodiment of the present invention.
Specific implementation mode
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limitation of the invention.It also should be noted that in order to just In description, only some but not all contents related to the present invention are shown in the drawings.
Fig. 1 is a kind of flow chart of internet access method provided in an embodiment of the present invention, the method by a kind of Internet device Lai It executes, described device is executed by software and/or hardware, and described device configures in the intelligent terminal that mobile phone etc. can surf the Internet. Wherein, which can have the function of call, short message etc..The method can be applied to personal computer and intelligent terminal In the scene connected by wired mode.
As shown in Figure 1, technical solution provided in an embodiment of the present invention includes:
S110:When intelligent terminal detects that the network function for the network interface added is opened, judgement is inserted in the network interface Whether cable connect the intelligent terminal with personal computer.
In embodiments of the present invention, the network interface added can be Ethernet interface, can be specifically rj-45 Ethernet interfaces.Its In, the network interface added can have the function of USB and network function, and the USB functions and network work(of network interface can be controlled by switch Energy.Wherein, the switch for controlling network interface can be physical button, can also be either the button of interface display or can also be In the preset characters of interface input, or it can also be the switch of other forms.
When the USB functions for the network interface added are opened, and network function is closed, by the network interface, intelligent terminal can be with Its personal computer connected carries out data transmission.It is a when the network function for the network interface added is opened, and USB functions are closed After people's computer is connect by the network interface with intelligent terminal, it can be surfed the Internet by the mobile communications network of intelligent terminal.
In an embodiment of the invention, when the network function for detecting the network interface added when intelligent terminal is opened, sentence Before whether the disconnected cable for being inserted in the network interface connect the intelligent terminal with personal computer, can also include:In intelligence Network interface can be added in terminal, and corresponding network interface card is set in the network interface.Wherein, network interface card is additional is arranged on intelligent terminal Network interface card, it is corresponding with the network interface added.
S120:If so, and the intelligent terminal detect mobile communications network open, to the network interface carry out function match It sets.
In embodiments of the present invention, when intelligent terminal judges to be inserted in the cable of network interface by intelligent terminal and personal computer When connecting, and detecting that mobile communications network is opened, functional configuration is carried out to network interface.Otherwise, to network interface without functional configuration. When network interface is without functional configuration, personal computer cannot be surfed the Internet by the mobile communications network of intelligent terminal.Wherein, Optionally, mobile communications network can be with 4G, 3G or 2G network.
In one embodiment of the invention, to the functional configuration of network interface can also open network interface network function when into Row.But works as and judge that intelligent terminal is connect by the cable for being inserted in network interface with personal computer, and detect that mobile communications network is opened Qi Shi, carries out functional configuration to network interface, can improve service efficiency, and network interface function is carried out when avoiding being not used personal computer and is matched The wasting of resources caused by setting.
In one embodiment of the invention, optionally, functional configuration is carried out to the network interface, may include:By setting It is the Network card setup to set the local in intelligent terminal and guard connector (Native daemon connector, NDC) Tether functions, so that the personal computer is surfed the Internet by the intelligent terminal;By being arranged in the intelligent terminal Busybox programs are the network card configuration internet protocol address and mask;By the NDC to finger daemon (Network Daemon, NETD) sends Tether Start orders;Wherein, the Tether Start orders, are used to indicate The DNSmasq programs that the NETD controls are arranged in intelligent terminal start, and using the DNSmasq programs as DynamicHost Configuration protocol Dynamic Host Configuration Protocol, DHCP) server networks with working as the personal computer When for the personal computer distribute IP address;The domain name forwarding capability of the network interface card is set by the NDC, so that the net When clamping receives user's inputs domain name, domain name is converted into corresponding IP address.
Wherein, NDC is located in intelligent terminal system, can specifically be located at application framework layer, can be to other layers of system Operational order is sent, the functions such as monitoring information are can be used for.When NDC is Network card setup Tether functions, can be NDC to Network interface card sends Tether orders, is Network card setup Tether functions.For example, realization of such as issuing orders can be passed through:Ndc tether interface add eth0.Wherein, which is used to be Network card setup Tether functions, and so that NETD is known on network interface card and open Tether functions.When network interface card has the function of Tether, intelligent terminal can be made to have the function of routing, to other personal Computer shared verification.
Wherein, NETD is responsible for the realization of the network operation correlation function with some physical ports, for example, broadband control, net Network address conversion, personal area network, PPP links, shared verification etc., be all according to modular organisation under NRTD file directorys. Wherein, NETD can be sent out mainly as the communication bridge between hardware driving layer and application framework layer, application framework layer to NETD Send operational order.
In embodiments of the present invention, it is Network card setup IP address and mask by Busybox programs.Such as it can pass through Following order is realized:Busybox ifconfig eth0 192.168.42.1netmask 255.255.255.0up.Its In, eth0 refers to network interface card.Busybox programs can by it is many have the unix tool of the small versions of general character be attached to one it is single Executable file.Such set can substitute the GNU fileutils, shellutils etc. of most of common tool such as Tool, BusyBox provide a fairly perfect environment, can be adapted for any small embedded system.It is set when for network interface card After setting IP address and mask, network interface card could be accurately sent to by coming from the data packet of outer net, then is sent to by network interface card corresponding Personal computer.
In embodiments of the present invention, Tether Start orders are sent to NETD by NDC, for example, it may be following Order:Ndc tether start 192.168.42.2 192.168.42.254, wherein the parameter of the order is DynamicHost Configuration protocol range (DHCP range).Tether Start orders are used to indicate NETD controls and are arranged in intelligent terminal DNSmasq programs start, and using DNSmasq programs as Dynamic Host Configuration Protocol server using when personal computer networks as personal computer Distribute IP address.
In embodiments of the present invention, the domain name forwarding capability of network interface card is set by NDC.For example, can be by such as issuing orders It realizes:Ndc ipfwd enable eth0.Wherein, eth0 refers to network interface card.When network interface card has domain name forwarding capability, can make When network interface card receives domain name input by user, corresponding IP address is translated domain names into, to access external service according to IP address Device is with data of inquiring etc..In embodiments of the present invention, the domain name forwarding capability of dns server can also be set, so that DNS query All it is forwarded to mobile communication network side.For example, the method for setting, which can be NDC, sends operational order, can be as issued orders: Ndc tether dns set 101 211.136.112.50.Wherein, parameter 101 is the network identity of mobile communications network (Network Identifier, NETID), parameter 211.136.112.50 are that mobile communications network establishes the DNS obtained later The address of server, the address are determined by operator.
In one embodiment of the invention, optionally, described that functional configuration is carried out to the network interface, further include:Pass through The NDC establishes network interface card and is associated with the first routing table in the intelligent terminal, and the first routing rule is arranged;Wherein, First routing rule is used to indicate when the network interface card receives the data packet for coming from outer net, is based on the first via Data packet will be received by table and be sent to corresponding personal computer;Institute is added in secondary route table in the intelligent terminal The routing iinformation of network interface card is stated, and secondary route rule is set;Wherein, the secondary route rule, is used to indicate when the network interface card When receiving the data packet for coming from the personal computer, the data packet received is sent to based on the secondary route table Corresponding outer net address.
Wherein, it establishes network interface card by DNC to be associated with the first routing table in intelligent terminal, reality of such as issuing orders can be passed through It is existing:Ndc nat enable eth0rmnet_data0 0.Wherein, rmnet_data0 is the first routing table.Be arranged the first via by Rule can pass through following order:Ip rule add from all iif eth0lookup rmnet_data0.Wherein, First routing rule is used to indicate when network interface card receives the data packet for coming from outer net, will be received based on the first routing table Data packet is sent to corresponding personal computer.For example, when user inquires data on a personal computer, come from outer The data packet of net is sent to network interface card, inquires the IP address of personal computer corresponding with outer net address in the first routing table, and will The data packet received is sent on personal computer corresponding with outer net address, realizes the inquiry of data.
Wherein, the routing iinformation that the network interface card is added in the secondary route table in the intelligent terminal, can be by such as Under order realize:Ip route add 192.168.42.0/24dev eth0proto static scope link table local_network.Wherein, local_network is secondary route table.The order is in secondary route table local_ The dependent routing information of network interface card eth0 is added in network.
Wherein, intelligent terminal setting secondary route rule can be realized by following order:Ip rule add from all oif eth0lookup local_network.Order effect is to come from personal computer when network interface card eth0 is received On data packet when, search secondary route table local_network, and the data packet received be sent to corresponding outer entoilage Location.For example, when user is by personal computer uplink data, network interface card receives the data packet of personal computer transmission, Outer net address corresponding with pc ip address in secondary route table is inquired, realizes the upload of data.
In one embodiment of the invention, optionally, described that functional configuration is carried out to the network interface, further include:It is described The data packet for coming from outer net that network interface card receives is identified by intelligent terminal, with to come from the data packet of outer net into Row tracking, and third routing rule is set, the third routing rule is used to indicate the mark that the network interface card wraps based on the data Know and inquire first routing table, the data packet of mark is sent to corresponding personal computer.
Wherein, be identified the data packet for coming from outer net that network interface card receives can be by following life for intelligent terminal It enables and realizing:Iptables-t mangle-A INPUT-i eth0-j MARK--set-xmark0x30088/0xffffffff. The order is that the packet marking fwmark for coming from outer net for receiving network interface card is 0x30088, to be chased after to data packet Track.Wherein it is possible to be that the data packet for the setting form for coming from outer net is marked, the data packet in the form of to setting carries out Tracking.
Wherein, setting third routing rule can pass through realization of such as issuing orders:Ip rule add from all fwmark 0x10088/0x1ffff lookup local_network.The order is the data packet that fwmark is 0x10088/0x1ffff Secondary route table local_network is searched, i.e., when network interface card eth0 receives the data for coming from outer net, by data packet into rower Know, and according to identifier lookup secondary route table local_network, the data packet of mark is sent to corresponding individual calculus On machine.
It should be noted that the specific steps for carrying out functional configuration in the embodiment of the present invention to network interface can as needed really The sequence of fixed each step, the sequence of each step are not restricted by.
S130:When the intelligent terminal detects that the functional configuration of the network interface is completed, sent out to the personal computer Send networking successful message;Wherein, it is logical by the movement of the intelligent terminal to be used to indicate the personal computer for the message Communication network is surfed the Internet.
In embodiments of the present invention, when network interface functional configuration is completed, intelligent terminal to personal computer send networking at The message of work(, the message are used to indicate personal computer and are surfed the Internet by the mobile communications network of intelligent terminal.Wherein, work as net When mouth functional configuration is completed, intelligent terminal has the function of routing, and request, data packet etc. can be sent to specified address.
In embodiments of the present invention, when user is connected using personal computer by the mobile communications network of intelligent terminal When net, start DNSmasq programs in intelligent terminal, for the IP address of personal computer distribution.If user is input to individual calculus Machine is domain name, then inquiry request is sent to network interface card by personal computer, wherein the IP of personal computer is carried in inquiry request Location, inquiry the information such as domain name.The inquiry request that dns server in LAN is received according to network interface card, translates domain names into The IP address of accessed external network server, dns server control network interface card and access corresponding external network server, and external network server will Corresponding data packet is sent to network interface card, is forwarded on personal computer by network interface card.
A kind of internet access method provided in an embodiment of the present invention, by the additional network interface on intelligent terminal, and to adding Network interface carry out functional configuration, make network interface have the function of routeing, and personal computer is made to pass through the mobile communication of intelligent terminal Network is surfed the Internet, and can provide new approach for the online of personal computer, user-friendly personal computer carries out Net.
Fig. 2 is a kind of flow chart of internet access method provided in an embodiment of the present invention, on the basis of the above embodiments, is such as schemed Shown in 2, technical solution provided in an embodiment of the present invention includes:
S210:Network interface is added on the intelligent terminal, and corresponding network interface card is set in the network interface.
S220:When the intelligent terminal detects that the network function of the network interface is not turned on, show for opening State the interface of the network function of network interface.
In embodiments of the present invention, it when detecting that the network function of network interface is not turned on, is shown on the screen of terminal The interface of the network function of network interface is opened, user can input the character for the network function for being used to open network interface in interface.Its In, can include input frame in interface, so that user inputs character in input frame.
Wherein, the detection that whether intelligent terminal opens the network function of network interface can be at interval of examining for a period of time It surveys, can also be real-time detection, or can also be to be controlled by user.For example, it may be when user presses setting button, Intelligent terminal receives signal, and is detected to whether the network function of network interface is opened.It for another example can also be user to screen It is unlocked, when intelligent terminal receives unlocking screen signal, whether intelligent terminal opens progress to the network function of network interface Detection.
S230:When obtaining preset characters input by user by the interface, the network function of the network interface is opened.
In embodiments of the present invention, preset characters can need to be configured according to user, optionally, can be arranged and facilitate use The character of family input, or other characters can also be inputted.For example, it is " * #9916#, net on that can input" click determination When, open the network function of network interface.
The network function for opening network interface by inputting character in display interface as a result, it is convenient for the user to operate, it improves and uses Efficiency.
S240:When intelligent terminal detects that the network function for the network interface added is opened, judgement is inserted in the network interface Whether cable connect the intelligent terminal with personal computer.
S250:If so, and the intelligent terminal detect mobile communications network open, to the network interface carry out function match It sets.
S260:When the intelligent terminal detects that the functional configuration of the network interface is completed, sent out to the personal computer Send networking successful message;Wherein, it is logical by the movement of the intelligent terminal to be used to indicate the personal computer for the message Communication network is surfed the Internet.
Fig. 3 is a kind of flow chart of internet access method provided in an embodiment of the present invention, as shown in figure 3, the embodiment of the present invention carries The technical solution of confession includes:
S310:Start.
S320:Judge whether network interface comes into force.
If so, S330 is executed, if it is not, executing S370.
S330:When detecting insertion cable in network interface, mobile communications network is opened.
S340:Functional configuration is carried out to network interface.
S350:When networking successfully, notice personal computer is normally surfed the Internet.
S360:Terminate.
S370:Input preset characters, it is determined whether open the network function of network interface.
If so, returning to S320.
Fig. 4 is a kind of structure diagram of Internet device provided in an embodiment of the present invention, and described device is for executing one kind Network method, as shown in figure 4, described device 400 includes:
Judgment module 410, for when detecting that the network function for the network interface added is opened, judgement to be inserted in the network interface Cable whether intelligent terminal is connect with personal computer;
Functional configuration module 420 is used for if so, opening mobile communications network, and carry out functional configuration to the network interface;
Information sending module 430, for when detect the network interface functional configuration complete when, to the personal computer Send the successful message that networks;Wherein, the message is used to indicate movement of the personal computer by the intelligent terminal Communication network is surfed the Internet.
Further, described device 400 further includes:
Interface display module 440, for when detecting that the network function of the network interface is not turned on, showing for opening The interface of the network function of the network interface;
Network function opening module 450, for when obtaining preset characters input by user by the interface, opening institute State the network function of network interface.
Further, described device 400 further includes network interface setup module 460, for adding net on the intelligent terminal Mouthful, and corresponding network interface card is set in the network interface.
Further, described that functional configuration is carried out to the network interface, including:
It is the Network card setup Tether functions to guard connector NDC by the local being arranged in intelligent terminal, so that The personal computer is surfed the Internet by the intelligent terminal;
By the Busybox programs that are arranged in the intelligent terminal be the network card configuration internet protocol address with And mask;
By the NDC Tether Start orders are sent to finger daemon NETD;Wherein, the Tether Start lives It enables, is used to indicate the DNSmasq programs that NETD control is arranged in intelligent terminal and starts, and by the DNSmasq programs As dynamic host configuration protocol DHCP server to be that the personal computer distributes IP when the personal computer networks Address;
The domain name forwarding capability of the network interface card is set by the NDC, so that the network interface card receives user's inputs domain name When, domain name is converted into corresponding IP address.
Further, described that functional configuration is carried out to the network interface, further include:
The network interface card is established by the NDC to be associated with the first routing table in the intelligent terminal, and is arranged the One routing rule;Wherein, first routing rule is used to indicate and comes from the data packet of outer net when the network interface card receives When, data packet will be received based on first routing table and be sent to corresponding personal computer;
The routing iinformation of the network interface card is added in secondary route table in the intelligent terminal, and secondary route rule are set Then;Wherein, secondary route rule is used to indicate and comes from the data packet of the personal computer when the network interface card receives When, the data packet received is sent to by corresponding outer net address based on the secondary route table.
Further, described that functional configuration is carried out to the network interface, further include:
The data packet for coming from outer net that network interface card receives is identified by the intelligent terminal, with to coming from outer net The data packet is tracked, and third routing rule is arranged, the third routing rule, is used to indicate the network interface card and is based on connecing The mark of the data packet received inquires the secondary route table, and the data packet of mark is sent to corresponding individual calculus Machine.
A kind of Internet device that the embodiment of the present invention is provided can perform in one kind that any embodiment of the present invention is provided Network method has the corresponding function module of execution method and advantageous effect.
A kind of Internet device provided in an embodiment of the present invention, by the additional network interface on intelligent terminal, and to adding Network interface carry out functional configuration, make intelligent terminal have the function of routeing, and personal computer is made to pass through the movement of intelligent terminal Communication network is surfed the Internet, and can provide new approach for the online of personal computer, user-friendly personal computer into Row online.
Fig. 5 is a kind of structural schematic diagram of intelligent terminal provided in an embodiment of the present invention.Fig. 5, which is shown, is suitable for use in realization The block diagram of the exemplary intelligent terminal 512 of embodiment of the present invention.The intelligent terminal 512 that Fig. 5 is shown is only an example, no The function and use scope for coping with the embodiment of the present invention bring any restrictions.
As shown in figure 5, intelligent terminal 512 is showed in the form of universal computing device.The component of intelligent terminal 512 can wrap It includes but is not limited to:One or more processor or processing unit 516, system storage 528 connect different system component The bus 518 of (including system storage 528 and processing unit 516).
Bus 518 indicates one or more in a few class bus structures, including memory bus or Memory Controller, Peripheral bus, graphics acceleration port, processor or the local bus using the arbitrary bus structures in a variety of bus structures.It lifts For example, these architectures include but not limited to industry standard architecture (ISA) bus, microchannel architecture (MAC) Bus, enhanced isa bus, Video Electronics Standards Association (VESA) local bus and peripheral component interconnection (PCI) bus.
Intelligent terminal 512 typically comprises a variety of computer system readable media.These media can any can be visited Ask the usable medium of intelligent terminal 512, including volatile and non-volatile media, moveable and immovable medium.
System storage 528 may include the computer system readable media of form of volatile memory, such as deposit at random Access to memory (RAM) 530 and/or cache memory 532.Intelligent terminal 512 may further include it is other it is removable/no Movably, volatile/non-volatile computer system storage medium.Only as an example, storage system 534 can be used for reading and writing Immovable, non-volatile magnetic media (Fig. 5 do not show, commonly referred to as " hard disk drive ").It, can although being not shown in Fig. 5 To provide for the disc driver to moving non-volatile magnetic disk (such as " floppy disk ") read-write, and to removable non-volatile Property CD (such as CD-ROM, DVD-ROM or other optical mediums) read and write CD drive.In these cases, each to drive Dynamic device can be connected by one or more data media interfaces with bus 518.Memory 528 may include at least one journey There is one group of (for example, at least one) program module, these program modules to be configured to perform this hair for sequence product, the program product The function of bright each embodiment.
Program/utility 540 with one group of (at least one) program module 542 can be stored in such as system and deposit In reservoir 528, such program module 542 includes but not limited to operating system, one or more application program, other programs Module and program data may include the realization of network environment in each or certain combination in these examples.Program mould Block 542 usually executes function and/or method in embodiment described in the invention.
Intelligent terminal 512 can also be with one or more external equipments 514 (such as keyboard, sensing equipment, display 524 Deng) communication, can also be enabled a user to one or more equipment interact with the intelligent terminal 512 communicate, and/or with make Any equipment that the intelligent terminal 512 can be communicated with one or more of the other computing device (such as network interface card, modem Etc.) communication.This communication can be carried out by input/output (I/O) interface 522.Also, intelligent terminal 512 can also lead to Cross network adapter 520 and one or more network (such as LAN (LAN), wide area network (WAN) and/or public network, example Such as internet) communication.As shown in figure 5, network adapter 520 is communicated by bus 518 with other modules of server 512.It answers When understanding, although not shown in the drawings, other hardware and/or software module can be used in conjunction with intelligent terminal 512, including it is but unlimited In:Microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive and number According to backup storage system etc..
Processing unit 516 is stored in program in system storage 528 by operation, to perform various functions using with And data processing, such as realize a kind of internet access method that the embodiment of the present invention is provided.
That is, the processing unit is realized when executing described program:When the network function unlatching for detecting the network interface added When, judge whether the cable for being inserted in the network interface connect the intelligent terminal with personal computer;If so, and detecting shifting Dynamic communication network is opened, and functional configuration is carried out to the network interface;When detecting that the functional configuration of the network interface is completed, to described Personal computer sends the successful message that networks;Wherein, the message is used to indicate the personal computer and passes through the intelligence The mobile communications network of terminal is surfed the Internet.
The embodiment of the present invention additionally provides a kind of storage medium including computer executable instructions.It is stored thereon with calculating Machine program, the program realize a kind of internet access method provided in an embodiment of the present invention when being executed by processor.
The storage medium provided in an embodiment of the present invention for including computer executable instructions, may be used one or more meters The arbitrary combination of calculation machine readable medium.Computer-readable medium can be computer-readable signal media or computer-readable deposit Storage media.Computer readable storage medium for example may be-but not limited to-electricity, magnetic, optical, electromagnetic, infrared ray or half System, device or the device of conductor, or the arbitrary above combination.The more specific example of computer readable storage medium is (non- Exhaustive list) include:Electrical connection, portable computer diskette with one or more conducting wires, hard disk, random access memory Device (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, Portable, compact magnetic Disk read-only memory (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document In, computer readable storage medium, which can be any, includes or the tangible medium of storage program, which can be commanded execution The either device use or in connection of system, device.
Computer-readable signal media may include in a base band or as the data-signal that a carrier wave part is propagated, Wherein carry computer-readable program code.Diversified forms may be used in the data-signal of this propagation, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By instruction execution system, device either device use or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited In wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
It can be write with one or more programming languages or combinations thereof for executing the computer that operates of the present invention Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++, Further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with It fully executes, partly execute on the user computer on the user computer, being executed as an independent software package, portion Divide and partly executes or executed on a remote computer or server completely on the remote computer on the user computer. Be related in the situation of remote computer, remote computer can pass through the network of any kind --- including LAN (LAN) or Wide area network (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as carried using Internet service It is connected by internet for quotient).
Note that above are only presently preferred embodiments of the present invention and institute's application technology principle.It will be appreciated by those skilled in the art that The present invention is not limited to specific embodiments described here, can carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out to the present invention by above example It is described in further detail, but the present invention is not limited only to above example, without departing from the inventive concept, also May include other more equivalent embodiments, and the scope of the present invention is determined by scope of the appended claims.

Claims (10)

1. a kind of internet access method, which is characterized in that including:
When intelligent terminal detects that the network function for the network interface added is opened, judge that the cable for being inserted in the network interface whether will The intelligent terminal is connect with personal computer;
If so, and the intelligent terminal detect mobile communications network open, to the network interface carry out functional configuration;
When the intelligent terminal detects that the functional configuration of the network interface is completed, network successfully to personal computer transmission Message;Wherein, the message is used to indicate the personal computer and is carried out by the mobile communications network of the intelligent terminal Online.
2. according to the method described in claim 1, it is characterized in that, further including:
When the intelligent terminal detects that the network function of the network interface is not turned on, the net for opening the network interface is shown The interface of network function;
When obtaining preset characters input by user by the interface, the network function of the network interface is opened.
3. according to the method described in claim 1, it is characterized in that, further including:
Network interface is added on the intelligent terminal, and corresponding network interface card is set in the network interface.
4. according to the method described in claim 3, it is characterized in that, it is described to the network interface carry out functional configuration, including:
It is the Network card setup Tether functions to guard connector NDC by the local being arranged in intelligent terminal, so that described Personal computer is surfed the Internet by the intelligent terminal;
It is the network card configuration internet protocol address by the Busybox programs that are arranged in the intelligent terminal and covers Code;
By the NDC Tether Start orders are sent to finger daemon NETD;Wherein, the Tether Start orders, The DNSmasq programs that NETD control is arranged in intelligent terminal are used to indicate to start, and using the DNSmasq programs as Dynamic host configuration protocol DHCP server is to be that the personal computer distributes IP address when the personal computer networks;
The domain name forwarding capability of the network interface card is set by the NDC, it, will when so that the network interface card receiving user's inputs domain name Domain name is converted into corresponding IP address.
5. according to the method described in claim 4, it is characterized in that, it is described to the network interface carry out functional configuration, further include:
The network interface card is established by the NDC to be associated with the first routing table in the intelligent terminal, and the first via is set By rule;Wherein, first routing rule is used to indicate when the network interface card receives the data packet for coming from outer net, base Data packet, which will be received, in first routing table is sent to corresponding personal computer;
The routing iinformation of the network interface card is added in secondary route table in the intelligent terminal, and secondary route rule is set; Wherein, the secondary route rule, is used to indicate when the network interface card receives the data packet for coming from the personal computer, The data packet received is sent to corresponding outer net address based on the secondary route table.
6. according to the method described in claim 5, it is characterized in that, it is described to the network interface carry out functional configuration, further include:
The data packet for coming from outer net that network interface card receives is identified by the intelligent terminal, with to coming from described in outer net Data packet is tracked, and third routing rule is arranged;The third routing rule is used to indicate the network interface card and is based on receiving The mark of the data packet inquire the secondary route table, the data packet of mark is sent to corresponding personal computer.
7. a kind of Internet device, which is characterized in that including:
Judgment module, for when detecting that the network function for the network interface added is opened, judging the cable for being inserted in the network interface Whether intelligent terminal is connect with personal computer;
Functional configuration module, for if so, and detect mobile communications network open, to the network interface carry out functional configuration;
Information sending module, for when detecting that the functional configuration of the network interface is completed, sending and connecting to the personal computer Net successful message;Wherein, the message is used to indicate mobile radio communication of the personal computer by the intelligent terminal Network is surfed the Internet.
8. device according to claim 7, which is characterized in that further include:
Interface display module, for when detecting that the network function of the network interface is not turned on, showing for opening the net The interface of the network function of mouth;
Network function opening module, for when obtaining preset characters input by user by the interface, opening the network interface Network function.
9. a kind of intelligent terminal, which is characterized in that including:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors so that one or more of processors are real A kind of now internet access method as described in any in claim 1-6.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor Any a kind of internet access method in claim 1-6 is realized when execution.
CN201711483730.1A 2017-12-29 2017-12-29 Internet access method and device, intelligent terminal and storage medium Active CN108600402B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711483730.1A CN108600402B (en) 2017-12-29 2017-12-29 Internet access method and device, intelligent terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711483730.1A CN108600402B (en) 2017-12-29 2017-12-29 Internet access method and device, intelligent terminal and storage medium

Publications (2)

Publication Number Publication Date
CN108600402A true CN108600402A (en) 2018-09-28
CN108600402B CN108600402B (en) 2021-12-14

Family

ID=63633102

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711483730.1A Active CN108600402B (en) 2017-12-29 2017-12-29 Internet access method and device, intelligent terminal and storage medium

Country Status (1)

Country Link
CN (1) CN108600402B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101175310A (en) * 2006-11-03 2008-05-07 中兴通讯股份有限公司 Wireless access system and method thereof
CN101193369A (en) * 2006-11-23 2008-06-04 中兴通讯股份有限公司 A device and method for realizing mobile phone and external network access of PC based on mobile phone
CN201114625Y (en) * 2007-09-03 2008-09-10 中兴通讯股份有限公司 Mobile phone with broadband Internet access function
CN101808425A (en) * 2009-02-17 2010-08-18 上海华阳检测仪器有限公司 Vibration signal acquisition system realized by smart phone
EP2415232A2 (en) * 2009-03-31 2012-02-08 Google, Inc. Unifying web and phone presence
CN104333867A (en) * 2014-12-02 2015-02-04 上海斐讯数据通信技术有限公司 Method and device for sharing PC network by virtue of mobile phone
CN105704226A (en) * 2016-03-11 2016-06-22 北京奇虎科技有限公司 Intelligent terminal and network configuration method thereof

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101175310A (en) * 2006-11-03 2008-05-07 中兴通讯股份有限公司 Wireless access system and method thereof
CN101193369A (en) * 2006-11-23 2008-06-04 中兴通讯股份有限公司 A device and method for realizing mobile phone and external network access of PC based on mobile phone
CN201114625Y (en) * 2007-09-03 2008-09-10 中兴通讯股份有限公司 Mobile phone with broadband Internet access function
CN101808425A (en) * 2009-02-17 2010-08-18 上海华阳检测仪器有限公司 Vibration signal acquisition system realized by smart phone
EP2415232A2 (en) * 2009-03-31 2012-02-08 Google, Inc. Unifying web and phone presence
CN104333867A (en) * 2014-12-02 2015-02-04 上海斐讯数据通信技术有限公司 Method and device for sharing PC network by virtue of mobile phone
CN105704226A (en) * 2016-03-11 2016-06-22 北京奇虎科技有限公司 Intelligent terminal and network configuration method thereof

Also Published As

Publication number Publication date
CN108600402B (en) 2021-12-14

Similar Documents

Publication Publication Date Title
CN103825895B (en) A kind of information processing method and electronic equipment
CN105007581B (en) A kind of network access authentication method and client
CN104333552B (en) A kind of certification determines method and access device
TWI224907B (en) Method and system for contacting a device on a private network using a specialized domain name server
CN103179100B (en) A kind of method and apparatus preventing domain name system Tunnel Attack
CN106383736B (en) Ports-Extending method and apparatus
CN104113530B (en) The method and device of access router
EP1465381A2 (en) Program, method and apparatus providing mobility of voice over IP terminals
CN106105158B (en) For establishing the method and system of connection between searchers's device and destination apparatus
CN107197462A (en) Detection method, device and the electronic equipment of wireless network type
CN109582256A (en) Method of printing, apparatus and system
CN108540552A (en) Device interconnection method, apparatus, system, device and storage medium
CN107969003A (en) A kind of wireless access authentication method
CN108377499A (en) A kind of method for network access, routing device and terminal
CN108762659A (en) Control method, device, storage medium and the electronic device of cloud terminal
CN107959920A (en) A kind of method and apparatus of registering based on wireless network
JP6181760B2 (en) System and method for sharing image data
CN106790010A (en) ARP attack detection method, device and system based on Android system
CN107135506A (en) A kind of portal authentication methods, apparatus and system
CN107666428A (en) Silencing devices detection method and device
CN108600402A (en) A kind of internet access method, device, intelligent terminal and storage medium
CN108199964A (en) A kind of transmission method, terminal, server and computer readable storage medium
CN107454099A (en) A kind of secure data management method, terminal and computer-readable recording medium
CN105635316B (en) A kind of control method and server of domestic terminal apparatus
CN104125605B (en) A kind of implementation method and device for asking to set up WIFI connections

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant