CN108600402B - Internet access method and device, intelligent terminal and storage medium - Google Patents

Internet access method and device, intelligent terminal and storage medium Download PDF

Info

Publication number
CN108600402B
CN108600402B CN201711483730.1A CN201711483730A CN108600402B CN 108600402 B CN108600402 B CN 108600402B CN 201711483730 A CN201711483730 A CN 201711483730A CN 108600402 B CN108600402 B CN 108600402B
Authority
CN
China
Prior art keywords
network
intelligent terminal
personal computer
function
internet
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.)
Active
Application number
CN201711483730.1A
Other languages
Chinese (zh)
Other versions
CN108600402A (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.)
Longsung Technology Shanghai Co ltd
Original Assignee
Longsung 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 Longsung Technology Shanghai Co ltd filed Critical Longsung 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

Images

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)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention discloses a method and a device for surfing the internet, an intelligent terminal and a storage medium, wherein the method comprises the following steps: when the intelligent terminal detects that the network function of the added network port is started, judging whether a network cable inserted into the network port connects the intelligent terminal with a personal computer; if yes, the intelligent terminal detects that a mobile communication network is started, and function configuration is carried out on the network port; when the intelligent terminal detects that the function configuration of the internet access is completed, a message of successful networking is sent to the personal computer; and the message is used for indicating the personal computer to surf the internet through the mobile communication network of the intelligent terminal. The embodiment of the invention can enable the intelligent terminal to have the routing function, can provide a new way for the Internet surfing of the personal computer, and is convenient for users to surf the Internet by using the personal computer.

Description

Internet access method and device, intelligent terminal and storage medium
Technical Field
The invention relates to the technical field of terminals, in particular to a method and a device for surfing the internet, an intelligent terminal and a storage medium.
Background
Along with the popularization of the application of the intelligent terminal in families and office places, the functions of the intelligent terminal are more and more. For example, the user may access the web page through a wireless mode such as WIFI through the internet access function, or the user may access the web page through a mobile communication network. Therefore, the intelligent terminal can surf the internet at any time under the condition of no WIFI.
In the prior art, although the intelligent terminal has many functions, the intelligent terminal does not support the function of a personal computer for surfing the internet through the intelligent terminal. In the absence of a network, a personal computer cannot surf the internet, which causes various inconveniences.
Disclosure of Invention
The embodiment of the invention provides an internet access method, which can enable an intelligent terminal to have a routing function, provide a new way for the internet access of a personal computer and facilitate a user to use the personal computer to access the internet.
In a first aspect, an embodiment of the present invention provides an internet access method, including:
when the intelligent terminal detects that the network function of the added network port is started, judging whether a network cable inserted into the network port connects the intelligent terminal with a personal computer;
if yes, the intelligent terminal detects that a mobile communication network is started, and function configuration is carried out on the network port;
when the intelligent terminal detects that the function configuration of the internet access is completed, a message of successful networking is sent to the personal computer; and the message is used for indicating the personal computer to surf the internet through the mobile communication network of the intelligent terminal.
In a second aspect, an embodiment of the present invention further provides an internet access apparatus, including:
the judging module is used for judging whether a network cable inserted into the network port connects the intelligent terminal with the personal computer or not when the network function of the additionally arranged network port is detected to be started;
the function configuration module is used for carrying out function configuration on the network port if the intelligent terminal detects that the mobile communication network is started; the information sending module is used for sending a successful networking message to the personal computer when the completion of the function configuration of the internet access is detected; and the message is used for indicating the personal computer to surf the internet through the mobile communication network of the intelligent terminal.
In a third aspect, an embodiment of the present invention further provides an intelligent terminal, including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors enable the one or more processors to implement the internet access method provided by the embodiment of the invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the internet access method provided in the embodiment of the present invention.
According to the technical scheme provided by the embodiment of the invention, the intelligent terminal is additionally provided with the network port, and the function configuration is carried out on the additionally arranged network port, so that the intelligent terminal has the routing function, and the personal computer can surf the internet through the mobile communication network of the intelligent terminal, a new way can be provided for surfing the internet of the personal computer, and a user can conveniently surf the internet by using the personal computer.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
fig. 1 is a flowchart of a method for accessing a network according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for accessing a network according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for accessing a network according to an embodiment of the present invention;
fig. 4 is a block diagram illustrating a structure of an internet access device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an intelligent terminal according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some but not all of the relevant aspects of the present invention are shown in the drawings.
Fig. 1 is a flowchart of a method for accessing internet according to an embodiment of the present invention, where the method is executed by an internet access device, the device is executed by software and/or hardware, and the device is configured in an intelligent terminal such as a mobile phone and the like capable of accessing internet. The intelligent terminal can have functions of communication, short messages and the like. The method can be applied to a scene that the personal computer is connected with the intelligent terminal in a wired mode.
As shown in fig. 1, the technical solution provided by the embodiment of the present invention includes:
s110: when the intelligent terminal detects that the network function of the added network port is started, whether a network cable inserted into the network port connects the intelligent terminal with the personal computer or not is judged.
In the embodiment of the present invention, the additional network port may be an ethernet port, and specifically, may be an rj-45 ethernet port. The added network port can have a USB function and a network function, and the USB function and the network function of the network port can be controlled through the switch. The switch for controlling the network port may be a physical key, or may also be a button displayed on the interface, or may also be a preset character input on the interface, or may also be a switch in other forms.
When the USB function of the added network port is opened and the network function is closed, the intelligent terminal can transmit data with the personal computer connected with the intelligent terminal through the network port. When the network function of the added network port is opened and the USB function is closed, the personal computer is connected with the intelligent terminal through the network port and then can surf the internet through the mobile communication network of the intelligent terminal.
In an embodiment of the present invention, when the intelligent terminal detects that a network function of an additional network port is turned on, before determining whether a network cable inserted into the network port connects the intelligent terminal with a personal computer, the method may further include: and additionally arranging a network port on the intelligent terminal, and arranging a corresponding network card in the network port. The network card is additionally arranged on the intelligent terminal and corresponds to the additionally arranged network port.
S120: if yes, the intelligent terminal detects that the mobile communication network is started, and the network port is configured in a function mode.
In the embodiment of the invention, when the intelligent terminal judges that the network cable inserted into the network port connects the intelligent terminal with the personal computer and detects that the mobile communication network is started, the function configuration is carried out on the network port. Otherwise, the network port is not configured with functions. When the network port is not configured with functions, the personal computer can not surf the internet through the mobile communication network of the intelligent terminal. Wherein, optionally, the mobile communication network may be a 4G, 3G or 2G network.
In an embodiment of the present invention, the function configuration of the portal may also be performed when the network function of the portal is turned on. However, when the network cable inserted into the network port is judged to connect the intelligent terminal with the personal computer and the mobile communication network is detected to be opened, the network port is configured with functions, so that the use efficiency can be improved, and the resource waste caused by the network port function configuration when the personal computer is not used is avoided.
In an embodiment of the present invention, optionally, the performing a function configuration on the network port may include: setting a gather function for the network card through a local daemon connector (NDC) arranged in the intelligent terminal so that the personal computer can surf the internet through the intelligent terminal; configuring an Internet Protocol (IP) address and a mask for the network card through a Busybox program arranged in the intelligent terminal; sending a Tether Start command to a Daemon (NETD) through the NDC; the Tether Start command is used for indicating the NETD to control the starting of a DNSmasq program arranged in the intelligent terminal, and the DNSmasq program is used as a Dynamic Host Configuration Protocol (DHCP) server to allocate an IP address for the personal computer when the personal computer is networked; and setting a domain name forwarding function of the network card through the NDC so that the network card converts the domain name into a corresponding IP address when receiving a domain name input by a user.
The NDC is located in the intelligent terminal system, specifically may be located in an application framework layer, may send an operation command to other layers of the system, and may also be used for functions such as message monitoring. When the NDC sets the teter function for the network card, the NDC may send a teter command to the network card to set the teter function for the network card. For example, this can be achieved by the following commands: ndc tether interface add et 0. Wherein the command is used for setting the Tether function for the network card and making the NETD know that the Tether function is started on the network card. When the network card has the Tether function, the intelligent terminal can have the routing function and share the internet with other personal computers.
The NETD is responsible for implementing functions related to network operations of some physical ports, such as broadband control, network address translation, personal area network, PPP link, shared internet access, and the like, which are organized in an NRTD file directory according to modules. The NETD is mainly used as a communication bridge between a hardware driving layer and an application framework layer, and the application framework layer can send an operation command to the NETD.
In the embodiment of the invention, the IP address and the mask are set for the network card through a Busybox program. This can be achieved, for example, by the following commands: busybox ifconfig eth0192.168.42.1netmask 255.255.255.0 up. Wherein eth0 refers to a network card. The Busybox program can combine many small versions of UNIX tools with common features into a single executable file. The set can replace most common tools such as GNU files, shellcuils and the like, and BusyBox provides a relatively perfect environment and can be suitable for any small embedded system. After setting the IP address and mask for the network card, the data packet from the external network can be accurately sent to the network card, and then sent to the corresponding personal computer by the network card.
In the embodiment of the present invention, the gather Start command is sent to the NETD through the NDC, and may be, for example, the following command: ndc temp start 192.168.42.2192.168.42.254, where the parameter of the command is dynamic host configuration protocol range (DHCP range). A gather Start command for instructing the NETD to control the Start of the DNSmasq program provided in the smart terminal and to use the DNSmasq program as a DHCP server to assign an IP address to the personal computer when the personal computer is networked.
In the embodiment of the invention, the domain name forwarding function of the network card is set through the NDC. For example, this can be achieved by the following commands: ndc ipfwd enable eth 0. Wherein eth0 refers to a network card. When the network card has the domain name forwarding function, the network card can convert the domain name into a corresponding IP address when receiving the domain name input by a user, so as to access an external server according to the IP address to inquire information and the like. In the embodiment of the present invention, a domain name forwarding function of the DNS server may also be set, so that all DNS queries are forwarded to the mobile communication network side. For example, the set method may be that the NDC sends an operation command, and may be the following command: ndc temp dns set 101211.136.112.50. Where the parameter 101 is a Network Identifier (NETID) of the mobile communication Network, and the parameter 211.136.112.50 is an address of the DNS server acquired after the mobile communication Network is established, and the address is determined by an operator.
In an embodiment of the present invention, optionally, the performing the function configuration on the network port further includes: establishing a network card and associating with a first routing table in the intelligent terminal through the NDC, and setting a first routing rule; the first routing rule is used for indicating that when the network card receives a data packet from an external network, the received data packet is sent to a corresponding personal computer based on the first routing table; adding the routing information of the network card into a second routing table in the intelligent terminal, and setting a second routing rule; and the second routing rule is used for indicating that when the network card receives a data packet from the personal computer, the received data packet is sent to a corresponding external network address based on the second routing table.
The network card is established to be associated with the first routing table in the intelligent terminal through DNC, and the association can be realized through the following commands: ndc nat enable eth0rmnet _ data 00. Where rmnet _ data0 is a first routing table. Setting the first routing rule may be via the following command: ip rule add from all ifth eth0lookup rmnet _ data 0. And the first routing rule is used for indicating that when the network card receives the data packet from the external network, the received data packet is sent to the corresponding personal computer based on the first routing table. For example, when a user queries data on a personal computer, a data packet from an external network is sent to a network card, an IP address of the personal computer corresponding to the external network address in the first routing table is queried, and the received data packet is sent to the personal computer corresponding to the external network address, so as to query the data.
The adding of the routing information of the network card in the second routing table in the intelligent terminal can be realized by the following commands: ip route add 192.168.42.0/24dev eth0 protocol static wiring line table local _ network. Wherein the local _ network is a second routing table. The command is to add the routing information related to the network card eth0 in the second routing table local _ network.
The setting of the second routing rule by the intelligent terminal can be realized by the following commands: ip rule add from all oil eth0lookup local _ network. The command is to search the second routing table local _ network when the network card eth0 receives a packet from the personal computer, and send the received packet to the corresponding external network address. For example, when the user uploads the data through the personal computer, the network card receives the data packet sent by the personal computer, and queries the external network address corresponding to the IP address of the personal computer in the second routing table, thereby implementing the uploading of the data.
In an embodiment of the present invention, optionally, the performing the function configuration on the network port further includes: the intelligent terminal identifies a data packet from an external network received by a network card so as to track the data packet from the external network, and sets a third routing rule, wherein the third routing rule is used for indicating the network card to inquire the first routing table based on the identification of the data packet and send the identified data packet to a corresponding personal computer.
The intelligent terminal identifies the data packet from the external network received by the network card through the following commands: iptables-t mangle-A INPUT-i eth0-j MARK-set-xmark 0x30088/0 xfffffffff. The command marks the data packet fwmark received by the network card from the external network as 0x30088 so as to track the data packet. The data packet of the set format from the external network may be marked to track the data packet of the set format.
Wherein, setting the third routing rule can be realized by the following commands: ip rule add from all fwmark 0x10088/0x1ffff lookup local _ network. The command is to search the second routing table local _ network for a data packet with fwmark of 0x10088/0x1ffff, that is, when the network card eth0 receives data from an external network, identify the data packet, and search the second routing table local _ network according to the identification, so as to send the identified data packet to a corresponding personal computer.
It should be noted that, in the embodiment of the present invention, the specific steps of performing the function configuration on the network port may determine the sequence of each step according to needs, and the sequence of each step is not limited.
S130: when the intelligent terminal detects that the function configuration of the internet access is completed, a message of successful networking is sent to the personal computer; and the message is used for indicating the personal computer to surf the internet through the mobile communication network of the intelligent terminal.
In the embodiment of the invention, when the network port function configuration is completed, the intelligent terminal sends a message of successful networking to the personal computer, and the message is used for indicating the personal computer to surf the internet through the mobile communication network of the intelligent terminal. When the network port function configuration is completed, the intelligent terminal has a routing function and can send a request, a data packet and the like to a specified address.
In the embodiment of the invention, when a user adopts a personal computer to carry out networking through a mobile communication network of the intelligent terminal, a DNSmasq program is started in the intelligent terminal to allocate an IP address for the personal computer. If the personal computer input by the user is the domain name, the personal computer sends a query request to the network card, wherein the query request carries information such as the IP address of the personal computer, the queried domain name and the like. The DNS server in the LAN converts the domain name into the IP address of the accessed outer network server according to the query request received by the network card, the DNS server controls the network card to access the corresponding outer network server, and the outer network server sends the corresponding data packet to the network card and forwards the data packet to the personal computer through the network card.
According to the internet access method provided by the embodiment of the invention, the internet access is additionally arranged on the intelligent terminal, the function configuration is carried out on the additionally arranged internet access, so that the internet access has a routing function, and the personal computer can surf the internet through the mobile communication network of the intelligent terminal, so that a new way can be provided for the internet of the personal computer, and a user can conveniently surf the internet by using the personal computer.
Fig. 2 is a flowchart of an internet access method according to an embodiment of the present invention, where on the basis of the above embodiment, as shown in fig. 2, a technical solution according to the embodiment of the present invention includes:
s210: and additionally arranging a network port on the intelligent terminal, and arranging a corresponding network card in the network port.
S220: and when the intelligent terminal detects that the network function of the network port is not started, displaying an interface for starting the network function of the network port.
In the embodiment of the invention, when the network function of the internet access is not started, an interface for starting the network function of the internet access is displayed on a screen of the terminal, and a user can input characters for opening the network function of the internet access in the interface. Wherein, an input box can be included in the interface, so that the user can input characters in the input box.
The detection of whether the network function of the network port is started or not by the intelligent terminal can be detection at intervals, real-time detection or user control. For example, when the user presses the setting button, the intelligent terminal receives the signal and detects whether the network function of the internet access is turned on. If the screen is unlocked by the user, when the intelligent terminal receives the screen unlocking signal, the intelligent terminal detects whether the network function of the internet access is started.
S230: and when the preset characters input by the user are acquired through the interface, starting the network function of the network port.
In the embodiment of the present invention, the preset characters may be set according to the user's needs, and optionally, characters convenient for the user to input may be set, or other characters may also be input. For example, the input may be "# 9916#, net on? And when clicking is determined, starting the network function of the network port.
Therefore, the network function of the internet access is started by inputting characters in the display interface, so that the operation of a user is facilitated, and the use efficiency is improved.
S240: when the intelligent terminal detects that the network function of the added network port is started, whether a network cable inserted into the network port connects the intelligent terminal with the personal computer or not is judged.
S250: if yes, the intelligent terminal detects that the mobile communication network is started, and the network port is configured in a function mode.
S260: when the intelligent terminal detects that the function configuration of the internet access is completed, a message of successful networking is sent to the personal computer; and the message is used for indicating the personal computer to surf the internet through the mobile communication network of the intelligent terminal.
Fig. 3 is a flowchart of an internet access method provided in an embodiment of the present invention, and as shown in fig. 3, a technical solution provided in the embodiment of the present invention includes:
s310: and starting.
S320: and judging whether the network port is effective or not.
If yes, go to S330, otherwise go to S370.
S330: and when the network cable is inserted into the network port, starting the mobile communication network.
S340: and carrying out function configuration on the network port.
S350: when the networking is successful, the personal computer is informed to surf the internet normally.
S360: and (6) ending.
S370: inputting preset characters, and determining whether to start the network function of the network port.
If yes, return to S320.
Fig. 4 is a block diagram of a structure of an internet access apparatus according to an embodiment of the present invention, where the apparatus is configured to execute an internet access method, and as shown in fig. 4, the apparatus 400 includes:
the judging module 410 is used for judging whether a network cable inserted into the network port connects the intelligent terminal with the personal computer or not when detecting that the network function of the additionally arranged network port is started;
a function configuration module 420, configured to, if yes, start the mobile communication network, and perform function configuration on the network port;
an information sending module 430, configured to send a message of successful networking to the personal computer when detecting that the function configuration of the internet access is completed; and the message is used for indicating the personal computer to surf the internet through the mobile communication network of the intelligent terminal.
Further, the apparatus 400 further comprises:
the interface display module 440 is configured to display an interface for starting the network function of the internet access when it is detected that the network function of the internet access is not started;
and a network function starting module 450, configured to start the network function of the internet access when the preset character input by the user is acquired through the interface.
Further, the apparatus 400 further includes a network port setting module 460, configured to add a network port on the intelligent terminal, and set a corresponding network card in the network port.
Further, the performing function configuration on the internet access includes:
setting a Tether function for the network card through a local guarding connector NDC arranged in an intelligent terminal so that the personal computer can surf the internet through the intelligent terminal;
configuring an Internet Protocol (IP) address and a mask for the network card through a Busybox program arranged in the intelligent terminal;
sending a Tether Start command to a daemon NETD through the NDC; the Tether Start command is used for indicating the NETD to control the starting of a DNSmasq program arranged in the intelligent terminal, and the DNSmasq program is used as a Dynamic Host Configuration Protocol (DHCP) server to allocate an IP address for the personal computer when the personal computer is networked;
and setting a domain name forwarding function of the network card through the NDC so that the network card converts the domain name into a corresponding IP address when receiving a domain name input by a user.
Further, the performing function configuration on the internet access further includes:
establishing the association between the network card and a first routing table in the intelligent terminal through the NDC, and setting a first routing rule; the first routing rule is used for indicating that when the network card receives a data packet from an external network, the received data packet is sent to a corresponding personal computer based on the first routing table;
adding the routing information of the network card into a second routing table in the intelligent terminal, and setting a second routing rule; and the second routing rule is used for indicating that when the network card receives a data packet from the personal computer, the received data packet is sent to a corresponding external network address based on the second routing table.
Further, the performing function configuration on the internet access further includes:
the intelligent terminal identifies the data packet from the external network received by the network card so as to track the data packet from the external network, and sets a third routing rule, wherein the third routing rule is used for instructing the network card to inquire the second routing table based on the received identification of the data packet, and sending the identified data packet to the corresponding personal computer.
The internet device provided by the embodiment of the invention can execute the internet method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
According to the internet device provided by the embodiment of the invention, the intelligent terminal is additionally provided with the internet port, and the function configuration is carried out on the additionally arranged internet port, so that the intelligent terminal has a routing function, and the personal computer can surf the internet through the mobile communication network of the intelligent terminal, a new way can be provided for surfing the internet of the personal computer, and a user can conveniently surf the internet by using the personal computer.
Fig. 5 is a schematic structural diagram of an intelligent terminal according to an embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary smart terminal 512 suitable for use in implementing embodiments of the present invention. The smart terminal 512 shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of the application of the embodiments of the present invention.
As shown in fig. 5, the smart terminal 512 is in the form of a general purpose computing device. The components of the smart terminal 512 may include, but are not limited to: one or more processors or processing units 516, a system memory 528, and a bus 518 that couples the various system components including the system memory 528 and the processing unit 516.
Bus 518 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
The smart terminal 512 typically includes a variety of computer system readable media. Such media may be any available media that can be accessed by the smart terminal 512 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 528 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)530 and/or cache memory 532. The smart terminal 512 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 534 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 518 through one or more data media interfaces. Memory 528 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 540 having a set (at least one) of program modules 542, such program modules 542 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, may be stored in, for example, system memory 528, each of which examples or some combination may include an implementation of a network environment. The program modules 542 generally perform the functions and/or methods of the described embodiments of the invention.
The intelligent terminal 512 may also communicate with one or more external devices 514 (e.g., keyboard, pointing device, display 524, etc.), with one or more devices that enable a user to interact with the intelligent terminal 512, and/or with any devices (e.g., network card, modem, etc.) that enable the intelligent terminal 512 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 522. Also, the intelligent terminal 512 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 520. As shown in FIG. 5, the network adapter 520 communicates with the other modules of the server 512 via the bus 518. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the smart terminal 512, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 516 executes various functional applications and data processing by running programs stored in the system memory 528, for example, to implement a network access method provided by the embodiment of the present invention.
That is, the processing unit implements, when executing the program: when the network function of the added network port is detected to be started, judging whether a network cable inserted into the network port connects the intelligent terminal with a personal computer; if yes, and the mobile communication network is detected to be started, and the network port is configured in function; when detecting that the function configuration of the internet access is completed, sending a networking success message to the personal computer; and the message is used for indicating the personal computer to surf the internet through the mobile communication network of the intelligent terminal.
The embodiment of the invention also provides a storage medium containing the computer executable instruction. The internet access system comprises a network server, a network server and a network server, wherein the network server is used for storing a network access request message, and the network access request message comprises a network access request message and a network access request message.
Storage media containing computer-executable instructions provided by embodiments of the present invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (8)

1. A method for surfing the internet is characterized by comprising the following steps:
when the intelligent terminal detects that the network function of the added network port is started, judging whether a network cable inserted into the network port connects the intelligent terminal with a personal computer;
if yes, the intelligent terminal detects that a mobile communication network is started, and function configuration is carried out on the network port;
when the intelligent terminal detects that the function configuration of the internet access is completed, a message of successful networking is sent to the personal computer; the message is used for indicating the personal computer to surf the internet through the mobile communication network of the intelligent terminal;
wherein the method further comprises:
additionally arranging a network port on the intelligent terminal, and arranging a corresponding network card in the network port;
and performing function configuration on the network port, including:
the intelligent terminal identifies a data packet from an external network received by the network card so as to track the data packet from the external network and set a third routing rule; and the third routing rule is used for indicating the network card to inquire the second routing table based on the received identification of the data packet and sending the identified data packet to the corresponding personal computer.
2. The method of claim 1, further comprising:
when the intelligent terminal detects that the network function of the network port is not started, displaying an interface for starting the network function of the network port;
and when the preset characters input by the user are acquired through the interface, starting the network function of the network port.
3. The method of claim 1, wherein the functionally configuring the portal comprises:
setting a Tether function for the network card through a local guarding connector NDC arranged in an intelligent terminal so that the personal computer can surf the internet through the intelligent terminal;
configuring an Internet Protocol (IP) address and a mask for the network card through a Busybox program arranged in the intelligent terminal;
sending a Tether Start command to a daemon NETD through the NDC; the Tether Start command is used for indicating the NETD to control the starting of a DNSmasq program arranged in the intelligent terminal, and the DNSmasq program is used as a Dynamic Host Configuration Protocol (DHCP) server to allocate an IP address for the personal computer when the personal computer is networked;
and setting a domain name forwarding function of the network card through the NDC so that the network card converts the domain name into a corresponding IP address when receiving a domain name input by a user.
4. The method of claim 3, wherein the functionally configuring the portal further comprises:
establishing the association between the network card and a first routing table in the intelligent terminal through the NDC, and setting a first routing rule; the first routing rule is used for indicating that when the network card receives a data packet from an external network, the received data packet is sent to a corresponding personal computer based on the first routing table;
adding the routing information of the network card into a second routing table in the intelligent terminal, and setting a second routing rule; and the second routing rule is used for indicating that when the network card receives a data packet from the personal computer, the received data packet is sent to a corresponding external network address based on the second routing table.
5. An internet access device, comprising:
the judging module is used for judging whether a network cable inserted into the network port connects the intelligent terminal with the personal computer or not when the network function of the additionally arranged network port is detected to be started;
the function configuration module is used for carrying out function configuration on the network port if the mobile communication network is detected to be started;
the information sending module is used for sending a successful networking message to the personal computer when the completion of the function configuration of the internet access is detected; the message is used for indicating the personal computer to surf the internet through the mobile communication network of the intelligent terminal;
the device also comprises a network port setting module which is used for additionally arranging a network port on the intelligent terminal and setting a corresponding network card in the network port;
and performing function configuration on the network port, including:
the intelligent terminal identifies a data packet from an external network received by the network card so as to track the data packet from the external network and set a third routing rule; and the third routing rule is used for indicating the network card to inquire the second routing table based on the received identification of the data packet and sending the identified data packet to the corresponding personal computer.
6. The apparatus of claim 5, further comprising:
the interface display module is used for displaying an interface for starting the network function of the network port when the network function of the network port is not started;
and the network function starting module is used for starting the network function of the network port when the preset characters input by the user are obtained through the interface.
7. An intelligent terminal, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method of surfing the internet as recited in any one of claims 1-4.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of surfing the internet as claimed in any one of claims 1 to 4.
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 CN108600402A (en) 2018-09-28
CN108600402B true 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 (2)

* 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
CN201114625Y (en) * 2007-09-03 2008-09-10 中兴通讯股份有限公司 Mobile phone with broadband Internet access function

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN101808425A (en) * 2009-02-17 2010-08-18 上海华阳检测仪器有限公司 Vibration signal acquisition system realized by smart phone
US20100250592A1 (en) * 2009-03-31 2010-09-30 Paquet Vincent F 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 (2)

* 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
CN201114625Y (en) * 2007-09-03 2008-09-10 中兴通讯股份有限公司 Mobile phone with broadband Internet access function

Also Published As

Publication number Publication date
CN108600402A (en) 2018-09-28

Similar Documents

Publication Publication Date Title
CN103825895B (en) A kind of information processing method and electronic equipment
CN110034984B (en) Access method, device and system
US9665149B2 (en) Gateway for controlling wakeup-on-LAN and sleep-on-LAN
CN111756756A (en) Terminal network control method and device, electronic equipment and storage medium
US8612540B2 (en) Wireless data card and working method of the wireless data card
WO2018196468A1 (en) Method, device and terminal for realizing data service
WO2020038443A1 (en) Bridging communication method and device
CN113242331B (en) Different types of address conversion method, device, computer equipment and storage medium
CN108540552B (en) Device interconnection method, apparatus, system, device and storage medium
WO2023160203A1 (en) Switch configuration management method and apparatus, and electronic device and storage medium
CN111224878B (en) Route forwarding method and device, electronic equipment and storage medium
CN111431912A (en) Method and device for detecting DHCP hijacking
WO2016119623A1 (en) Method and device for realizing network sharing
CN113992382B (en) Service data processing method and device, electronic equipment and storage medium
CN105429800A (en) Network connection processing method and device and terminal equipment
CN111556178A (en) Analytic system, method, equipment and storage medium
CN109286684B (en) Communication connection processing method and device, proxy server and storage medium
CN108881247B (en) Message conversion method, device, gateway equipment and storage medium
CN115913597A (en) Method and device for determining lost host
US8326919B1 (en) Network address translation auto-discovery in data storage networks
CN108600402B (en) Internet access method and device, intelligent terminal and storage medium
CN110278558B (en) Message interaction method and WLAN system
CN108848033B (en) Method, device and storage medium for avoiding route conflict
CN108293075B (en) Shared terminal detection method and device therefor
CN115225692B (en) Information processing method, device and storage medium

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