Control method of hotspot switch and electronic equipment

By monitoring the network usage status of terminal devices and dynamically controlling the on/off status of hotspots, the problem of high power consumption of terminal devices is solved, and seamless switching between energy saving and network services is achieved.

CN121815381APending Publication Date: 2026-04-07XIAN UNISOC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-12
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In existing technologies, hotspots on terminal devices cannot be identified when the device is not actively using the network, causing the hotspots to run continuously and increasing power consumption.

Method used

By monitoring the network usage status of connected devices, including data packet transmission frequency and network request type, it determines whether the hotspot shutdown conditions are met. When the conditions are met, the hotspot is shut down via a low-power communication module, while listening for network usage requests and promptly turning the hotspot back on.

Benefits of technology

This significantly reduces the duration of unused hotspots, lowers the power consumption of terminal devices, ensures network access for connected devices, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121815381A_ABST
    Figure CN121815381A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a control method of a hotspot switch and electronic equipment. The method comprises the following steps: monitoring a network use state of a connection device, wherein the network use state comprises a data packet transmission frequency and a network request type; judging whether a hotspot closing condition is met or not according to the network use state; when the network use state meets a hotspot closing condition, triggering the hotspot module to be closed, and monitoring a network use request of the connection equipment through the low-power-consumption communication module; and when it is detected that the connection device sends a network use request, triggering the hotspot to be opened. The method is used for reducing the power consumption of the terminal equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a control method and electronic device for a hotspot switch. Background Technology

[0002] Users can provide internet access to their laptops via the hotspot function (Soft AP) of their mobile devices while waiting at the airport, or share the network with other devices via the hotspot of their tablets while outdoors.

[0003] In existing technologies, the on / off control of terminal hotspots mainly relies on monitoring the connection status. When the terminal detects that no device has connected to the hotspot for an extended period, it will actively turn off the hotspot to save power. If a device is connected but not actively using the network (e.g., not transmitting data), this status cannot be effectively identified, causing the hotspot to run continuously and resulting in high power consumption for the terminal device. Summary of the Invention

[0004] This application provides a hotspot switch control method and electronic device to reduce the power consumption of terminal devices.

[0005] In a first aspect, embodiments of this application provide a method for controlling a hotspot switch, including:

[0006] Monitor the network usage status of connected devices, including data packet transmission frequency and network request type;

[0007] Based on the network usage status, determine whether the hotspot shutdown conditions are met;

[0008] When the network usage status meets the hotspot shutdown condition, the hotspot module is triggered to shut down, and the network usage request of the connected device is listened for through the low-power communication module;

[0009] When a network usage request is detected from the connected device, the hotspot is activated.

[0010] In one possible implementation, monitoring the network usage status of connected devices includes:

[0011] The number of data packets sent or received within a preset time period is determined as the data packet transmission frequency of the connected device, and the data packet transmission frequency is used to measure the intensity of network activity.

[0012] The network request type of the connected device is determined based on the hypertext transfer request and / or file transfer request of the connected device.

[0013] In one possible implementation, determining the network request type of the connected device based on the hypertext transfer request and file transfer request of the connected device includes:

[0014] Based on the request frequency and duration corresponding to the hypertext transfer request, a first request type is determined, wherein the first request type is a non-persistent request type or a persistent request type.

[0015] Based on the activity level of the file transfer request, a second request type is determined, wherein the second request type is either the non-persistent request type or the persistent request type;

[0016] When the first request type or the second request type is the persistent request type, the network request type is determined to be the persistent request type.

[0017] In one possible implementation, the first request type is determined based on the request frequency and duration corresponding to the hypertext transfer request, including:

[0018] Obtain the preset frequency threshold and preset duration threshold;

[0019] In response to the request frequency being less than or equal to the preset frequency threshold and the duration being less than the preset duration threshold, the first request type is determined to be the non-continuous request.

[0020] In response to the request frequency being greater than or equal to the preset frequency threshold, or the duration being greater than or equal to the preset duration threshold, the first request type is determined to be the continuous request.

[0021] In one possible implementation, determining the second request type based on the activity level of the file transfer request includes:

[0022] In response to the activity level of the file transfer request being a first preset activity level, the second request type is determined to be the continuous request type;

[0023] If the activity level of the file transfer request is a second preset activity level, then the second request type is determined to be the non-persistent request type.

[0024] In one possible implementation, determining whether the hotspot shutdown conditions are met based on the network usage status includes:

[0025] Determine the target frequency threshold;

[0026] When the data packet transmission frequency is less than the target frequency threshold and the network request type is a non-persistent request type, the network usage status meets the hotspot shutdown condition.

[0027] In one possible implementation, determining a preset frequency threshold includes:

[0028] Obtain the geographical location information corresponding to the terminal device;

[0029] The current scene corresponding to the terminal device is identified using the geographical location information;

[0030] Based on the current scenario, adjust the preset frequency threshold corresponding to the hotspot shutdown condition to obtain the target frequency threshold.

[0031] In one possible implementation, determining the target frequency threshold includes:

[0032] Obtain the device identification information corresponding to the connected device;

[0033] The device type corresponding to the connected device is determined by the device identification information;

[0034] Based on the device type, determine the target frequency threshold corresponding to the hotspot shutdown condition.

[0035] In one possible implementation, triggering the hotspot module to start includes:

[0036] The low-power communication module sends a hotspot activation confirmation message to the connected device.

[0037] Hotspot reconnection with the connected device is completed via wireless communication protocol;

[0038] The low-power communication module sends a hotspot activation notification to the connected device.

[0039] Secondly, this application embodiment provides a control device for a hotspot switch, including a monitoring module, a judgment module, a shutdown module, a listening module, and a startup module:

[0040] The monitoring module is used to monitor the network usage status of connected devices, including data packet transmission frequency and network request type.

[0041] The judgment module is used to determine whether the hotspot shutdown conditions are met based on the network usage status.

[0042] The shutdown module is used to trigger the hotspot module to shut down when the network usage status meets the hotspot shutdown conditions;

[0043] The monitoring module is used to monitor network usage requests from the connected device via a low-power communication module.

[0044] The startup module is used to trigger hotspot activation when it detects that the connected device has sent a network usage request.

[0045] In one possible implementation, the monitoring module is specifically used for:

[0046] The number of data packets sent or received within a preset time period is determined as the data packet transmission frequency of the connected device, and the data packet transmission frequency is used to measure the intensity of network activity.

[0047] The network request type of the connected device is determined based on the hypertext transfer request and / or file transfer request of the connected device.

[0048] In one possible implementation, the monitoring module is specifically used for:

[0049] Based on the request frequency and duration corresponding to the hypertext transfer request, a first request type is determined, wherein the first request type is a non-persistent request type or a persistent request type.

[0050] Based on the activity level of the file transfer request, a second request type is determined, wherein the second request type is either the non-persistent request type or the persistent request type;

[0051] When the first request type or the second request type is the persistent request type, the network request type is determined to be the persistent request type.

[0052] In one possible implementation, the monitoring module is specifically used for:

[0053] Obtain the preset frequency threshold and preset duration threshold;

[0054] In response to the request frequency being less than or equal to the preset frequency threshold and the duration being less than the preset duration threshold, the first request type is determined to be the non-continuous request.

[0055] In response to the request frequency being greater than or equal to the preset frequency threshold, or the duration being greater than or equal to the preset duration threshold, the first request type is determined to be the continuous request.

[0056] In one possible implementation, the monitoring module is specifically used for:

[0057] In response to the activity level of the file transfer request being a first preset activity level, the second request type is determined to be the continuous request type;

[0058] If the activity level of the file transfer request is a second preset activity level, then the second request type is determined to be the non-persistent request type.

[0059] In one possible implementation, the determining module is specifically used for:

[0060] Determine the target frequency threshold;

[0061] When the data packet transmission frequency is less than the target frequency threshold and the network request type is a non-persistent request type, the network usage status meets the hotspot shutdown condition.

[0062] In one possible implementation, the determining module is specifically used for:

[0063] Obtain the geographical location information corresponding to the terminal device;

[0064] The current scene corresponding to the terminal device is identified using the geographical location information;

[0065] Based on the current scenario, adjust the preset frequency threshold corresponding to the hotspot shutdown condition to obtain the target frequency threshold.

[0066] In one possible implementation, the determining module is specifically used for:

[0067] Obtain the device identification information corresponding to the connected device;

[0068] The device type corresponding to the connected device is determined by the device identification information;

[0069] Based on the device type, determine the target frequency threshold corresponding to the hotspot shutdown condition.

[0070] In one possible implementation, the startup module is specifically used for:

[0071] The low-power communication module sends a hotspot activation confirmation message to the connected device.

[0072] Hotspot reconnection with the connected device is completed via wireless communication protocol;

[0073] The low-power communication module sends a hotspot activation notification to the connected device.

[0074] Thirdly, embodiments of this application provide a chip, the chip including instructions for a processor to execute computer execution instructions to implement the first aspect and / or various possible implementations of the first aspect.

[0075] Fourthly, embodiments of this application provide an electronic device, including: a memory and a processor;

[0076] The memory stores computer-executed instructions;

[0077] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0078] Fifthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0079] In a sixth aspect, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0080] The hotspot switch control method and electronic device provided in this application can actively turn off the hotspot function when not in use by monitoring the network usage status of connected devices, and turn on the hotspot function as needed when connected devices need to use the network. This can significantly reduce the duration of the hotspot running ineffectively, thereby reducing the power consumption of terminal devices, while ensuring the network usage needs of connected devices and improving the user experience. Attached Figure Description

[0081] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0082] Figure 1 A schematic diagram illustrating the application scenarios provided in the embodiments of this application;

[0083] Figure 2 A flowchart illustrating a hotspot switch control method provided in an embodiment of this application;

[0084] Figure 3 A flowchart illustrating another hotspot switch control method provided in this application;

[0085] Figure 4 This application provides an example of a terminal reconnection interaction diagram.

[0086] Figure 5 This is a schematic diagram of the structure of a hotspot switch control device provided in an embodiment of this application;

[0087] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0088] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0089] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0090] Figure 1 This is a schematic diagram illustrating an application scenario provided in an embodiment of this application. Please refer to [link / reference]. Figure 1 The specific application scenarios of this application may include hotspot device 101 and connection device 102.

[0091] Hotspot device 101 can be a mobile terminal with hotspot functionality (Soft AP), allowing users to share the network with other connected devices 102 while waiting at airports or engaging in outdoor activities. Connected device 102 can be a mobile terminal with network connectivity (e.g., mobile phone, tablet, smartwatch, etc.) or a device with only Wi-Fi access functionality but no independent cellular network connectivity (e.g., portable Bluetooth speaker, smart bracelet, laptop, etc.).

[0092] In existing technologies, the on / off control of terminal hotspots mainly relies on monitoring device connection status. When the terminal detects that no device has been connected to the hotspot for an extended period, it will actively turn off the hotspot to save power. If a device is connected but not actively using the network (e.g., not transmitting data), this status cannot be effectively identified, causing the hotspot to run continuously and resulting in high power consumption for the terminal device.

[0093] The hotspot switch control method provided in this application embodiment can monitor the network usage status of connected devices, including data packet transmission frequency and network request type; determine whether the hotspot shutdown condition is met based on the network usage status; when the network usage status meets the hotspot shutdown condition, send a hotspot shutdown command through a low-power communication module; and when a network usage request is detected from a connected device, send a hotspot startup command through a low-power communication module.

[0094] During the above process, by monitoring the network usage status of connected devices, the hotspot function can be proactively turned off in non-use scenarios, and then turned on as needed when connected devices need to use the network. This can significantly reduce the duration of the hotspot running ineffectively, thereby reducing the power consumption of terminal devices, while ensuring the network usage needs of connected devices and improving the user experience.

[0095] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0096] Figure 2 This is a flowchart illustrating a hotspot switch control method provided in an embodiment of this application. Please refer to... Figure 2 The method may include:

[0097] S201. Monitor the network usage status of connected devices.

[0098] The execution entity in this application embodiment can be a hotspot device or a chip of a hotspot device, or it can be a control device for a hotspot switch disposed in the hotspot device or the chip of the hotspot device. The control device for the hotspot switch can be implemented by software or by a combination of software and hardware.

[0099] A two-layer communication mechanism, primarily using Wi-Fi and secondarily using low-power communication protocols, can be used to monitor the network usage status of connected devices. This network usage status can include packet transmission frequency and network request types.

[0100] The low-power communication protocol can be Bluetooth Low Energy (BLE).

[0101] Data packet transmission frequency is the number of data packets sent or received per unit of time. Data packet transmission frequency can be used to measure the intensity of network activity.

[0102] The frequency of uplink and downlink data packet exchanges between connected devices can be counted by the Wi-Fi module of the hotspot device to determine whether there is effective network transmission.

[0103] Network request types can include network access requests specific to mobile hotspots (Soft APs), Hypertext Transfer Protocol (HTTP) requests, and file download / upload requests. The network request type can be used to determine whether the connected device is actually accessing the network.

[0104] Among them, the network request type specific to mobile hotspots (Soft APs) can be identified by the request identifier received by the low-power communication module; hypertext transfer requests and file transfer requests can be determined by the application layer protocol characteristics of the data packets parsed by the Wi-Fi module.

[0105] S202. Determine whether the conditions for shutting down the hotspot are met based on the network usage status.

[0106] Hotspot shutdown conditions are preset conditions that trigger hotspot shutdown. For example, a hotspot shutdown condition could be that if connected devices do not transmit any valid data packets within 10 minutes, the hotspot shutdown condition is met.

[0107] In some embodiments, a target frequency threshold can be determined; when the data packet transmission frequency is less than the target frequency threshold and the network request type is a non-persistent request type, the network usage status meets the hotspot shutdown condition.

[0108] Non-persistent request type refers to network request type that does not have subsequent continuous data interaction after a hotspot connection is triggered once, that is, no new data packets are transmitted within a preset time after the request is completed.

[0109] Continuous request type refers to network request type that requires maintaining data link connectivity for an extended period of time.

[0110] For example, file downloads / uploads and video streaming playback are continuous request types; hypertext transfer requests for single web page browsing and temporary query API calls can be non-continuous request types.

[0111] In determining the network request type, the attribute of the network request type (persistent / non-persistent) must first be confirmed through the Wi-Fi module, and then a comprehensive judgment should be made in combination with the monitoring data of data packet transmission frequency.

[0112] If it is a continuous request type, even if the data packet transmission frequency is lower than the target threshold for a short period of time, the hotspot shutdown condition is not met, so as to avoid interrupting the critical network services of the connected device.

[0113] In this application, the conditions for shutting down hotspots can be limited by the data packet transmission frequency and network request type, which can improve the accuracy of determining whether to shut down hotspots, while taking into account the needs of network service continuity and terminal power consumption control.

[0114] S203. When the network usage status meets the hotspot shutdown conditions, the hotspot module is triggered to shut down, and the network usage requests of connected devices are listened for through the low-power communication module.

[0115] The hotspot module can be shut down by calling the hardware / software shutdown interface of the Wi-Fi hotspot.

[0116] The low-power communication module can also synchronize a status notification to connected devices that the hotspot is about to be turned off.

[0117] The low-power communication module can be a BLE module. After completing the hotspot shutdown state synchronization, the low-power communication module enters a low-power standby mode and only periodically listens for network usage requests from connected devices.

[0118] For example, the low-power communication module can listen for directional broadcast signals sent by connected devices every 30 seconds after the hotspot is turned off and state synchronization is completed, instead of continuously running full-band broadcasts.

[0119] S204. When a network usage request is detected from a connected device, the hotspot module is activated.

[0120] Specifically, a hotspot activation confirmation message can be sent to the connected device via a low-power communication module; a hotspot reconnection with the connected device can be completed via a wireless communication protocol; and a hotspot activation notification can be sent to the connected device via a low-power communication module.

[0121] The wireless communication protocol can be the Wi-Fi protocol, which is the core communication carrier for hotspot back-connection. The low-power communication module only undertakes the functions of receiving requests and notifying status in the early stage.

[0122] The hotspot activation confirmation message is used to notify connected devices that the hotspot has entered the startup process; the hotspot enable notification is used to clearly inform connected devices that they can initiate a Wi-Fi reconnection or that they have network service capabilities.

[0123] In this application, the coordination between hotspot activation confirmation and WIFI reconnection can ensure seamless switching of network services and avoid the problem of disconnection where the connected device cannot access the network in time after initiating a request.

[0124] It is worth noting that the power consumption test data on the test equipment based on this application is as follows:

[0125] Traditional Soft AP continuous operation scenario: The test device turns on the soft AP hotspot (no actual network data transmission, only maintaining the connection), other terminals maintain Wi-Fi connection, and the power consumption of the device is 44.51mA when the screen is off for 1 minute, which corresponds to the high power consumption scenario of "not recognizing non-use status, hotspot continuously running".

[0126] Hotspot shutdown and BLE standby scenarios in this application: The test device shuts down the Soft AP hotspot, and other terminals use BLE connection. The power consumption is 7.59mA after the screen is off for 1 minute.

[0127] Data comparison shows that this application can reduce terminal power consumption by about 83% in hot idle scenarios, verifying the energy-saving effect of dynamic control logic.

[0128] The hotspot switch control method provided in this application can actively turn off the hotspot function when not in use by monitoring the network usage status of connected devices, and turn on the hotspot function as needed when the connected devices need to use the network. This can significantly reduce the duration of the hotspot running ineffectively, thereby reducing the power consumption of terminal devices, while ensuring the network usage needs of connected devices and improving the user experience.

[0129] Figure 3 A flowchart illustrating another hotspot switch control method provided in this application. Please refer to... Figure 3 The method may include:

[0130] S301. The number of data packets sent or received within a preset time period is determined as the data packet transmission frequency of the connected device.

[0131] The Wi-Fi module of the hotspot device can actively monitor the data packet transmission frequency of connected devices through the collaborative mechanism of the data link layer and physical layer of the Wi-Fi protocol.

[0132] The physical layer communication protocol is the underlying protocol for basic signal transmission and modulation / demodulation between devices. It needs to be combined with the frame parsing capability of the data link layer to accurately count the transmission frequency of effective data packets.

[0133] The packet transmission frequency monitored collaboratively by the physical layer and the data link layer can be used to accurately determine the actual network activity status of connected devices.

[0134] For example, the Wi-Fi module of the hotspot device captures the radio frequency signal interaction of the connected device through the physical layer, and then parses the frame type through the data link layer (distinguishing between service data frames, control frames, and management frames). Finally, it counts the number of valid service data packets sent / received per unit time (such as per minute) to determine whether the device is in a real network active state; if only control frames and management frames are detected but no service data frames are detected, it is determined to be in an inactive state.

[0135] S302. Determine the network request type of the connected device based on the hypertext transfer request and / or file transfer request of the connected device.

[0136] The network request type of the connecting device can be parsed by the network protocol parsing module of the hotspot device through the application layer protocol, and the data must be split through the transport layer protocol before parsing.

[0137] Application layer protocols are high-level communication protocols built on top of the transport layer (TCP / UDP). They are used to define the interaction specifications for different types of network services. Application layer protocols can include HTTP / HTTPS, File Transfer Protocol (FTP), streaming media protocols (such as RTSP), etc.

[0138] The transport layer protocol is responsible for establishing end-to-end data transmission channels and providing data diversion support for application layer protocol parsing. It first determines the general category of the request by the transport layer port number (e.g., port 80 for HTTP and port 21 for FTP), and then parses the specific request type by the application layer protocol.

[0139] For example, the transport layer can first identify that the target port of the data packet is port 80. Then, by parsing the Request-Method (such as GET or POST) and Content-Type fields in the Hypertext Transfer Request header, it can determine whether the device is browsing a webpage (GET request to obtain page resources), making an API call (POST request to submit data), or downloading a file via the HTTP protocol (a large-scale fragmented GET request). If FTP protocol data is identified, it is determined to be a file upload / download request.

[0140] In this application, the network request type of the connected device can be determined through hypertext transfer requests and / or file transfer requests. The three methods for determining the network request type are described below.

[0141] Method 1: Determine the first request type based on the request frequency and duration corresponding to the hypertext transfer request. The first request type can be either a non-persistent request type or a persistent request type.

[0142] Specifically, a preset frequency threshold and a preset duration threshold are obtained; in response to a request frequency less than or equal to the preset frequency threshold and a duration threshold less than or equal to the preset duration threshold, the first request type is determined to be a non-persistent request; in response to a request frequency greater than the preset frequency threshold or a duration greater than the preset duration threshold, the first request type is determined to be a persistent request.

[0143] For example, the request frequency can be the number of requests within 5 minutes, with a preset frequency threshold of 3 times. The duration is the time occupied by a single request, with a preset duration threshold of 10 seconds. If the number of requests within 5 minutes is ≤3 and the duration of a single request is ≤10 seconds, the first request type is a non-persistent request. If the number of requests within 5 minutes is >3, and / or the duration of a single request is >10 seconds, the first request type is a persistent request.

[0144] If the duration of a single request does not exceed the preset duration threshold, it can be a single web page query or a temporary API call, etc. Such requests do not require continuous network data interaction.

[0145] The corresponding hotspot shutdown condition determination logic is as follows: when the non-persistent request type and the state of "data packet transmission frequency < target frequency threshold" are met at the same time, and the composite state continues to reach the preset no data transmission duration threshold (such as 10 minutes), the final determination of the hotspot shutdown condition is immediately triggered, and the subsequent hotspot shutdown and low power monitoring process is started.

[0146] If the duration of a single request exceeds a preset duration threshold, it can be for large file chunk downloads via HTTP, online document real-time collaborative editing, etc. Such requests require maintaining network connectivity for an extended period.

[0147] The corresponding hotspot shutdown condition determination logic is as follows: even if the data packet transmission frequency is detected to be briefly lower than the target frequency threshold, the hotspot shutdown trigger instruction will be directly blocked until the duration of the HTTP request falls back to within the preset threshold and the state of the data packet transmission frequency being lower than the target threshold is maintained for 5 minutes, before re-entering the shutdown determination process.

[0148] In this application, by configuring the request frequency and duration for hypertext transfer requests and binding differentiated hotspot shutdown condition triggering logic to different first request types, the accurate identification of network usage status in HTTP request scenarios is achieved, which greatly improves the accuracy of hotspot shutdown condition determination.

[0149] Method 2: Determine the second request type based on the activity level of the file transfer request. The second request type can be either a non-persistent request type or a persistent request type.

[0150] Specifically, in response to the activity level of a file transfer request being a first preset activity level, the second request type is determined to be a continuous request type; in response to the activity level of a file transfer request being a second preset activity level, the second request type is determined to be a non-continuous request type.

[0151] The activity level is determined by the amount of FTP data packets transferred per unit time (e.g., 1 minute). If the amount of data packets transferred within 1 minute is ≥1MB and the link is not interrupted, it is the first preset activity level. If the amount of data packets is <100KB or the link is frequently interrupted, it is the second preset activity level.

[0152] If the activity level of FTP file transfer is detected to be at the first preset activity level (such as large file upload / download or batch folder synchronization), it is determined to be a continuous request type. In this type of scenario, a stable network connection is required to ensure the completion of the transfer.

[0153] The corresponding hotspot shutdown condition determination logic is as follows: even if the data packet transmission frequency is briefly lower than the target frequency threshold, the hotspot shutdown trigger command will be directly blocked until the FTP transmission activity drops to the second preset activity level and is maintained for a preset duration (such as 5 minutes), at which point the shutdown determination process will be re-entered.

[0154] If the FTP transfer activity remains at the second preset activity level for an extended period (e.g., the link becomes idle after only one small file transfer or the transfer task is interrupted), it is determined to be a non-continuous request type, and the connected device has no continuous network usage requirement.

[0155] The corresponding hotspot shutdown condition determination logic is as follows: when the data packet transmission frequency is synchronously lower than the target frequency threshold, and this state continues to reach the preset no data transmission duration threshold (such as 10 minutes), the final determination of the hotspot shutdown condition is immediately triggered.

[0156] Method 3: When a connected device initiates both a hypertext transfer request and a file transfer request, the network request type is a persistent request type if either the first or second request type is a persistent request type.

[0157] If a connected device initiates both HTTP and FTP requests simultaneously, the persistent request type with higher priority will be used as the final determination result (that is, as long as there is one type of persistent request, the overall network request type will be determined as a persistent request); only when both types of requests meet the determination conditions for non-persistent requests will the overall request type be classified as a non-persistent request, so as to avoid the abnormal shutdown of hotspots due to misjudgment of a single protocol.

[0158] The corresponding hotspot shutdown condition determination logic is as follows: if the HTTP request is determined to be a continuous type (such as long-term online video playback) and the FTP request is determined to be a non-continuous type (such as small file transfer completed), then the determination rule for continuous request types is directly used to block the hotspot shutdown command; only when the HTTP request is a non-continuous type (such as a single web page query) and the FTP request is a non-continuous type (such as the link is idle) will the comprehensive determination of the shutdown condition be completed by combining the data packet transmission frequency threshold, so as to avoid abnormal shutdown of hotspots due to misjudgment of a single protocol.

[0159] For example, if the first request type of the hypertext transfer request is a persistent request type and the second request type is a non-persistent request type, then the network request type is a persistent request type. In this case, the hotspot shutdown condition determination module will directly lock the state of "not meeting the shutdown condition" until the HTTP streaming media transmission is terminated and the FTP link idle time reaches 10 minutes, at which point the shutdown condition will be re-verified.

[0160] In this application, the second request type is determined to be a continuous request type by responding to the activity level of the file transfer request as a first preset activity level; if the activity level of the file transfer request is the second preset activity level, the second request type is determined to be a non-continuous request type. Differentiated hotspot shutdown condition triggering logic is configured for different request types. At the same time, the judgment link of mixed scenarios is completed by the priority judgment rule of multi-protocol requests, which improves the accuracy of hotspot shutdown conditions.

[0161] In this application, by combining the frequency and duration of hypertext transfer requests, the activity level of FTP transfers, and the priority fallback logic for multi-protocol mixed scenarios, the accurate classification of network request types is achieved. This can identify network service scenarios that require continuous persistence, as well as accurately locate idle scenarios without continuous data interaction, thereby improving the accuracy and reliability of hotspot shutdown conditions. At the same time, it takes into account both the need for network service continuity and terminal power consumption control.

[0162] S303. Determine the target frequency threshold.

[0163] This application provides two methods for determining the target frequency threshold, and these two methods can also be used in combination.

[0164] Method 1: Obtain the geographic location information corresponding to the terminal device; identify the current scene corresponding to the terminal device through the geographic location information; adjust the preset frequency threshold corresponding to the hotspot shutdown condition according to the current scene to obtain the target frequency threshold.

[0165] Geographic location information can be terminal location information obtained through GPS or Wi-Fi signal strength. For example, in an airport scenario, GPS positioning shows that the terminal is within the airport area, or the airport scenario can be identified by matching the SSIDs of nearby Wi-Fi hotspots.

[0166] For example, if the latitude and longitude coordinates obtained by GPS fall within the preset coordinate range of transportation hubs such as airports and high-speed rail stations, it is directly determined to be a transportation hub scenario (including airports and high-speed rail stations); if the GPS coordinates fall within the coordinate range of a residential area and Wi-Fi matches a private home SSID, it is determined to be a home scenario; if the GPS positioning shows that the terminal is on a city road or in an open outdoor area, and the Wi-Fi scan result is a featureless SSID with less than 3 hotspots, it is determined to be an outdoor commuting scenario; if no valid GPS coordinates are obtained, and Wi-Fi scan detects a feature SSID in public areas such as shopping malls or office buildings, it is determined to be a public office / consumption scenario.

[0167] The preset frequency threshold is the base threshold defaulted to by the terminal at the factory. For different scenarios, a scenario weighting coefficient multiplication adjustment algorithm is used to calculate the target frequency threshold:

[0168]

[0169] in, For the preset frequency threshold, The target frequency threshold, This represents the scene weighting coefficient.

[0170] For different scenarios, the scenario weight coefficient K can be 0.4 for transportation hub scenarios, 1 for home scenarios, 1.2 for outdoor commuting scenarios, and 0.8 for public office / consumption scenarios.

[0171] In this application, a target frequency threshold is determined by geographic location information, and the hotspot shutdown strategy is dynamically adjusted according to the scenario to adapt to user needs in different scenarios. For example, in an airport scenario, users may frequently use hotspots for short periods of time. Lowering the target frequency threshold can reduce power consumption and network disconnection issues caused by frequent hotspot switching. In contrast, in outdoor commuting scenarios, the threshold can be appropriately shortened to prioritize ensuring terminal battery life.

[0172] Method 2: Obtain the device identification information corresponding to the connected device; determine the device type corresponding to the connected device through the device identification information; determine the target frequency threshold corresponding to the hotspot shutdown condition based on the device type.

[0173] Device identification information is used to identify the type of connected device, such as MAC address prefixes and device model identifiers reported by the device when connecting.

[0174] You can determine whether the connected device is a laptop, smartphone, smart bracelet, etc. by the MAC address prefix (such as the MAC segment of a specific manufacturer) or the device model identifier.

[0175] Device types can be office equipment (such as laptops, desktop computers, etc.), mobile devices (such as smartphones, tablets, etc.), and wearable devices (such as smart bracelets, smartwatches, etc.).

[0176] The target frequency domain threshold can be obtained by multiplying the type weight coefficient corresponding to the device type by the preset frequency domain threshold.

[0177] For example, the preset frequency domain threshold can be 5 packets / minute. The type weight coefficient for office devices is 0.6, so the target frequency domain threshold is 3 packets / minute; the type weight coefficient for mobile devices is 1, so the target frequency domain threshold is 5 packets / minute; and the type weight coefficient for wearable devices is 1.2, so the target frequency domain threshold is 6 packets / minute.

[0178] In this application, a device type differentiation strategy is used to match the usage characteristics of different devices. For example, laptop users may not actively use the network for a long time, so lowering the frequency threshold can prevent frequent hotspot startup and shutdown from affecting users' work; while smartphone users use the network more frequently, so there is no need to relax the threshold too much, thus balancing battery life and user experience.

[0179] In some embodiments, the target frequency threshold can also be determined by combining the geographical location information of the terminal device and the device identification information of the connected device.

[0180] Specifically, the basic threshold of the scene is first determined based on the geographical location information, and then a second fine-tuning is performed within the range of the basic threshold based on the device type of the connected device to form the final target frequency threshold.

[0181] For example, in an airport scenario, the base threshold is 2 packets / minute. If the connected device is a laptop, the frequency threshold is further maintained at 2 packets / minute; if the connected device is a smart bracelet, the frequency threshold is increased to 3 packets / minute. Simultaneously, upper and lower limits are set for threshold adjustment: the highest frequency threshold is no more than 8 packets / minute, and the lowest is no less than 1 packet / minute. This prevents the threshold from deviating excessively from the reasonable range due to the superposition of two conditions, thus affecting power consumption control.

[0182] In this application, the target frequency threshold is accurately adapted by using a basic threshold for the scenario, a secondary fine-tuning based on the device type, and a fallback threshold range. This approach takes into account user habits in different scenarios and matches the network usage characteristics of various connected devices. Compared to a single-dimensional threshold determination method, this significantly improves the flexibility and rationality of the hotspot shutdown strategy, ensuring network service continuity while minimizing the ineffective power consumption of terminal devices.

[0183] S304. When the data packet transmission frequency is less than the target frequency threshold and the network request type is a non-persistent request type, the network usage status meets the hotspot shutdown condition.

[0184] For example, assuming the target frequency threshold is 3 packets / minute, if the data packet transmission frequency of the connected device is 2 packets / minute (less than the target threshold), and its network request type is a non-persistent request (such as a single webpage query with no subsequent interaction), the shutdown condition is not met at this time. When the device maintains a low transmission frequency of 2 packets / minute and no persistent network requests are initiated throughout, the hotspot shutdown condition is determined to be met. If the device initiates a large FTP file download (persistent request type) during this period, even if the transmission frequency is briefly lower than the target threshold, the shutdown determination will be immediately terminated, and the hotspot will resume normal operation.

[0185] S305 triggers the hotspot module to shut down and listens for network usage requests from connected devices via the low-power communication module.

[0186] First, a notification is sent to the connected device via a low-power communication module, indicating that the hotspot will be shut down in 3-5 seconds, allowing for a short period of status synchronization.

[0187] Call the local Wi-Fi hotspot hardware / software shutdown interface of the hotspot device to shut down the hotspot module and cut off the Wi-Fi data transmission link.

[0188] After the hotspot module is turned off, the low-power communication module immediately enters the low-power standby listening mode, only periodically scanning for directional broadcast requests from connected devices (e.g., listening once every 30 seconds, not full-band scanning), and stops high-power continuous signal transmission and reception.

[0189] If the low-power communication module does not receive a status confirmation from the connected device, it will extend the hotspot shutdown operation by 10 seconds to ensure that the device completes status synchronization and avoid the connected device from initiating an invalid reconnection due to not receiving a notification.

[0190] S306. When a network usage request is detected from a connected device, the hotspot is activated.

[0191] After the low-power communication module detects a targeted network usage request from a connected device, it first sends a hotspot activation preparation confirmation message to the connected device, informing the device that the request has been received and the startup process has begun, thus avoiding the device from sending the request repeatedly.

[0192] Trigger the Wi-Fi hotspot module startup interface of the hotspot device and wait for the hotspot module to complete the startup process such as channel initialization and SSID broadcast (usually takes 1-2 seconds).

[0193] After the hotspot module starts up, it sends a notification that the hotspot is officially available to connected devices through the low-power communication module, and at the same time starts listening for Wi-Fi link reconnection.

[0194] After receiving the notification, the connected device initiates a Wi-Fi reconnection. Once the hotspot device completes authentication, it resumes network data transmission, achieving seamless switching of network services.

[0195] If no Wi-Fi reconnection request is detected from a connected device within 5 seconds after the hotspot is activated, a notification will be pushed again via the low-power communication module. If no reconnection is detected after 3 consecutive attempts, the hotspot will be paused and re-enter the monitoring mode to avoid unnecessary power consumption.

[0196] The hotspot switch control method provided in this application introduces low-power communication technology as an auxiliary means of hotspot status monitoring. After the terminal hotspot function is enabled, it dynamically monitors the network usage status of connected devices based on the local memory's state caching and policy storage mechanism. Based on the monitoring results and the pre-stored management policies, it intelligently controls the hotspot's on / off state, thereby reducing terminal power consumption while ensuring hotspot availability. A multi-level monitoring mechanism (Wi-Fi connection status + BLE communication status) distinguishes between network usage and non-usage scenarios, and dynamic energy saving is achieved by combining this with hotspot switch control logic. This reduces the power consumption of terminal devices, minimizes the interference caused by frequent hotspot starts and stops, and improves the user experience.

[0197] Figure 4 This is a schematic diagram illustrating a terminal reconnection interaction provided in an embodiment of this application. Please refer to... Figure 4 This includes hotspot devices and connected devices. At this time, the Wi-Fi hotspot module of the hotspot device is turned off, and only the low-power communication module (BLE) maintains standby listening.

[0198] When a connected device detects its own network usage needs (such as a user opening a browser), it sends a network usage request containing a Soft AP network request identifier to the hotspot device via the paired BLE link. After the hotspot device's BLE module hears the request, it first returns an acknowledgment message "request received" to the connected device, and then calls the Wi-Fi hotspot's hardware / software interface to activate the hotspot function.

[0199] After the hotspot device completes the initialization of the Wi-Fi hotspot module (such as channel configuration and SSID broadcast), it sends a "hotspot ready" status message to the connected device via BLE. Upon receiving the "hotspot ready" message, the connected device retrieves the connection parameters of the hotspot (such as SSID and password) from its local cache, initiates a Wi-Fi link reconnection request, and completes network access.

[0200] If a BLE disconnection is detected, it means that the terminal hotspot has moved away from the connected device, and the terminal hotspot does not need to be turned on again.

[0201] Figure 5 This is a schematic diagram of a control device for a hotspot switch provided in an embodiment of this application. Please refer to... Figure 5 The control device 500 for the hotspot switch includes a monitoring module 501, a judgment module 502, a shutdown module 503, a listening module 504, and a startup module 505.

[0202] Monitoring module 501 is used to monitor the network usage status of connected devices, including data packet transmission frequency and network request type;

[0203] The judgment module 502 is used to determine whether the hotspot shutdown conditions are met based on the network usage status.

[0204] The shutdown module 503 is used to trigger the shutdown of the hotspot module when the network usage status meets the hotspot shutdown conditions;

[0205] The listening module 504 is used to listen for network usage requests from connected devices via a low-power communication module;

[0206] The startup module 505 is used to trigger hotspot activation when a network usage request is detected from a connected device.

[0207] In one possible implementation, the monitoring module 501 is specifically used for:

[0208] The number of data packets sent or received within a preset time period is determined as the data packet transmission frequency of the connected device. The data packet transmission frequency is used to measure the intensity of network activity.

[0209] Determine the network request type of the connected device based on the hypertext transfer request and / or file transfer request of the connected device.

[0210] In one possible implementation, the monitoring module 501 is specifically used for:

[0211] The first request type is determined based on the request frequency and duration corresponding to the hypertext transfer request. The first request type is either a non-persistent request type or a persistent request type.

[0212] Based on the activity level of the file transfer request, determine the second request type, which can be either a non-persistent request type or a persistent request type.

[0213] When either the first request type or the second request type is a persistent request type, the network request type is determined to be a persistent request type.

[0214] In one possible implementation, the monitoring module 501 is specifically used for:

[0215] Obtain the preset frequency threshold and preset duration threshold;

[0216] In response to a request frequency that is less than or equal to a preset frequency threshold and a duration that is less than a preset duration threshold, the first request type is determined to be a non-persistent request.

[0217] In response to a request frequency greater than or equal to a preset frequency threshold, or a duration greater than or equal to a preset duration threshold, the first request type is determined to be a continuous request.

[0218] In one possible implementation, the monitoring module 501 is specifically used for:

[0219] In response to the activity level of the file transfer request being a first preset activity level, the second request type is determined to be a continuous request type;

[0220] If the activity level of the file transfer request is the second preset activity level, then the second request type is determined to be a non-persistent request type.

[0221] In one possible implementation, the determination module 502 is specifically used for:

[0222] Determine the target frequency threshold;

[0223] When the data packet transmission frequency is less than the target frequency threshold and the network request type is a non-persistent request type, the network usage status meets the hotspot shutdown condition.

[0224] In one possible implementation, the determination module 502 is specifically used for:

[0225] Obtain the geographical location information corresponding to the terminal device;

[0226] Identify the current scene corresponding to the terminal device by using geographical location information;

[0227] Based on the current scenario, adjust the preset frequency threshold corresponding to the hotspot shutdown condition to obtain the target frequency threshold.

[0228] In one possible implementation, the determination module 502 is specifically used for:

[0229] Obtain the device identification information corresponding to the connected device;

[0230] The device type corresponding to the connected device is determined by the device identification information;

[0231] Determine the target frequency threshold corresponding to the hotspot shutdown condition based on the device type.

[0232] In one possible implementation, the startup module 505 is specifically used for:

[0233] Send hotspot activation confirmation information to the connected device via a low-power communication module;

[0234] Complete hotspot reconnection with connected devices via wireless communication protocols;

[0235] A hotspot activation notification is sent to the connected device via a low-power communication module.

[0236] The hotspot switch control device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0237] Figure 6This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Please refer to... Figure 6 The electronic device 20 may include a processor 21 and a memory 22. Exemplarily, the processor 21 and the memory 22 are interconnected via a bus 23.

[0238] Memory 22 stores instructions executed by the computer;

[0239] The processor 21 executes computer execution instructions stored in the memory 22, causing the processor 21 to execute the hotspot switch control method as shown in the above method embodiment.

[0240] Electronic devices can include chips, modules, integrated development environments (IDEs), etc.

[0241] Accordingly, this application provides a chip that includes at least one processor, which executes computer execution instructions to implement the hotspot switch control method of the above method embodiments.

[0242] Accordingly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the hotspot switch control method of the above method embodiments.

[0243] Accordingly, embodiments of this application may also provide a computer program product, including a computer program, which, when executed by a processor, can implement the hotspot switch control method shown in the above method embodiments.

[0244] The computer-readable storage medium and computer program product of this application embodiment can execute the above-described information reporting method. The specific implementation process and beneficial effects are described above and will not be repeated here.

[0245] All or part of the steps in the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, it performs the steps of the above-described method embodiments; 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 disk, and any combination thereof.

[0246] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0247] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0248] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0249] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims of this application and their equivalents, this application also intends to include these modifications and variations.

Claims

1. A method for controlling a hotspot switch, characterized in that, include: Monitor the network usage status of connected devices, including data packet transmission frequency and network request type; Based on the network usage status, determine whether the hotspot shutdown conditions are met; When the network usage status meets the hotspot shutdown condition, the hotspot module is triggered to shut down, and the network usage request of the connected device is listened for through the low-power communication module; When a network usage request is detected from the connected device, the hotspot is activated.

2. The method according to claim 1, characterized in that, Monitor the network usage status of connected devices, including: The number of data packets sent or received within a preset time period is determined as the data packet transmission frequency of the connected device, and the data packet transmission frequency is used to measure the intensity of network activity. The network request type of the connected device is determined based on the hypertext transfer request and / or file transfer request of the connected device.

3. The method according to claim 2, characterized in that, Based on the hypertext transfer request and file transfer request of the connected device, the network request type of the connected device is determined, including: Based on the request frequency and duration corresponding to the hypertext transfer request, a first request type is determined, wherein the first request type is a non-persistent request type or a persistent request type. Based on the activity level of the file transfer request, a second request type is determined, wherein the second request type is either the non-persistent request type or the persistent request type; When the first request type or the second request type is the persistent request type, the network request type is determined to be the persistent request type.

4. The method according to claim 3, characterized in that, Based on the request frequency and duration corresponding to the hypertext transfer request, the first request type is determined, including: Obtain the preset frequency threshold and preset duration threshold; In response to the request frequency being less than or equal to the preset frequency threshold and the duration being less than the preset duration threshold, the first request type is determined to be the non-continuous request. In response to the request frequency being greater than or equal to the preset frequency threshold, or the duration being greater than or equal to the preset duration threshold, the first request type is determined to be the continuous request.

5. The method according to claim 3, characterized in that, Based on the activity level of the file transfer request, determine the second request type, including: In response to the activity level of the file transfer request being a first preset activity level, the second request type is determined to be the continuous request type; If the activity level of the file transfer request is a second preset activity level, then the second request type is determined to be the non-persistent request type.

6. The method according to claim 1, characterized in that, Based on the network usage status, determine whether the hotspot shutdown conditions are met, including: Determine the target frequency threshold; When the data packet transmission frequency is less than the target frequency threshold and the network request type is a non-persistent request type, the network usage status meets the hotspot shutdown condition.

7. The method according to claim 6, characterized in that, Determine the preset frequency threshold, including: Obtain the geographical location information corresponding to the terminal device; The current scene corresponding to the terminal device is identified using the geographical location information; Based on the current scenario, adjust the preset frequency threshold corresponding to the hotspot shutdown condition to obtain the target frequency threshold.

8. The method according to claim 6, characterized in that, Determining the target frequency threshold includes: Obtain the device identification information corresponding to the connected device; The device type corresponding to the connected device is determined by the device identification information; Based on the device type, determine the target frequency threshold corresponding to the hotspot shutdown condition.

9. The method according to claim 1, characterized in that, Triggering the activation of the hotspot module includes: The low-power communication module sends a hotspot activation confirmation message to the connected device. Hotspot reconnection with the connected device is completed via wireless communication protocol; The low-power communication module sends a hotspot activation notification to the connected device.

10. An electronic device, characterized in that, include: Processor, memory; The memory stores computer programs; The processor invokes the computer program stored in the memory, causing the electronic device to perform the method according to any one of claims 1 to 9.