CN113473576B - Roaming networking processing method and device, mobile terminal and readable storage medium - Google Patents

Roaming networking processing method and device, mobile terminal and readable storage medium Download PDF

Info

Publication number
CN113473576B
CN113473576B CN202010245241.8A CN202010245241A CN113473576B CN 113473576 B CN113473576 B CN 113473576B CN 202010245241 A CN202010245241 A CN 202010245241A CN 113473576 B CN113473576 B CN 113473576B
Authority
CN
China
Prior art keywords
dhcp
address
mobile terminal
dhcp server
response message
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
CN202010245241.8A
Other languages
Chinese (zh)
Other versions
CN113473576A (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.)
Oneplus Technology Shenzhen Co Ltd
Original Assignee
Oneplus Technology Shenzhen 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 Oneplus Technology Shenzhen Co Ltd filed Critical Oneplus Technology Shenzhen Co Ltd
Priority to CN202010245241.8A priority Critical patent/CN113473576B/en
Priority to PCT/CN2021/084370 priority patent/WO2021197375A1/en
Publication of CN113473576A publication Critical patent/CN113473576A/en
Application granted granted Critical
Publication of CN113473576B publication Critical patent/CN113473576B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • 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]
    • 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/5061Pools of addresses

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application provides a roaming networking processing method, a roaming networking processing device, a mobile terminal and a readable storage medium, and relates to the field of mobile communication. When a mobile terminal detects that a roaming event occurs, the mobile terminal broadcasts and sends a DHCP detection request message carrying a default IP address of the mobile terminal before roaming, so that the characteristic that a DHCP server can respond to any DHCP request message received by the mobile terminal is utilized, the DHCP detection response messages of all DHCP servers are received, and then the target detection response messages and message type identification results thereof are determined, so that whether the mobile terminal can directly access a network managed by the DHCP server corresponding to the target detection response messages by means of the current default IP address after roaming is quickly determined according to the type identification results, the time stability of network accessibility confirmation operation is enhanced, the phenomenon of long-time interruption of network access is avoided, and the user internet access experience is optimized.

Description

Roaming networking processing method and device, mobile terminal and readable storage medium
Technical Field
The present application relates to the field of mobile communications, and in particular, to a roaming networking processing method and apparatus, a mobile terminal, and a readable storage medium.
Background
With the continuous development of mobile communication technology, the application of wireless roaming technology is becoming more and more extensive, and a mobile terminal can access to a network matched with a roaming place through the wireless roaming technology to realize network access operation. After a roaming operation is completed, the mobile terminal needs to determine whether the mobile terminal can directly access the network at the roaming site at that time, and applies a new IP address to the network at the roaming site for network entry loading operation when the mobile terminal cannot. At present, the mobile terminal implements the network accessibility confirmation operation by sending a response request message for the gateway device before roaming and waiting for a response message of the gateway device before roaming. If the mobile terminal does not receive the response message from the gateway device before roaming for a long time after sending the response request message, the mobile terminal can determine that the mobile terminal cannot access the network at the roaming position currently. Therefore, the confirmation duration of the accessibility confirmation scheme is unstable, whether the mobile terminal can visit the network at the roaming place after roaming cannot be quickly determined, and the phenomenon of long-time interruption of network access is easy to occur.
Disclosure of Invention
In view of the above, an object of the present application is to provide a roaming networking processing method, an apparatus, a mobile terminal and a readable storage medium, which can quickly determine whether the mobile terminal can access a network at a roaming location after roaming, enhance the stability of the accessibility determination duration, avoid the phenomenon of long-time interruption of network access, and optimize the user experience of surfing the internet.
In order to achieve the above purpose, the embodiments of the present application employ the following technical solutions:
in a first aspect, an embodiment of the present application provides a roaming networking processing method, which is applied to a mobile terminal, and the method includes:
detecting whether a roaming event is generated, and broadcasting and sending a DHCP detection request message when the roaming event is detected, wherein the DHCP detection request message carries a default IP address of the mobile terminal before roaming;
receiving a DHCP detection response message corresponding to the DHCP detection request message and fed back by a DHCP server, wherein the DHCP detection response message is obtained by responding to the received DHCP detection request message by the DHCP server according to an IP address pool managed by the DHCP server;
determining a target detection response message in the received DHCP detection response message, and performing message type identification on the target detection response message to obtain a corresponding type identification result;
and determining whether the mobile terminal can access the network managed by the first DHCP server sending the target detection response message through the default IP address according to the type identification result.
In an optional implementation manner, the determining, according to the type identification result, whether the mobile terminal can access a network managed by a first DHCP server that sends the target detection response packet through the default IP address includes:
if the type identification result is that the target detection response message is a positive response message, judging that the default IP address is in an IP address pool of the first DHCP server, and the mobile terminal can access a network managed by the first DHCP server through the default IP address;
if the type identification result is that the target detection response message is a definite response message, it is determined that the default IP address is not in the IP address pool of the first DHCP server, and the mobile terminal cannot access the network managed by the first DHCP server through the default IP address.
In an alternative embodiment, the method further comprises:
and when the type identification result is that whether the target detection response message is a definite response message or not, applying for the current target IP address under the accessible network of the mobile terminal to load.
In an optional embodiment, the applying for loading the target IP address of the mobile terminal under the current accessible network includes:
clearing the current default IP address, and broadcasting and sending a DHCP detection message;
receiving a DHCP detection response message which is fed back by a DHCP server and corresponds to the DHCP detection message;
determining a second DHCP server in the DHCP servers corresponding to the received DHCP detection response messages respectively, and broadcasting and sending a DHCP service request message aiming at the second DHCP server, wherein the second DHCP server is a DHCP server applied for an IP address;
and receiving a DHCP service response message from the second DHCP server, and configuring a default IP address according to a target IP address included in the DHCP service response message.
In a second aspect, an embodiment of the present application provides a roaming networking processing apparatus, applied to a mobile terminal, the apparatus including:
the detection request module is used for detecting whether a roaming event is generated and broadcasting and sending a DHCP detection request message when the roaming event is detected, wherein the DHCP detection request message carries a default IP address of the mobile terminal before roaming;
the response receiving module is used for receiving a DHCP detection response message which is fed back by the DHCP server and corresponds to the DHCP detection request message, wherein the DHCP detection response message is obtained by the DHCP server according to the received DHCP detection request message which is responded by the IP address pool managed by the DHCP server;
the message identification module is used for determining a target detection response message in the received DHCP detection response message and carrying out message type identification on the target detection response message to obtain a corresponding type identification result;
and the access detection module is used for determining whether the mobile terminal can access the network managed by the first DHCP server which sends the target detection response message through the default IP address according to the type identification result.
In an optional implementation manner, the first DHCP server is a DHCP server that corresponds to the target detection response packet and needs to be determined whether to be accessible, and the access detection module determines whether the mobile terminal can access a network managed by the first DHCP server that sends the target detection response packet through the default IP address according to the type identification result, including:
if the type identification result is that the target detection response message is a positive response message, judging that the default IP address is in an IP address pool of the first DHCP server, and the mobile terminal can access a network managed by the first DHCP server through the default IP address;
if the type identification result is that the target detection response message is a predetermined response message, it is determined that the default IP address is not in the IP address pool of the first DHCP server, and the mobile terminal cannot access the network managed by the first DHCP server through the default IP address.
In an alternative embodiment, the apparatus further comprises:
and the address application module is used for applying for loading the target IP address of the current accessible network of the mobile terminal when the type identification result is that whether the target detection response message is a definite response message or not.
In an optional embodiment, the applying for a target IP address of the mobile terminal under the current accessible network by the address applying module includes:
clearing the current default IP address, and broadcasting and sending a DHCP detection message;
receiving a DHCP detection response message which is fed back by a DHCP server and corresponds to the DHCP detection message;
determining a second DHCP server in the DHCP servers corresponding to the received DHCP detection response messages respectively, and broadcasting and sending a DHCP service request message aiming at the second DHCP server, wherein the second DHCP server is a DHCP server applied for an IP address;
and receiving a DHCP service response message from the second DHCP server, and configuring a default IP address according to a target IP address included in the DHCP service response message.
In a third aspect, an embodiment of the present application provides a mobile terminal, which includes a processor and a memory, where the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the roaming networking processing method described in the foregoing embodiment.
In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the roaming networking processing method described in any one of the foregoing embodiments is implemented.
The application has the following beneficial effects:
when a mobile terminal detects that a roaming event occurs, the mobile terminal broadcasts and sends a DHCP detection request message carrying a default IP address of the mobile terminal before roaming, the mobile terminal receives DHCP detection response messages obtained by all DHCP servers responding to the DHCP detection request message according to an IP address pool of the mobile terminal, then a target detection response message and a message type identification result are determined, and then whether the mobile terminal can access a network managed by a first DHCP server sending the target detection response message through the default IP address is determined according to the type identification result, so that whether the mobile terminal can access the network at the roaming place after roaming is quickly determined by utilizing the characteristic that the DHCP server can respond to any DHCP request message received by the mobile terminal, the stability of the accessibility determination time length is enhanced, the phenomenon of long-time interruption of network access is avoided, and the internet surfing experience of a user is optimized.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic view of a roaming scenario between a mobile terminal and a DHCP server according to an embodiment of the present disclosure;
fig. 2 is a schematic structural component diagram of a mobile terminal according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a roaming networking processing method according to an embodiment of the present application;
fig. 4 is a second flowchart illustrating a roaming networking processing method according to an embodiment of the present application;
FIG. 5 is a functional block diagram of a roaming networking processing device according to an embodiment of the present application;
fig. 6 is a second functional block diagram of a roaming networking processing device according to an embodiment of the present application.
Icon: 10-a mobile terminal; 20-a DHCP server; 11-a memory; 12-a processor; 13-a communication unit; 100-roaming networked processing means; 110-a detection request module; 120-a response receiving module; 130-a message identification module; 140-access detection module; 150-address application module.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, as presented in the figures, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It is noted that relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The inventor finds that, through diligent research, when a mainstream in the industry currently judges whether a mobile terminal can access a network at a roaming location under the condition that the mobile terminal has a roaming event, the current industry generally adopts a mode that an ICMP (Internet Control Message Protocol) Echo Request (ICMP Echo Request) Message which is generated based on a ping Protocol and carries a gateway Address of the gateway device before roaming and is sent to the gateway device before roaming, and/or a mode that an ARP (Address Resolution Protocol) Request Message which carries the gateway Address of the gateway device before roaming is sent in a broadcast mode, so that the gateway device before roaming returns a response Message corresponding to the sent Request Message to the mobile terminal, wherein any gateway device of which the current gateway Address does not accord with the gateway Address recorded by the Request Message does not respond to the Request Message when receiving the Request Message.
After the mobile terminal sends the ICMP echo request message and/or the ARP request message, it waits for the gateway device before roaming to return a response message corresponding to the sent request message, and when the waiting time exceeds a preset waiting time and also does not receive the corresponding response message, it determines that the current roaming event of the mobile terminal belongs to cross-network segment roaming, and at this time, the mobile terminal cannot access to the network at the roaming location. Therefore, the network accessibility confirmation scheme has the phenomenon of unstable discrimination time, at least one preset waiting time needs to be spent when a real cross-network segment roaming event is faced, whether the current roaming operation belongs to cross-network segment roaming cannot be quickly confirmed, that is, whether a mobile terminal can access a network at a roaming place after roaming cannot be quickly confirmed, the network connection interruption time cannot be reduced, the phenomenon of long-time network access interruption is easy to occur, and the user internet experience is poor. Accordingly, the present inventors have solved the above-described problems by providing a roaming networking processing method, apparatus, mobile terminal, and readable storage medium.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments and features of the embodiments described below can be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a schematic view illustrating a roaming scenario between a mobile terminal 10 and a DHCP server 20 according to an embodiment of the present disclosure. In this embodiment of the present application, each DHCP (Dynamic Host Configuration Protocol) server 20 is configured with an IP address pool, and manages a network corresponding to the IP address pool, where the IP address pool corresponding to each DHCP server 20 may record an IP address of at least one network segment, and each network segment corresponds to one local area network, that is, each DHCP server 20 may correspondingly manage at least one local area network. The mobile terminal 10 may roam between all local area networks managed by the same DHCP server 20, or may roam between local area networks managed by each of the plurality of DHCP servers 20.
After the mobile terminal 10 completes the roaming operation each time, it broadcasts and sends a DHCP request message carrying the current IP address of the mobile terminal 10 (the IP address of the mobile terminal 10 before the roaming operation occurs), so that after receiving the DHCP request message, the DHCP server 20 covering the mobile terminal 10 can determine whether the IP address recorded in the DHCP request message is in the IP address pool of the DHCP server 20 according to its own IP address pool, so as to determine whether the mobile terminal 10 can access the network corresponding to the DHCP server 20 by means of the IP address before roaming, and then directly feed back a DHCP response message for reflecting the network access determination result to the mobile terminal 10, so that the mobile terminal 10 can quickly know whether itself can directly access the network after roaming, thereby improving the stability of the time length of the network accessibility confirmation operation, avoiding the phenomenon of long-time interruption of network access, and optimizing the user internet access experience.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a mobile terminal 10 according to an embodiment of the present disclosure. In the embodiment of the present application, the mobile terminal 10 includes a roaming networking processing device 100, a memory 11, a processor 12, and a communication unit 13. The various elements of the memory 11, the processor 12 and the communication unit 13 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, the memory 11, the processor 12 and the communication unit 13 may be electrically connected to each other through one or more communication buses or signal lines.
In this embodiment, the memory 11 may be used for storing a program, and the processor 12 may execute the program accordingly after receiving the execution instruction. The Memory 11 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 11 may also be used to store an IP address currently used by the corresponding mobile terminal 10 for implementing network access, i.e., a default IP address.
In this embodiment, the processor 12 may be an integrated circuit chip having signal processing capabilities. The Processor 12 may be a general-purpose Processor including a Central Processing Unit (CPU), a Network Processor (NP), and the like. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like that implements or executes the methods, steps and logic blocks disclosed in the embodiments of the present application.
In this embodiment, the communication unit 13 is configured to establish a communication connection between the mobile terminal 10 and another electronic device through a network, and perform data interaction through the network. In addition, the communication unit 13 is also configured to implement a signal transmitting function and a signal receiving function of the mobile terminal 10.
In this embodiment, the roaming networking processing device 100 includes at least one software functional module that can be stored in the memory 11 in the form of software or firmware or be solidified in the operating system of the mobile terminal 10. The processor 12 may be used to execute executable modules stored by the memory 11, such as software functional modules and computer programs included in the roaming network processing device 100. When a roaming event occurs in the mobile terminal 10, the roaming networking processing device 100 can quickly determine whether the mobile terminal 10 can directly access to the network of the roaming area, so as to improve the stability of the time duration of the network accessibility determination operation, avoid the phenomenon of long-time interruption of network access, and optimize the user internet experience.
It should be understood that the block diagram shown in fig. 2 is merely a structural component diagram of the mobile terminal 10, and that the mobile terminal 10 may include more or fewer components than those shown in fig. 2, or may have a different configuration than that shown in fig. 2. The components shown in fig. 2 may be implemented in hardware, software, or a combination thereof.
In order to ensure that the mobile terminal 10 can quickly determine whether the mobile terminal can directly access to a network of a roaming place when a roaming event occurs, improve the time stability of network accessibility determination operation, avoid the phenomenon of long-time interruption of network access, and optimize user internet experience, the roaming networking processing method applied to the mobile terminal 10 is provided in the application to realize the functions. The roaming networking processing method provided in the present application is described below.
Optionally, referring to fig. 3, fig. 3 is a flowchart illustrating a roaming networking processing method according to an embodiment of the present disclosure. In the embodiment of the present application, the specific flow and steps of the roaming networking processing method shown in fig. 3 are as follows.
Step S210, whether a roaming event occurs is detected, and when the roaming event is detected, a DHCP detection request message is sent in a broadcast mode, wherein the DHCP detection request message carries a default IP address of the mobile terminal before roaming.
In this embodiment, when the mobile terminal 10 roams in at least one local area network managed by the same DHCP server 20, or roams between at least one local area network managed by different DHCP servers 20, the mobile terminal 10 may detect whether a roaming event occurs in itself through its underlying firmware, and when the roaming event is detected, send a DHCP detection request message for requesting to detect whether the current default IP address of the mobile terminal 10 can be continuously used in the network after the roaming is completed by broadcasting to the outside through the communication unit 13, where the DHCP detection request message records the default IP address used for network access before the mobile terminal 10 generates the roaming event. In an implementation manner of this embodiment, the DHCP detect Request message may be generated by using a DHCP Request message format.
Step S220, receiving a DHCP detection response message corresponding to the DHCP detection request message fed back by the DHCP server.
In this embodiment, after the mobile terminal 10 has a roaming event and has sent a DHCP detection request message in a broadcast manner, at least one DHCP server 20 in the DHCP message sending range of the mobile terminal 10 correspondingly receives the DHCP detection request message, and then the DHCP server 20 extracts information from the DHCP detection request message to obtain the current default IP address of the mobile terminal 10 recorded in the DHCP detection request message. At this time, the DHCP server 20 compares the extracted default IP address with its own IP address pool to determine whether the mobile terminal 10 can directly access a local area network managed by itself.
The number of IP address pools stored in DHCP server 20 is the same as the number of local area networks managed by DHCP server 20, and each local area network managed by the same DHCP server 20 corresponds to one IP address pool. When a certain DHCP server 20 obtains a certain default IP address to be detected, it is first determined whether an original lan corresponding to the default IP address belongs to a lan managed by the DHCP server 20.
If the original lan corresponding to the default IP address does not belong to the lan managed by the DHCP server 20, it indicates that the corresponding mobile terminal 10 cannot directly access any lan managed by itself through the default IP address, and at this time, the DHCP server 20 feeds back a DHCP detection response packet, which directly generates a packet type of a negative response packet, to the mobile terminal 10.
If the original lan corresponding to the default IP address belongs to the lan managed by the DHCP server 20, it indicates that the mobile terminal 10 may directly access the original lan managed by the DHCP server 20 and matched with the default IP address through the default IP address, and at this time, the DHCP server 20 calls an IP address pool corresponding to the original lan and determines whether the default IP address exists in the called IP address pool by an address comparison method.
When the default IP address does not exist in the IP address pool corresponding to the original lan, it may indicate that the default IP address is illegal, and the mobile terminal 10 cannot access the original lan through the default IP address, and at this time, the DHCP server 20 feeds back a DHCP detection response packet, which is directly generated in a packet type of a negative response packet, to the mobile terminal 10.
When the default IP address exists in the IP address pool corresponding to the original lan, it may indicate that the default IP address is valid, and the mobile terminal 10 may access the original lan through the default IP address, and at this time, the DHCP server 20 feeds back a DHCP detection response packet, which is directly generated and has a packet type of an acknowledgement packet, to the mobile terminal 10.
In an implementation manner of this embodiment, the positive ACKnowledgement message may be expressed in a DHCP ACK (ACKnowledgement) message format, and the Negative ACKnowledgement message may be expressed in a DHCP NAK (non-ACKnowledgement) message format.
Step S230, determining a target detection response message from the received DHCP detection response message, and performing message type identification on the target detection response message to obtain a corresponding type identification result.
In this embodiment, when the mobile terminal 10 receives a plurality of DHCP detection response messages, the first DHCP detection response message received is usually used as a target detection response message most matched with the DHCP server 20 at the current roaming destination, and at this time, the DHCP server 20 that sends the target detection response message is the currently selected DHCP server 20 (i.e., the first DHCP server 20) that needs to be confirmed whether to be accessible. At this time, the mobile terminal 10 will determine whether it can directly access the network at the roaming location by using the current default IP address at that time according to the message type result of the target detection response message.
Step S240, determining whether the mobile terminal can access the network managed by the first DHCP server sending the target detection response packet through the default IP address according to the type identification result.
In this embodiment, when the type identification result of the target detection response packet indicates that the target detection response packet is an acknowledgement packet, it may be determined that the current default IP address of the mobile terminal 10 is in the IP address pool of the first DHCP server 20 that sends the target detection response packet, that is, the mobile terminal 10 may access the network managed by the first DHCP server 20 through the default IP address. When the type identification result of the target detection response packet indicates whether the target detection response packet is a response packet, it may be determined that the current default IP address of the mobile terminal 10 is not in the IP address pool of the first DHCP server 20 that sends the target detection response packet, that is, the mobile terminal 10 cannot access the network managed by the first DHCP server 20 through the default IP address.
In the present application, the mobile terminal 10 can ensure that the mobile terminal 10 quickly confirms whether itself can directly access the network at the roaming location by means of the IP address before roaming after the roaming event occurs by using the roaming networking processing method, so as to enhance the stability of the accessibility confirmation duration, avoid the phenomenon of long-time interruption of network access, and optimize the user internet experience.
Optionally, referring to fig. 4, fig. 4 is a second flowchart illustrating a roaming networking processing method according to an embodiment of the present application. In this embodiment, compared with the roaming networking processing method shown in fig. 3, in the roaming networking processing method shown in fig. 4, the roaming networking processing method shown in fig. 4 may further include step S250, and when the mobile terminal 10 cannot directly access the network at the roaming destination through the IP address before roaming, the mobile terminal 10 can acquire the IP address matching with the network at the roaming destination by executing the step S250, and connect with the network at the roaming destination according to the acquired IP address, so as to ensure that the mobile terminal 10 can continue to access the network.
Step S250, when the type identification result is that the target detection response message is a response message, applying for the target IP address of the current accessible network of the mobile terminal to load.
In this embodiment, when the mobile terminal 10 determines that the type identification result corresponding to the obtained target detection response message indicates that the target detection response message is a negative response message, the mobile terminal 10 cannot directly access the network at the roaming destination through the current default IP address, and at this time, the mobile terminal 10 correspondingly seeks for the target IP address under the network that the mobile terminal can access at the current roaming destination to load, so as to access the network at the roaming destination to perform a network access operation.
Specifically, the step of applying for loading the target IP address of the mobile terminal 10 under the current accessible network includes:
clearing the current default IP address, and broadcasting and sending a DHCP detection message;
receiving a DHCP detection response message corresponding to the DHCP detection message fed back by the DHCP server 20;
determining a second DHCP server 20 in the DHCP servers 20 corresponding to the received DHCP probe response message, and broadcasting and sending a DHCP service request message for the second DHCP server 20;
and receiving a DHCP service reply message from the second DHCP server 20, and configuring a default IP address according to a target IP address included in the DHCP service reply message.
Wherein, the second DHCP server 20 is the DHCP server 20 of the applied IP address determined by the mobile terminal 10. The DHCP probe message sent by the mobile terminal 10 may be generated in a DHCP Discover message format, the DHCP probe response message sent by the DHCP server 20 may be generated in a DHCP Offer message format, and the number of the DHCP probe response messages received by the mobile terminal 10 is at least one.
The mobile terminal 10 may select, according to a receiving sequence of the DHCP probe response messages, the DHCP server 20 corresponding to the first received DHCP probe response message as the second DHCP server 20, and broadcast and send a DHCP service Request message for indicating that the application of the IP address through the second DHCP server 20 is confirmed to the surroundings, where the DHCP service Request message may be generated in a DHCP Request message format. At this point, the selected second DHCP server 20 may point to the same DHCP server 20 as the aforementioned first DHCP server 20. After receiving the DHCP service request message, the second DHCP server 20 correspondingly allocates a target IP address in the network managed by the second DHCP server 20 to the mobile terminal 10, and feeds back a DHCP service response message including the target IP address to the mobile terminal 10, so that the mobile terminal 10 can configure its own default IP address according to the target IP address, and directly access the network managed by the second DHCP server 20 through the configured default IP address.
In the present application, in order to ensure that the roaming networking processing device 100 included in the mobile terminal 10 can be normally implemented, the functions of the roaming networking processing device 100 are implemented by dividing the functional blocks. The following describes specific components of the roaming networking processing device 100 provided in the present application.
Optionally, referring to fig. 5, fig. 5 is a schematic functional block diagram of a roaming networking processing device 100 according to an embodiment of the present disclosure. In the embodiment of the present application, the roaming networking processing device 100 includes a detection request module 110, a response receiving module 120, a message identification module 130, and an access detection module 140.
The detection request module 110 is configured to detect whether a roaming event occurs, and broadcast and send a DHCP detection request message when the roaming event is detected, where the DHCP detection request message carries a default IP address of the mobile terminal before roaming.
And a response receiving module 120, configured to receive a DHCP detection response message corresponding to the DHCP detection request message and fed back by the DHCP server, where the DHCP detection response message is obtained by the DHCP server responding to the received DHCP detection request message according to an IP address pool managed by the DHCP server.
The message identification module 130 is configured to determine a target detection response message from the received DHCP detection response message, and perform message type identification on the target detection response message to obtain a corresponding type identification result.
And the access detection module 140 is configured to determine whether the mobile terminal can access a network managed by the first DHCP server that sends the target detection response packet through the default IP address according to the type identification result.
Optionally, referring to fig. 6, fig. 6 is a second functional module schematic diagram of the roaming networking processing device 100 according to the embodiment of the present application. In the embodiment of the present application, in comparison between the roaming networking processing device 100 shown in fig. 6 and the roaming networking processing device 100 shown in fig. 5, the roaming networking processing device 100 shown in fig. 6 may further include an address application module 150.
The address application module 150 is configured to apply for loading a target IP address of the mobile terminal under the current accessible network when the type identification result indicates that the target detection response packet is a definite response packet.
It should be noted that the basic principle and the resulting technical effect of the roaming networking processing apparatus 100 provided in the embodiment of the present application are the same as those of the roaming networking processing method described above, and for a brief description, reference may be made to the above description of the roaming networking processing method, which is not mentioned in this embodiment.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions may be stored in a readable storage medium if they are implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a readable storage medium, which includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned readable storage medium comprises: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In summary, in a roaming networking processing method, apparatus, mobile terminal and readable storage medium provided in embodiments of the present application, when a roaming event is detected by a mobile terminal, the mobile terminal broadcasts and sends a DHCP detect request message carrying a default IP address of the mobile terminal before roaming, the mobile terminal receives a DHCP detect response message obtained by each DHCP server responding to the DHCP detect request message according to its own IP address pool, and then determines a target detect response message and a message type identification result thereof, and further determines, according to the type identification result, whether the mobile terminal can access a network managed by a first DHCP server that sends the target detect response message through the default IP address.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A roaming networking processing method, applied to a mobile terminal, the method comprising:
detecting whether a roaming event is generated, and broadcasting and sending a DHCP detection request message when the roaming event is detected, wherein the DHCP detection request message carries a default IP address of the mobile terminal before roaming;
receiving a DHCP detection response message which is fed back by a DHCP server and corresponds to the DHCP detection request message, wherein the DHCP detection response message is obtained by responding to the received DHCP detection request message by the DHCP server according to an IP address pool managed by the DHCP server, and the DHCP detection response message is used for representing whether an original local area network corresponding to the default IP address belongs to a local area network which is managed by the corresponding DHCP server and is matched with the IP address pool or not;
determining a target detection response message in the received DHCP detection response message, and performing message type identification on the target detection response message to obtain a corresponding type identification result, wherein the target detection response message is the DHCP detection response message which is most matched with a DHCP server at the current roaming position;
and determining whether the mobile terminal can access a network managed by a first DHCP server sending the target detection response message through the default IP address according to the type identification result.
2. The method of claim 1, wherein the first DHCP server is a DHCP server that corresponds to the target detection response packet and needs to be confirmed whether to be accessible, and the determining whether the mobile terminal can access a network managed by the first DHCP server that sends the target detection response packet through the default IP address according to the type identification result includes:
if the type identification result is that the target detection response message is an acknowledgement message, determining that the default IP address is in an IP address pool of the first DHCP server, and the mobile terminal can access a network managed by the first DHCP server through the default IP address;
if the type identification result is that the target detection response message is a predetermined response message, it is determined that the default IP address is not in the IP address pool of the first DHCP server, and the mobile terminal cannot access the network managed by the first DHCP server through the default IP address.
3. The method of claim 2, further comprising:
and when the type identification result is that whether the target detection response message is a definite response message or not, applying for the current target IP address under the accessible network of the mobile terminal to load.
4. The method according to claim 3, wherein said applying for loading the target IP address of the current accessible network of the mobile terminal comprises:
clearing the current default IP address, and broadcasting and sending a DHCP detection message;
receiving a DHCP detection response message which is fed back by a DHCP server and corresponds to the DHCP detection message;
determining a second DHCP server in the DHCP servers corresponding to the received DHCP detection response messages respectively, and broadcasting and sending a DHCP service request message aiming at the second DHCP server, wherein the second DHCP server is a DHCP server applied for an IP address;
and receiving a DHCP service response message from the second DHCP server, and configuring a default IP address according to a target IP address included in the DHCP service response message.
5. A roaming networking processing apparatus, applied to a mobile terminal, the apparatus comprising:
the detection request module is used for detecting whether a roaming event is generated and broadcasting and sending a DHCP detection request message when the roaming event is detected, wherein the DHCP detection request message carries a default IP address of the mobile terminal before roaming;
the response receiving module is used for receiving a DHCP detection response message which is fed back by a DHCP server and corresponds to the DHCP detection request message, wherein the DHCP detection response message is obtained by the DHCP server according to the received DHCP detection request message which is responded by an IP address pool managed by the DHCP server, and the DHCP detection response message is used for representing whether an original local area network corresponding to the default IP address belongs to a local area network which is managed by the corresponding DHCP server and is matched with the IP address pool or not;
the message identification module is used for determining a target detection response message in the received DHCP detection response message and carrying out message type identification on the target detection response message to obtain a corresponding type identification result, wherein the target detection response message is the DHCP detection response message which is most matched with a DHCP server at the current roaming position;
and the access detection module is used for determining whether the mobile terminal can access the network managed by the first DHCP server which sends the target detection response message through the default IP address according to the type identification result.
6. The apparatus of claim 5, wherein the first DHCP server is a DHCP server that corresponds to the target detection response packet and needs to be determined whether to be accessible, and the determining, by the access detection module according to the type identification result, whether the mobile terminal can access a network managed by the first DHCP server that sends the target detection response packet through the default IP address includes:
if the type identification result is that the target detection response message is an acknowledgement message, determining that the default IP address is in an IP address pool of the first DHCP server, and the mobile terminal can access a network managed by the first DHCP server through the default IP address;
if the type identification result is that the target detection response message is a predetermined response message, it is determined that the default IP address is not in the IP address pool of the first DHCP server, and the mobile terminal cannot access the network managed by the first DHCP server through the default IP address.
7. The apparatus of claim 6, further comprising:
and the address application module is used for applying for loading the current target IP address under the accessible network of the mobile terminal when the type identification result is that whether the target detection response message is a definite response message or not.
8. The apparatus of claim 7, wherein the address application module applies for loading the target IP address of the current accessible network of the mobile terminal, and comprises:
clearing the current default IP address, and broadcasting and sending a DHCP detection message;
receiving a DHCP detection response message which is fed back by a DHCP server and corresponds to the DHCP detection message;
determining a second DHCP server in the DHCP servers corresponding to the received DHCP detection response messages respectively, and broadcasting and sending a DHCP service request message aiming at the second DHCP server, wherein the second DHCP server is a DHCP server applied for an IP address;
and receiving a DHCP service response message from the second DHCP server, and configuring a default IP address according to a target IP address included in the DHCP service response message.
9. A mobile terminal comprising a processor and a memory, the memory storing machine executable instructions executable by the processor to implement the roaming networking processing method of any one of claims 1-4.
10. A readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the roaming networking processing method of any one of claims 1-4.
CN202010245241.8A 2020-03-31 2020-03-31 Roaming networking processing method and device, mobile terminal and readable storage medium Active CN113473576B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010245241.8A CN113473576B (en) 2020-03-31 2020-03-31 Roaming networking processing method and device, mobile terminal and readable storage medium
PCT/CN2021/084370 WO2021197375A1 (en) 2020-03-31 2021-03-31 Roaming networking processing method, apparatus, mobile terminal and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010245241.8A CN113473576B (en) 2020-03-31 2020-03-31 Roaming networking processing method and device, mobile terminal and readable storage medium

Publications (2)

Publication Number Publication Date
CN113473576A CN113473576A (en) 2021-10-01
CN113473576B true CN113473576B (en) 2023-04-07

Family

ID=77865515

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010245241.8A Active CN113473576B (en) 2020-03-31 2020-03-31 Roaming networking processing method and device, mobile terminal and readable storage medium

Country Status (2)

Country Link
CN (1) CN113473576B (en)
WO (1) WO2021197375A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114124581B (en) * 2022-01-27 2022-05-17 深圳融安网络科技有限公司 Message processing method, firewall and readable storage medium
CN114978942A (en) * 2022-05-13 2022-08-30 深信服科技股份有限公司 Router detection method and device, electronic equipment and storage medium
CN115118518A (en) * 2022-07-21 2022-09-27 深圳安天网络安全技术有限公司 Anti-detection method and device
CN115296893A (en) * 2022-08-02 2022-11-04 北京天融信网络安全技术有限公司 Method, device, system and medium for detecting address information abnormity

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103795581A (en) * 2012-10-29 2014-05-14 杭州华三通信技术有限公司 Address processing method and address processing device
CN107517283A (en) * 2017-08-18 2017-12-26 杭州迪普科技股份有限公司 A kind of method and device for realizing terminal roaming switching

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2619092C (en) * 2008-01-29 2015-05-19 Solutioninc Limited Method of and system for support of user devices roaming between routing realms by a single network server
CN106304277B (en) * 2015-05-12 2020-12-04 中兴通讯股份有限公司 Method and terminal for realizing network access
CN106255089B (en) * 2016-08-26 2019-09-17 杭州迪普科技股份有限公司 A kind of method and apparatus of radio three layer roaming
CN107484223B (en) * 2017-08-23 2020-08-04 杭州迪普科技股份有限公司 Method and device for terminal roaming switching
CN107995070B (en) * 2017-11-21 2020-12-08 新华三技术有限公司 IPOE-based networking control method and device and BRAS
CN109088955B (en) * 2018-07-23 2021-07-09 成都西加云杉科技有限公司 Message processing method and device
CN109861892A (en) * 2019-03-28 2019-06-07 新华三技术有限公司 A kind of terminal roaming method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103795581A (en) * 2012-10-29 2014-05-14 杭州华三通信技术有限公司 Address processing method and address processing device
CN107517283A (en) * 2017-08-18 2017-12-26 杭州迪普科技股份有限公司 A kind of method and device for realizing terminal roaming switching

Also Published As

Publication number Publication date
CN113473576A (en) 2021-10-01
WO2021197375A1 (en) 2021-10-07

Similar Documents

Publication Publication Date Title
CN113473576B (en) Roaming networking processing method and device, mobile terminal and readable storage medium
US7991863B2 (en) Method and device for requesting and allocating connection point address
CN109150741B (en) Message sending method and device, electronic equipment and storage medium
EP3163946B1 (en) Transmission list in wi-fi acces point
WO2018103400A1 (en) Wireless fidelity wifi connection method and related product
US20230008647A1 (en) Connection establishment method, communication apparatus, and system
CN110086839B (en) Dynamic access method and device for remote equipment
CN108847999B (en) Equipment network connectivity detection method, device, terminal equipment and storage medium
CN110035134B (en) Network address translation method, device and access equipment
CN109088955B (en) Message processing method and device
CN111131484A (en) Node mounting method, device, network node and storage medium
US8443072B1 (en) Method and apparatus for managing network congestion due to automatic configuration procedures
CN104243626B (en) Information processing apparatus
CN116346429A (en) Illegal external connection equipment detection method and device
CN114584425A (en) Method for applying cross-domain roaming
US20220159454A1 (en) Wireless repeater device and configuration method for the same
CN110290230B (en) Method, device and storage medium for detecting dialing mode supported by network environment
CN112565482B (en) Electronic equipment, domain name query method and related product
CN108667944B (en) DHCP configuration method and DHCP client
EP3200433A1 (en) Ipv6 address management method, device and terminal
CN113852938A (en) Vehicle-mounted equipment communication method, vehicle-mounted equipment, storage medium and electronic device
CN111385371A (en) MAC address acquisition method, device and equipment
CN113596890B (en) Communication method, system, device and storage medium
CN113992583B (en) Table item maintenance method and device
CN110912997B (en) Method and device for checking Loopback interface of triangular networking

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