Network access method and device, equipment, storage medium and program product
By receiving request messages from terminal devices, determining the device type and selecting the appropriate network among multiple WiFi networks for access processing, the problem of low data transmission efficiency caused by the reduction of WiFi version is solved, and the effect of improving data transmission rate is achieved.
Patent Information
- Application Number
- CN202411330842.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2024-12-27
AI Technical Summary
In the same usage scenario, due to the reduced WiFi version of the router or wireless access point, all devices are connected to a lower WiFi version of the router, resulting in low data transmission efficiency.
By receiving request messages sent by the terminal device, determining its device type, and determining the target WiFi network among multiple selected WiFi networks according to the device type, performing access processing, ensuring that terminal devices of different WiFi versions access the corresponding WiFi network , thereby improving data transmission efficiency.
Improve data transmission efficiency, ensure the data transmission rate in each WiFi network, and solve the problem of low data transmission efficiency due to reduced WiFi version.
Smart Images

Figure CN119212043A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the technical field of communications, and in particular, to a network access method, apparatus, device, storage medium, and program product. Background Art
[0002] As wireless fidelity (WIFI) technology continues to develop, WIFI versions continue to iterate, and multiple wireless devices with different WIFI versions may exist in the same usage scenario. For example, in a smart home scenario, there are devices with different WIFI versions, such as WiFi4 version devices, WiFi5 version devices, and WiFi6 version devices.
[0003] Different WIFI versions have different WiFi standards. IoT devices may not be able to connect to routers or wireless access points with higher WiFi versions. Currently, you can connect to devices with lower WiFi versions by lowering the WiFi version of the router or wireless access point. For example, configure a WiFi6 router to WiFi5 version to connect to WiFi5 version devices.
[0004] In the above connection process, since the WiFi version of the router or wireless access point is lowered, all devices in the same usage scenario are connected to the router with a lower WiFi version, resulting in lower data transmission efficiency. Summary of the invention
[0005] The embodiments of the present application provide a network access method, apparatus, device, storage medium and program product, which are used to solve the defect in the prior art that due to lowering the WiFi version of a router or a wireless access point, all devices in the same usage scenario are connected to a router with a lower WiFi version, resulting in low data transmission efficiency.
[0006] In a first aspect, the present application provides a network access method, the method comprising:
[0007] Receive a request message sent by a terminal device, where the request message is used to request access to a WiFi network;
[0008] Determining the device type of the terminal device according to the request message;
[0009] Determine a target WiFi network from multiple candidate WiFi networks according to the device type;
[0010] Access processing is performed on the terminal device according to the target WiFi network.
[0011] In a possible implementation manner, determining the device type of the terminal device according to the request message includes:
[0012] Determining the message type of the request message;
[0013] If the message type is any one of a detection type, an identity authentication type, or an association type, determining at least one target field according to the request message, and determining a device type of the terminal device according to the target field;
[0014] If the message type is a security authentication type, obtain the identified device information and the device identification of the terminal device, and determine the device type of the terminal device based on the identified device information and the device identification, wherein the identified device information includes identifications of multiple terminal devices.
[0015] In a possible implementation, determining the device type of the terminal device according to the target field includes:
[0016] Determining whether there is a field indicating orthogonal frequency division multiple access in the target field;
[0017] If so, determining that the device type of the terminal device is a first WiFi mode type;
[0018] If not, determine whether there is a preset field in the target field. If there is a preset field, determine that the device type of the terminal device is the second WiFi mode type. If there is no preset field, determine that the device type of the terminal device is the third WiFi mode type.
[0019] In a possible implementation manner, after determining the device type of the terminal device, the method further includes:
[0020] Determining a device identification of the terminal device;
[0021] The identified device information is updated according to the device identification and the device type.
[0022] In a possible implementation, determining the device type of the terminal device according to the identified device information and the device identifier includes:
[0023] Determining a device identification of the terminal device;
[0024] If the device identifier exists in the identified device information, then the device type corresponding to the device identifier is determined in the identified device information.
[0025] In a possible implementation, performing access processing on the terminal device according to the target WiFi network includes:
[0026] If the request message is a probe request message, determine a probe response message corresponding to the probe request message through the target WiFi network, and send the probe response message to the terminal device, where the probe response message includes a timestamp, rate information, and network information;
[0027] If the request message is an identity authentication message, determine, through the target WiFi network, an identity authentication response message corresponding to the identity authentication message, and send the identity authentication response message to the terminal device, wherein the identity authentication response message is used to indicate whether the identity authentication is successful;
[0028] If the request message is an association request message, determine an association response message corresponding to the association request message through the target WiFi network, and send the association response message to the terminal device, where the association response message is used to indicate whether the association is successful;
[0029] If the request message is a security authentication message, determine the security authentication response message corresponding to the security authentication message through the target WiFi network, and send the security authentication response message to the terminal device, where the security authentication response message is used to indicate whether the security authentication is successful.
[0030] In a possible implementation manner, after performing access processing on the terminal device according to the target WiFi network, the method further includes:
[0031] Determining whether the terminal device is successfully connected;
[0032] If so, determining a network protocol address corresponding to the terminal device;
[0033] The network protocol address and the terminal device are associated to obtain an associated relationship, and the associated relationship is stored.
[0034] In a second aspect, the present application provides a network access device, the device comprising:
[0035] A receiving module, used to receive a request message sent by a terminal device, wherein the request message is used to request access to a WiFi network;
[0036] A first determining module, used to determine a device type of the terminal device according to the request message;
[0037] A second determination module is used to determine a target WiFi network from a plurality of candidate WiFi networks according to the device type;
[0038] A processing module is used to perform access processing on the terminal device according to the target WiFi network.
[0039] In a possible implementation manner, the first determining module is specifically configured to:
[0040] Determining the message type of the request message;
[0041] If the message type is any one of a detection type, an identity authentication type, or an association type, determining at least one target field according to the request message, and determining a device type of the terminal device according to the target field;
[0042] If the message type is a security authentication type, obtain the identified device information and the device identification of the terminal device, and determine the device type of the terminal device based on the identified device information and the device identification, wherein the identified device information includes identifications of multiple terminal devices.
[0043] In a possible implementation manner, the first determining module is specifically configured to:
[0044] Determining whether there is a field indicating orthogonal frequency division multiple access in the target field;
[0045] If so, determining that the device type of the terminal device is a first WiFi mode type;
[0046] If not, determine whether there is a preset field in the target field. If there is a preset field, determine that the device type of the terminal device is the second WiFi mode type. If there is no preset field, determine that the device type of the terminal device is the third WiFi mode type.
[0047] In a possible implementation manner, the first determining module is further configured to:
[0048] Determining a device identification of the terminal device;
[0049] The identified device information is updated according to the device identification and the device type.
[0050] In a possible implementation manner, the first determining module is specifically configured to:
[0051] Determining a device identification of the terminal device;
[0052] If the device identifier exists in the identified device information, then the device type corresponding to the device identifier is determined in the identified device information.
[0053] In a possible implementation manner, the processing module is specifically used for:
[0054] If the request message is a probe request message, determine a probe response message corresponding to the probe request message through the target WiFi network, and send the probe response message to the terminal device, where the probe response message includes a timestamp, rate information, and network information;
[0055] If the request message is an identity authentication message, determine, through the target WiFi network, an identity authentication response message corresponding to the identity authentication message, and send the identity authentication response message to the terminal device, wherein the identity authentication response message is used to indicate whether the identity authentication is successful;
[0056] If the request message is an association request message, determine an association response message corresponding to the association request message through the target WiFi network, and send the association response message to the terminal device, where the association response message is used to indicate whether the association is successful;
[0057] If the request message is a security authentication message, determine the security authentication response message corresponding to the security authentication message through the target WiFi network, and send the security authentication response message to the terminal device, where the security authentication response message is used to indicate whether the security authentication is successful.
[0058] In a possible implementation manner, the device further includes a storage module, and the storage module is specifically configured to:
[0059] Determining whether the terminal device is successfully connected;
[0060] If so, determining a network protocol address corresponding to the terminal device;
[0061] The network protocol address and the terminal device are associated to obtain an associated relationship, and the associated relationship is stored.
[0062] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0063] The memory stores computer-executable instructions;
[0064] The processor executes the computer-executable instructions stored in the memory to implement the method described in any one of the first aspects.
[0065] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method as described in any one of the first aspects.
[0066] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the method as described in any one of the first aspects when executed by a computer.
[0067] The network access method, device, equipment, storage medium and program product provided by the embodiment of the present application receive a request message sent by a terminal device, the request message is used to request access to a WiFi network, determine the device type of the terminal device according to the request message, determine the target WiFi network from multiple WiFi networks to be selected according to the device type, and perform access processing on the terminal device according to the target WiFi network. In this way, terminal devices of different WiFi versions are connected to corresponding WiFi networks, the data transmission rate in each WiFi network is guaranteed, and the data transmission efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0069] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;
[0070] Figure 2 A flowchart of a network access method provided in an embodiment of the present application;
[0071] Figure 3 A flowchart of another network access method provided in an embodiment of the present application;
[0072] Figure 4 A schematic diagram of the structure of a network access device provided in an embodiment of the present application;
[0073] Figure 5 A schematic diagram of the structure of another network access device provided in an embodiment of the present application;
[0074] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0075] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0076] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0077] It should be noted that, although the terms "first", "second", etc. are used to describe various information in the embodiments of the present application, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. Optionally, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information.
[0078] It should be understood that the terms "comprises" and "includes" indicate the presence of the previously mentioned features, steps, operations, but do not exclude the presence, occurrence or addition of one or at least one other feature, step, operation. The terms "and / or" and the like used in this application may be interpreted as inclusive, or mean any one or any combination. Optionally, "A and / or B" means "any of the following: A; B; A and B". In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship.
[0079] As wireless fidelity (WIFI) technology continues to develop, WIFI versions continue to iterate, and multiple wireless devices with different WIFI versions may exist in the same usage scenario. For example, in a smart home scenario, there are devices with different WIFI versions, such as WiFi4 version devices, WiFi5 version devices, and WiFi6 version devices.
[0080] Next, combine Figure 1 , the usage scenarios of the above smart home are illustrated with examples.
[0081] Figure 1 This is a schematic diagram of an application scenario provided by the embodiment of this application. Figure 1 , Figure 1 A network architecture 100 may be included, which may include a plurality of access terminals 101 , a router 102 , and an external network 103 .
[0082] The multiple access terminals 101 may include IoT devices and smart terminals, etc.
[0083] For example, IoT devices can be wireless network cameras, smart light bulbs, smart sockets, smart thermostats, smart refrigerators, smart washing machines, smart sweeping robots, etc.
[0084] IoT devices are usually equipped with lower-version WiFi modules due to factors such as communication frequency and cost. IoT devices can also be equipped with higher-version WiFi modules.
[0085] Due to factors such as communication requirements and intelligent functions, smart terminals can be configured with higher-version WiFi modules.
[0086] Different WIFI versions may have different WiFi standards.
[0087] The router 102 may be used to connect a local network with an external network 103. The local network may be a network composed of multiple access terminals 101. The router 102 may forward requests from the access terminals 101 in the local network to the external network 103, and return data received from the external network 103 to the corresponding access terminals 101.
[0088] The router 102 can be divided into a WiFi 4 router, a WiFi 5 router, and a WiFi 6 router according to the WiFi version. A terminal device with a lower WiFi version cannot connect to a router with a higher WiFi version.
[0089] In the related art, the WiFi version of a router or wireless access point can be lowered to connect to a device with a lower WiFi version. For example, a WiFi6 router can be configured to WiFi5 version to connect to a device with WiFi5 version.
[0090] The external network 103 may be a signal from an Internet service provider that is converted into a data format that can be processed by a router through a modem.
[0091] The signal of the Internet service provider can be a cable signal, optical fiber signal, etc., which is not limited here.
[0092] In the above connection process, since the WiFi version of the router or wireless access point is lowered, all devices in the same usage scenario are connected to the router with a lower WiFi version, resulting in lower data transmission efficiency.
[0093] In order to solve the above technical problems, the embodiment of the present application provides a network access method, which determines the device type of the terminal device through a request message sent by the terminal device to access the WiFi network, determines the target WiFi network from multiple candidate WiFi networks according to the device type, and connects the terminal device to the target WiFi network. In this way, terminal devices with different WiFi versions are connected to the corresponding WiFi networks, ensuring the data transmission rate in each WiFi network and improving the data transmission efficiency.
[0094] The technical solution shown in the present application is described in detail below through specific embodiments. It should be noted that the following embodiments can exist independently or in combination with each other, and the same or similar contents will not be described repeatedly in different embodiments.
[0095] Figure 2 A flowchart of a network access method provided by an embodiment of the present application. The execution subject of the embodiment of the present application can be a router, or a network access system set in the router. The network access system can be implemented by software, or by a combination of software and hardware. Figure 2 , the method comprising:
[0096] S201. Receive a request message sent by a terminal device.
[0097] The request message is used to request access to a WiFi network.
[0098] Requesting access to a WiFi network may include four access phases.
[0099] The four access phases are scanning phase, identity authentication phase, association phase and security authentication phase.
[0100] At different stages, the terminal device can send different request messages.
[0101] The request message may be a probe request message, an identity authentication message, an association request message, or a security authentication message.
[0102] The request message may include a device identifier of the terminal device, a target field, etc.
[0103] The Target field may be used to indicate the capabilities of the terminal device.
[0104] The wireless signal sent by the terminal device can be received within the preset range covered by the router, the wireless signal can be analyzed and processed, and the request message sent by the terminal device can be determined.
[0105] Optionally, before receiving a request message sent by a terminal device, multiple WiFi networks to be selected can be configured. The multiple WiFi networks to be selected can be configured in the following manner: a management interface is displayed, the management interface includes a wireless setting control, and in response to a user's input operation on the wireless setting control, multiple WiFi networks to be selected are generated. The multiple WiFi networks to be selected may include one or more of a first WiFi version network, a second WiFi version network, and a third WiFi version network, which are not limited here.
[0106] S202: Determine the device type of the terminal device according to the request message.
[0107] The device type can be used to indicate the WiFi version type of the terminal device.
[0108] The device type may include a first WiFi version type, a second WiFi version type, a third WiFi version type, etc., which are not limited here.
[0109] The request message may be parsed to determine the message type of the request message, and the device type of the terminal device may be determined based on the request message and the message type.
[0110] Optionally, the device type of the terminal device can be determined based on the request message in the following manner: determine the message type of the request message; if the message type is any one of a detection type, an identity authentication type or an association type, determine at least one target field based on the request message, and determine the device type of the terminal device based on the target field; if the message type is a security authentication type, obtain the identified device information and the device identification of the terminal device, and determine the device type of the terminal device based on the identified device information and the device identification, wherein the identified device information includes identifications of multiple terminal devices.
[0111] S203: Determine a target WiFi network from multiple candidate WiFi networks according to the device type.
[0112] The multiple to-be-selected WiFi networks may include one or more of a first WiFi version network, a second WiFi version network, and a third WiFi version network, which is not limited herein.
[0113] Different to-be-selected WiFi networks may correspond to different WiFi versions.
[0114] The target WiFi network may be a WiFi network of the same WiFi version as that corresponding to the device type.
[0115] A mapping relationship may be obtained, and a target WiFi network may be determined from multiple candidate WiFi networks according to the mapping relationship and the device type.
[0116] The mapping relationship may include multiple device types and the WiFi network corresponding to each device type.
[0117] For example, the mapping relationship may be as shown in Table 1;
[0118] Table 1
[0119] Device Type WiFi Network WiFi4 version type WiFi4 version network WiFi5 version type WiFi5 version network WiFi6 version type WiFi6 version network
[0120] S204: Perform access processing on the terminal device according to the target WiFi network.
[0121] The access processing may be identity authentication processing, association processing, scanning processing, etc., which is not limited here.
[0122] The target WiFi network can reply to the request message through the target WiFi network to perform access processing on the terminal device.
[0123] The network access method provided in this embodiment receives a request message sent by a terminal device, the request message is used to request access to a WiFi network, determines the device type of the terminal device according to the request message, determines a target WiFi network from multiple candidate WiFi networks according to the device type, and performs access processing on the terminal device according to the target WiFi network. In this way, terminal devices with different WiFi versions are connected to corresponding WiFi networks, ensuring the data transmission rate in each WiFi network and improving the data transmission efficiency.
[0124] Figure 3 A flowchart of another network access method provided by an embodiment of the present application. Based on the above embodiment, see Figure 3 , the method is described in detail. The method comprises:
[0125] S301. Receive a request message sent by a terminal device.
[0126] The execution process of S301 can refer to the execution process of S201, which will not be described in detail here.
[0127] S302: Determine the message type of the request message.
[0128] If the message type is any one of the detection type, identity authentication type or association type, execute S303;
[0129] If the message type is a security authentication type, execute S308.
[0130] The message type may be a message type specified by the communication protocol. The message type may be used to distinguish different access stages, and may also be used to describe the content of the request message.
[0131] The message type may include detection type, identity authentication type, association type, and security authentication type.
[0132] The request message may be parsed to determine the message type of the request message.
[0133] S303: Determine whether there is a field indicating OFDMA in the target field.
[0134] If yes, execute S304;
[0135] If not, execute S305.
[0136] The field indicating OFDMA may be a flag bit at a specific bit position.
[0137] The target field may be analyzed to determine the flag bit. If the flag bit is configured to a specific value, it indicates that there is a field indicating orthogonal frequency division multiple access; if the flag bit is configured to another value, it indicates that there is no field indicating orthogonal frequency division multiple access.
[0138] S304: Determine that the device type of the terminal device is the first WiFi version type.
[0139] After executing S304 , execute S310 .
[0140] Among them, the first WiFi version type can be a WiFi6 version type, and a version type above the WiFi6 version.
[0141] S305: Determine whether there is a preset field in the target field.
[0142] If yes, execute S306;
[0143] If not, execute S307.
[0144] The preset field can be used to indicate the capability value of the terminal device.
[0145] For example, the preset field may be a Very High Throughput (VHT) field.
[0146] The target field can be analyzed to determine whether there is a preset field in the target field.
[0147] S306: Determine that the device type of the terminal device is the second WiFi version type.
[0148] After executing S306 , execute S310 .
[0149] Among them, the second WiFi version type can be a WiFi5 version type.
[0150] S307: Determine that the device type of the terminal device is a third WiFi version type.
[0151] After executing S307 , execute S310 .
[0152] Among them, the third WiFi version type can be a WiFi4 version type.
[0153] S308: Determine the device identification of the terminal device.
[0154] Optionally, the device identification of the terminal device may be determined according to the request message;
[0155] Optionally, device information sent by the terminal device may be acquired, and the device identification of the terminal device may be determined according to the device information.
[0156] It should be noted that the device identification of the terminal device can be determined according to any feasible implementation method, and the embodiments of the present application are not limited to this.
[0157] S309: If the device identifier exists in the identified device information, determine the device type corresponding to the device identifier in the identified device information.
[0158] The identified device information includes the identifiers of multiple IoT devices.
[0159] Identified device information can be used to record the identities of multiple IoT devices.
[0160] It can be determined whether there is a device identifier in the identified device information. If so, the device type corresponding to the device identifier is determined in the identified device information.
[0161] Optionally, after S304, S306 or S307, the identified device information may be updated. Specifically, the identified device information may be updated in the following manner:
[0162] Determine the device identification of the terminal device; and update the identified device information based on the device identification.
[0163] Herein, updating the identified device information may be recording the device identification into the original identified device information.
[0164] S310: Determine a target WiFi network from multiple candidate WiFi networks according to the device type.
[0165] The execution process of S310 can refer to the execution process of S203, which will not be described in detail here.
[0166] S311. Perform access processing on the terminal device according to the target WiFi network.
[0167] The terminal device can be accessed and processed through the target WiFi network according to the message type.
[0168] Next, you can access the terminal device through the target WiFi network in the following four situations:
[0169] Case 1: The request message is a probe request message.
[0170] The target WiFi network can be used to determine the probe response message corresponding to the probe request message, and send the probe response message to the terminal device.
[0171] The detection request message may be a terminal device actively searching for available wireless networks around it.
[0172] If the network characteristics detected in the probe request message match the target WiFi network, the probe response message corresponding to the probe request message can be determined through the target WiFi network, and the probe response message can be sent to the terminal device.
[0173] The probe response message may include a timestamp, rate information, and network information.
[0174] The timestamp can be used to synchronize the Target Beacon Transmission Time (TBTT) window between the wireless access point or router and the terminal device.
[0175] Case 2: The request message is an identity authentication message.
[0176] The target WiFi network can be used to determine the identity authentication response message corresponding to the identity authentication message, and send the identity authentication response message to the terminal device.
[0177] The authentication response message may be used to indicate whether the authentication is successful, so as to ensure that the terminal device is authorized to connect to the WiFi network.
[0178] Authentication can be performed based on the identity authentication message. When the authentication is successful, an authentication response message is generated and sent to the terminal device through the target WiFi network.
[0179] Case 3: The request message is an association request message.
[0180] An association response message corresponding to the association request message may be determined through the target WiFi network, and the association response message may be sent to the terminal device.
[0181] The association response message may be used to indicate whether the association is successful.
[0182] The association request message may be sent by the terminal after finding a suitable network and passing authentication, and is used to request to establish an association with an access point (AP) for data transmission.
[0183] A matching process may be performed based on the association request message. If a match is found, an association response message corresponding to the association request message may be determined through the target WiFi network, and the association response message may be sent to the terminal device.
[0184] Case 4: The request message is a security authentication message.
[0185] The security authentication response message corresponding to the security authentication message can be determined through the target WiFi network, and the security authentication response message can be sent to the terminal device.
[0186] The security authentication response message is used to indicate whether the security authentication is successful.
[0187] S312: Determine whether the terminal device is successfully connected.
[0188] If yes, execute S313;
[0189] If not, then end.
[0190] Optionally, a list of connected devices may be obtained, and whether the terminal device has been successfully connected may be determined based on the list of connected devices.
[0191] Optionally, a network data packet detection model may be used to determine whether the terminal device has been successfully connected.
[0192] It should be noted that whether the terminal device has successfully accessed can be determined according to any feasible implementation method, and the embodiments of the present application are not limited to this.
[0193] S313: Determine the network protocol address corresponding to the terminal device.
[0194] The client list can be obtained, and the network protocol address corresponding to the terminal device can be determined according to the client list.
[0195] The client list includes the names of the terminal devices connected to the router and their corresponding network protocol addresses.
[0196] The log records can be obtained, and the network protocol address corresponding to the terminal device can be determined based on the log records.
[0197] The log may record the network protocol address information assigned when the terminal device is connected.
[0198] S314: associate the network protocol address with the terminal device to obtain an association relationship, and store the association relationship.
[0199] A MAC address table may be obtained, and the network protocol address and the terminal device may be associated in the MAC address table to obtain an association relationship, and the association relationship may be stored.
[0200] By storing the association relationship, the stability of the terminal device connection under the network can be guaranteed.
[0201] The implementation content of each step in the embodiment of the present application can refer to the description of the corresponding steps or operations in the above method embodiment, and repeated content will not be repeated.
[0202] A network access method provided in the present embodiment receives a request message sent by a terminal device, where the request message is used to request access to a WiFi network, and determines the message type of the request message; if the message type is any one of a detection type, an identity authentication type, or an association type, then at least one target field is determined according to the request message, and it is determined whether there is a field indicating orthogonal frequency division multiple access in the target field; if so, it is determined that the device type of the terminal device is a first WiFi mode type; if not, it is determined whether there is a preset field in the target field, and if there is a preset field, it is determined that the device type of the terminal device is a second WiFi mode type, and if there is no preset field, it is determined that the terminal device The device type of the device is the third WiFi mode type; if the message type is the security authentication type, obtain the identified device information and the device identifier of the terminal device, and determine the device identifier of the terminal device; if the identified device information has a device identifier, determine the device type corresponding to the device identifier in the identified device information, determine the target WiFi network from multiple selected WiFi networks according to the device type, perform access processing on the terminal device according to the target WiFi network, and determine whether the terminal device is successfully accessed; if so, determine the network protocol address corresponding to the terminal device; associate the network protocol address with the terminal device to obtain an association relationship, and store the association relationship. In this way, terminal devices of different WiFi versions are connected to corresponding WiFi networks, ensuring the data transmission rate in each WiFi network and improving the data transmission efficiency.
[0203] Figure 4 This is a schematic diagram of the structure of a network access device provided in an embodiment of the present application. Figure 4 The device 400 includes a receiving module 401, a first determining module 402, a second determining module 403 and a processing module 404, wherein:
[0204] The receiving module 401 is used to receive a request message sent by a terminal device, where the request message is used to request access to a WiFi network;
[0205] A first determination module 402, configured to determine a device type of the terminal device according to the request message;
[0206] A second determination module 403 is used to determine a target WiFi network from a plurality of candidate WiFi networks according to the device type;
[0207] The processing module 404 is used to perform access processing on the terminal device according to the target WiFi network.
[0208] In a possible implementation manner, the first determining module 402 is specifically configured to:
[0209] Determining the message type of the request message;
[0210] If the message type is any one of a detection type, an identity authentication type, or an association type, determining at least one target field according to the request message, and determining a device type of the terminal device according to the target field;
[0211] If the message type is a security authentication type, obtain the identified device information and the device identification of the terminal device, and determine the device type of the terminal device based on the identified device information and the device identification, wherein the identified device information includes identifications of multiple terminal devices.
[0212] In a possible implementation manner, the first determining module 402 is specifically configured to:
[0213] Determining whether there is a field indicating orthogonal frequency division multiple access in the target field;
[0214] If so, determining that the device type of the terminal device is a first WiFi mode type;
[0215] If not, determine whether there is a preset field in the target field. If there is a preset field, determine that the device type of the terminal device is the second WiFi mode type. If there is no preset field, determine that the device type of the terminal device is the third WiFi mode type.
[0216] In a possible implementation manner, the first determining module 402 is further configured to:
[0217] Determining a device identification of the terminal device;
[0218] The identified device information is updated according to the device identification and the device type.
[0219] In a possible implementation manner, the first determining module 402 is specifically configured to:
[0220] Determining a device identification of the terminal device;
[0221] If the device identifier exists in the identified device information, then the device type corresponding to the device identifier is determined in the identified device information.
[0222] In a possible implementation, the processing module 404 is specifically configured to:
[0223] If the request message is a probe request message, determine a probe response message corresponding to the probe request message through the target WiFi network, and send the probe response message to the terminal device, where the probe response message includes a timestamp, rate information, and network information;
[0224] If the request message is an identity authentication message, determine, through the target WiFi network, an identity authentication response message corresponding to the identity authentication message, and send the identity authentication response message to the terminal device, wherein the identity authentication response message is used to indicate whether the identity authentication is successful;
[0225] If the request message is an association request message, determine an association response message corresponding to the association request message through the target WiFi network, and send the association response message to the terminal device, where the association response message is used to indicate whether the association is successful;
[0226] If the request message is a security authentication message, determine the security authentication response message corresponding to the security authentication message through the target WiFi network, and send the security authentication response message to the terminal device, where the security authentication response message is used to indicate whether the security authentication is successful.
[0227] Figure 5 This is a schematic diagram of the structure of another network access device provided in an embodiment of the present application. Figure 5 The device 400 includes a storage module 405, and the storage module 405 is specifically used for:
[0228] Determining whether the terminal device is successfully connected;
[0229] If so, determining a network protocol address corresponding to the terminal device;
[0230] The network protocol address and the terminal device are associated to obtain an associated relationship, and the associated relationship is stored.
[0231] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6 , the electronic device 600 may include: a memory 601 , a processor 602 , and a transceiver 603 .
[0232] The memory 601 is used to store program instructions;
[0233] The processor 602 is used to execute the program instructions stored in the memory, so as to enable the electronic device 600 to execute the above method.
[0234] The transceiver 603 may include: a transmitter and / or a receiver. The transmitter may also be referred to as a transmitter, a transmitter, a transmission port, a transmission interface, or the like, and the receiver may also be referred to as a receiver, a reception port, a reception interface, or the like. Exemplarily, the memory 601, the processor 602, and the transceiver 603 are interconnected via a bus 604.
[0235] The embodiment of the present application also provides a computer program product, which can be executed by a processor. When the computer program product is executed, the above method can be implemented.
[0236] The network access device, electronic device, computer-readable storage medium and computer program product of the embodiments of the present application can execute the technical solutions shown in the above-mentioned network access method embodiments. Their implementation principles and beneficial effects are similar and will not be repeated here.
[0237] All or part of the steps of the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned memory (storage medium) includes: read-only memory (ROM), random access memory (RAM), flash memory, hard disk, solid state drive, magnetic tape, floppy disk, optical disc and any combination thereof.
[0238] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer-executable instructions. These computer-executable instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0239] These computer executable instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0240] These computer executable instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0241] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A network access method, characterized in that: The method comprises: Receive a request message sent by a terminal device, where the request message is used to request access to a WiFi network; Determining the device type of the terminal device according to the request message; Determine a target WiFi network from multiple candidate WiFi networks according to the device type; Access processing is performed on the terminal device according to the target WiFi network.
2. The method according to claim 1, characterized in that Determining the device type of the terminal device according to the request message includes: Determining the message type of the request message; If the message type is any one of a detection type, an identity authentication type, or an association type, determining at least one target field according to the request message, and determining a device type of the terminal device according to the target field; If the message type is a security authentication type, obtain the identified device information and the device identification of the terminal device, and determine the device type of the terminal device based on the identified device information and the device identification, wherein the identified device information includes identifications of multiple terminal devices.
3. The method according to claim 2, characterized in that Determining the device type of the terminal device according to the target field includes: Determining whether there is a field indicating orthogonal frequency division multiple access in the target field; If so, determining that the device type of the terminal device is a first WiFi version type; If not, determine whether there is a preset field in the target field. If there is a preset field, determine that the device type of the terminal device is the second WiFi version type. If there is no preset field, determine that the device type of the terminal device is the third WiFi version type.
4. The method according to claim 3, characterized in that After determining the device type of the terminal device, the method further includes: Determining a device identification of the terminal device; The identified device information is updated according to the device identification and the device type.
5. The method according to claim 2 or 3, characterized in that: Determining the device type of the terminal device according to the identified device information and the device identifier includes: Determining a device identification of the terminal device; If the device identifier exists in the identified device information, then the device type corresponding to the device identifier is determined in the identified device information.
6. The method according to any one of claims 1 to 5, characterized in that: According to the target WiFi network, access processing is performed on the terminal device, including: If the request message is a probe request message, determine a probe response message corresponding to the probe request message through the target WiFi network, and send the probe response message to the terminal device, where the probe response message includes a timestamp, rate information, and network information; If the request message is an identity authentication message, determine, through the target WiFi network, an identity authentication response message corresponding to the identity authentication message, and send the identity authentication response message to the terminal device, wherein the identity authentication response message is used to indicate whether the identity authentication is successful; If the request message is an association request message, determine an association response message corresponding to the association request message through the target WiFi network, and send the association response message to the terminal device, where the association response message is used to indicate whether the association is successful; If the request message is a security authentication message, determine the security authentication response message corresponding to the security authentication message through the target WiFi network, and send the security authentication response message to the terminal device, where the security authentication response message is used to indicate whether the security authentication is successful.
7. The method according to any one of claims 1 to 6, characterized in that: After performing access processing on the terminal device according to the target WiFi network, the method further includes: Determining whether the terminal device is successfully connected; If so, determining a network protocol address corresponding to the terminal device; The network protocol address and the terminal device are associated to obtain an associated relationship, and the associated relationship is stored.
8. A network access device, characterized in that: The device comprises: A receiving module, used to receive a request message sent by a terminal device, wherein the request message is used to request access to a WiFi network; A first determining module, used to determine a device type of the terminal device according to the request message; A second determination module is used to determine a target WiFi network from a plurality of candidate WiFi networks according to the device type; A processing module is used to perform access processing on the terminal device according to the target WiFi network.
9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
11. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.
Citation Information
Cited By
Mobile network control apparatus, external network control apparatus, mobile network control method, external network control method, mobile network control program and external network control program
US20250106749A1
