WiFi scanning control method, device and equipment
By disabling WiFi scanning by default, scanning is only performed when a high-priority request is received, and then disabled again after the scanning duration exceeds a threshold. This solves the problem of WiFi scanning affecting latency-sensitive applications and achieves the effect of completing network scanning only when necessary.
Patent Information
- Application Number
- CN202411389838.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-07
AI Technical Summary
Existing technologies cannot balance the smoothness of latency-sensitive applications and users' network scanning needs when managing WiFi scanning, especially when users need to switch WiFi networks or locate devices, scanning is prohibited, thus failing to meet the needs.
With WiFi scanning disabled by default, scanning is only performed when a WiFi scanning request with a priority higher than the threshold is received. The scanning function is then disabled again after the scanning time exceeds the threshold. Through fast scanning and timer control, network scanning is ensured to be completed when necessary.
It reduces unnecessary network latency, ensuring that users can complete network scans smoothly when needed, and improves the smoothness and operational efficiency of latency-sensitive applications.
Smart Images

Figure CN119277476A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of terminal technology, and specifically relates to a WiFi scanning control method, device and equipment. Background Art
[0002] Nowadays, with the popularity of smart terminals and wireless networks, some applications have higher requirements for latency and accuracy, such as real-time online games, video calls, virtual reality and other applications that require real-time response. In these applications, WiFi scanning may introduce latency and affect the performance of the application. Therefore, WiFi scanning needs to be controlled according to actual needs.
[0003] When managing WiFi scanning, existing electronic devices usually completely prohibit all types of WiFi scanning during the operation of these applications. Although this approach can reduce network latency, it also brings new problems: if users have strong network scanning needs when using these applications, such as switching to a WiFi network with a more stable signal, or needing to locate the device based on the WiFi network, the device cannot perform WiFi scanning because scanning is prohibited, thus failing to balance the smoothness of application operation and the user's WiFi scanning needs. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a WiFi scanning control method, device and equipment, which can not only reduce unnecessary network delays, but also ensure that users can successfully complete network scanning when needed, thereby meeting the user's WiFi scanning needs.
[0005] In a first aspect, an embodiment of the present application provides a WiFi scanning control method, the method comprising:
[0006] When the WiFi scanning function is disabled and a WiFi scanning request message with a priority higher than a priority threshold is received, WiFi scanning is performed;
[0007] When the scanning duration of the WiFi scan exceeds the duration threshold, the WiFi scan function is disabled.
[0008] In a second aspect, an embodiment of the present application provides a WiFi scanning control device, the device comprising:
[0009] A scanning module, configured to perform WiFi scanning when a WiFi scanning function is disabled and a WiFi scanning request message having a priority higher than a priority threshold is received;
[0010] The prohibition module is used to prohibit the WiFi scanning function when the scanning time of the WiFi scanning exceeds the time threshold.
[0011] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method provided in the first aspect are implemented.
[0012] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method provided in the first aspect are implemented.
[0013] In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the method provided in the first aspect.
[0014] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method provided in the first aspect.
[0015] In the WiFi scanning control method, device and equipment of the present application, when the WiFi scanning function is disabled by default, the system can only respond to requests with a priority higher than a threshold and perform WiFi scanning, and disable the Wi-Fi scanning function again when the scanning duration exceeds the duration threshold. In this way, only when a WiFi scanning request message with a higher priority is initiated, a short WiFi scan is allowed within the specified time window. In this way, unnecessary network delays can be reduced, and it can ensure that the user can successfully complete the network scan when needed, thereby meeting the user's WiFi scanning needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a flowchart of a WiFi scanning control method provided by some embodiments of the present application;
[0017] Figure 2 is a structural schematic diagram of a WiFi scanning control device provided in some embodiments of the present application;
[0018] Figure 3 is a schematic diagram of the structure of an electronic device provided by some embodiments of the present application;
[0019] Figure 4 It is a schematic diagram of the hardware structure of the electronic device provided in some embodiments of the present application. DETAILED DESCRIPTION
[0020] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0021] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0022] The present application provides a WiFi scanning control method. The WiFi scanning control method provided by the embodiment of the present application is described in detail below through specific embodiments and application scenarios in conjunction with the accompanying drawings.
[0023] Wireless Fidelity (WiFi) is a wireless communication technology that allows electronic devices to connect to the Internet and other networks through wireless signals.
[0024] WiFi scanning refers to an electronic device searching and detecting nearby wireless network signals to identify available WiFi networks and obtain their WiFi information. The WiFi information may include the network name and signal strength.
[0025] The WiFi ID refers to the name of the wireless network, namely the SSID (Service Set Identifier). It is used to uniquely identify a WiFi network, allowing users to identify and select the network they want to connect to.
[0026] The WiFi framework refers to the system components that manage and control Wi-Fi connections, scanning, and communications.
[0027] A game engine is a software development platform that provides the tools and libraries needed to build and run video games, including graphics rendering, physics simulation, audio processing, and networking capabilities.
[0028] It should be noted that the WiFi scanning control method provided in the embodiments of the present application can be executed by electronic devices such as mobile phones, tablet computers, laptop computers, PDAs, and vehicle-mounted electronic devices. In some embodiments of the present application, the WiFi scanning control method provided in the embodiments of the present application is described by taking the electronic device as the execution subject to execute the WiFi scanning control method as an example.
[0029] The WiFi scanning control method provided in the embodiments of the present application can be applied to delay-sensitive scenarios, wherein one specific application scenario is an online gaming scenario, and another specific application scenario is a video call scenario.
[0030] like Figure 1 As shown, Figure 1 : is a flow chart of a WiFi scanning control method provided by an embodiment of the present application. The embodiment of the present application provides a WiFi scanning control method, which may include:
[0031] Step 101, when the WiFi scanning function is disabled and a WiFi scanning request message with a priority higher than a priority threshold is received, WiFi scanning is performed;
[0032] In some embodiments of the present application, the electronic device may be a device such as a smart phone, a laptop computer, or a tablet computer that can be connected to a Wireless Fidelity (WiFi) network.
[0033] The system can monitor the status of each application currently running in the electronic device through the Application Programming Interface (API) or service to determine whether it is running in the foreground. When it is detected that the target application is running in the foreground of the electronic device, it means that the target application is the main application currently being used by the user, and the system needs to prioritize the allocation of resources to the target application to ensure its smooth operation. Among them, the target application is an application that is sensitive to delays. For example, the target application can be an application that requires higher network stability and network fluency during operation, such as a game application or a video call application.
[0034] Since WiFi scanning will cause a large delay, in order to avoid the delay caused by WiFi scanning interfering with the operation of the target application, when the target application is running in the foreground, the system of the electronic device will automatically prohibit WiFi scanning.
[0035] For example, a target application list can be set in advance, and the target application list can be a string array, in which the application names of all target applications are stored. Only when the target application in the target application list is running in the foreground, WiFi scanning needs to be prohibited. Then, every time a user opens an application and runs it in the foreground, the application name of the application can be obtained, and then the target application list is searched to see whether the application name is included in the target application list. If the application name is included in the target application list, the application running in the foreground is considered to be the target application, and WiFi scanning is prohibited; if the application name is not included in the target application list, the application running in the foreground is considered not to be the target application, and WiFi scanning does not need to be prohibited.
[0036] Taking the target applications as game applications and video call applications as an example, when the game application is detected to be running in the foreground of the electronic device, the electronic device will automatically enter the game mode and automatically prohibit WiFi scanning in the game mode. That is, the electronic device is prevented from automatically searching for nearby WiFi networks, because WiFi scanning will switch channels, causing network delays and affecting the gaming experience. Similarly, when the video call application is detected to be running in the foreground of the electronic device, the electronic device will also prohibit WiFi scanning.
[0037] Among them, the method of disabling WiFi scanning can include adjusting the settings of the WiFi module in the electronic device, such as setting the scanning flag of the WiFi game mode to a disabled mode to turn off the scanning function. The WiFi scanning function can also be directly disabled by using a system command, such as by inputting a command to turn off scanning.
[0038] After the WiFi scan is disabled, the WiFi scan is usually blocked, and the WiFi scan is performed only when the system receives a WiFi scan request message with a priority higher than the priority threshold.
[0039] For example, in a video call scenario using a video call application, if the user wants to switch networks, the user can manually switch the WiFi network. When manually switching the WiFi network, the system generates a WiFi scan request message with a priority higher than the priority threshold, and the electronic device will perform a WiFi scan. For another example, in a scenario where the user is playing an online game using a game application, if the user needs to locate via WiFi, the system can also generate a WiFi scan request message with a priority higher than the priority threshold during the positioning process, and the electronic device will perform a WiFi scan.
[0040] Step 102: When the scanning duration of the WiFi scanning exceeds the duration threshold, the WiFi scanning function is disabled.
[0041] In this embodiment, when the WiFi scanning function is disabled and a WiFi scanning request message with a priority higher than the priority threshold is received, WiFi scanning is only allowed within a limited time window to obtain a scanning result, and the limited time window is a time length threshold, and the time length threshold can be 20 seconds or 10 seconds. The scanning result can include available WiFi network information, such as network name (SSID), signal strength, encryption type, etc.
[0042] Taking the duration threshold of 20 seconds as an example, when obtaining a target scan request, a timer can be set. The duration is the duration threshold. Within the timer duration, multiple scans can be initiated to obtain scan results. After the timer times out, the WiFi scan function is disabled again to ensure that the target application running in the foreground can continue to obtain a stable network connection without unnecessary scanning interference.
[0043] In this application, when the WiFi scanning function is disabled by default, the system can only respond to requests with a priority higher than the threshold and perform WiFi scanning, and disable the Wi-Fi scanning function again when the scanning duration exceeds the duration threshold. In this way, only when a WiFi scanning request message with a higher priority is initiated, a short WiFi scan is allowed within the specified time window. In this way, unnecessary network delays can be reduced, and the user can be ensured to successfully complete the network scan when needed, thereby meeting the user's WiFi scanning needs.
[0044] In some embodiments, in the case of acquiring a target scanning request, in the case of a WiFi scanning function being disabled and a WiFi scanning request message having a priority higher than a priority threshold being received, performing WiFi scanning includes:
[0045] In a case where the WiFi scanning function is disabled and a control input to the WiFi scanning control is received, determining that a WiFi scanning request message having a priority higher than a priority threshold is received;
[0046] Perform a WiFi scan.
[0047] In this embodiment, when the user inputs into the status bar or quick launch bar of the electronic device, the system will respond to the input and display a setting interface. The setting interface includes a displayed WiFi scanning control. The WiFi scanning control can be a WiFi switch or a WiFi icon. The user can further control the WiFi scanning control in the setting interface, and the system can respond to the control input, that is, it can generate a WiFi scanning request message with a priority higher than the priority threshold, and then start scanning nearby available WiFi networks.
[0048] In this way, even when the WiFi scanning function is disabled, the user can still easily and quickly trigger the WiFi scanning by controlling the WiFi scanning control input.
[0049] In some embodiments, after performing the WiFi scan, the method further includes:
[0050] Displaying a WiFi scan result, wherein the scan result includes at least one WiFi identifier, and a WiFi identifier indicates a scanned WiFi network;
[0051] receiving an identifier selection input for one of the at least one WiFi identifier;
[0052] In response to the identifier selection input, connecting to a WiFi network indicated by the WiFi identifier selected by the identifier selection input.
[0053] In this embodiment, after the user generates a WiFi scan request message with a priority higher than the priority threshold by controlling the WiFi scan control, the system can perform WiFi scanning within the duration threshold to obtain a scan result. After the scan is completed, the system will display the WiFi scan result. For example, the WiFi scan result can be a list of scanned WiFi, and the WiFi list includes at least one WiFi identifier, and each WiFi identifier corresponds to an available WiFi network. Subsequently, the user can select a WiFi identifier from the displayed WiFi list for selection input. In response to the selection input, the system will switch the WiFi currently connected to the electronic device to the WiFi network indicated by the WiFi identifier selected by the selection input.
[0054] As an optional embodiment, the WiFi scanning function is prohibited during the operation of the game application. When the game application is detected to be running in the foreground of the electronic device, the electronic device enters the game mode, and WiFi scanning is prohibited in the game mode. If the user encounters network jams in the game application and wants to switch the connected WiFi network, the status bar of the electronic device can be pulled down through the first input, the setting interface can be opened, and the WiFi scanning control in the setting interface can be controlled and input to open the WiFi list to switch the WiFi network. At this time, the system recognizes that the user's network switching demand is a strong demand, that is, the priority of the WiFi scanning request message is higher than the priority threshold, so WiFi scanning is allowed and a 20-second timer is started. After the WiFi scan within 20 seconds is completed, the user can select and connect to a new WiFi network from the WiFi list. After the 20-second timeout, the system prohibits WiFi scanning again to ensure the smoothness of the game.
[0055] As another optional embodiment, the WiFi scanning function is prohibited during the operation of the video call application. When it is detected that the video call application is running in the foreground of the electronic device, the electronic device prohibits WiFi scanning. If the user feels that the network is stuck during the video call and wants to switch the connected WiFi network, the user can pull down the quick launch bar of the electronic device through the first input, and control the WiFi scan control in the quick launch bar to open the WiFi list to switch the WiFi network. At this time, the system generates a WiFi scan request message, and the priority of the WiFi scan request message is higher than the priority threshold, so WiFi scanning is allowed and a 30-second timer is started. After the WiFi scan within 30 seconds is completed, the user selects and connects to a new WiFi network from the WiFi list. After the 30-second timeout, the system prohibits WiFi scanning again to ensure the smoothness of the video call.
[0056] In this embodiment, even when the target application is running and WiFi scanning is prohibited, the user can still easily trigger WiFi scanning by input and complete the connection in a short time, thereby improving the operation efficiency. At the same time, the scanning is only triggered within the time threshold, thereby reducing unnecessary network resource consumption.
[0057] In some embodiments, when the WiFi scanning function is disabled and a WiFi scanning request message having a priority higher than a priority threshold is received, performing WiFi scanning includes:
[0058] When the WiFi scanning function is disabled and a team trigger input is received for a game application running in the foreground, the game engine of the game application sends a WiFi scanning request message to the WiFi framework;
[0059] The WiFi framework, when receiving the WiFi scan request message, determines that a WiFi scan request message having a priority higher than a priority threshold is received;
[0060] Perform a WiFi scan.
[0061] In this embodiment, when the target application running on the current stage is a game application, the WiFi scanning function is disabled. The user can directly input a team formation trigger in the game application to trigger a team formation request message. Since the user needs to determine the geographical location of the user's electronic device when forming a team, the player in the same or nearby area is automatically identified, and the users in the same area are automatically assigned to the same team. The determination of the geographical location of the electronic device depends on the scanning result of the WiFi scan.
[0062] Therefore, after the game engine of the game application receives the team request message corresponding to the team trigger input, it can generate a WiFi scan request message based on the team request message and send the WiFi scan request message to the WiFi framework. After the WiFi framework receives the WiFi scan request message, it can determine whether the priority of the WiFi scan request message is higher than the priority threshold. If the priority of the WiFi scan request message is higher than the priority threshold, perform a WiFi scan.
[0063] In the above manner, even if the Wi-Fi scanning function is disabled, the system can still promptly identify and process high-priority WiFi scanning requests when receiving a team formation request from the foreground game application, thereby ensuring that users can quickly find an available network to complete the team formation.
[0064] In some embodiments, after performing the WiFi scan, the method further includes:
[0065] Determine the scanning geographic location according to the scanning result of the WiFi scan;
[0066] sending the scanned geographic location as auxiliary positioning information to the game application;
[0067] The game application determines a team formation space range according to the auxiliary positioning information, where the team formation space range is a space range centered on the scanned geographical location;
[0068] At least one game user within the team formation space is added to the same game queue.
[0069] In this embodiment, in response to the WiFi scan request message sent by the game engine, after performing a WiFi scan, the scanning result of the WiFi scan can be obtained. The scanning geographical location of the electronic device can be determined based on the scanning result, and then the determined scanning geographical location can be sent to the game application as auxiliary positioning information. The game application defines a teaming space range centered on the scanning geographical location based on the received auxiliary positioning information. The teaming space range can be used to screen nearby users, and users whose electronic devices are within the teaming space range are automatically assigned to the same game queue to achieve automatic teaming.
[0070] As an optional embodiment, when it is detected that the game application is running in the foreground of the electronic device, the electronic device enters the game mode, and WiFi scanning is prohibited in the game mode. If the user wants to team up with nearby players in the game application, the players who want to team up can all initiate a team request message through the team trigger input, and the game engine will generate a WiFi scan request message with a priority higher than the priority threshold based on the team request message. Therefore, the system allows WiFi scanning and starts a 20-second timer. After the WiFi scan within 20 seconds is completed, the game engine can locate the user according to the scan results, obtain the scanned geographical location of each electronic device, and assign users within the team space range to the same game queue. After the 20-second timeout, the system prohibits WiFi scanning again to ensure the smoothness of the game.
[0071] In this embodiment, the user location is automatically determined through WiFi scanning, and then users in the same area are grouped together, which improves the efficiency of teaming. It automatically assigns nearby users to the same game queue, reducing the complexity of manual teaming.
[0072] In some embodiments, after prohibiting WiFi scanning when detecting that the target application is running in the foreground of the electronic device, the method further includes:
[0073] When the WiFi scanning function is disabled and a WiFi scanning request message with a priority lower than a priority threshold is received, the WiFi scanning request message is rejected.
[0074] In this embodiment, when the electronic device detects a WiFi scan request message with a priority lower than the priority threshold, the system will reject these WiFi scan request messages and will not perform the WiFi scan operation. Specifically, the WiFi scan request message with a priority lower than the priority threshold may include a specific network protocol scan and a periodic scan request initiated by a non-target application or system. Among them, the specific network protocol scan may include an OBSS Scan and an Action frame.
[0075] Through the above method, it is possible to avoid unnecessary scanning affecting the operation of the target application, ensure the smooth operation of high-priority target applications, and reduce network delays.
[0076] In some embodiments, performing WiFi scanning includes:
[0077] Perform a WiFi scan on each WiFi channel at the first dwell time;
[0078] The first dwell time is less than the second dwell time, the second dwell time is the channel dwell time in the slow WiFi scanning mode, and the first dwell time is the channel dwell time in the fast WiFi scanning mode.
[0079] In this embodiment, compared with the conventional slow WiFi scanning mode, the WiFi scanning in this embodiment is performed in a fast scanning manner. In the conventional slow WiFi scanning mode, the stay on each WiFi channel is for the second stay time, while the WiFi scanning in this embodiment only needs to stay on each channel for the first stay time. Since the second stay time is longer than the first stay time, the WiFi scanning mode in this embodiment reduces the delay of switching channels through fast scanning.
[0080] In addition, in the WiFi scanning mode of this embodiment, each time a channel is scanned, it may return to the original channel for a short time to transmit data, and then continue to scan other channels.
[0081] Through the above method, the interference of WiFi scanning on the system and network can be reduced by shortening the device's residence time on each channel, thereby ensuring the smooth operation of the target application.
[0082] In some embodiments, after performing the WiFi scan, the method further includes:
[0083] Disable WiFi scanning when an application with network latency below the latency threshold is running in the foreground.
[0084] In this embodiment, since the application running in the foreground is a delay-sensitive application, such application has high requirements for delay and accuracy. Therefore, after performing WiFi scanning, if it is detected that the network delay of the application running in the foreground is lower than the set delay threshold, the system will automatically disable the WiFi scanning function. In this way, the network interference of WiFi scanning on the application is reduced, ensuring the performance and fluency of the application.
[0085] This can effectively reduce network interference and ensure smooth operation of applications running in the foreground. This not only optimizes resource usage, but is also especially suitable for scenarios with high real-time requirements, such as online games and video calls, and avoids unnecessary network fluctuations caused by WiFi scanning, which can cause delays and freezes.
[0086] In some embodiments, when an application with a network delay lower than a delay threshold is running in the foreground, after disabling WiFi scanning, the method further includes:
[0087] When the application is switched to background operation or closed, the WiFi scanning function is enabled.
[0088] In this embodiment, when the target application is running in the foreground of the electronic device, the system will prohibit WiFi scanning to reduce network latency and ensure smooth operation of the target application. Once it is detected that the target application is switched to the background or closed, the system will resume allowing WiFi scanning and allow the electronic device to perform regular network search and switching operations.
[0089] In this way, when the target application is running in the foreground, the network delay caused by WiFi scanning is reduced to ensure the smoothness of the target application, and WiFi scanning is resumed after the target application is switched to the background or closed to ensure the normal network function and resource utilization of the device.
[0090] Figure 2 is a structural diagram of a WiFi scanning control device provided by another embodiment of the present application, such as Figure 2 As shown, the WiFi scanning control device may include:
[0091] The scanning module 201 is used to perform WiFi scanning when the WiFi scanning function is disabled and a WiFi scanning request message with a priority higher than a priority threshold is received;
[0092] The prohibition module 202 is used to prohibit the WiFi scanning function when the scanning duration of the WiFi scanning exceeds the duration threshold.
[0093] In this application, when the WiFi scanning function is disabled by default, the system can only respond to requests with a priority higher than the threshold and perform WiFi scanning, and disable the Wi-Fi scanning function again when the scanning duration exceeds the duration threshold. In this way, only when a WiFi scanning request message with a higher priority is initiated, a short WiFi scan is allowed within the specified time window. In this way, unnecessary network delays can be reduced, and the user can be ensured to successfully complete the network scan when needed, thereby meeting the user's WiFi scanning needs.
[0094] In another optional example, the scanning module 201 is specifically used for:
[0095] In a case where the WiFi scanning function is disabled and a control input to the WiFi scanning control is received, determining that a WiFi scanning request message having a priority higher than a priority threshold is received;
[0096] Perform a WiFi scan.
[0097] In another optional example, the WiFi scanning control device further includes:
[0098] A display module, used to display WiFi scanning results, wherein the scanning results include at least one WiFi identifier, and a WiFi identifier indicates a scanned WiFi network;
[0099] A receiving module, configured to receive an input of selecting a WiFi identifier among the at least one WiFi identifier;
[0100] The connection module is used to connect to the WiFi network indicated by the WiFi identifier selected by the identifier selection input in response to the identifier selection input.
[0101] In another optional example, the scanning module 201 is specifically used for:
[0102] When the WiFi scanning function is disabled and a team trigger input is received for a game application running in the foreground, the game engine of the game application sends a WiFi scanning request message to the WiFi framework;
[0103] The WiFi framework, when receiving the WiFi scan request message, determines that a WiFi scan request message having a priority higher than a priority threshold is received;
[0104] Perform a WiFi scan.
[0105] In another optional example, the WiFi scanning control device includes:
[0106] A determination module, used to determine a scanned geographic location according to a scan result of a WiFi scan;
[0107] A sending module, used for sending the scanned geographic location as auxiliary positioning information to the game application;
[0108] The determination module is further configured to enable the game application to determine a team formation space range according to the auxiliary positioning information, wherein the team formation space range is a space range centered on the scanned geographic location;
[0109] The adding module is used to add at least one game user within the team formation space to the same game queue.
[0110] In another optional example, the WiFi scanning control device further includes:
[0111] The rejection module is used to reject the WiFi scanning request message when the WiFi scanning function is disabled and a WiFi scanning request message with a priority lower than the priority threshold is received.
[0112] In another optional example, the scanning module 201 is specifically used to perform WiFi scanning on each WiFi channel with a first dwell time;
[0113] The first dwell time is less than the second dwell time, the second dwell time is the channel dwell time in the slow WiFi scanning mode, and the first dwell time is the channel dwell time in the fast WiFi scanning mode.
[0114] In another optional example, the WiFi scanning control device further includes:
[0115] A prohibition module is used to prohibit the WiFi scanning function when an application with a network latency below the latency threshold is running in the foreground.
[0116] In another optional example, the WiFi scanning control device further includes:
[0117] The recovery module is used to enable the WiFi scanning function when the application is switched to the background running or closed state.
[0118] The WiFi scanning control device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application is not specifically limited.
[0119] The WiFi scanning control device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0120] The WiFi scanning control device provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0121] Alternatively, if Figure 3 As shown, the embodiment of the present application also provides an electronic device 100, including a processor 110, a memory 119, and a program or instruction stored in the memory 119 and executable on the processor 110. When the program or instruction is executed by the processor 110, each process of the above-mentioned WiFi scanning control method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0122] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0123] Please refer to Figure 4 , Figure 4 The hardware structure diagram of an electronic device for implementing an embodiment of the present application is shown in FIG. The electronic device 100 includes, but is not limited to, a radio frequency unit 121, a network module 122, an audio output unit 123, an input unit 124, a sensor 125, a display unit 126, a user input unit 127, an interface unit 128, a memory 129, and a processor 120.
[0124] Those skilled in the art will appreciate that the electronic device 100 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 120 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 4 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0125] The processor 120 is configured to perform a WiFi scan when the WiFi scan function is disabled and a WiFi scan request message having a priority higher than a priority threshold is received;
[0126] The processor 120 is configured to disable the WiFi scanning function when the scanning duration of the WiFi scanning exceeds a duration threshold.
[0127] In this application, when the WiFi scanning function is disabled by default, the system can only respond to requests with a priority higher than the threshold and perform WiFi scanning, and disable the Wi-Fi scanning function again when the scanning duration exceeds the duration threshold. In this way, only when a WiFi scanning request message with a higher priority is initiated, a short WiFi scan is allowed within the specified time window. In this way, unnecessary network delays can be reduced, and the user can be ensured to successfully complete the network scan when needed, thereby meeting the user's WiFi scanning needs.
[0128] In another optional example, the processor 120 is specifically configured to:
[0129] In a case where the WiFi scanning function is disabled and a control input to the WiFi scanning control is received, determining that a WiFi scanning request message having a priority higher than a priority threshold is received;
[0130] Perform a WiFi scan.
[0131] In another optional example, the display unit 126 is used to display a WiFi scan result, wherein the scan result includes at least one WiFi identifier, and a WiFi identifier indicates a scanned WiFi network;
[0132] The processor 120 is configured to receive an input for selecting a WiFi identifier among the at least one WiFi identifier;
[0133] The processor 120 is configured to connect to the WiFi network indicated by the WiFi identifier selected by the identifier selection input in response to the identifier selection input.
[0134] In another optional example, the processor 120 is specifically configured to:
[0135] When the WiFi scanning function is disabled and a team trigger input is received for a game application running in the foreground, the game engine of the game application sends a WiFi scanning request message to the WiFi framework;
[0136] The WiFi framework, when receiving the WiFi scan request message, determines that a WiFi scan request message having a priority higher than a priority threshold is received;
[0137] Perform a WiFi scan.
[0138] In another optional example, the processor 120 is further configured to:
[0139] Determine the scanning geographic location according to the scanning result of the WiFi scan;
[0140] sending the scanned geographic location as auxiliary positioning information to the game application;
[0141] The game application determines a team formation space range according to the auxiliary positioning information, where the team formation space range is a space range centered on the scanned geographical location;
[0142] At least one game user within the team formation space is added to the same game queue.
[0143] In another optional example, the processor 120 is further configured to: when the WiFi scanning function is disabled and a WiFi scanning request message with a priority lower than a priority threshold is received, reject the WiFi scanning request message.
[0144] In another optional example, the processor 120 is further configured to perform a WiFi scan on each WiFi channel with a first dwell time;
[0145] The first dwell time is less than the second dwell time, the second dwell time is the channel dwell time in the slow WiFi scanning mode, and the first dwell time is the channel dwell time in the fast WiFi scanning mode.
[0146] In another optional example, the processor 120 is configured to disable the WiFi scanning function when an application whose network delay is lower than a delay threshold is running in the foreground.
[0147] In another optional example, the processor 120 is used to enable the WiFi scanning function when the application is switched to background running or closed.
[0148] It should be understood that in the embodiment of the present application, the input unit 124 may include a graphics processor (Graphics Processing Unit, GPU) 1241 and a microphone 1242, and the graphics processor 1241 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 126 may include a display panel 1261, and the display panel 1261 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 127 includes a touch panel 1271 and at least one of other input devices 1272. The touch panel 1271 is also called a touch screen. The touch panel 1271 may include two parts: a touch detection device and a touch controller. Other input devices 1272 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0149] The memory 129 can be used to store software programs and various data. The memory 129 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 129 may include a volatile memory or a non-volatile memory, or the memory 129 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 129 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0150] The processor 120 may include one or more processing units; optionally, the processor 120 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 120.
[0151] The embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned WiFi scanning control method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0152] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0153] The embodiment of the present application further provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned WiFi scanning control method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0154] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0155] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned WiFi scanning control method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0156] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0157] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0158] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A WiFi scanning control method, characterized in that: include: When the WiFi scanning function is disabled and a WiFi scanning request message with a priority higher than a priority threshold is received, WiFi scanning is performed; When the scanning duration of the WiFi scan exceeds the duration threshold, the WiFi scan function is disabled.
2. The method according to claim 1, characterized in that The performing of WiFi scanning when the WiFi scanning function is disabled and a WiFi scanning request message having a priority higher than a priority threshold is received includes: In a case where the WiFi scanning function is disabled and a control input to the WiFi scanning control is received, determining that a WiFi scanning request message having a priority higher than a priority threshold is received; Perform a WiFi scan.
3. The method according to claim 2, characterized in that After the WiFi scan is performed, the method further includes: Displaying a WiFi scan result, wherein the scan result includes at least one WiFi identifier, and a WiFi identifier indicates a scanned WiFi network; receiving an identifier selection input for one of the at least one WiFi identifier; In response to the identifier selection input, connecting to a WiFi network indicated by the WiFi identifier selected by the identifier selection input.
4. The method according to claim 1, characterized in that: The performing of WiFi scanning when the WiFi scanning function is disabled and a WiFi scanning request message having a priority higher than a priority threshold is received includes: When the WiFi scanning function is disabled and a team trigger input is received for a game application running in the foreground, the game engine of the game application sends a WiFi scanning request message to the WiFi framework; The WiFi framework, when receiving the WiFi scan request message, determines that a WiFi scan request message having a priority higher than a priority threshold is received; Perform a WiFi scan.
5. The method according to claim 4, characterized in that After the WiFi scan is performed, the method further includes: Determine the scanning geographic location according to the scanning result of the WiFi scan; sending the scanned geographic location as auxiliary positioning information to the game application; The game application determines a team formation space range according to the auxiliary positioning information, where the team formation space range is a space range centered on the scanned geographical location; At least one game user within the team formation space is added to the same game queue.
6. The method according to claim 1, characterized in that The method further comprises: When the WiFi scanning function is disabled and a WiFi scanning request message with a priority lower than a priority threshold is received, the WiFi scanning request message is rejected.
7. The method according to claim 1, characterized in that The WiFi scanning comprises: Perform a WiFi scan on each WiFi channel at the first dwell time; The first dwell time is less than the second dwell time, the second dwell time is the channel dwell time in the slow WiFi scanning mode, and the first dwell time is the channel dwell time in the fast WiFi scanning mode.
8. The method according to claim 1, characterized in that After the WiFi scan is performed, the method further includes: Disable WiFi scanning when an application with network latency below the latency threshold is running in the foreground.
9. The method according to claim 8, characterized in that After prohibiting WiFi scanning when an application with a network delay lower than a delay threshold is run in the foreground, the method further includes: When the application is switched to background operation or closed, the WiFi scanning function is enabled.
10. A WiFi scanning control device, characterized in that: include: A scanning module, configured to perform WiFi scanning when a WiFi scanning function is disabled and a WiFi scanning request message having a priority higher than a priority threshold is received; The prohibition module is used to prohibit the WiFi scanning function when the scanning time of the WiFi scanning exceeds the time threshold.
11. The device according to claim 10, characterized in that The scanning module is specifically used for: In a case where the WiFi scanning function is disabled and a control input to the WiFi scanning control is received, determining that a WiFi scanning request message having a priority higher than a priority threshold is received; Perform a WiFi scan.
12. The device according to claim 11, characterized in that The WiFi scanning control device comprises: A display module, used to display WiFi scanning results, wherein the scanning results include at least one WiFi identifier, and a WiFi identifier indicates a scanned WiFi network; A receiving module, configured to receive an input of selecting a WiFi identifier among the at least one WiFi identifier; The connection module is used to connect to the WiFi network indicated by the WiFi identifier selected by the identifier selection input in response to the identifier selection input.
13. The device according to claim 10, characterized in that The scanning module is specifically used for: When the WiFi scanning function is disabled and a team trigger input is received for a game application running in the foreground, the game engine of the game application sends a WiFi scanning request message to the WiFi framework; The WiFi framework, when receiving the WiFi scan request message, determines that a WiFi scan request message having a priority higher than a priority threshold is received; Perform a WiFi scan.
14. The device according to claim 13, characterized in that The WiFi scanning control device comprises: A determination module, used to determine a scanned geographic location according to a scan result of a WiFi scan; A sending module, used for sending the scanned geographic location as auxiliary positioning information to the game application; The determination module is further configured to enable the game application to determine a team formation space range according to the auxiliary positioning information, wherein the team formation space range is a space range centered on the scanned geographic location; The adding module is used to add at least one game user within the team formation space to the same game queue.
15. The device according to claim 10, characterized in that The WiFi scanning control device also includes: The rejection module is used to reject the WiFi scanning request message when the WiFi scanning function is disabled and a WiFi scanning request message with a priority lower than the priority threshold is received.
16. The device according to claim 8, characterized in that The scanning module is specifically used to perform WiFi scanning on each WiFi channel with a first dwell time; The first dwell time is less than the second dwell time, the second dwell time is the channel dwell time in the slow WiFi scanning mode, and the first dwell time is the channel dwell time in the fast WiFi scanning mode.
17. The device according to claim 8, characterized in that The WiFi scanning control device also includes: A prohibition module is used to prohibit the WiFi scanning function when an application with a network latency below the latency threshold is running in the foreground.
18. The device according to claim 17, characterized in that The WiFi scanning control device also includes: The recovery module is used to enable the WiFi scanning function when the application is switched to the background running or closed state.
19. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the WiFi scanning control method according to any one of claims 1 to 9 are implemented.
Citation Information
Cited By
WIFI scanning control method and apparatus, and device
WO2026067495A1