Internet protocol acquisition method and device, electronic equipment and storage medium
By obtaining the service set identifier and user agency fields in the request message of the mobile terminal, determine the types of operating systems, and allocate appropriate configuration servers to solve the problem of unable to provide differentiated configuration services in the traditional wireless network connection. More stable and efficient network connection and better user experience.
Patent Information
- Application Number
- CN202411630860.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-01-24
AI Technical Summary
During the traditional wireless network connection process, differentiated configuration services cannot be provided according to the operating system of the mobile terminal, resulting in low network connection stability and efficiency, which may lead to problems such as connection failure, slow network speed, and reduced security.
By responding to the mobile terminal's wireless connection request, obtaining the service set identifier and user agent field in the request message, determining the operating system type, and allocating the appropriate configuration server based on this, so that the mobile terminal can obtain the Internet Protocol address of the wireless network .
It realizes personalized network configuration services, improves the stability and efficiency of network connections, optimizes user experience, enhances network security, and improves network resource utilization.
Smart Images

Figure CN119364399A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for acquiring an Internet protocol. Background Art
[0002] With the rapid development of wireless communication technology, wireless local area network (WLAN) has become an indispensable part of people's daily life and is widely used in various fields such as homes, offices, and public places. In these places, multiple wireless networks are usually deployed, and each network has a unique service set identifier (SSID) for identification. When a user wants to connect to a wireless network using his mobile terminal (such as a smartphone, tablet, etc.), he needs to send a wireless connection request.
[0003] However, in the traditional wireless network connection process, when a mobile terminal sends a connection request, the wireless network management system can often only simply determine the network that the user wants to connect to based on the SSID, but cannot further understand the user's device information, such as the type of operating system, etc. This results in the wireless network management system being unable to provide differentiated configuration services for mobile terminals with different operating systems, thus affecting the stability and efficiency of network connections.
[0004] In addition, since mobile terminals with different operating systems have differences in network configuration, security policies, etc., if the wireless network management system cannot provide them with targeted configuration services, it may lead to connection failure, slow network speed, reduced security and other problems. Summary of the invention
[0005] The present invention proposes an Internet protocol acquisition method, device, electronic device and storage medium, aiming to solve one of the technical problems in the related art at least to a certain extent. The embodiments of the present invention can realize personalized network configuration services.
[0006] On the one hand, an embodiment of the present invention provides a method for obtaining an Internet protocol, comprising:
[0007] In response to the wireless connection request of the target mobile terminal, a request message of the target mobile terminal is obtained; wherein the request message includes a target service set identifier and a target user agent field of the target mobile terminal;
[0008] Determining a target wireless network for connection requested by a target mobile terminal based on a target service set identifier;
[0009] Determining the type of operating system of the target mobile terminal based on the target user agent field by the terminal identification device;
[0010] A target configuration server is allocated to the target mobile terminal according to the type of operating system, so that the target mobile terminal obtains the Internet protocol address of the target wireless network through the target configuration server.
[0011] Optionally, the method further comprises the following steps:
[0012] In response to a network scan request of the target mobile terminal, push a service set identifier of the wireless network in a broadcast state to the target mobile terminal;
[0013] In response to the target mobile terminal's operation instruction on the target service set identifier, a wireless connection request is obtained.
[0014] Optionally, obtaining a request message from a target mobile terminal includes the following steps:
[0015] The request message sent by the target mobile terminal is forwarded to the terminal identification device through the wireless access point and the switch.
[0016] Optionally, forwarding the request message sent by the target mobile terminal to the terminal identification device through the wireless access point and the switch includes the following steps:
[0017] Wireless access control based on access controller, obtaining the request message sent by the target mobile terminal through the wireless access point;
[0018] The request message obtained by the wireless access point is forwarded to the terminal identification device through the switch.
[0019] Optionally, a system storage table is provided in the terminal identification device, and the system storage table includes a user agent field and an operating system name stored in association; determining the operating system type of the target mobile terminal based on the target user agent field by the terminal identification device includes the following steps:
[0020] Based on the target user agent field and all user agent fields in the system storage table, traversal matching is performed, and the operating system type of the target mobile terminal is obtained according to the operating system name associated with the matching result.
[0021] Optionally, the operating system type includes a first type and a second type; allocating a target configuration server to a target mobile terminal according to the operating system type includes the following steps:
[0022] When the operating system type is the first type, assigning a stateful address target configuration server to the target mobile terminal;
[0023] When the operating system type is the second type, a stateless address automatic target configuration server is allocated to the target mobile terminal.
[0024] Optionally, the request message also includes a connection password; before the step of the target mobile terminal obtaining the Internet Protocol address of the target wireless network through the target configuration server, the method further includes the following steps:
[0025] Match and verify the connection password with the access password of the target wireless network;
[0026] The target mobile terminal obtains the Internet Protocol address of the target wireless network through the target configuration server based on the result of the matching check that passed the check.
[0027] On the other hand, an embodiment of the present invention provides an Internet protocol acquisition device, including:
[0028] The first module is used to obtain a request message of the target mobile terminal in response to a wireless connection request of the target mobile terminal; wherein the request message includes a target service set identifier and a target user agent field of the target mobile terminal;
[0029] The second module is used to determine the target wireless network that the target mobile terminal requests to connect to based on the target service set identifier;
[0030] The third module is used to determine the operating system type of the target mobile terminal based on the target user agent field through the terminal identification device;
[0031] The fourth module is used to allocate a target configuration server to the target mobile terminal according to the type of operating system, so that the target mobile terminal obtains the Internet Protocol address of the target wireless network through the target configuration server.
[0032] Optionally, the device further comprises:
[0033] A fifth module is configured to push a service set identifier of a wireless network in a broadcast state to the target mobile terminal in response to a network scan request of the target mobile terminal;
[0034] The sixth module is configured to obtain a wireless connection request in response to an operation instruction of the target mobile terminal on the target service set identifier.
[0035] Optionally, the request message also includes a connection password; and the device also includes:
[0036] The seventh module is used to match and verify the connection password with the access password of the target wireless network;
[0037] The target mobile terminal obtains the Internet Protocol address of the target wireless network through the target configuration server based on the result of the matching check that passed the check.
[0038] On the other hand, an embodiment of the present invention provides an electronic device, including: a processor and a memory; the memory is used to store programs; the processor executes the program to implement the above-mentioned Internet protocol acquisition method.
[0039] On the other hand, an embodiment of the present invention provides a computer storage medium, in which a program executable by a processor is stored. When the program executable by the processor is executed by the processor, it is used to implement the above-mentioned Internet protocol acquisition method.
[0040] The embodiment of the present invention obtains a request message of the target mobile terminal by responding to the wireless connection request of the target mobile terminal; wherein the request message includes a target service set identifier and a target user agent field of the target mobile terminal; determines the target wireless network that the target mobile terminal requests to connect to based on the target service set identifier; determines the type of operating system of the target mobile terminal based on the target user agent field through a terminal identification device; and allocates a target configuration server to the target mobile terminal according to the type of operating system, so that the target mobile terminal obtains the Internet Protocol address of the target wireless network through the target configuration server. The method of the present invention can intelligently allocate a target configuration server to the target mobile terminal according to the type of its operating system, thereby providing personalized network configuration services, thereby improving the stability and efficiency of network connections, optimizing user experience, enhancing network security, and improving network resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the technical solution of the present invention and do not constitute a limitation on the technical solution of the present invention.
[0042] Figure 1 A schematic diagram of an implementation environment for obtaining Internet protocols provided by an embodiment of the present invention;
[0043] Figure 2 A schematic diagram of a flow chart of a method for acquiring an Internet protocol provided by an embodiment of the present invention;
[0044] Figure 3 A schematic diagram of an extended process of a method for acquiring Internet protocols provided in an embodiment of the present invention;
[0045] Figure 4 A schematic diagram of the expanded flow of step S400 provided in an embodiment of the present invention;
[0046] Figure 5 A schematic diagram of signaling interaction provided by an embodiment of the present invention;
[0047] Figure 6 A schematic diagram of a network scenario of an application provided by an embodiment of the present invention;
[0048] Figure 7 The embodiment of the present invention provides Figure 6 Schematic diagram of the data packet flow in the network scenario;
[0049] Figure 8 A schematic diagram of a message interaction process between a DHCPv6 client and a DHCPv6 server provided in an embodiment of the present invention;
[0050] Fig. 9 A schematic diagram of the structure of an Internet protocol acquisition device provided by an embodiment of the present invention;
[0051] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0053] It should be noted that, although the functional modules are divided in the system schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first / S100", "second / S200", etc. in the specification, claims and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0054] Reference to "embodiments" in the present invention means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in the present invention may be combined with other embodiments.
[0055] To facilitate the understanding of the technical solution of the present invention, the following is an explanation of the specific names of the technical features that may appear in the technical solution of the present invention:
[0056] IPv6: IPv6 is the abbreviation of "Internet Protocol Version 6" in English. It is the next-generation IP protocol designed by the Internet Engineering Task Force (IETF) to replace IPv4. It is also called IPng (IP Next Generation). The network layer where it is located provides connectionless data transmission services.
[0057] DHCPv6: Dynamic Host Configuration Protocol for IPv6, is a network protocol used to configure the IPv6 address, IPv6 prefix, and other configurations (such as DNS) required by IPv6 hosts working on an IPv6 network.
[0058] SLAAC: Stateless Address Autoconfigruation. It is a method for obtaining an IPv6 global unicast address without a DHCPv6 server.
[0059] Mobile terminal operating system: specifically refers to Android and Apple (IOS) systems.
[0060] SSID: Service Set Identifier is the identifier of the WLAN network and is used to distinguish different WLAN networks.
[0061] AP: wireless access point, is an access point of a wireless network, commonly known as "hotspot". There are mainly routing switch access integrated devices and pure access point devices. Integrated devices perform access and routing work, and pure access devices are only responsible for wireless client access. Pure access devices are usually used as wireless network extensions, connecting to other APs or main APs to expand wireless coverage, while integrated devices are generally the core of wireless networks.
[0062] AC: Access controller, also known as wireless access control server or wireless LAN access control device, is responsible for aggregating data from different APs and connecting them to the Internet, while completing AP device configuration management, wireless user authentication, management, broadband access, security and other control functions.
[0063] UA: User Agent is a special string header that enables the server to identify the operating system and version, CPU type, browser and version, browser rendering engine, browser language, browser plug-ins, etc. used by the client.
[0064] like Figure 1 FIG. 1 is a schematic diagram of an implementation environment provided by an embodiment of the present invention. Figure 1 The implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected to a network wirelessly or wired to complete data transmission and exchange.
[0065] Server 101 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.
[0066] In addition, the server 101 can also be a node server in the blockchain network. Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm.
[0067] The terminal 102 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal 102 and the server 101 may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiment of the present invention.
[0068] Based on the example Figure 1 In the implementation environment shown, an embodiment of the present invention provides a method for obtaining an Internet protocol. The following is explained using the example of applying the method for obtaining an Internet protocol to a terminal 102. It can be understood that the method for obtaining an Internet protocol can also be applied to a server 101.
[0069] Reference Figure 2 , Figure 2 The flowchart of the method for obtaining the Internet protocol applied to the terminal provided by the embodiment of the present invention, the execution subject of the method for obtaining the Internet protocol can be any of the aforementioned computer devices (including servers or terminals). Figure 2 , the method comprises the following steps:
[0070] S100, in response to a wireless connection request from a target mobile terminal, obtaining a request message from the target mobile terminal;
[0071] The request message includes a target service set identifier and a target user agent field of the target mobile terminal;
[0072] It should be noted that in some embodiments, Figure 3 As shown, the method may also include: T100, in response to a network scan request of a target mobile terminal, pushing a service set identifier of a wireless network in broadcast state to a target mobile terminal; T200, in response to an operation instruction of the target mobile terminal on the target service set identifier, obtaining a wireless connection request.
[0073] For example, in some specific implementations, the above technical content is further described below:
[0074] T100: In response to the network scanning request of the target mobile terminal, push the service set identifier of the wireless network in the broadcast state to the target mobile terminal:
[0075] When a target mobile terminal (such as a smartphone, tablet, etc.) enters a new wireless network environment, it usually sends a network scan request to find and list the currently available wireless networks. These wireless networks indicate their existence by broadcasting their service set identifiers (SSIDs).
[0076] After receiving the network scan request from the target mobile terminal, the wireless network management system (such as a router, access point or a dedicated wireless network management service) will check which wireless networks are currently broadcasting and push the service set identifiers of these wireless networks to the target mobile terminal. In this way, the target mobile terminal can see a list of wireless networks on its screen, and the user can select the network to connect to.
[0077] T200: In response to the target mobile terminal's operation instruction on the target service set identifier, a wireless connection request is obtained:
[0078] Once the wireless network list is displayed on the target mobile terminal, the user can select a network (i.e., target service set identifier) from which he wants to connect. After the user clicks or selects the network, the target mobile terminal sends a wireless connection request containing the target service set identifier to the wireless network management system. This request usually also contains other information about the target mobile terminal, such as the user agent field (used to identify the device's operating system, browser type, etc.).
[0079] After receiving the wireless connection request, the wireless network management system will perform subsequent processing based on the information in the request (such as the target service set identifier and user agent field), such as determining the target wireless network, identifying the operating system type of the target mobile terminal, and allocating the target configuration server.
[0080] It should be noted that, in some embodiments, obtaining the request message of the target mobile terminal may include the following steps: forwarding the request message sent by the target mobile terminal to the terminal identification device through the wireless access point and the switch.
[0081] Among them, in some embodiments, forwarding the request message sent by the target mobile terminal to the terminal identification device through the wireless access point and the switch may include the following steps: based on the wireless access control of the access controller, obtaining the request message sent by the target mobile terminal through the wireless access point; forwarding the request message obtained by the wireless access point to the terminal identification device through the switch.
[0082] For example, in some specific implementations, the above technical content is further described below:
[0083] In a wireless network environment, a request message sent by a target mobile terminal (such as a smartphone, tablet computer, etc.) usually needs to go through a series of forwarding before it reaches the terminal identification device that processes the message. The following are the detailed steps of this process:
[0084] 1. Wireless access point (AP) captures the request message:
[0085] When the target mobile terminal wants to connect to a wireless network or access network resources, it sends a request message containing information such as the target service set identifier (SSID) and the target user agent field.
[0086] This request message is first captured by the wireless access point (AP) in the area where the target mobile terminal is located. The wireless access point is a key device in the wireless network, responsible for receiving and forwarding wireless signals from mobile terminals.
[0087] 2. The switch forwards the request message:
[0088] After the wireless access point captures the request message, it will forward it to the switch via wired or wireless means.
[0089] A switch is a device used to forward data packets in a network. It determines to which device a packet should be forwarded based on the destination address in the packet (such as MAC address, IP address, etc.).
[0090] In this scenario, the switch forwards the request message to the terminal identification device responsible for processing the message.
[0091] 3. The terminal identifies the device and receives the request message:
[0092] The terminal identification device is a device specifically used to identify and process request messages from mobile terminals.
[0093] After receiving the request message forwarded by the switch, it will parse and process the message to extract useful information (such as the target service set identifier, target user agent field, etc.).
[0094] Based on the target user agent field, the operating system type of the target mobile terminal can be determined. After receiving the request message from the target mobile terminal, the terminal identification device can determine the operating system type of the target mobile terminal by parsing the target user agent field in the message. The following are the detailed steps of this process:
[0095] 1. Wireless access control of access controller:
[0096] In a wireless network environment, an access controller (AC) is usually used to manage wireless access points (APs) and control access rights to wireless networks. - Through the wireless access control function, the access controller can obtain the request message of the target mobile terminal captured by the wireless access point.
[0097] 2. The wireless access point obtains and forwards the request message:
[0098] As before, after the wireless access point captures the request message of the target mobile terminal, it will forward it to the switch.
[0099] During this process, the wireless access point may also forward the request message to the access controller so that the access controller can further process and analyze the message.
[0100] 3. The switch forwards the message to the terminal identification device:
[0101] After receiving the request message from the wireless access point (or access controller), the switch will forward it to the terminal identification device according to the target address in the message.
[0102] 4. The terminal identifies the device and parses the user agent field:
[0103] After receiving the request message, the terminal identification device will parse the target user agent field in the message.
[0104] The user agent field usually contains information about the mobile terminal's operating system, browser type, version, etc.
[0105] By analyzing this information, the terminal identification device can determine the type of operating system of the target mobile terminal.
[0106] S200, determining a target wireless network that a target mobile terminal requests to connect to based on a target service set identifier;
[0107] Exemplarily, in some specific implementations, the following is a supplementary description of determining the target wireless network to which the target mobile terminal requests to connect based on the target service set identifier (SSID):
[0108] 1. The role of the target service set identifier (SSID):
[0109] SSID is an important identifier in a wireless network, which is used to distinguish different wireless networks. Each wireless network has a unique SSID, which is usually set in the configuration of the wireless access point (AP). When a target mobile terminal (such as a smartphone, tablet, etc.) wants to connect to a wireless network, it will search for the target SSID in the scanned wireless network list and try to connect to the wireless network that matches it.
[0110] 2. The process of determining the target wireless network based on SSID:
[0111] 1. Scan for wireless networks:
[0112] When the target mobile terminal turns on the WiFi function and tries to connect to a wireless network, it will first scan the surrounding wireless networks.
[0113] During the scanning process, the target mobile terminal will receive broadcast signals from various wireless access points, which contain the SSID of the wireless network and other relevant information (such as signal strength, encryption method, etc.).
[0114] 2. Match SSID:
[0115] The target mobile terminal searches the scanned wireless network list for a wireless network that matches the target SSID.
[0116] If a wireless network matching the target SSID is found, the target mobile terminal will attempt to connect to the network.
[0117] If no wireless network matching the target SSID is found, the target mobile terminal cannot connect to the target wireless network unless the user manually enters another available SSID or selects another wireless network for connection.
[0118] 3. Connection request and authentication:
[0119] Once the target mobile terminal finds a wireless network that matches the target SSID, it sends a connection request to the wireless access point of the network.
[0120] After receiving the connection request, the wireless access point will authenticate the target mobile terminal according to the pre-set authentication method (such as WPA2, WPA3, etc.).
[0121] If the authentication is successful, the wireless access point will allow the target mobile terminal to connect to the target wireless network and allocate network resources such as an IP address to it.
[0122] S300, determining the type of operating system of the target mobile terminal based on the target user agent field through the terminal identification device;
[0123] It should be noted that, in some embodiments, a system storage table is provided in the terminal identification device, and the system storage table includes associated stored user agent fields and operating system names; determining the operating system type of the target mobile terminal based on the target user agent field by the terminal identification device may include the following steps: traversing and matching the target user agent field with all user agent fields in the system storage table, and obtaining the operating system type of the target mobile terminal according to the operating system name associated with the matching result.
[0124] For example, in some specific implementations, the above technical content is supplemented as follows:
[0125] 1. Function and structure of system storage table:
[0126] The system storage table plays a vital role in terminal identification. This table is specially designed to store the association information between the user agent field and the operating system name. The user agent field is usually a string sent by the browser or mobile terminal, which contains clues about the device, browser type, operating system, etc. The operating system name is a clear identification of the operating system used by these devices.
[0127] The structure of the system storage table is usually relatively simple, but very efficient. It mainly consists of two key parts: the user agent field column and the operating system name column. Each row represents the association between a specific user agent string and its corresponding operating system name.
[0128] 2. Traversal matching process:
[0129] When the terminal identification device receives a target user agent field, it needs to go through a series of steps to determine the type of operating system used by the mobile terminal represented by this field. The following is a detailed analysis of these steps:
[0130] 1. Read the target user agent field: First, the terminal identification device needs to read the target user agent field from the request or data packet. This field usually exists in the form of a string and contains detailed information about the target mobile terminal.
[0131] 2. Traverse the system storage table: Next, the terminal identification device will start to traverse all the user agent fields in the system storage table. This process is a one-by-one comparison process, the purpose is to find the user agent string that matches the target user agent field.
[0132] 3. Matching judgment: During the traversal process, the terminal identification device will perform a matching judgment on each user agent field. If a user agent string is found that completely matches or is highly similar to the target user agent field (this depends on the accuracy and flexibility of the matching algorithm), the match is considered successful.
[0133] 4. Get the operating system name: Once the match is successful, the terminal identification device will obtain the operating system type of the target mobile terminal based on the operating system name column associated with the matching result. This process is direct because the system storage table has established a clear association between the user agent field and the operating system name.
[0134] 5. Return result: Finally, the terminal identification device will return the obtained operating system name as a result to the requester. This result can be used for subsequent processing, analysis or decision-making.
[0135] 3. Considerations of matching algorithm:
[0136] In practical applications, the selection and implementation of matching algorithms are crucial to the efficiency and accuracy of the traversal matching process. Here are some key factors to consider:
[0137] Accuracy: The matching algorithm needs to be able to accurately identify the type of operating system corresponding to the target user agent field. This requires the algorithm to have a high degree of accuracy and stability in the parsing and comparison process of the user agent string.
[0138] Flexibility: Since the format and content of the user agent string may change over time and across devices, the matching algorithm needs to be flexible enough to adapt to these changes. For example, the algorithm can support multiple matching methods such as fuzzy matching and regular expression matching to improve the accuracy and applicability of the match.
[0139] Efficiency: The traversal matching process may involve a large amount of data comparison and calculation, so the algorithm needs to have efficient processing capabilities to ensure that the matching task is completed in a reasonable time. This can be achieved by optimizing the data structure, using efficient search algorithms, etc.
[0140] Additional explanation for the example:
[0141] Assume that a terminal identification device is processing a request from a target mobile terminal, and the request includes a user agent field: "Mozilla / 5.0(iPhone; CPU iPhone OS15_0like Mac OS X)AppleWebKit / 605.1.15(KHTML,like Gecko)Version / 15.0Mobile / 15E148 Safari / 604.1".
[0142] The terminal identification device will first read the user agent field and start traversing and matching in the system storage table. During the matching process, it will find a string that is highly similar to the user agent field: "Mozilla / 5.0(iPhone;...Safari / 604.x)" (here, only part of the matching string is shown to simplify the example). Since this string is highly consistent with the user agent field in key parts (such as device type, operating system version, etc.), it can be considered a successful match.
[0143] Next, the terminal identification device will obtain the operating system type of the target mobile terminal based on the operating system name column associated with the matching result. In this example, it will find "iOS" as the operating system name and return it as a result to the requester. This result can be used for subsequent processing, analysis or decision-making, such as providing customized services or content recommendations to users.
[0144] S400: Allocate a target configuration server to the target mobile terminal according to the type of operating system, so that the target mobile terminal obtains the Internet Protocol address of the target wireless network through the target configuration server.
[0145] It should be noted that the operating system types include a first type and a second type; in some embodiments, such as Figure 4 As shown, allocating a target configuration server to a target mobile terminal according to the type of operating system may include the following steps: S401, when the type of operating system is the first type, allocating a stateful address target configuration server to the target mobile terminal; S402, when the type of operating system is the second type, allocating a stateless address automatic target configuration server to the target mobile terminal.
[0146] For example, in some specific implementations, the above technical content is supplemented as follows:
[0147] 1. Differentiation of operating system types:
[0148] The distinction between operating system types is an important basis for allocating target configuration servers. Generally, operating system types can be divided into the first type and the second type, such as Android, iOS (although iOS is closed source, its devices may interact with the configuration server through specific protocols in some network configuration scenarios) or other Linux distributions.
[0149] It should be noted that it is well known that IPv6 address allocation has two allocation modes: "stateful DHCPv6" and "stateless SLAAC". In the embodiment of the present invention, the first category specifically refers to operating systems that can support stateful DHCPv6 address allocation, and the second category specifically refers to operating systems that cannot support stateful DHCPv6 (i.e., can only be allocated through stateless SLAAC).
[0150] 2. Type and function of configuration server:
[0151] 1. Stateful address target configuration server:
[0152] Function: This configuration server is usually responsible for allocating fixed or persistent IP addresses and other network configuration parameters to the client (here, the target mobile terminal). It can be DHCPv6, a network protocol used to configure the IPv6 address, IPv6 prefix, and other configurations (such as DNS) required by the IPv6 host working on the IPv6 network.
[0153] Applicable scenarios: When the operating system type is the first type, if the operating system supports stateful DHCPv6 IP address allocation, it is appropriate to directly use the stateful address target configuration server.
[0154] 2. Stateless address automatic target configuration server:
[0155] Function: This configuration server assigns temporary or dynamic IP addresses to clients based on stateless address autoconfiguration (SLAAC). It usually does not maintain persistent state information of the client, but relies on the client's own network configuration capabilities and protocols (obtaining IPv6 global unicast addresses in the absence of a DHCPv6 server) to automatically obtain network configuration.
[0156] Applicable scenarios: When the operating system type is the second type, if the system does not support stateful address configuration, it is appropriate to use the stateless address automatic target configuration server.
[0157] 3. Detailed steps of the allocation process
[0158] 1. Determine the type of operating system:
[0159] The user agent field of the target mobile terminal is read by the terminal identification device and matched with the system storage table to determine the type of operating system of the target mobile terminal.
[0160] 2. Allocate stateful address target configuration server (S401):
[0161] When the operating system type is the first type, the system will allocate an IP address and other necessary network configuration parameters to the target mobile terminal from the address pool of the stateful address configuration server according to a preset policy or rule.
[0162] Once the allocation is complete, the system will send the configuration information to the target mobile terminal so that it can connect to the network correctly.
[0163] 3. Allocate stateless address automatic target configuration server (S402):
[0164] When the operating system type is the second type, the system will not allocate a fixed IP address to the target mobile terminal, but will configure the relevant information of the stateless address automatic target configuration server (such as the server address, port, etc.).
[0165] When the target mobile terminal starts or reconnects to the network, it will automatically request network configuration parameters (such as IP address, prefix, etc.) from the configuration server based on this information and configure its network interface based on these parameters.
[0166] It should also be noted that the request message also includes a connection password; in some embodiments, before the step of the target mobile terminal obtaining the Internet Protocol address of the target wireless network through the target configuration server, the method may also include the following steps: matching and verifying the connection password with the access password of the target wireless network; wherein the target mobile terminal obtains the Internet Protocol address of the target wireless network through the target configuration server based on the result of the matching verification that passes the verification.
[0167] For example, in some specific implementations, the above technical content is supplemented as follows:
[0168] 1. Introduction of connection password:
[0169] In the terminal identification and management system, in order to ensure that the target mobile terminal can securely and accurately access the target wireless network and obtain the correct Internet Protocol address (IP address) through the target configuration server after access, the concept of connection password is introduced. The connection password is a key or token used to verify the identity and access authority of the target mobile terminal. It is usually used together with the access password of the target wireless network to ensure the security and accuracy of the access process.
[0170] 2. Verify the connection password and access password
[0171] 1. Purpose of matching verification:
[0172] Verify whether the target mobile terminal has the authority to access the target wireless network.
[0173] Ensure that the identity and access request of the target mobile terminal are legitimate and authentic.
[0174] 2. Matching verification process:
[0175] When the target mobile terminal attempts to access the target wireless network, it sends the connection password and access request to the network management system or access point.
[0176] The network management system or access point receives and parses these requests and extracts the connection password.
[0177] Next, the network management system will match the connection password with the access password of the target wireless network. This usually involves comparing the connection password with a predefined or dynamically generated access password stored in the system.
[0178] If the connection password matches the access password successfully, it means that the target mobile terminal has access authority and can continue with the subsequent access and configuration process.
[0179] If the match fails, the access request of the target mobile terminal will be rejected, and a corresponding error message or prompt may be returned.
[0180] 3. Get the IP address based on the matching verification result
[0181] 1. Process after verification:
[0182] Once the connection password matches the access password and is successfully verified, the target mobile terminal is considered a legitimate and trusted access point.
[0183] At this time, the network management system or access point will instruct the target configuration server to assign an IP address to the target mobile terminal.
[0184] The target configuration server will select a suitable IP address for the target mobile terminal based on factors such as network policy and address pool status, and assign it to the terminal.
[0185] 2. IP address allocation and notification:
[0186] After allocating the IP address, the target configuration server will send the address and other necessary network configuration information (such as subnet mask, gateway, etc.) to the target mobile terminal.
[0187] After receiving this information, the target mobile terminal will configure its network interface so that it can correctly connect to the target wireless network and communicate through the network.
[0188] In some specific implementation scenarios, example scenarios of the overall application process of the technical solution of the present invention can be implemented as follows:
[0189] In a large shopping mall, there are multiple wireless networks (such as WiFi networks) for customers to use, each with a unique service set identifier (SSID). Steps:
[0190] 1. Wireless connection request and request message acquisition:
[0191] In the WiFi settings of the smartphone, select a wireless network provided by the shopping mall (such as "ShoppingMall_WiFi") and try to connect.
[0192] At this point, the shopping mall's wireless network management system will receive the wireless connection request from the smartphone and obtain the request message in the request. This request message contains the service set identifier (SSID: "ShoppingMall_WiFi") of the wireless network that the smartphone requests to connect to and the smartphone's target user agent field (User-Agent, which usually contains information such as the phone's operating system and browser type).
[0193] 2. Determine the target wireless network:
[0194] The wireless network management system determines which wireless network provided by the shopping mall the smartphone is requesting to connect to based on the SSID ("ShoppingMall_WiFi") in the request message.
[0195] 3. Determine the type of operating system:
[0196] The wireless network management system parses the target user agent field in the request message of the smart phone through a terminal identification device (such as a special server or device for parsing the user agent field) connected to the shopping mall.
[0197] Through analysis, the system recognizes that the smartphone uses the Android operating system (assumption).
[0198] 4. Assign target configuration server:
[0199] According to the type of operating system (Android) used by the smart phone, the wireless network management system allocates a configuration server (target configuration server) specially configured for Android devices to the smart phone.
[0200] This configuration server will provide appropriate network configuration information for smartphones based on the characteristics of the Android system, such as IP address, DNS server address, etc.
[0201] 5. Get the Internet Protocol address:
[0202] The smartphone successfully obtained the Internet Protocol address (IP address) required to connect to the "ShoppingMall_WiFi" wireless network through the assigned target configuration server.
[0203] At this point, the smartphone can access the Internet normally.
[0204] Through this process, shopping malls can intelligently assign the most suitable network configuration server to customers based on the operating system type of their mobile phones, thereby providing a more stable and efficient wireless network connection experience. At the same time, this technology can also help shopping malls collect and analyze customer mobile device information, providing data support for subsequent personalized services and marketing.
[0205] In order to explain the principle of the technical solution of the present invention in detail, the overall process of the present invention is described below in combination with some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and cannot be regarded as a limitation of the present invention.
[0206] First of all, it should be noted that the present invention is mainly aimed at the existing problems in allocating IPv6 addresses to current wireless mobile phone terminals: It is well known that there are two allocation methods for IPv6 addresses: "stateful DHCPv6" and "stateless SLAAC". Since Google has not supported the DHCPv6 address allocation method for the Android system, when DHCPv6 is used to allocate IPv6 addresses, Android cannot obtain IPv6 addresses. This invention identifies the connected mobile terminal system, and uses stateful DHCPv6 when it is identified as an IOS system, and uses stateless SLAAC when it is identified as an Android system.
[0207] like Figure 5 , Figure 6 and Figure 7 As shown, Figure 5 Schematic diagram of signaling interaction of the technical solution of the present invention. Figure 6 is a schematic diagram of a network scenario in which the present invention is applied, Figure 7 Based on Figure 6 Specifically, the technical solution of the present invention can be implemented as follows:
[0208] 1. This invention is mainly used for the connection of wireless WiFi in enterprise networks. The specific link includes mobile terminals (mobile phone terminals), wireless APs (wireless access points, transmitting SSIDs), wireless ACs (access controllers, used to control wireless APs), and switches (data exchange equipment used to connect wireless APs and wireless ACs).
[0209] 2. The mobile terminal (usually a mobile phone) is connected to the wireless network WIFI through the SSID;
[0210] 3. At this time, the mobile terminal starts to send solicit requests;
[0211] 4. The AP and switch forward the solicitation request message from the mobile terminal;
[0212] 5. The terminal identification system identifies the mobile terminal through the User-Agent field in the message and determines whether the system is IOS or Android;
[0213] 6. If it is an IOS system, the request is forwarded to DHCPv6;
[0214] 7. If it is an Android system, the request is forwarded to SLAAC.
[0215] It should also be noted that DHCPv6 (Dynamic Host Configuration Protocol for IPv6) is a protocol used to dynamically allocate IP addresses and other network configuration information in an IPv6 network. The message interaction process between the DHCPv6 client and the server is the key to achieving this dynamic configuration. Figure 8 As shown, the following is a detailed expansion and supplementary explanation of the process:
[0216] 1. Message type and function:
[0217] The main message types involved in the DHCPv6 interaction process include:
[0218] 1. Solicit: The DHCPv6 client uses the Solicit message to locate the DHCPv6 server and request an IPv6 address and other network configuration parameters. The message contains the client's identifier (such as DUID) and possible configuration option requests.
[0219] 2. Advertise: After receiving the Solicit message, the DHCPv6 server will send an Advertise message to the client as a response. This message declares that the server can provide DHCPv6 services and contains the available configuration options provided by the server to the client, such as IPv6 address, lease, network configuration parameters, etc.
[0220] 3.Request: After receiving the Advertise message, the client selects one of the servers and sends a Request message to it, requesting to use specific configuration options. The message contains the server identifier selected by the client and the requested configuration parameters.
[0221] 4. Reply: After receiving the Request message, the selected DHCPv6 server will send a Reply message to the client as a response. This message confirms the configuration options assigned to the client and contains the final confirmed configuration information.
[0222] In addition, the DHCPv6 interaction process may also involve other types of messages, such as Renew, Release, Decline, and Confirm, which are used to perform corresponding operations when the lease expires, no longer needs to be configured, or there is an address conflict.
[0223] 2. Message interaction process:
[0224] The message exchange process between the DHCPv6 client and the server is usually divided into the following stages:
[0225] 1. Discovery phase:
[0226] The DHCPv6 client searches for an available DHCPv6 server by sending a Solicit message. Since the client does not know the IPv6 address of the server, it sends the message in multicast mode to all potential servers within the same link range.
[0227] The message carries information such as the client's DUID, IAID (interface identifier), the non-temporary address to be requested, and network configuration parameters.
[0228] 2. Provisioning phase (only applicable when there are multiple DHCPv6 servers):
[0229] The DHCPv6 server that receives the Solicit message selects an available IPv6 address from an address pool that is in the same network segment as the IPv6 address of the interface that received the message.
[0230] The server responds to the client in unicast mode through an Advertise message, which contains information such as the server's DUID, the client's DUID, the server's priority, the IPv6 address and lease period assigned to the client, and a list of network configuration parameters.
[0231] 3. Selection phase (also only applicable when there are multiple DHCPv6 servers):
[0232] After receiving multiple Advertise messages, the client will select one of the servers (usually based on the server's priority and the configuration parameters provided) and send a Request message to it.
[0233] The message contains information such as the DUID of the server selected by the client, the DUID of the client, and the requested IPv6 address.
[0234] 4. Confirmation stage:
[0235] After receiving the Request message, the selected DHCPv6 server will send a Reply message to the client as a response.
[0236] The message confirms the IPv6 address assigned to the client and other network configuration parameters.
[0237] After receiving the Reply message, the client uses the configuration information in it to perform network configuration and apply it to the IPv6 interface.
[0238] When there is only one DHCPv6 server, the message interaction process between the client and the server can be simplified to the discovery phase and the confirmation phase. That is, the client directly receives the Reply message from the server after sending the Solicit message (if the server supports rapid address allocation, the Solicit message may carry the Rapid Commit option to request rapid allocation).
[0239] 3. Address allocation and conflict detection:
[0240] During the DHCPv6 address allocation process, the server will allocate an IPv6 address to the client based on the available addresses in the address pool and the client's request. To avoid address conflicts, after receiving the allocated address, the client will send a DAD (DuplicateAddress Detection) probe message to check whether there are other terminals using the address within the link range. If no response is received within the specified time, it means that the client can use this address; if a response is received, it means that other terminals have used this address, and the client will send a Decline message to the server and request the address again.
[0241] The message exchange process between the DHCPv6 client and the server is a complex and sophisticated process, which involves multiple message types, multiple interaction stages, and key steps such as address allocation and conflict detection. This process ensures that the hosts in the IPv6 network can dynamically obtain the required IP addresses and other network configuration information, thereby realizing automatic configuration and management of the network.
[0242] In summary, in order to realize that different mobile phone operating systems can obtain IPv6 addresses under the same SSID in enterprise wireless WIFI, the present invention identifies different mobile terminals through a terminal identification system, thereby adaptively configuring and obtaining IPv6.
[0243] Compared with the prior art, the present invention has at least the following beneficial effects:
[0244] 1. The technical solution of the present invention can solve the problem that different mobile terminals can obtain IPv6 addresses under the same SSID; however, most of the mobile Android terminals on the market currently obtain IPv6 through SLAAC, rather than multiple terminals of different systems obtaining IPv6 addresses under the same SSID under wireless WIFI. That is to say, under normal circumstances, if different mobile terminal operating systems want to obtain IPv6 addresses, they need to create multiple different SSIDs to obtain IPv6. For example: create a new SSID (test-dhcpv6) for all wireless terminals except the Android system, and then create a new SSID (test-slaac) for Android system terminals.
[0245] 2. The technical solution of the present invention adds terminal system identification in front of the DHCP server, and obtains the terminal system type by identifying the User-Agent field, thereby eliminating the need to create multiple different SSIDs to allocate IPv6 addresses to different mobile terminals;
[0246] 3. The technical solution of the present invention can simplify operation and maintenance costs.
[0247] On the other hand, Fig. 9 As shown, the embodiment of the present invention provides an Internet protocol acquisition device 900, which may include:
[0248] The first module 901 is used to obtain a request message of the target mobile terminal in response to a wireless connection request of the target mobile terminal; wherein the request message includes a target service set identifier and a target user agent field of the target mobile terminal;
[0249] The second module 902 is used to determine the target wireless network that the target mobile terminal requests to connect to based on the target service set identifier;
[0250] The third module 903 is used to determine the type of operating system of the target mobile terminal based on the target user agent field through the terminal identification device;
[0251] The fourth module 904 is used to allocate a target configuration server to the target mobile terminal according to the type of operating system, so that the target mobile terminal obtains the Internet Protocol address of the target wireless network through the target configuration server.
[0252] In some embodiments, the apparatus may further include:
[0253] A fifth module is configured to push a service set identifier of a wireless network in a broadcast state to the target mobile terminal in response to a network scan request of the target mobile terminal;
[0254] The sixth module is configured to obtain a wireless connection request in response to an operation instruction of the target mobile terminal on the target service set identifier.
[0255] In some embodiments, the request message also includes a connection password; the device may also include:
[0256] The seventh module is used to match and verify the connection password with the access password of the target wireless network;
[0257] The target mobile terminal obtains the Internet Protocol address of the target wireless network through the target configuration server based on the result of the matching check that passed the check.
[0258] The contents of the method embodiments of the present invention are all applicable to the device embodiments. The functions specifically implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0259] On the other hand, an embodiment of the present invention further provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above sensitive information method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0260] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0261] like Fig.10 As shown, Fig.10 A specific example of the hardware structure of an electronic device 1000 according to an embodiment is shown. The electronic device 1000 includes:
[0262] The processor 1001 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.
[0263] The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1002, and the processor 1001 calls and executes the network node population optimization method of the embodiment of the present invention;
[0264] Input / output interface 1003, used to implement information input and output;
[0265] The communication interface 1004 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0266] A bus 1005 , which transmits information between various components of the device (e.g., the processor 1001 , the memory 1002 , the input / output interface 1003 , and the communication interface 1004 );
[0267] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .
[0268] The electronic device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0269] The contents of the method embodiments of the present invention are all applicable to the electronic device embodiments. The functions specifically implemented by the electronic device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0270] Another aspect of an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the above method.
[0271] It should be noted that the computer-readable medium shown in the embodiment of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read to Only Memory, CD to ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0272] The contents of the method embodiments of the present invention are all applicable to the computer-readable storage medium embodiments. The functions specifically implemented by the computer-readable storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0273] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above method.
[0274] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0275] It should be noted that, although several modules of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0276] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD to ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation of the present invention.
[0277] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of the technology. The disclosed method is not limited to the operation and logic flow presented by the present invention. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part described as a larger operation is performed independently.
[0278] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions and internal relationships of various functional modules in the device disclosed in the present invention, the actual implementation of the module will be understood within the conventional skills of engineers. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.
[0279] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0280] The logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by an instruction execution device, apparatus or device (such as a computer-based device, a device including a processor, or other device that can fetch instructions from an instruction execution device, apparatus or device and execute the instructions), or in conjunction with such instruction execution device, apparatus or device. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution device, apparatus or device, or in conjunction with such instruction execution device, apparatus or device.
[0281] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0282] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution device. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0283] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0284] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
[0285] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A method for acquiring an Internet protocol, characterized in that: The following steps are involved: In response to a wireless connection request of a target mobile terminal, obtaining a request message of the target mobile terminal; wherein the request message includes a target service set identifier and a target user agent field of the target mobile terminal; Determine the target wireless network that the target mobile terminal requests to connect to based on the target service set identifier; Determining the type of operating system of the target mobile terminal based on the target user agent field by a terminal identification device; A target configuration server is allocated to the target mobile terminal according to the type of the operating system, so that the target mobile terminal obtains the Internet Protocol address of the target wireless network through the target configuration server.
2. The method for obtaining the Internet protocol according to claim 1, characterized in that: The method further comprises the following steps: In response to a network scan request of the target mobile terminal, push a service set identifier of a wireless network in a broadcast state to the target mobile terminal; The wireless connection request is obtained in response to an operation instruction of the target mobile terminal on the target service set identifier.
3. The method for obtaining the Internet protocol according to claim 1, characterized in that: The step of obtaining the request message of the target mobile terminal comprises the following steps: The request message sent by the target mobile terminal is forwarded to the terminal identification device through a wireless access point and a switch.
4. The method for obtaining the Internet protocol according to claim 3, characterized in that: The step of forwarding the request message sent by the target mobile terminal to the terminal identification device through a wireless access point and a switch includes the following steps: Based on the wireless access control of the access controller, obtaining the request message sent by the target mobile terminal through the wireless access point; The request message obtained by the wireless access point is forwarded to the terminal identification device through a switch.
5. The method for obtaining the Internet protocol according to claim 1, characterized in that: The terminal identification device is provided with a system storage table, wherein the system storage table includes a user agent field and an operating system name stored in association; the determining the operating system type of the target mobile terminal based on the target user agent field by the terminal identification device comprises the following steps: Based on the traversal matching between the target user agent field and all the user agent fields in the system storage table, the operating system type of the target mobile terminal is obtained according to the operating system name associated with the matching result.
6. The method for obtaining the Internet protocol according to claim 1, characterized in that: The operating system types include a first type and a second type; and the step of allocating a target configuration server to the target mobile terminal according to the operating system type includes the following steps: When the operating system type is the first type, allocating a stateful address target configuration server to the target mobile terminal; When the operating system type is the second type, a stateless address automatic target configuration server is allocated to the target mobile terminal.
7. The method for acquiring Internet protocol according to claim 1, characterized in that: The request message also includes a connection password; before the step of the target mobile terminal obtaining the Internet Protocol address of the target wireless network through the target configuration server, the method also includes the following steps: Matching and verifying the connection password with the access password of the target wireless network; Wherein, the target mobile terminal obtains the Internet Protocol address of the target wireless network through the target configuration server based on the result of the matching verification that has passed the verification.
8. An Internet protocol acquisition device, characterized in that: include: The first module is used to obtain a request message of the target mobile terminal in response to a wireless connection request of the target mobile terminal; wherein the request message includes a target service set identifier and a target user agent field of the target mobile terminal; A second module is used to determine a target wireless network that the target mobile terminal requests to connect to based on the target service set identifier; A third module is used to determine the type of operating system of the target mobile terminal based on the target user agent field through a terminal identification device; The fourth module is used to allocate a target configuration server to the target mobile terminal according to the type of the operating system, so that the target mobile terminal obtains the Internet Protocol address of the target wireless network through the target configuration server.
9. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 7.
10. A computer storage medium storing a program executable by a processor, characterized in that: The program executable by the processor is used to implement the method according to any one of claims 1 to 7 when executed by the processor.
