CN114640582A - Intelligent network connection method, system, device and storage medium - Google Patents

Intelligent network connection method, system, device and storage medium Download PDF

Info

Publication number
CN114640582A
CN114640582A CN202210169060.0A CN202210169060A CN114640582A CN 114640582 A CN114640582 A CN 114640582A CN 202210169060 A CN202210169060 A CN 202210169060A CN 114640582 A CN114640582 A CN 114640582A
Authority
CN
China
Prior art keywords
port
message
task
detection
access
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
CN202210169060.0A
Other languages
Chinese (zh)
Other versions
CN114640582B (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.)
Shenzhen Jiuzhou Electric Appliance Co Ltd
Original Assignee
Shenzhen Jiuzhou Electric Appliance 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 Shenzhen Jiuzhou Electric Appliance Co Ltd filed Critical Shenzhen Jiuzhou Electric Appliance Co Ltd
Priority to CN202210169060.0A priority Critical patent/CN114640582B/en
Publication of CN114640582A publication Critical patent/CN114640582A/en
Application granted granted Critical
Publication of CN114640582B publication Critical patent/CN114640582B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports

Abstract

The application discloses an intelligent network connection method, a system, equipment and a storage medium, wherein the intelligent network connection method comprises the following steps: receiving a network cable access signal of a port to be configured, starting a port detection task, and acquiring a detection result, wherein the port identification task comprises a main task and at least one secondary task; obtaining port identification information based on the detection result; and extracting the port identification information, acquiring an internet access, and configuring the port to be configured as the internet access. The utility model relates to a network communication field, after the net twine inserts, start port detection task, automatic identification port type makes the net gape accomplish port identification and inserts the self-adaptation, sets for the net gape type that the discernment obtained automatically for the net gape, not only can increase net gape quantity, and the user also need not oneself and judges the net gape classification, only needs to insert the net twine to net gape back system automatic identification and carry out corresponding net gape configuration, provides very big facility for the user.

Description

Intelligent network connection method, system, device and storage medium
Technical Field
The present application relates to the field of network communications, and in particular, to an intelligent network connection method, system, device, and storage medium.
Background
In the conventional network access devices, such as routers, gateways and other network access devices providing routing, most of them have WAN and LAN ports, and the LAN or WAN port is marked by color at the port, or the WAN or LAN port is marked by LAN or WAN character indication, generally, at this time, these devices directly mark the port as WAN port, and can not be used as LAN port, or need to be reset after setting to be used as LAN port. This approach not only does not facilitate the user and improve the user experience, but also reduces the number of LAN ports after the WAN port cannot be used as a LAN port, and for a network access device with only one network port, this device can provide routing and can be connected to an external network, and at this time, this network port needs to be used as both a WAN port and a LAN port at any time, and thus cannot meet the user's needs.
Disclosure of Invention
The present application mainly aims to provide an intelligent network connection method, system, device and storage medium, and aims to solve the technical problem that a port of a network access device is fixed and cannot meet user requirements in the prior art.
In order to achieve the above object, the present application provides an intelligent network connection method, including:
receiving a network cable access signal of a port to be configured, starting a port detection task, and acquiring a detection result, wherein the port identification task comprises a main task and at least one secondary task;
obtaining port identification information based on the detection result;
and extracting the port identification information, acquiring an internet access, and configuring the port to be configured as the internet access.
Optionally, the step of starting a port probing task and obtaining a probing result includes:
starting a main task and at least one secondary task in the port identification tasks;
and receiving a detection result sent by the main task, wherein the secondary task acquires a detection message and sends the detection message to the main task, and the main task determines the detection result based on the detection message.
Optionally, the step of receiving the probe result sent by the main task includes:
starting WAN port identification tasks, wherein the WAN port identification tasks comprise a WAN port identification main task, an access detection secondary task of PPPOE, an access detection secondary task of DHCP and an access detection secondary task of static IP;
and acquiring the detection result of the WAN port based on the main task of the WAN port identification, wherein the main task of the WAN port identification is based on the access detection secondary task of the PPPOE, the access detection secondary task of the DHCP and the access detection secondary task of the static IP to determine the detection result of the WAN port.
Optionally, the determining, by applying to a main task side, the obtaining the WAN port detection result based on the WAN port identification main task, where the WAN port identification main task is based on the PPPOE access detection subtask, the DHCP access detection subtask, and the static IP access detection subtask, and the determining the WAN port detection result includes:
receiving an access detection message of the PPPOE, wherein the access detection of the PPPOE sends a PADI broadcast message at a network port, if the access detection message receives the PADO message, the access detection message successfully sends a PPPOE WAN access detection message to the WAN port identification main task, and if the access detection message reaches a preset detection frequency and does not receive the PADO message, the access detection message failed to send the PPPOE access detection message to the WAN port identification main task;
receiving an access detection message of the DHCP, wherein the access detection of the DHCP sends a DHCP discovery broadcast message at a network port, if a DHCP offer message is received, a message that DHCP WAN access detection is successful is sent to a WAN port identification main task, and if the DHCP discovery message is sent for a preset detection time and no DHCP offer message is received, a message that DHCP WAN access detection is failed is sent to the WAN port identification main task;
receiving an access detection message of a static IP, wherein the access detection of the static IP sends an ARP broadcast request message to a gateway at a network port, if the access detection message of the static IP receives an ARP response message of the gateway, the access detection message of the static IP sends a message that the access detection of the static WAN is successful to a WAN port identification main task, and if the ARP response message is not received when the access detection message of the static IP is sent for a preset detection frequency, the access detection message of the static IP is failed to the WAN port identification main task;
and acquiring the detection result based on the PPPOE access detection message, the DHCP access detection message and the static IP access detection message.
Optionally, the step of receiving the probe result sent by the main task includes:
starting LAN port identification tasks, wherein the LAN port identification tasks comprise a LAN port identification main task, an access detection secondary task of DHCP and an access detection secondary task of static LAN;
and acquiring the detection result of the LAN port based on the identification main task of the LAN port, wherein the identification main task of the LAN port determines the detection result of the LAN port based on the access detection secondary task of the DHCP and the access detection secondary task of the static LAN.
Optionally, the step of determining the LAN socket probing result, applied to a main task end, of identifying a main task based on the LAN socket and obtaining the LAN socket probing result, where the LAN socket identifying main task is based on the access probing subtask of the DHCP and the access probing subtask of the static LAN, includes:
receiving an access detection message of the DHCP, wherein the access detection of the DHCP sends a DHCP discovery broadcast message at a network port, if the DHCP discovery message is received, a message that DHCP LAN access detection is successful is sent to the LAN port identification main task, and if the DHCP discovery message is sent for a preset detection time and no DHCP discovery message is received, a message that DHCP LAN access detection is failed is sent to the LAN port identification main task;
receiving access detection of the static LAN, wherein the access detection of the static LAN and all IP addresses in a Ping LAN segment, if Ping is passed, sending a message that the access detection of the static LAN is successful to the identification main task of the LAN port, and if Ping is not passed, sending a message that the detection is failed to the identification main task of the LAN port;
and acquiring the detection result based on the access detection message of the DHCP and the access detection message of the static LAN.
Optionally, the primary task detects a message that any one of the secondary tasks is successfully detected, ends all the port identification tasks, and obtains the corresponding detection result.
The present application further provides an intelligent network connection system, the intelligent network connection system includes:
the system comprises an acquisition module, a configuration module and a processing module, wherein the acquisition module is used for receiving a network cable access signal of a port to be configured, starting a port detection task and acquiring a detection result, and the port identification task comprises a main task and at least one secondary task;
the identification module is used for obtaining port identification information based on the detection result;
and the configuration module is used for extracting the port identification information, acquiring a network port and configuring the port to be configured as the network port.
The present application further provides an intelligent network connection device, the intelligent network connection device includes: a memory, a processor, and a program stored on the memory for implementing the intelligent network connection method,
the memory is used for storing a program for realizing the intelligent network connection method;
the processor is used for executing the program for realizing the intelligent network connection method so as to realize the steps of the intelligent network connection method.
The present application also provides a storage medium having stored thereon a program for implementing an intelligent network connection method, the program being executed by a processor to implement the steps of the intelligent network connection method.
Compared with the prior art in which the type of a fixed network port at a network port cannot meet the user requirements and the user experience is poor, the intelligent network connection method, the system, the equipment and the storage medium provided by the application receive a network cable access signal of a port to be configured, start a port detection task and acquire a detection result, wherein the port identification task comprises a main task and at least one secondary task; obtaining port identification information based on the detection result; the port identification information is extracted, the network port is obtained, the port to be configured is configured into the network port, namely in the application, after the network cable is connected, the port detection task is started, the port type is automatically identified, the port identification access self-adaption is realized for the network port, the network port is automatically set into the network port type obtained by identification, the number of the network ports can be increased, a user does not need to judge the network port type by himself, the network cable is only required to be connected into the network port, the system is automatically identified and the corresponding network port is configured, and great convenience is provided for the user.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a schematic diagram of an apparatus architecture of a hardware operating environment according to an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating a first embodiment of an intelligent network connection method according to the present application;
FIG. 3 is a schematic flow chart of a WAN port identification task of the intelligent network connection method of the present application;
fig. 4 is a schematic flowchart of the LAN port identification task in the intelligent network connection method of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present application.
The terminal in the embodiment of the application may be a PC, or may be a mobile terminal device having a display function, such as a smart phone, a tablet computer, an e-book reader, an MP3(Moving Picture Experts Group Audio Layer III, motion Picture Experts compression standard Audio Layer 3) player, an MP4(Moving Picture Experts Group Audio Layer IV, motion Picture Experts compression standard Audio Layer 4) player, a portable computer, or the like.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a memory system separate from the processor 1001.
Optionally, the terminal may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that may turn off the display screen and/or the backlight when the mobile terminal is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when the mobile terminal is stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer and tapping) and the like for recognizing the attitude of the mobile terminal; of course, the mobile terminal may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an intelligent network connection program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be used to invoke the intelligent network connectivity program stored in the memory 1005.
Referring to fig. 2, an embodiment of the present application provides an intelligent network connection method, where the intelligent network connection method includes:
step S100, receiving a network cable access signal of a port to be configured, starting a port detection task, and acquiring a detection result, wherein the port identification task comprises a primary task and at least one secondary task;
step S200, obtaining port identification information based on the detection result;
step S300, extracting the port identification information, acquiring a network port, and configuring the port to be configured as the network port.
In this embodiment, the specific application scenarios may be:
the traditional network access equipment is provided with WAN and LAN ports, the LAN or WAN ports are usually marked by colors at the ports, or the WAN or LAN ports are marked by LAN or WAN character instructions, the equipment can not be used as the LAN ports after directly marking the ports as the WAN ports, if the WAN-marked ports are required to be used as the LAN ports, the equipment needs to be reset and then can be used as the LAN ports, and the user experience is poor;
or for the network access device with only one network port, the device can provide a route and can also be connected to an external network, at the moment, the network port needs to be used as a WAN port and also needs to be used as a LAN port at any time, and if the network port is fixed as the WAN port or the LAN port, the requirement of a user cannot be met.
The method comprises the following specific steps:
step S100, receiving a network cable access signal of a port to be configured, starting a port detection task, and acquiring a detection result, wherein the port identification task comprises a primary task and at least one secondary task;
in this embodiment, the device that receives the network access signal of the port to be configured is a network access device, which may be a router, a gateway, or another network access device that provides a route, and receives the network access signal acquired by the network access device after the network access device accesses the network port of the network access device, where the port to be configured is the network port of the network access device to which the network access device accesses.
In this embodiment, the port identification task includes a WAN port identification task and a LAN port identification task, where a detection result obtained by the port identification task includes that the port to be configured is a WAN port or a LAN port. Specifically, the port identification task includes a primary task and at least one secondary task, the secondary task is used for detecting a message and sending the detected message to the primary task, and the primary task is used for receiving and analyzing the detected message to obtain a detection result.
In this embodiment, there is no need to configure a WAN access type (PPP, DHCP, static IP), and for the configuration of PPP, only the relevant access parameters, such as user name, password, authorization mode, etc., need to be configured by application.
Specifically, the step S100 includes the following steps S110 to S120:
step S110, starting a main task and at least one secondary task in the port identification tasks;
step S120, receiving a detection result sent by the primary task, where the secondary task obtains a detection message and sends the detection message to the primary task, and the primary task determines the detection result based on the detection message.
In this embodiment, the port identification task includes a primary task and at least one secondary task, the secondary task is configured to detect a message and send the detected message to the primary task, and the primary task is configured to receive and analyze the detected message to obtain a detection result.
Specifically, the step S120 includes the following steps a100 to a 200:
step A100, a WAN port identification task is started, wherein the WAN port identification task comprises a WAN port identification main task, an access detection secondary task of PPPOE, an access detection secondary task of DHCP and an access detection secondary task of static IP;
in this embodiment, the WAN port identification task includes a WAN port identification primary task and a WAN port identification secondary task, where the WAN port identification secondary task includes PPPOE 'access probe, DHCP' access probe, and static IP 'access probe, and specifically, based on the PPPOE' access probe, DHCP 'access probe, and static IP' access probe, the packet is sent respectively to detect whether the port is a WAN port, and the identification result is sent to the WAN port identification primary task.
And step A200, acquiring the detection result of the WAN port based on the main WAN port identification task, wherein the main WAN port identification task is based on the access detection secondary task of the PPPOE, the access detection secondary task of the DHCP and the access detection secondary task of the static IP, and determining the detection result of the WAN port.
In this embodiment, the detection result includes success of WAN socket detection and failure of WAN socket detection.
Specifically, the step a200 includes the following steps a210-a 240:
step A210, receiving an access detection message of the PPPOE, wherein the access detection of the PPPOE sends a PADI broadcast message at a network port, if the access detection message is received, the access detection message successfully sends a PPPOE WAN access detection message to the WAN port identification main task, and if the access detection message reaches a preset detection frequency and does not receive the PADO message, the access detection message failed to send the PPPOE access detection message to the WAN port identification main task;
referring to fig. 3, in this embodiment, the secondary task of the PPPOE-based access probe message checks whether the access port is a WAN port by sending a PADI broadcast packet through the network port, and if the PADO packet is received, it indicates that the access port is a WAN port and the access type of the WAN port is PPP, sends a message that the PPPOE WAN access probe is successful to the WAN port identification primary task. If the PADI message is sent for the preset detection times and the PADO message is not received yet, it needs to be noted that the result indicates the access type of the non-WAN port PPP of the port, but does not represent the non-WAN port of the port, and the port may be another access type of the WAN port or may be a LAN port, and sends the PPPOE access detection failure message to the WAN port identification main task, where the preset detection times are manually set and may be set to 5 times, and if the preset detection times are exceeded and the PAD0 message is not received, the PPPOE access detection failure message is sent to the WAN port identification main task.
Step A220, receiving the access detection message of the DHCP, wherein the access detection of the DHCP sends a DHCP discovery broadcast message at a network port, if a DHCP offer message is received, the access detection message successfully sends a DHCP WAN access detection message to the WAN port identification main task, and if the DHCP discovery message reaches a preset detection frequency and the DHCP offer message is not received yet, the access detection message unsuccessfully sends a DHCP WAN access detection message to the WAN port identification main task;
in this embodiment, the secondary task of the access detection message based on the DHCP checks whether the access port is a WAN port by sending a DHCP discover broadcast message through the network port, and if the DHCP offer message is received, it indicates that the access port is a WAN port and the access type of the WAN port is the DHCP, sends a message that the DHCP WAN access detection is successful to the WAN port identification primary task. If the DHCP message is sent for the preset detection times and no DHCP offer message is received, it should be noted that the result indicates that the non-access type of the port is a WAN port of the DHCP, but does not represent the non-WAN port, and the port may be another access type of the WAN port or may be a LAN port.
Step A230, receiving an access detection message of a static IP, wherein the access detection of the static IP sends an ARP broadcast request message to a gateway at a network port, if the access detection message of the static IP receives an ARP response message of the gateway, the access detection message of the static WAN is sent to a WAN port identification main task, and if the ARP broadcast request message is sent for a preset detection time, the ARP response message is not received, and a message of failure of the access detection of the static IP is sent to the WAN port identification main task;
in this embodiment, the sub-task of the access detection message based on the static IP checks whether the access port is a WAN port by sending an ARP broadcast request message to the gateway at the network port, and if the ARP response message of the gateway is received, indicating that the access port is a WAN port, sends a message that the static WAN access detection is successful to the WAN port identification main task. If the ARP broadcast request message is sent for the preset detection times and no ARP response message is received, it needs to be noted that the result indicates that the non-access type of the port is a static IP WAN port, but does not represent the non-WAN port of the port, the port may be other access types of the WAN port or a LAN port, and if the preset detection times are exceeded and no DHCP offer message is received, a message that the DHCP access detection fails is sent to the WAN port identification main task.
Step a240, obtaining the detection result based on the PPPOE access probe message, the DHCP access probe message, and the static IP access probe message.
And the main task detects any one message that the secondary task is successfully detected, ends all the port identification tasks and acquires the corresponding detection result.
In this embodiment, the detection result includes a WAN port detection success and a WAN port detection failure, and if any one of the PPPOE access detection message, the DHCP access detection message, and the static IP access detection message is detected successfully, the detection result is a WAN port detection success; and if the access detection message of the PPPOE, the access detection message of the DHCP and the access detection message of the static IP are all failed to detect, the detection result is that the detection of the WAN port fails.
In this embodiment, the access type of the WAN is intelligently identified, and if the network port receives a DHCP offer message, it is identified that the DHCP accesses the external network, and if the port receives a PADO message, it is identified that the PPP accesses the external network. If the application layer configures WAN access as a static IP address, ARP broadcast is sent to the gateway through the network port, a gateway local area network (MAC) address is inquired, and if a gateway reply is received, the WAN static IP access external network can be determined.
In another embodiment, specifically, the step S120 further includes the following steps B100 to B200:
step B100, starting LAN port identification tasks, wherein the LAN port identification tasks comprise a LAN port identification main task, an access detection secondary task of DHCP and an access detection secondary task of static LAN;
in this embodiment, the LAN port identification task includes a LAN port identification primary task and a LAN port identification secondary task, where the LAN port identification secondary task includes an access probe for DHCP and an access probe for static LAN, and specifically, the access probes based on the access probe for DHCP and the access probe for static LAN respectively send a message to detect whether a port is a LAN port, and send an identification result to the LAN port identification primary task.
And step B200, acquiring the detection result of the LAN port based on the main task of the LAN port identification, wherein the main task of the LAN port identification determines the detection result of the LAN port based on the access detection subtask of the DHCP and the access detection subtask of the static LAN.
In the present embodiment, the probe result includes a LAN socket probe success and a LAN socket probe failure.
Specifically, the step B200 includes the following steps B210 to B230:
step B210, receiving an access detection message of the DHCP, wherein the access detection of the DHCP sends a DHCP discovery broadcast message at a network port, if the DHCP discovery broadcast message is received, sending a message that DHCP LAN access detection is successful to the LAN port identification main task, and if the DHCP discovery message is sent for a preset detection time and no DHCP discovery message is received, sending a message that DHCP LAN access detection is failed to the LAN port identification main task;
referring to fig. 4, in this embodiment, based on the secondary task of the access detection message of the DHCP, it is checked whether the access port is a LAN port by sending a DHCP discover broadcast message through the network port, and if the access port is a LAN port, which indicates that the access port is a LAN port, the secondary task identifies the primary task of the LAN port and sends a message that the DHCP LAN access detection is successful. If the DHCP message is sent for the preset detection times and the DHCP discovery message is not received, the result shows that the port is not the LAN port, and if the detection times exceed the preset detection times and the DHCP discovery message is not received, the message of the DHCP access detection failure is sent to the LAN port identification main task.
Step B220, receiving the access detection of the static LAN, wherein the access detection of the static LAN and all IP addresses in a Ping LAN segment, if Ping is passed, sending a message that the access detection of the static LAN is successful to the identification main task of the LAN port, and if Ping is not passed, sending a message that the detection is failed to the identification main task of the LAN port;
in this embodiment, the access probe message based on the static LAN is based on all IP addresses in the Ping LAN segment, where it is to be noted that all IP addresses do not include their own IP addresses, and if there is a Ping-through IP address, it indicates that the access port is a LAN port, a message that the static LAN access probe is successful is sent to the LAN port identification main task, and if all IP addresses are not Ping, it indicates that the port is not a LAN port, it sends a message that the DHCP access probe is failed to the LAN port identification main task.
Step B230, acquiring the detection result based on the access detection message of the DHCP and the access detection message of the static LAN.
And the main task detects any one message that the secondary task is successfully detected, ends all the port identification tasks and acquires the corresponding detection result.
In this embodiment, the detection result includes a successful LAN port detection and a failed LAN port detection, and if any one of the DHCP access detection message and the static LAN access detection message is successfully detected, the detection result is a successful WAN port detection; and if the access detection message of the PPPOE, the access detection message of the DHCP and the access detection message of the static IP are all failed to detect, the detection result is that the detection of the WAN port fails.
Step S200, obtaining port identification information based on the detection result;
in this embodiment, the port identification information includes a WAN port and a LAN port, for example, if the detection result obtained by the WAN port identification task is a WAN port detection failure, the port identification information is a LAN; and if the detection result obtained by the LAN port identification task is that the LAN port detection is successful, the port identification information is LAN.
Step S300, extracting the port identification information, acquiring a network port, and configuring the port to be configured as the network port.
In this embodiment, for example, if the port identification information is a WAN port, the port to be configured is configured as a WAN port, where the port to be configured is a network port of a network access device accessed by a network cable, that is, the network cable detection signal is identified as WAN, and the port to be configured is configured as a WAN port.
Compared with the prior art in which the type of a fixed network port at a network port cannot meet the user requirements and the user experience is poor, the intelligent network connection method, the system, the equipment and the storage medium provided by the application receive a network cable access signal of a port to be configured, start a port detection task and acquire a detection result, wherein the port identification task comprises a main task and at least one secondary task; obtaining port identification information based on the detection result; the port identification information is extracted, the network port is obtained, the port to be configured is configured into the network port, namely in the application, after the network cable is connected, the port detection task is started, the port type is automatically identified, the port identification access self-adaption is realized for the network port, the network port is automatically set into the network port type obtained by identification, the number of the network ports can be increased, a user does not need to judge the network port type by himself, the network cable is only required to be connected into the network port, the system is automatically identified and the corresponding network port is configured, and great convenience is provided for the user.
The present application further provides an intelligent network connection system, which includes:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for receiving a network cable access signal of a port to be configured, starting a port detection task and acquiring a detection result, and the port identification task comprises a main task and at least one secondary task;
the identification module is used for obtaining port identification information based on the detection result;
and the configuration module is used for extracting the port identification information, acquiring a network port and configuring the port to be configured as the network port.
The present application further provides an intelligent network connection device, the intelligent network connection device includes: a memory, a processor, and a program stored on the memory for implementing the intelligent network connection method,
the memory is used for storing a program for realizing the intelligent network connection method;
the processor is used for executing the program for realizing the intelligent network connection method so as to realize the steps of the intelligent network connection method.
The specific implementation of the intelligent network connection device of the present application is substantially the same as the embodiments of the intelligent network connection synchronization method, and is not described herein again.
The present application also provides a storage medium having stored thereon a program for implementing an intelligent network connection method, the program being executed by a processor to implement the steps of the intelligent network connection method.
The specific implementation of the storage medium of the present application is substantially the same as that of each embodiment of the foregoing intelligent network connection method, and is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (10)

1. An intelligent network connection method, characterized in that the intelligent network connection method comprises:
receiving a network cable access signal of a port to be configured, starting a port detection task, and acquiring a detection result, wherein the port identification task comprises a main task and at least one secondary task;
obtaining port identification information based on the detection result;
and extracting the port identification information, acquiring a network port, and configuring the port to be configured as the network port.
2. The intelligent network connection method according to claim 1, wherein the step of initiating a port probing task and obtaining probing results comprises:
starting a main task and at least one secondary task in the port identification tasks;
and receiving a detection result sent by the main task, wherein the secondary task acquires a detection message and sends the detection message to the main task, and the main task determines the detection result based on the detection message.
3. The intelligent network connection method according to claim 2, wherein the step of receiving the probe result sent by the primary task comprises:
starting a Wide Area Network (WAN) port identification task, wherein the WAN port identification task comprises a WAN port identification main task, an access detection secondary task of a point-to-point protocol over Ethernet (PPPOE), an access detection secondary task of a Dynamic Host Configuration Protocol (DHCP) and an access detection secondary task of a static Internet Protocol (IP);
and acquiring the detection result of the WAN port based on the main task of the WAN port identification, wherein the main task of the WAN port identification is based on the access detection secondary task of the PPPOE, the access detection secondary task of the DHCP and the access detection secondary task of the static IP to determine the detection result of the WAN port.
4. The intelligent network connection method of claim 3, wherein the step of obtaining the detection result of the WAN port based on the identification of the main task of the WAN port, applied to a main task side, comprises:
receiving an access detection message of the PPPOE, wherein the access detection of the PPPOE sends a PPPOE activity discovery initial Packet (PADI) broadcast message at a network port, if a PPPOE activity discovery offer Packet (PADO) message is received, the access detection message successfully sends a PPPOE WAN access detection message to the WAN port identification main task, and if the PADI message is sent for a preset detection time and no PADO message is received, the access detection message failed by the PPPOE access detection message is sent to the WAN port identification main task;
receiving an access detection message of the DHCP, wherein the access detection of the DHCP sends a dynamic host configuration protocol discovery phase (DHCP discover) broadcast message at a network port, if a dynamic host configuration protocol offer phase (DHCP offer) message is received, a message that DHCP WAN access detection succeeds is sent to the WAN port identification main task, and if the DHCP discover message is sent for a preset detection time and no DHCP offer message is received, a message that DHCP WAN access detection fails is sent to the WAN port identification main task;
receiving an access detection message of a static IP, wherein the access detection of the static IP sends an Address Resolution Protocol (ARP) broadcast request message to a gateway at a network port, if the ARP response message of the gateway is received, the message that the access detection of the static WAN is successful is sent to a WAN port identification main task, and if the ARP response message is not received when the ARP broadcast request message is sent for a preset detection number of times, the message that the access detection of the static IP fails is sent to the WAN port identification main task;
and acquiring the detection result based on the PPPOE access detection message, the DHCP access detection message and the static IP access detection message.
5. The intelligent network connection method according to claim 2, wherein the step of receiving the probe result sent by the main task comprises:
starting a Local Area Network (LAN) port identification task, wherein the LAN port identification task comprises a LAN port identification main task, an access detection sub-task of DHCP and an access detection sub-task of static LAN;
and acquiring the detection result of the LAN port based on the identification main task of the LAN port, wherein the identification main task of the LAN port determines the detection result of the LAN port based on the access detection secondary task of the DHCP and the access detection secondary task of the static LAN.
6. The intelligent network connection method according to claim 5, wherein the step of obtaining the LAN port detection result based on the LAN port identification main task, applied to a main task side, comprises:
receiving an access detection message of the DHCP, wherein the access detection of the DHCP sends a DHCP discovery broadcast message at a network port, if the DHCP discovery message is received, a message that DHCP LAN access detection is successful is sent to the LAN port identification main task, and if the DHCP discovery message is sent for a preset detection time and no DHCP discovery message is received, a message that DHCP LAN access detection is failed is sent to the LAN port identification main task;
receiving access probes of the static LAN, wherein the access probes of the static LAN and all IP addresses in an Internet packet probe (Ping) LAN segment, if the Ping is on, sending a message that the static LAN access probes are successful to the LAN port identification main task, and if the Ping is not on, sending a message that the probes are failed to the LAN port identification main task;
and acquiring the detection result based on the access detection message of the DHCP and the access detection message of the static LAN.
7. The intelligent network connection method according to claim 1, wherein the primary task detects a message that any one of the secondary tasks is successfully detected, ends the port identification task, and obtains the detection result.
8. An intelligent network connection system, comprising:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for receiving a network cable access signal of a port to be configured, starting a port detection task and acquiring a detection result, and the port identification task comprises a main task and at least one secondary task;
the identification module is used for obtaining port identification information based on the detection result;
and the configuration module is used for extracting the port identification information, acquiring a network port and configuring the port to be configured as the network port.
9. An intelligent network connection device, comprising: a memory, a processor, and a program stored on the memory for implementing the intelligent network connection method,
the memory is used for storing a program for realizing the intelligent network connection method;
the processor is configured to execute a program implementing the intelligent network connection method to implement the steps of the intelligent network connection method according to any one of claims 1 to 7.
10. A storage medium having stored thereon a program for implementing an intelligent network connection method, the program being executed by a processor to implement the steps of the intelligent network connection method according to any one of claims 1 to 7.
CN202210169060.0A 2022-02-23 2022-02-23 Intelligent network connection method, system, equipment and storage medium Active CN114640582B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210169060.0A CN114640582B (en) 2022-02-23 2022-02-23 Intelligent network connection method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210169060.0A CN114640582B (en) 2022-02-23 2022-02-23 Intelligent network connection method, system, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114640582A true CN114640582A (en) 2022-06-17
CN114640582B CN114640582B (en) 2023-10-31

Family

ID=81948432

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210169060.0A Active CN114640582B (en) 2022-02-23 2022-02-23 Intelligent network connection method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114640582B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007085860A1 (en) * 2006-01-27 2007-08-02 Camrivox Ltd. Automatic ip network determination and configuration for edge devices
US20100121946A1 (en) * 2006-08-23 2010-05-13 Thomson Licensing Method and device for identifying and selecting an interface to access a network
CN103534984A (en) * 2012-10-08 2014-01-22 华为终端有限公司 Port setting method, apparatus and computer program product for routing
CN103636167A (en) * 2013-02-07 2014-03-12 华为技术有限公司 Station opening configuration method in base station, base station, and server
CN104683188A (en) * 2015-03-23 2015-06-03 太仓市同维电子有限公司 Method for quickly detecting communication of IP channel of household router
CN106341246A (en) * 2015-07-07 2017-01-18 西安中兴新软件有限责任公司 Method and device for automatically recognizing LAN (Local Area Network) port and WAN (Wide Area Network) port
CN108667672A (en) * 2018-06-13 2018-10-16 四川斐讯信息技术有限公司 A kind of automatic adaptation method and router of LAN interface and wan interface

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007085860A1 (en) * 2006-01-27 2007-08-02 Camrivox Ltd. Automatic ip network determination and configuration for edge devices
US20100121946A1 (en) * 2006-08-23 2010-05-13 Thomson Licensing Method and device for identifying and selecting an interface to access a network
CN103534984A (en) * 2012-10-08 2014-01-22 华为终端有限公司 Port setting method, apparatus and computer program product for routing
CN103636167A (en) * 2013-02-07 2014-03-12 华为技术有限公司 Station opening configuration method in base station, base station, and server
CN104683188A (en) * 2015-03-23 2015-06-03 太仓市同维电子有限公司 Method for quickly detecting communication of IP channel of household router
CN106341246A (en) * 2015-07-07 2017-01-18 西安中兴新软件有限责任公司 Method and device for automatically recognizing LAN (Local Area Network) port and WAN (Wide Area Network) port
CN108667672A (en) * 2018-06-13 2018-10-16 四川斐讯信息技术有限公司 A kind of automatic adaptation method and router of LAN interface and wan interface

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
佚名: "Configuring a switch with WAN and LAN", Retrieved from the Internet <URL:https://serverfault.com/questions/885387/configuring-a-switch-with-wan-and-lan> *
王萍: "高速访问互联网的LAN/WAN集成交换技术", 无线电通信技术, no. 02 *

Also Published As

Publication number Publication date
CN114640582B (en) 2023-10-31

Similar Documents

Publication Publication Date Title
WO2014161478A1 (en) Switching method for network interfaces, access device and computer storage medium
US20040230703A1 (en) Network device, server device, client device, and method and program for assigning network IP address
US10111263B2 (en) Method and system for network interconnection between devices
CN109462668B (en) Method and device for processing domain name resolution request
KR20210110335A (en) Smart device network configuration method and related devices
US10505890B2 (en) Network access method, system and terminal device, and computer storage medium
CN109743744B (en) Wireless performance test method, device, equipment and readable storage medium
CN113038499B (en) Terminal Wi-Fi compatibility testing method, device, system, equipment and medium
EP3114887A1 (en) Determination method and corresponding terminal, computer program product and storage medium
CN114640582A (en) Intelligent network connection method, system, device and storage medium
CN107911494B (en) Method, device, computer equipment and storage medium for accessing IPv6 network
EP3570495A1 (en) Device management method and related device
WO2021042893A1 (en) Access point name configuration method and apparatus, and readable storage medium
CN114040412A (en) Method, device and equipment for establishing connection communication and readable storage medium
CN114302433A (en) Mesh networking method and device for multiple devices and readable storage medium
CN112351420B (en) Networking identity creation method and equipment of terminal equipment and readable storage medium
EP2829985A1 (en) Information processing system, information processing method, server, control method therefor, and control program
JP6052876B2 (en) Relay device, control method thereof, and control program thereof
CN114629725A (en) User domain dumb terminal management method, device, system and storage medium
CN110691023A (en) Address system
CN107613497B (en) Network authentication method and wireless access equipment
CN112333054A (en) Device communication method, device and computer readable storage medium
KR101762862B1 (en) Automatic configuration method and automatic configuration system for client terminal at exclusive network
CN111147592A (en) Method and device for realizing management of switch through JSON and storage medium
CN111565388A (en) Network registration method and electronic equipment

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