Address management method and electronic device

By dynamically adjusting the DHCP lease duration based on the device's access duration information, the problem of the DHCP address pool of Wi-Fi access points being full is solved, improving address utilization and user experience.

CN116938882BActive Publication Date: 2026-04-07NOKIA TECHNOLOGIES OY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-30
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In locations with high user traffic, the DHCP address pool of Wi-Fi access points can easily become full, preventing new users from obtaining a DHCP address.

Method used

By dynamically adjusting the DHCP lease duration, address information can be promptly reclaimed and allocated based on the device's access duration, thereby improving the utilization rate of DHCP addresses.

Benefits of technology

This improves the utilization rate of DHCP addresses and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116938882B_ABST
    Figure CN116938882B_ABST
Patent Text Reader

Abstract

This application provides an address management method and an electronic device. The method includes: the electronic device can dynamically adjust the lease duration of address information used by each device connected to the electronic device based on the access duration of each device connected to the electronic device, thereby effectively improving the resource utilization rate of addresses in the address pool of the electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communications, and more particularly to an address management method and an electronic device. Background Technology

[0002] With the development of communication technology, Wi-Fi products are being used in increasingly widespread scenarios. For example, free Wi-Fi services are available in large conference venues, stadiums, communities, and other public places. However, in these locations, due to the large number of users accessing the wireless access points (APs), and the fact that each AP can only allow a limited number of users within its Dynamic Host Configuration Protocol (DHCP) address pool, when user turnover is high, the AP reclaims the DHCP addresses assigned to users after their leases expire. At this point, some APs' DHCP address pools may be full, preventing new users from obtaining DHCP addresses. Summary of the Invention

[0003] To address the aforementioned technical problems, this application provides an address management method and an electronic device. In this method, the electronic device can dynamically adjust the lease duration to release DHCP addresses in a timely manner.

[0004] In a first aspect, embodiments of this application provide an address management method. This method is applied to a first electronic device and includes: at a first preset period trigger time, the first electronic device acquires access duration information for the first period. The access duration information for the first period includes the access duration of each of a plurality of second electronic devices that access the first electronic device within the first period, and the access duration of a single second electronic device is used to indicate the duration between the start time and disconnection time of the single second electronic device's access to the first electronic device. The first electronic device determines a first lease duration based on the access duration information. At a first moment, the first electronic device establishes a Wi-Fi connection with a third electronic device, wherein the first address information used by the third electronic device to access the first electronic device is allocated to the third electronic device by the first electronic device during the establishment of the Wi-Fi connection, and the lease duration of the first address information is the first lease duration, which is the lease duration most recently acquired by the first electronic device. At a second moment, the first electronic device detects that the lease duration of the first address information (i.e., the first lease duration) has expired, and the Wi-Fi connection between the first electronic device and the third electronic device has been disconnected, and the first electronic device reclaims the first address information. In this way, electronic devices can dynamically adjust the DHCP lease duration (also known as the DHCP lease period) based on the access duration of each device connected to the electronic device, thereby improving the utilization rate of DHCP resources and enhancing the user experience.

[0005] According to the first aspect, the duration between the first moment and the second moment is the first lease duration. In this way, electronic devices can promptly reclaim address information after the address information lease of the access device expires, thereby improving the utilization rate of DHCP addresses.

[0006] According to the first aspect, or any implementation of the first aspect above, the method further includes: at the trigger time of the second preset period, acquiring access duration information for the second period, the access duration information for the second period including the access duration of each of the plurality of fourth electronic devices that access the first electronic device within the second period, the access duration of the fourth electronic device being used to indicate the duration between the start time and the disconnection time of the fourth electronic device accessing the first electronic device; determining a second lease duration based on the access duration information for the second period; the second lease duration being different from the first lease duration. In this way, the electronic device can dynamically adjust the DHCP duration based on different access durations to adapt the DHCP lease duration to the current application scenario according to actual needs.

[0007] According to the first aspect, or any implementation of the first aspect above, the method further includes: at a third moment, the first electronic device establishes a Wi-Fi connection with the fifth electronic device, wherein the fifth electronic device accesses the first electronic device using first address information, the first address information being assigned to the fifth electronic device by the first electronic device during the establishment of the Wi-Fi connection, and the lease duration of the first address information being a second lease duration. At a fourth moment, it is detected that the lease duration of the first address information has expired and the Wi-Fi connection between the first electronic device and the fifth electronic device has been disconnected, and the first address information is reclaimed. In this way, the electronic device can allocate the reclaimed address information to newly connected devices, thereby improving the resource utilization rate of DHCP addresses.

[0008] According to the first aspect, or any implementation of the first aspect above, before obtaining the access duration information for the first period, the method further includes: after the second electronic device connects to the first electronic device, the first electronic device saves the start time of the second electronic device; after the second electronic device disconnects from the first electronic device, the disconnection time of the second electronic device is obtained; based on the start time and disconnection time, the access duration information of the second electronic device is determined. In this way, after each electronic device connects to another electronic device, it can record the start time and disconnection time of each electronic device to obtain the corresponding access duration. Therefore, based on the access duration of each electronic device, the DHCP lease duration can be adaptively adjusted.

[0009] According to the first aspect, or any implementation of the first aspect above, the first electronic device is an access point (AP).

[0010] Secondly, embodiments of this application provide a first electronic device. The first electronic device includes: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory. When the computer programs are executed by the one or more processors, the first electronic device performs the following steps: at a first preset period trigger time, acquiring access duration information for the first period, the access duration information for the first period including the access duration of each of a plurality of second electronic devices that access the first electronic device within the first period, the access duration of the second electronic device indicating the duration between the start time and disconnection time of the second electronic device accessing the first electronic device; determining a first lease duration based on the access duration information; at a first moment, establishing a Wi-Fi connection with a third electronic device, wherein the first address information used by the third electronic device to access the first electronic device is allocated to the third electronic device by the first electronic device during the process of establishing a Wi-Fi connection with the third electronic device, and the lease duration of the first address information is the first lease duration; at a second moment, detecting that the lease duration of the first address information has expired and that the Wi-Fi connection between the first electronic device and the third electronic device has been disconnected, and reclaiming the first address information.

[0011] According to the second aspect, the duration of the quality inspection at the first and second moments is the duration of the first lease.

[0012] According to the second aspect, or any implementation thereof, when the computer program is executed by one or more processors, the first electronic device performs the following steps: at a second preset period trigger time, acquiring access duration information for the second period, the access duration information for the second period including the access duration of each of the plurality of fourth electronic devices that accessed the first electronic device in the first period, the access duration of the fourth electronic device being used to indicate the duration between the start time and the disconnection time of the fourth electronic device accessing the first electronic device; determining a second lease duration based on the access duration information for the second period; the second lease duration being different from the first lease duration.

[0013] According to the second aspect, or any implementation thereof, when the computer program is executed by one or more processors, the first electronic device performs the following steps: at a third moment, establishing a Wi-Fi connection with a fifth electronic device, wherein the fifth electronic device accesses the first electronic device using first address information, the first address information being allocated to the fifth electronic device by the first electronic device during the process of establishing the Wi-Fi connection with the fifth electronic device, and the lease duration of the first address information being a second lease duration; at a fourth moment, detecting that the lease duration of the first address information has expired and that the Wi-Fi connection between the first electronic device and the fifth electronic device has been disconnected, and reclaiming the first address information.

[0014] According to the second aspect, or any implementation thereof, when the computer program is executed by one or more processors, the first electronic device performs the following steps: after the second electronic device connects to the first electronic device, the start time of the second electronic device is saved; after the second electronic device disconnects from the first electronic device, the disconnection time of the second electronic device is obtained; based on the start time and the disconnection time, the access duration information of the second electronic device is determined.

[0015] According to the second aspect, or any implementation of the second aspect above, the first electronic device is an access point (AP).

[0016] The second aspect and any implementation thereof correspond to the first aspect and any implementation thereof, respectively. The technical effects of the second aspect and any implementation thereof are similar to those of the first aspect and any implementation thereof, and will not be repeated here.

[0017] Thirdly, embodiments of this application provide a computer-readable medium for storing a computer program, the computer program including instructions for performing the method in the first aspect or any possible implementation of the first aspect.

[0018] Fourthly, embodiments of this application provide a computer program including instructions for performing the method in the first aspect or any possible implementation thereof.

[0019] Fifthly, embodiments of this application provide a chip including a processing circuit and transceiver pins. The transceiver pins and the processing circuit communicate with each other via an internal connection path. The processing circuit executes the method in the first aspect or any possible implementation of the first aspect to control the receiving pin to receive signals and to control the transmitting pin to transmit signals.

[0020] Sixthly, embodiments of this application provide a communication system that includes the electronic devices mentioned in the first aspect above. Attached Figure Description

[0021] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1a This is a schematic diagram of a communication system as an example.

[0023] Figure 1b A schematic diagram of the hardware structure of the electronic device is shown;

[0024] Figure 1c This is a software structure block diagram j of the electronic device according to an embodiment of this application;

[0025] Figure 2 This is a schematic diagram illustrating the process of a STA accessing an AP;

[0026] Figure 3 A schematic diagram of a user interface is shown as an example;

[0027] Figure 4 This is a schematic diagram illustrating an address management method process as an example.

[0028] Figure 5 This is a schematic diagram illustrating an application scenario;

[0029] Figure 6a This is a schematic diagram illustrating an application scenario;

[0030] Figure 6b This is a schematic diagram illustrating an application scenario;

[0031] Figure 7 This is a schematic diagram of the structure of an exemplary device. Detailed Implementation

[0032] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0033] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.

[0034] The terms "first" and "second," etc., used in the specification and claims of this application are used to distinguish different objects, not to describe a specific order of objects. For example, "first target object" and "second target object," etc., are used to distinguish different target objects, not to describe a specific order of target objects.

[0035] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0036] In the description of the embodiments in this application, unless otherwise stated, "multiple" means two or more. For example, multiple processing units means two or more processing units; multiple systems means two or more systems.

[0037] In this application embodiment, the access point (AP) can be a terminal device (such as a mobile phone) or a network device (such as a router) with a Wi-Fi chip. The access point can be a device supporting the 802.11be standard. The access point can also be a device supporting various wireless local area networks (WLAN) standards of the 802.11 family, such as 802.11be, 802.11ax, 802.11ac, 802.11n, 802.11g, 802.11b, and 802.11a. The access point in this application can be a HE-AP or an EHT-AP, or it can be an access point applicable to a future generation of Wi-Fi standards.

[0038] A station (non-access point station, non-AP STA) can be a wireless communication chip, wireless sensor, or wireless communication terminal, and can also be referred to as a user, station, or terminal. For example, a station can be a mobile phone supporting Wi-Fi communication, a tablet computer supporting Wi-Fi communication, a set-top box supporting Wi-Fi communication, a smart TV supporting Wi-Fi communication, a smart wearable device supporting Wi-Fi communication, an in-vehicle communication device supporting Wi-Fi communication, and a computer supporting Wi-Fi communication, etc. Optionally, the station can support the 802.11be standard. The station can also support various WLAN standards of the 802.11 family, such as 802.11be, 802.11ax, 802.11ac, 802.11n, 802.11g, 802.11b, and 802.11a.

[0039] For example, access points and sites can be devices used in the Internet of Vehicles (IoV), IoT nodes and sensors in the Internet of Things (IoT), smart cameras, smart remote controls, smart water and electricity meters in smart homes, and sensors in smart cities.

[0040] It should be noted that the AP site and non-AP site in this application can also be a wireless communication device that supports parallel transmission across multiple links, for example, referred to as a multi-link device or a multi-band device. Compared to devices that only support single-link transmission, multi-link devices have higher transmission efficiency and higher throughput.

[0041] A multi-link device includes one or more affiliated STAs. An affiliated STA is a logical site that can operate on a single link.

[0042] Although the embodiments in this application are primarily illustrated using a network deploying IEEE 802.11 as an example, those skilled in the art will readily understand that the various aspects of this application can be extended to other networks employing various standards or protocols, such as BLUETOOTH, high-performance radio LAN (HIPERLAN) (a wireless standard similar to IEEE 802.11, primarily used in Europe), and wide area networks (WANs), wireless local area networks (WLANs), personal area networks (PANs), or other networks now known or developed in the future. Therefore, regardless of the coverage area and wireless access protocol used, the various aspects provided in this application can be applied to any suitable wireless network.

[0043] Figure 1a This is a schematic diagram of a communication system as an example. Please refer to... Figure 1a The communication system includes one or more access point-type stations and one or more non-access point-type stations. For ease of description, this document refers to access point-type stations as access points (APs) and non-access point-type stations as stations (non-AP STAs). In the embodiments of this application, [the following is used as an example]. Figure 1a This description uses a communication system including a router (AP), a mobile phone (STA1), a television (STA2), and a speaker (STA3) as an example. In other embodiments, the communication system may include more or fewer APs or STAs, and Figure 1a The device types of STA and AP mentioned are merely illustrative examples and are not limited in this application. For example, Figure 1a Each STA in the system can interact with the AP (i.e., the router) via Wi-Fi connection.

[0044] Figure 1b A schematic diagram of the structure of the electronic device 100 is shown. It should be understood that... Figure 1b The electronic device 100 shown is merely an example of an electronic device, and the electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. Figure 1b The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.

[0045] Electronic device 100 may include: processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 140, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0046] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0047] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0048] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0049] The wireless communication function of electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 140, wireless communication module 160, modem processor, and baseband processor.

[0050] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.

[0051] The mobile communication module 140 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 140 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 140 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 140 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 140 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 140 and at least some modules of the processor 110 may be housed in the same device.

[0052] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 140 or other functional modules.

[0053] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0054] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 140, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).

[0055] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100.

[0056] Figure 1c This is a software structure block diagram of the electronic device 100 according to an embodiment of this application.

[0057] The layered architecture of the electronic device 100 divides the software into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0058] The application layer can include a series of application packages.

[0059] like Figure 1c As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.

[0060] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0061] like Figure 1c As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0062] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.

[0063] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.

[0064] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0065] The phone manager is used to provide communication functions for electronic device 100. For example, it manages call status (including connection and disconnection).

[0066] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0067] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.

[0068] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system.

[0069] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.

[0070] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0071] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0072] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0073] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0074] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0075] A 2D graphics engine is a graphics engine for 2D drawing.

[0076] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.

[0077] Understandable Figure 1c The components included in the system framework layer, system library, and runtime layer shown do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than shown, or combine some components, or split some components, or have different component arrangements.

[0078] Combination Figure 1a The communication system shown, Figure 2 This is a schematic diagram illustrating the process of a STA accessing an AP. Please refer to [link / reference]. Figure 2 Specifically, it includes:

[0079] S201, the mobile phone sends a Probe Request message to the router.

[0080] S202, the router sends a Probe Response message to the mobile phone.

[0081] For example, during the scanning phase, the mobile phone performs a full-channel scan, sending two Probe Request messages on each channel to detect whether a Wi-Fi network exists on the channel where the Probe Request message is sent.

[0082] For example, if a mobile phone receives a Probe Response message from the router, the phone can determine that a Wi-Fi network exists on the corresponding channel. Optionally, the Probe Response message may include, but is not limited to, the router's BSSID (Basic Service Set Identifier) ​​information and SSID information. The BSSID is equivalent to a Media Access Control (MAC) address and is used to uniquely identify the router's Wi-Fi network interface.

[0083] For example, after each Probe Request message is sent, the mobile phone waits 20ms to check whether it has received a Probe Response message from the router on that channel. It should be noted that the channel on which the mobile phone receives the Probe Response message determines which channel the router sending the Probe Response message is operating on. For instance, if the mobile phone sends a Probe Request message on channel 1 and receives a Probe Response message from router 2 on channel 1, the mobile phone can determine that router 2 is operating on channel 1 of the 2.4GHz frequency band.

[0084] For example, after the mobile phone scans all channels, namely channels 1 to 13 and channels 36 to 165, it displays the scan results. The scan results show the Wi-Fi networks corresponding to the routers that returned Probe Response messages (and which the mobile phone successfully received). Figure 3 As shown, for example, the mobile phone scans for Wi-Fi networks with network names Huawei, AAA, and BBB.

[0085] Continue to refer to Figure 2For example, after the scanning phase is completed, the mobile phone enters the network selection phase. During the network selection phase, the mobile phone can obtain the signal strength of the corresponding Wi-Fi network based on the received probe response message. The mobile phone can select and access one of the Wi-Fi networks from the scanned one or more Wi-Fi networks based on the set network selection conditions.

[0086] Optionally, network selection criteria include, but are not limited to, at least one of the following: Wi-Fi network communication quality parameters, historical connection information, encryption method, user-specified information, etc.

[0087] For example, the phone scans and displays as follows Figure 3 The app displays multiple Wi-Fi networks. Users can tap the Huawei option to select and connect to that network. The phone responds to the user's action, selecting the network during the network selection phase and executing the subsequent access process, which involves connecting to the router corresponding to the Huawei network (e.g., [router name missing]). Figure 1a The phone establishes a connection with the router in the network. Optionally, if the Huawei network is an encrypted network, the phone responds to the user's operation by displaying a prompt box on the WLAN settings interface, which includes a password input box where the user can enter a password. Optionally, if the Huawei network is an unencrypted network, the phone responds to the user's operation and directly proceeds to the subsequent access process.

[0088] For example, Wi-Fi network communication quality parameters include, but are not limited to: SNR (Signal Noise Ratio), RSRP (Reference Signal Receiving Power), RSRQ (Reference Signal Receiving Quality), and RSSI (Received Signal Strength Indication). For instance, if the phone does not detect user interaction, it can select and connect to the network with the optimal communication quality parameters from multiple Wi-Fi networks, provided those parameters exceed a threshold (which can be set as needed). It should be noted that if the communication quality parameters of all scanned Wi-Fi networks do not exceed the threshold, the phone can optionally re-perform the scan or wait for the user to make a selection.

[0089] For example, historical connection information is used to indicate that the mobile phone has previously accessed the Wi-Fi network. This includes storing information such as the Wi-Fi network's BSSID and SSID. Optionally, if the Wi-Fi network is encrypted, the historical connection information may also include the encrypted network's account and password. For instance, if the mobile phone does not detect user activity, it can match the BSSID of each of the multiple Wi-Fi networks with the BSSIDs of the multiple previously accessed Wi-Fi networks recorded in the historical connection information, and select and access the previously connected (i.e., successfully matched) Wi-Fi network. Optionally, if multiple previously connected Wi-Fi networks are matched, the mobile phone may choose to access the Wi-Fi network with the strongest signal strength.

[0090] For example, the encryption method is used to characterize the security level of the Wi-Fi network. Optionally, the encryption method includes, but is not limited to, methods such as: open, psk, wpa2, wpa3, etc. For instance, if the mobile phone does not detect user interaction, it may connect to a network among multiple Wi-Fi networks that has a specified encryption method (e.g., wpa3).

[0091] S203, the mobile phone and router perform authentication processing.

[0092] S204, the mobile phone and router are associated.

[0093] S205, the mobile phone and the router go through a four-way handshake phase.

[0094] For example, after the mobile phone selects the corresponding network during the network selection phase, it can execute S203 to S205. In fact, during S203 to S205, the mobile phone and the router will perform multiple signaling interactions. For example, for the password of the encrypted network entered by the user, the password can be verified during the four-way handshake phase. For specific details, please refer to the detailed description in the 802.11 protocol, which will not be repeated in this application.

[0095] At this point, the phone and router have successfully established a Wi-Fi connection. Optionally, the phone can write relevant Wi-Fi network information into its connection history, including but not limited to BSSID, username, and password.

[0096] It should be noted that after the mobile phone establishes a Wi-Fi connection with the router, it also needs to execute the Dynamic Host Configuration Protocol (DHCP) process to complete the router access process and have network access capabilities.

[0097] Continue to refer to Figure 2 The DHCP process specifically includes:

[0098] S206, the mobile phone sends a DHCP Discovery message to the router.

[0099] For example, the mobile phone sends a DHCP Discovery message to the router, optionally carrying the mobile phone's DHCP MAC address in the message.

[0100] S207, the router sends a DHCP Offer message to the mobile phone.

[0101] For example, if a router detects that there are available IP address resources in its local address pool, it sends a DHCP Offer message to the mobile phone. Optionally, this message may include, but is not limited to: the IP address assigned to the mobile phone by the router, the mobile phone's identification information (e.g., MAC address), lease information (including lease duration and renewal duration), and other information.

[0102] It should be noted that in existing technologies, the lease duration is usually a default duration. For example, the lease duration is usually 1 day (i.e., 24 hours). Optionally, the lease renewal duration allows the mobile phone to request renewal from the router within that duration to continue using the IP address assigned by the router. The renewal duration can be shorter than the lease duration, for example, it could be 10 minutes before the lease expires; this application does not impose any limitations on this.

[0103] S208, the mobile phone sends a DHCP Request message to the router.

[0104] For example, based on the received DHCP information, after determining that the DHCP information can be used, the mobile phone sends a DHCP Request message to the router. Optionally, the message carries IP address information to indicate that the mobile phone will use the IP address information. It should be noted that the IP address information is the IP address information assigned to the mobile phone by the router in S207.

[0105] S209, the router sends a DHCP ACK (Acknowledge character) message to the mobile phone.

[0106] For example, after receiving a DHCP Request message from a mobile phone, the router sends a DHCP ACK message to the mobile phone to indicate that the router has successfully received the DHCP Request message from the mobile phone, and the mobile phone can use the DHCP information to access the network.

[0107] Continue to refer to Figure 2After the mobile phone and router 1 execute the steps in S201 to S208, the mobile phone connects to the router and has network access function. That is to say, the mobile phone can access the network through the Wi-Fi connection between the mobile phone and the router based on the obtained DHCP information.

[0108] For example, refer to Figure 3 After the phone and router 1 complete the above interaction, a Wi-Fi connection icon will be displayed on the phone's network icon control. In addition, the Huawei network option in the WLAN settings interface will display a connection message, indicating that the phone has connected to the corresponding Huawei Wi-Fi network, which can also be understood as the phone being connected to the router.

[0109] For example, the AP (i.e., router) reclaims the IP address used by the STA (i.e., mobile phone) when the lease for that IP address expires, or after receiving a DHCP Release message from the mobile phone. However, in some scenarios, because the DHCP lease duration is long, and the STA only accesses the AP for a short time—for example, a DHCP lease of one day, while the access time of each STA connected to the AP is typically short, such as about 20 minutes—the AP will reclaim the IP address when the lease expires and detects that the STA has not renewed it. If there are many STAs connected to the AP, the DHCP address pool may become full due to the AP's delayed release of IP addresses, preventing newly connected STAs from obtaining an IP address.

[0110] This application provides an address management method that can dynamically adjust the DHCP lease duration to adapt to different application scenarios, thereby improving the utilization rate of addresses in the AP's address pool.

[0111] Referring to Figure 1, Figure 4 For an illustrative example of an address management method flowchart, please refer to... Figure 4 Specifically, it includes:

[0112] S401, the mobile phone establishes a connection with the router.

[0113] For example, this application uses the interaction between a mobile phone and a router as an example for illustration. In fact, each STA in Figure 1 performs the connection steps between the mobile phone and the router when connecting to the router, and this application will not provide examples for each one.

[0114] For example, the mobile phone establishes a Wi-Fi connection with the router. The specific connection establishment process can be referred to S201 to S209, and will not be repeated here. In this embodiment, if the router is starting up for the first time or has been restored to factory settings, in S207, the lease duration reported by the router to the mobile phone is the default value. The default value can be set according to actual needs, such as 1 day (i.e., 24 hours), which is not limited in this application. For example, if the router is not starting up for the first time or has been restored to factory settings, in S207, the router reports the DHCP lease duration most recently saved by the router to the mobile phone. The method of obtaining the DHCP lease duration will be described in the following embodiments.

[0115] S402, the router saves the connection start time.

[0116] For example, after a router (specifically, a Wi-Fi module within the router) successfully connects to a mobile phone, the router saves the connection start time with the phone. This start time can optionally be the time when step S209 completes. For instance, if the router obtains the connection start time with the phone as t1, the router saves the mapping between the phone and t1. For example, the router can save the mapping between the phone's identification information (e.g., MAC address) and t1. The router can store this mapping in memory.

[0117] S403, the phone has disconnected from the router.

[0118] For example, in response to a received user instruction, the mobile phone can send a DHCP Release message to the router. The router's Wi-Fi module, in response to the received DHCP Release message, disconnects from the mobile phone. In other embodiments, the mobile phone can also disconnect from the router if it leaves the router's coverage area or if the communication quality with the router is below a threshold. The specific steps for disconnecting the connection can be found in the detailed description of the 802.11 protocol, and will not be repeated here.

[0119] S404, the router saves the access duration.

[0120] For example, after the router detects that the phone has disconnected from the router, the router obtains the time the connection was lost. In one example, the router can store the phone's identification information and the mapping between the start time and the disconnection time. In another example, the router can find the corresponding start time based on the stored phone identification information, and then obtain the phone's access duration based on the start time and disconnection time. The router can store the mapping between the phone's identification information and the access duration.

[0121] S405, the router's Wi-Fi module sends all access durations stored within the cycle to the router's DHCP module.

[0122] For example, the router can be configured with a period duration, which is used to indicate the access duration within the current statistical period. In this embodiment, a period duration of 30 minutes is used as an example for illustration. This period duration can be set according to actual needs, and this application does not impose any limitations.

[0123] For example, at each cycle trigger time, the router's Wi-Fi module sends the access duration recorded for that cycle to the DHCP module.

[0124] In one example, as described above, the router can record the start and end times of each device. The Wi-Fi module can send all the start and end times recorded in the current period to the DHCP module, which then obtains the corresponding access duration. The specific processing method is similar to the example in the embodiments of this application and will not be repeated here.

[0125] In this embodiment, the example is taken where the Wi-Fi module obtains and saves the access duration of each device. The Wi-Fi module sends all access durations within the current period to the DHCP module.

[0126] For example, after the Wi-Fi module sends the access duration for the current period, it can clear the saved access duration to save memory resources.

[0127] S406, the router's DHCP module obtains the DHCP lease duration based on all access durations within a period.

[0128] For example, the DHCP module receives the access duration sent by the Wi-Fi module. The DHCP module can count the received access durations to obtain the DHCP lease duration corresponding to the router. In this embodiment, the DHCP module can take the average of multiple access durations, and the average value is the DHCP lease duration. In other embodiments, DHCP may also use other algorithms, which are not limited in this application.

[0129] For example, the DHCP module saves the DHCP lease duration and deletes the previously saved DHCP lease duration. For example, the DHCP module can determine the renewal duration based on the new lease duration. This could be, for example, 10 minutes before the lease expires, but this application is not limited to this.

[0130] For example, when a new device connects to the router, during the process of establishing a Wi-Fi connection between the router and the device, the router feeds back the most recently acquired DHCP lease duration and renewal lease duration to the device in S207. In other words, the router in this embodiment can acquire the DHCP lease duration based on the access duration within the current cycle at each time point. Correspondingly, devices connecting to the router in the next cycle will connect to the router based on the new DHCP lease duration.

[0131] It should be noted that the order of S405 with S401-S404 is not limited. For example, if the router detects a cycle duration trigger while the phone is executing any of the S401-S404 steps with the router, it can execute S405. It should also be noted that if the router updates the DHCP lease duration before the phone executes S207 (i.e., executing S405-S406), the phone will obtain the updated DHCP lease duration in S207. If the router updates the DHCP lease duration after the phone executes S207, the phone will obtain the DHCP lease duration currently stored by the router, which is the DHCP lease duration updated in the previous cycle, or it could be the default lease duration.

[0132] For example, a router can reclaim expired DHCP addresses (also known as IP addresses) based on the DHCP lease duration corresponding to each device.

[0133] It's important to note that, as mentioned above, the router's DHCP lease duration update process is asynchronous with the device access process. Therefore, the DHCP lease duration for each device connected to the router may be from the last update or the most recent update. For example, if phone A connects to the router before the router executes S405-S406, then phone A's DHCP lease duration is the one acquired by the router in the previous cycle, for example, a 40-minute lease. After phone A disconnects from the router, the router reclaims the DHCP address assigned to phone A based on phone A's DHCP lease duration (i.e., 40 minutes), meaning the lease duration from when phone A connected to the router until the current moment. To illustrate further, if phone B connects to the router after the router executes S405-S406, then phone B's DHCP lease duration is the one acquired by the router in the current cycle, for example, a 30-minute lease. After phone B disconnects from the router, the router reclaims phone B's DHCP address based on phone B's DHCP lease duration (i.e., 30 minutes).

[0134] The following example illustrates the DHCP address management process.

[0135] Figure 5This is an illustrative diagram of an application scenario; please refer to it. Figure 5 Specifically, at time t0, the mobile phone connects to the router, taking an example where the router currently stores a DHCP lease duration of 30 minutes. For instance, during the connection process, the mobile phone obtains a DHCP lease duration of 30 minutes, with a renewal period of 10 minutes before the lease expires (this can be set according to actual needs, and this application does not limit it). Other details not described can be found in the relevant content of the above embodiments, and will not be repeated here. For instance, at time t1, the mobile phone disconnects from the router. The router records the mobile phone's access duration, which is from time t0 to t1, for example, 20 minutes. That is, the mobile phone disconnects from the router within the lease duration. For instance, at time t2, based on the mobile phone's lease duration (i.e., 30 minutes), the router determines that the mobile phone has disconnected from the router and has not renewed the lease. The router reclaims the DHCP address assigned to the mobile phone, i.e., releases the IP address assigned to the mobile phone. The reclaimed DHCP address can be assigned to other newly connected devices.

[0136] Figure 6a For another application scenario illustration, please refer to... Figure 6a Specifically, at time t0, the mobile phone connects to the router, taking an example where the router currently stores a DHCP lease duration of 30 minutes. For instance, during the connection process, the mobile phone obtains a DHCP lease duration of 30 minutes, and the renewal period is 10 minutes before the lease expires (this can be set according to actual needs, and this application does not limit it). Other details not described can be referred to the relevant content of the above embodiments, and will not be repeated here. For instance, at time t1, that is, 10 minutes before the lease expires, the mobile phone renews the lease with the router. The specific renewal process can be referred to existing technical embodiments, and will not be repeated here. After the mobile phone renews the lease with the router at time t1, the router sends the currently stored DHCP lease duration to the mobile phone. In this embodiment, the router's currently stored DHCP lease duration is still the same as the DHCP duration when the mobile phone connects to the router, that is, the router does not update the DHCP lease duration between times t0 and t1. Please continue to refer to... Figure 6aFor example, the mobile phone obtains the DHCP lease duration (30 minutes) from the router. That is, the mobile phone can continue to use the DHCP address after the current DHCP lease expires (i.e., at time t2), for the same duration as the renewed DHCP lease, which is 30 minutes (e.g., from time t2 to t4). The mobile phone continues to interact with the router based on the connection between them. At time t3, the mobile phone disconnects from the router. The time difference between t1 and t3 is 18 minutes, meaning that after renewing a DHCP lease, the mobile phone continued to use the address for 18 minutes within the renewed lease period. At time t4, the router detects that the mobile phone's DHCP lease has expired; that is, the duration from t2 to t4 is the DHCP lease duration, and the router reclaims the mobile phone's DHCP address.

[0137] Figure 6b For another application scenario illustration, please refer to... Figure 6b Specifically, at time t0, the mobile phone connects to the router, taking an example where the router currently stores a DHCP lease duration of 30 minutes. For instance, during the connection process, the mobile phone obtains a DHCP lease duration of 30 minutes, and the lease is renewed 10 minutes before the lease expires (this can be set according to actual needs, and this application does not limit it). Other details not described can be referred to the relevant content of the above embodiments, and will not be repeated here. For instance, at time t1, that is, 10 minutes before the lease expires, the mobile phone renews the lease with the router. The specific renewal process can be referred to existing technical embodiments, and will not be repeated here. After the mobile phone renews the lease with the router at time t1, the router sends the currently stored DHCP lease duration to the mobile phone. In this embodiment, the router's currently stored DHCP lease duration is used as an example of a new DHCP lease duration (e.g., 20 minutes). That is, between times t0 and t1, the router updates the DHCP lease duration.

[0138] Please continue to refer to Figure 6b For example, the mobile phone obtains the DHCP lease duration (20 minutes) from the router. That is, the mobile phone can continue to use the DHCP address after the current DHCP lease expires (i.e., at time t2), for the same duration as the renewed DHCP lease, which is 20 minutes (e.g., from time t2 to t4). The mobile phone continues to interact with the router based on the connection. At time t3, the mobile phone disconnects from the router. The time difference between t1 and t3 is 18 minutes, meaning that after renewing a DHCP lease, the mobile phone continued to use the address for 18 minutes within the renewed lease period. At time t4, the router detects that the mobile phone's DHCP lease has expired, meaning the duration from t2 to t4 is the DHCP lease duration (20 minutes), and the router reclaims the mobile phone's DHCP address.

[0139] The address management method in this application embodiment can be applied to various scenarios. In one example, if the address management method is applied to scenarios with high user traffic and short connection times, such as cafes, airports, and train stations, at least one AP in the scenario can dynamically adjust the DHCP lease duration based on the access duration of each device within each cycle. For example, a shorter DHCP lease duration (e.g., 30 minutes) can be set to promptly reclaim DHCP traffic and improve the utilization rate of addresses in the DHCP address pool. In another example, if the address management method is applied to scenarios with long user connection times, such as schools, homes, or offices, at least one AP in the scenario can dynamically adjust the DHCP lease duration based on the access duration of each device within each cycle. For example, a longer DHCP lease duration (e.g., 8 hours) can be set to avoid repeated lease renewals by STAs, reduce DHCP message interaction between STAs and APs, reduce network transmission pressure, avoid network congestion, and improve user experience.

[0140] It should be noted that the embodiments of this application only use AP as an example for illustration. In other embodiments, the method in the embodiments of this application can also be applied to any device that can implement DHCP function, such as DHCP server, and the application is not limited.

[0141] It is understood that, in order to achieve the above-mentioned functions, electronic devices include hardware and / or software modules that perform the respective functions. Based on the algorithm steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software.

[0142] In one example, Figure 7 A schematic block diagram illustrating an embodiment of the present application shows an apparatus 700. The apparatus 700 may include a processor 701 and a transceiver / transceiver pin 702, and optionally, a memory 703.

[0143] The various components of device 700 are coupled together via bus 704, which includes a data bus, a power bus, a control bus, and a status signal bus. However, for clarity, all buses are referred to as bus 704 in the figure.

[0144] Optionally, the memory 703 can be used for the instructions in the foregoing method embodiments. The processor 701 can be used to execute the instructions in the memory 703, control the receive pin to receive signals, and control the transmit pin to transmit signals.

[0145] The device 700 may be an electronic device or a chip of an electronic device in the above method embodiments.

[0146] All relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.

[0147] This embodiment also provides a computer storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the aforementioned method steps to implement the methods described in the above embodiments.

[0148] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the methods described in the above embodiments.

[0149] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component, or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store computer execution instructions, and when the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the chip to execute the methods in the above-described method embodiments.

[0150] In this embodiment, the electronic device, computer storage medium, computer program product or chip are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding method provided above, and will not be repeated here.

[0151] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. An address management method, characterized in that, Applied to a first electronic device, the method includes: At the first preset period trigger time, the access duration information of the first period is obtained. The access duration information of the first period includes the access duration of each of the multiple second electronic devices that access the first electronic device in the first period. The access duration of the second electronic device is used to indicate the duration between the start time and the disconnection time of the second electronic device accessing the first electronic device. Based on the access duration information, the first lease duration is determined; At the first moment, a Wi-Fi connection is established with a third electronic device, wherein the first address information used by the third electronic device to access the first electronic device is assigned to the third electronic device by the first electronic device during the process of establishing a Wi-Fi connection with the third electronic device, and the lease duration of the first address information is the first lease duration; At the second moment, it is detected that the lease term of the first address information has expired and the Wi-Fi connection between the first electronic device and the third electronic device has been disconnected, and the first address information is reclaimed.

2. The method according to claim 1, characterized in that, The duration between the first moment and the second moment is the duration of the first lease.

3. The method according to claim 1, characterized in that, The method further includes: At the second preset period trigger time, the access duration information of the second period is obtained. The access duration information of the second period includes the access duration of each of the multiple fourth electronic devices that access the first electronic device in the second period. The access duration of the fourth electronic device is used to indicate the duration between the start time and the disconnection time of the fourth electronic device accessing the first electronic device. Based on the access duration information of the second period, the second lease duration is determined; the second lease duration is different from the first lease duration.

4. The method according to claim 3, characterized in that, The method further includes: At the third moment, a Wi-Fi connection is established with the fifth electronic device, wherein the fifth electronic device accesses the first electronic device using the first address information, the first address information being assigned to the fifth electronic device by the first electronic device during the process of establishing a Wi-Fi connection with the fifth electronic device, and the lease duration of the first address information being the second lease duration; At the fourth moment, it is detected that the lease term of the first address information has expired and the Wi-Fi connection between the first electronic device and the fifth electronic device has been disconnected, and the first address information is reclaimed.

5. The method according to claim 1, characterized in that, Before obtaining the access duration information for the first period, the method further includes: After the second electronic device is connected to the first electronic device, the start time of the second electronic device is saved; After the second electronic device disconnects from the first electronic device, the disconnection time of the second electronic device is obtained; The access duration of the second electronic device is determined based on the start time and the disconnection time.

6. The method according to claim 1, characterized in that, The first electronic device is an access point (AP).

7. A first electronic device, characterized in that, include: One or more processors; Memory; and one or more computer programs, wherein the one or more computer programs are stored on the memory, and when the computer programs are executed by the one or more processors, cause the first electronic device to perform the following steps: At the first preset period trigger time, the access duration information of the first period is obtained. The access duration information of the first period includes the access duration of each of the multiple second electronic devices that access the first electronic device in the first period. The access duration of the second electronic device is used to indicate the duration between the start time and the disconnection time of the second electronic device accessing the first electronic device. Based on the access duration information, the first lease duration is determined; At the first moment, a Wi-Fi connection is established with a third electronic device, wherein the first address information used by the third electronic device to access the first electronic device is assigned to the third electronic device by the first electronic device during the process of establishing a Wi-Fi connection with the third electronic device, and the lease duration of the first address information is the first lease duration; At the second moment, it is detected that the lease term of the first address information has expired and the Wi-Fi connection between the first electronic device and the third electronic device has been disconnected, and the first address information is reclaimed.

8. The electronic device according to claim 7, characterized in that, The duration between the first moment and the second moment is the duration of the first lease.

9. The electronic device according to claim 7, characterized in that, When the computer program is executed by the one or more processors, the first electronic device performs the following steps: At the second preset period trigger time, the access duration information of the second period is obtained. The access duration information of the second period includes the access duration of each of the multiple fourth electronic devices that access the first electronic device in the second period. The access duration of the fourth electronic device is used to indicate the duration between the start time and the disconnection time of the fourth electronic device accessing the first electronic device. Based on the access duration information of the second period, the second lease duration is determined; the second lease duration is different from the first lease duration.

10. The electronic device according to claim 9, characterized in that, When the computer program is executed by the one or more processors, the first electronic device performs the following steps: At the third moment, a Wi-Fi connection is established with the fifth electronic device, wherein the fifth electronic device accesses the first electronic device using the first address information, the first address information being assigned to the fifth electronic device by the first electronic device during the process of establishing a Wi-Fi connection with the fifth electronic device, and the lease duration of the first address information being the second lease duration; At the fourth moment, it is detected that the lease term of the first address information has expired and the Wi-Fi connection between the first electronic device and the fifth electronic device has been disconnected, and the first address information is reclaimed.

11. The electronic device according to claim 7, characterized in that, When the computer program is executed by the one or more processors, the first electronic device performs the following steps: After the second electronic device is connected to the first electronic device, the start time of the second electronic device is saved; After the second electronic device disconnects from the first electronic device, the disconnection time of the second electronic device is obtained; The access duration of the second electronic device is determined based on the start time and the disconnection time.

12. The electronic device according to claim 7, characterized in that, The first electronic device is an access point (AP).

13. A computer-readable storage medium, characterized in that, Includes a computer program that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1-6.

14. A computer program product, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the method as described in any one of claims 1-6.

15. A chip, characterized in that, The device includes one or more interface circuits and one or more processors; the interface circuits are configured to receive signals from the memory of an electronic device and send the signals to the processors, the signals including computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device performs the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and equipment for releasing IP addresses by DHCP server

    CN101730090A

  • Address renewal time obtaining method and device

    CN107864234A