WIFI scanning control method and apparatus, and device
By disabling WiFi scanning by default and only performing WiFi scanning when a request with a priority higher than the threshold is received, and disabling it again when the scanning time exceeds the threshold, the interference of WiFi scanning on latency-sensitive applications is resolved, achieving fast network scanning and smooth operation when needed.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-09-25
- Publication Date
- 2026-04-02
AI Technical Summary
Existing technologies cannot balance the smoothness of latency-sensitive applications and users' WiFi scanning needs when managing WiFi scanning, resulting in increased network latency and failing to meet users' network scanning requirements.
With WiFi scanning disabled by default, WiFi scanning is only performed when a WiFi scanning request message with a priority higher than the threshold is received, and the scanning function is disabled again when the scanning duration exceeds the duration threshold. WiFi scanning can be controlled by setting the priority threshold and the duration threshold.
It reduces unnecessary network latency, ensuring that users can successfully complete network scans when needed, meeting users' WiFi scanning needs, while optimizing resource usage, especially in scenarios with high real-time requirements such as online games and video calls, avoiding latency and lag caused by network fluctuations during WiFi scanning.
Smart Images

Figure CN2025123825_02042026_PF_FP_ABST
Abstract
Description
WiFi scan control method, apparatus and device
[0001] Cross-reference to Related Applications
[0002] This application claims priority to Chinese Patent Application No. 202411389838.4, filed on September 30, 2024, entitled “WiFi scan control method, apparatus and device”, the entire contents of which are incorporated herein by reference. TECHNICAL FIELD
[0003] The present application belongs to the technical field of terminals, and specifically relates to a WiFi scan control method, apparatus and device. BACKGROUND
[0004] Nowadays, with the popularity of intelligent terminals and wireless networks, some applications have higher requirements for latency and accuracy, such as real-time online games, video calls, virtual reality and some other applications that require real-time response. In these applications, wireless fidelity (WiFi) scanning may introduce latency, affecting the performance of the application. Therefore, it is necessary to control WiFi scanning according to actual needs.
[0005] However, the existing electronic devices usually completely prohibit all types of WiFi scanning during the running of these applications when managing WiFi scanning. Although this approach can reduce network latency, it also brings new problems: if the user has a strong network scanning demand when using these applications, for example, needs to switch to a WiFi network with more stable signal or needs to perform device positioning based on the WiFi network, the device cannot perform WiFi scanning due to the prohibition of scanning, thereby failing to balance the smoothness of application running and the user's WiFi scanning demand. SUMMARY
[0006] The purpose of the embodiments of the present application is to provide a WiFi scan control method, apparatus and device, which can not only reduce unnecessary network latency, but also ensure that the user can successfully complete network scanning when needed, thereby meeting the user's WiFi scanning demand.
[0007] In a first aspect, the embodiments of the present application provide a WiFi scan control method, which comprises:
[0008] In the case that the WiFi scanning function is prohibited and a WiFi scanning request message with a priority higher than a priority threshold is received, performing WiFi scanning.
[0009] In the case that the scanning duration of the WiFi scanning exceeds a duration threshold, prohibiting the WiFi scanning function.
[0010] In a second aspect, an embodiment of the present application provides a WiFi scanning control apparatus, which comprises:
[0011] a scanning module, configured 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;
[0012] a disabling module, configured to disable the WiFi scanning function when a scanning duration of the WiFi scanning exceeds a duration threshold.
[0013] In a third aspect, an embodiment of the present application provides an electronic device, which comprises a processor and a memory. The memory stores programs or instructions executable on the processor. When the programs or instructions are executed by the processor, the steps of the WiFi scanning control method provided in the first aspect are implemented.
[0014] In a fourth aspect, an embodiment of the present application provides a readable storage medium. The readable storage medium stores programs or instructions. When the programs or instructions are executed by a processor, the steps of the WiFi scanning control method provided in the first aspect are implemented.
[0015] In a fifth aspect, an embodiment of the present application provides a chip. The chip comprises a processor and a communication interface. The communication interface is coupled to the processor. The processor is configured to execute programs or instructions, so as to implement the steps of the WiFi scanning control method provided in the first aspect.
[0016] In a sixth aspect, an embodiment of the present application provides a computer program product. The program product is stored in a storage medium. The program product is executed by at least one processor to implement the steps of the WiFi scanning control method provided in the first aspect.
[0017] In the WiFi scanning control method, apparatus and device, the WiFi scanning function is disabled by default. The system responds to a request with a priority higher than a threshold and performs WiFi scanning. When the scanning duration exceeds a duration threshold, the WiFi scanning function is disabled again. In this way, WiFi scanning is allowed for a short time within a specified time window only when a WiFi scanning request message with a high priority is initiated. In this way, unnecessary network delay is reduced, and the user can successfully complete network scanning when needed, thereby meeting the WiFi scanning demand of the user. BRIEF DESCRIPTION OF DRAWINGS
[0018] FIG. 1 is a flowchart of a WiFi scanning control method according to some embodiments of the present application;
[0019] FIG. 2 is a structural diagram of a WiFi scanning control apparatus according to some embodiments of the present application;
[0020] FIG. 3 is a structural schematic diagram of an electronic device according to some embodiments of the present application;
[0021] FIG. 4 is a hardware structural schematic diagram of an electronic device according to some embodiments of the present application. DETAILED DESCRIPTION
[0022] The technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art are within the scope of protection of the present application.
[0023] The terms "first", "second", and the like 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 can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than that illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally a category and do not limit the number of objects, for example, the first object can be one or more. In addition, "and / or" in the specification and claims indicates at least one of the connected objects, and the character " / ", generally indicates that the front and rear associated objects are in an "or" relationship.
[0024] The present application provides a WiFi scanning control method. The WiFi scanning control method provided by the embodiments of the present application will be described in detail below with reference to the drawings, through specific embodiments and application scenarios.
[0025] Wireless Fidelity (WiFi): a wireless communication technology that allows electronic devices to connect to the Internet and other networks through wireless signals.
[0026] WiFi scanning refers to searching and detecting nearby wireless network signals by an electronic device to identify available WiFi networks and obtain their WiFi information, which can include network name and signal strength.
[0027] WiFi identification refers to the name of a wireless network, i.e. 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.
[0028] WiFi framework refers to system components that manage and control Wi-Fi connections, scanning, and communication.
[0029] A game engine is a software development platform that provides tools and libraries needed to build and run video games, including graphics rendering, physics simulation, audio processing, and network functionality.
[0030] It should be noted that the WiFi scanning control method provided in the embodiments of the present application can be executed by a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, or the like. In some embodiments of the present application, the WiFi scanning control method is executed by an electronic device as an execution subject.
[0031] The WiFi scanning control method provided in the embodiments of the present application can be applied to a time delay sensitive scenario. A specific application scenario is an online game scenario, and another specific application scenario is a video call scenario.
[0032] As shown in FIG. 1, FIG. 1 is a flowchart of the WiFi scanning control method provided in an embodiment of the present application. The WiFi scanning control method provided in the embodiments of the present application can include the following steps.
[0033] In step 101, WiFi scanning is performed in a case where a WiFi scanning function is disabled and a WiFi scanning request message with a priority higher than a priority threshold is received.
[0034] In some embodiments of the present application, the electronic device can be a smart phone, a notebook computer, or a tablet computer, or the like, which can be connected to a WiFi network.
[0035] The system can monitor the state of each application currently running in the electronic device through an application programming interface (API) or a service, and determine whether the application 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 being used by the user, and the system needs to prioritize resource allocation to the target application to ensure smooth running. The target application is an application sensitive to time delay. For example, the target application can be a game application or a video call application, or the like, which requires high network stability and network smoothness during running.
[0036] Since WiFi scanning will cause a large time delay, in order to avoid the time delay caused by WiFi scanning from interfering with the running of the target application, when the target application is running in the foreground, the system of the electronic device will automatically disable WiFi scanning.
[0037] For example, a target application list can be set in advance, which can be a string array storing application names of all target applications. Only the target applications in the target application list need to be prohibited from WiFi scanning when running in the foreground. Therefore, whenever a user opens an application to run in the foreground, the application name of the application can be obtained, and then searched in the target application list to determine 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 a 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 a target application, and WiFi scanning does not need to be prohibited.
[0038] For example, when a game application is detected to run in the foreground of the electronic device, the electronic device automatically enters a game mode, and WiFi scanning is automatically prohibited in the game mode. That is, the electronic device is prevented from automatically searching for a nearby WiFi network, because WiFi scanning will switch channels, causing network delay and affecting the gaming experience. Similarly, when a video call application is detected to run in the foreground of the electronic device, the electronic device also prohibits WiFi scanning.
[0039] The method of prohibiting WiFi scanning can include adjusting the settings of the WiFi module in the electronic device, such as setting the scan flag of the WiFi game mode to the disabled mode, to turn off the scanning function. System commands can also be used, such as inputting a command to turn off scanning to directly disable the WiFi scanning function.
[0040] After WiFi scanning is prohibited, WiFi scanning is generally prevented, and WiFi scanning is performed only when the system receives a WiFi scanning request message with a priority higher than the priority threshold.
[0041] For example, in a video call scenario through a video call application, if the user wants to switch the network, the user can manually switch the WiFi network, and the system generates a WiFi scanning request message with a priority higher than the priority threshold when manually switching the WiFi network, so that the electronic device performs WiFi scanning. For another example, in an online game scenario through a game application, if the user needs to perform positioning through WiFi, the system can also generate a WiFi scanning request message with a priority higher than the priority threshold during the positioning process, so that the electronic device performs WiFi scanning.
[0042] Step 102, in a case where the scanning duration of WiFi scanning exceeds the duration threshold, WiFi scanning function is prohibited.
[0043] In this embodiment, in the case that 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 allowed only within a defined time window, i.e., a time threshold, which 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.
[0044] Taking 20 seconds as the time threshold, in the case that a target scanning request is obtained, a timer can be set, and the timing duration is the time threshold. Within the timing duration of the timer, multiple scans can be initiated to obtain scanning results. After the timer expires, the WiFi scanning function is disabled again. This ensures that the foreground running target application can continue to obtain stable network connection and is not disturbed by unnecessary scanning.
[0045] In this application, in the case that the WiFi scanning function is disabled by default, the system only responds to a request with a priority higher than a threshold and performs WiFi scanning. When the scanning duration exceeds the time threshold, the WiFi scanning function is disabled again. In this way, only when a WiFi scanning request message with a high priority is initiated, is the WiFi scanning allowed for a short time within a specified time window. In this way, unnecessary network delay can be reduced, and the user can successfully complete network scanning when needed, thereby meeting the user's WiFi scanning needs.
[0046] In some embodiments, in the case that a target scanning request is obtained, in the case that 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, including:
[0047] In the case that the WiFi scanning function is disabled and a control input to the WiFi scanning control is received, it is determined that a WiFi scanning request message with a priority higher than a priority threshold is received;
[0048] WiFi scanning is performed.
[0049] In this embodiment, when the user inputs the status bar or the shortcut start bar of the electronic device, the system will respond to the input and display a setting interface. The setting interface contains a displayed WiFi scanning control. The WiFi scanning control can be a WiFi switch or a WiFi icon. The user can further control the input of the WiFi scanning control in the setting interface, and the system responds to the control input, i.e., a WiFi scanning request message with a priority higher than a priority threshold can be generated, and then scanning of available WiFi networks nearby is started.
[0050] In this way, even if the WiFi scanning function is prohibited, the user can still conveniently trigger a quick WiFi scan through control input to the WiFi scanning control.
[0051] In some embodiments, after the WiFi scanning, the WiFi scanning control method further includes:
[0052] displaying a WiFi scanning result, the scanning result including at least one WiFi identifier, each WiFi identifier indicating a scanned WiFi network;
[0053] receiving an identifier selection input to one of the at least one WiFi identifier;
[0054] in response to the identifier selection input, connecting to the WiFi network indicated by the selected WiFi identifier.
[0055] In this embodiment, after the user generates a WiFi scanning request message with a priority higher than a priority threshold through control input to the WiFi scanning control, the system can perform WiFi scanning within a time threshold to obtain a scanning result. After the scanning is completed, the system displays the WiFi scanning result. For example, the WiFi scanning result can be a list of scanned WiFi networks, and the list includes at least one WiFi identifier, each WiFi identifier corresponding to an available WiFi network. Then, the user can select one WiFi identifier from the displayed WiFi list for selection input. The system will respond to the selection input by switching the current WiFi connection of the electronic device to the WiFi network indicated by the selected WiFi identifier.
[0056] As an optional embodiment, the WiFi scanning function is prohibited during the running of the game application. When it is detected that the game application is running in the foreground of the electronic device, the electronic device enters a game mode, and the WiFi scanning is prohibited in the game mode. If the user encounters network lag in the game application and wants to switch the connected WiFi network, the user can pull down the status bar of the electronic device through a first input to open a settings interface and perform control input to the WiFi scanning control in the settings interface 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, i.e., the priority of the WiFi scanning request message is higher than the priority threshold, so the WiFi scanning is allowed, and a 20-second timer is started. After the WiFi scanning within 20 seconds is completed, the user selects and connects to a new WiFi network from the WiFi list. After 20 seconds, the system re-prohibits the WiFi scanning to ensure the smoothness of the game.
[0057] As another optional embodiment, the WiFi scanning function is prohibited during the running of the video call application. In the case that the video call application is detected to run in the foreground of the electronic device, the electronic device prohibits WiFi scanning. If the user feels that the network is jammed during the video call and wants to switch the connected WiFi network, the user can pull down the quick start bar of the electronic device through the first input and control the input of the WiFi scanning control in the quick start bar to open the WiFi list to switch the WiFi network. At this time, the system generates a WiFi scanning request message, and the priority of the WiFi scanning request message is higher than the priority threshold, so the WiFi scanning is allowed, and a 30-second timer is started. After the WiFi scanning within 30 seconds is completed, the user selects and connects to a new WiFi network from the WiFi list. After 30 seconds, the system re-prohibits the WiFi scanning to ensure the smoothness of the video call.
[0058] In this embodiment, even in the case that the target application is running and the WiFi scanning is prohibited, the user can still conveniently trigger the WiFi scanning through the input and complete the connection within a short time, improving the operation efficiency. At the same time, only the scanning within the time threshold is triggered, reducing unnecessary network resource consumption.
[0059] In some embodiments, in the case that the WiFi scanning function is prohibited and the WiFi scanning request message with a priority higher than the priority threshold is received, the WiFi scanning is performed, including:
[0060] In the case that the WiFi scanning function is prohibited and the team triggering input of the foreground running game application is received, the game engine of the game application sends a WiFi scanning request message to the WiFi framework;
[0061] The WiFi framework determines that the WiFi scanning request message with a priority higher than the priority threshold is received in the case that the WiFi scanning request message is received;
[0062] The WiFi scanning is performed.
[0063] In this embodiment, in the case that the foreground running target application is a game application, the WiFi scanning function is prohibited. The user can directly perform the team triggering input in the game application to trigger a team request message. Since the user team needs to determine the geographic position of the electronic device of the user to automatically identify the players in the same or nearby area and automatically assign the users in the same area to the same team. The determination of the geographic position of the electronic device depends on the scanning result of the WiFi scanning.
[0064] Therefore, after the game engine of the game application receives the team-up request message corresponding to the team-up trigger input, the game engine can generate a WiFi scan request message based on the team-up request message and send the WiFi scan request message to the WiFi framework. After the WiFi framework receives the WiFi scan request message, the WiFi framework 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, the WiFi framework performs WiFi scanning.
[0065] In the foregoing manner, even if the Wi-Fi scanning function is disabled, the system can identify and process a high-priority WiFi scan request in a timely manner when receiving a team-up request from a foreground game application, thereby ensuring that a user can quickly find an available network to complete team-up.
[0066] In some embodiments, after the WiFi scanning, the WiFi scan control method further includes:
[0067] determining a scanning geographic location according to a scanning result of the WiFi scanning;
[0068] sending the scanning geographic location as auxiliary positioning information to the game application;
[0069] determining a team-up space range according to the auxiliary positioning information, the team-up space range being a space range centered on the scanning geographic location;
[0070] adding at least one game user located in the team-up space range to the same game queue.
[0071] In this embodiment, after WiFi scanning is performed in response to the WiFi scan request message sent by the game engine, a scanning result of the WiFi scanning can be obtained. According to the scanning result, a scanning geographic location where the electronic device is located can be determined. Then, the determined scanning geographic location can be sent to the game application as auxiliary positioning information. According to the received auxiliary positioning information, the game application can define a team-up space range centered on the scanning geographic location. The team-up space range can be used to screen nearby users. Users located in the team-up space range are automatically assigned to the same game queue by the electronic device, so as to realize automatic team-up.
[0072] As an optional embodiment, in a case where it is detected that the game application is running in the foreground of the electronic device, the electronic device enters the game mode, and the WiFi scanning is prohibited in the game mode. If a user wants to form a team with nearby players in the game application, the players who want to form a team can each initiate a team formation request message through a team formation trigger input. The game engine generates a WiFi scanning request message with a priority higher than the priority threshold based on the team formation request message. Therefore, the system allows the WiFi scanning, and starts a 20-second timer. After the WiFi scanning within 20 seconds is completed, the game engine can locate the users according to the scanning results, obtain the scanned geographic positions of the electronic devices, and distribute the users in the team formation space range to the same game queue. After the 20-second timeout, the system re-prohibits the WiFi scanning to ensure the smoothness of the game.
[0073] In this embodiment, the user positions are automatically determined through the WiFi scanning, and the users in the same region are formed into a team, which improves the team formation efficiency. It automatically distributes the nearby users to the same game queue, reducing the complexity of manual team formation.
[0074] In some embodiments, after the WiFi scanning is prohibited in a case where it is detected that the target application is running in the foreground of the electronic device, the WiFi scanning control method further includes:
[0075] In a case where the WiFi scanning function is prohibited and a WiFi scanning request message with a priority lower than the priority threshold is received, the WiFi scanning request message is rejected.
[0076] In this embodiment, when the electronic device detects the WiFi scanning request message with a priority lower than the priority threshold, the system rejects the WiFi scanning request message and does not perform the WiFi scanning operation. Specifically, the WiFi scanning request message with a priority lower than the priority threshold can include specific network protocol scanning and periodic scanning requests from non-target applications or the system. The specific network protocol scanning can include OBSS Scan and Action frame.
[0077] In the above manner, unnecessary scanning can be avoided to affect the running of the target application, the smooth running of the high-priority target application is ensured, and network delay is reduced.
[0078] In some embodiments, the WiFi scanning includes:
[0079] performing WiFi scanning on each WiFi channel for a first dwell time;
[0080] The first dwell time is less than the second dwell time, and the second dwell time is a channel dwell time in a slow WiFi scanning mode, and the first dwell time is a channel dwell time in a fast WiFi scanning mode.
[0081] In the embodiment, compared with a conventional slow WiFi scanning mode, the WiFi scanning in the embodiment is a fast scanning mode. In the conventional slow WiFi scanning mode, a second dwell time is used for staying on each WiFi channel, while in the WiFi scanning in the embodiment, only a first dwell time is used for staying on each channel. Since the second dwell time is greater than the first dwell time, the WiFi scanning mode in the embodiment reduces the channel switching delay through fast scanning.
[0082] In addition, in the WiFi scanning mode in the embodiment, after scanning each channel, data transmission on the original channel can be temporarily returned, and then other channels are continuously scanned.
[0083] In the foregoing manner, the WiFi scanning can reduce the interference of the WiFi scanning on the system and the network by shortening the dwell time of the device on each channel, and ensure the smooth running of the target application.
[0084] In some embodiments, after the WiFi scanning, the WiFi scanning control method further includes:
[0085] In the case where the application program running in the foreground has a network delay lower than a delay threshold, the WiFi scanning function is disabled.
[0086] In the embodiment, since the application program running in the foreground is a delay-sensitive application, the application program has a high requirement on delay and precision. Therefore, after the WiFi scanning, if it is detected that the network delay of the application program running in the foreground is lower than the set delay threshold, the system automatically disables the WiFi scanning function. In this way, the network interference caused by the WiFi scanning is reduced, and the performance and smoothness of the application program are ensured.
[0087] In this way, the network interference can be effectively reduced, and the smooth running of the application program running in the foreground is ensured. In this way, the resource use is optimized, and in particular, the method is suitable for a high real-time requirement scene, such as an online game and a video call, and the delay and lag caused by unnecessary network fluctuation due to the WiFi scanning are avoided.
[0088] In some embodiments, in the case where the application program running in the foreground has a network delay lower than a delay threshold, after the WiFi scanning is disabled, the WiFi scanning control method further includes:
[0089] In the case where the application program is switched to a background running state or a closed state, the WiFi scanning function is enabled.
[0090] In the embodiment, when the target application runs in the foreground of the electronic device, the system prohibits WiFi scanning to reduce network delay and ensure smooth running of the target application, and once it is detected that the target application is switched to the background or closed, the system resumes to allow WiFi scanning, allowing the electronic device to perform normal network search and switching operation.
[0091] In this way, when the target application runs in the foreground, the network delay caused by WiFi scanning is reduced to ensure the smoothness of the target application, and after the target application is switched to the background or closed, WiFi scanning is resumed to ensure normal network function and resource utilization of the device.
[0092] FIG. 2 is a structural schematic diagram of a WiFi scanning control apparatus provided by another embodiment of the present application. As shown in FIG. 2, the WiFi scanning control apparatus can include:
[0093] The scanning module 201 is configured to, in the case that the WiFi scanning function is prohibited and a WiFi scanning request message with a priority higher than a priority threshold is received, perform WiFi scanning.
[0094] The prohibiting module 202 is configured to, in the case that the scanning time length of WiFi scanning exceeds a time length threshold, prohibit the WiFi scanning function.
[0095] In the present application, in the case that the WiFi scanning function is prohibited by default, the system only responds to the request with a priority higher than the threshold and performs WiFi scanning, and the WiFi scanning function is disabled again when the scanning time length exceeds the time length threshold. In this way, only when a WiFi scanning request message with a high priority is initiated, WiFi scanning is allowed for a short time within a specified time window. In this way, unnecessary network delay can be reduced, and the user can successfully complete network scanning when needed, thereby meeting the user's WiFi scanning demand.
[0096] In another optional example, the scanning module 201 is specifically configured to:
[0097] In the case that the WiFi scanning function is prohibited and a control input to the WiFi scanning control is received, it is determined that a WiFi scanning request message with a priority higher than a priority threshold is received.
[0098] WiFi scanning is performed.
[0099] In another optional example, the WiFi scanning control apparatus further includes:
[0100] The display module is configured to display a WiFi scanning result, the scanning result including at least one WiFi identifier, and one WiFi identifier indicating one scanned WiFi network.
[0101] The receiving module is configured to receive an identification selection input of one of the at least one WiFi identification;
[0102] The connecting module is configured to connect to a WiFi network indicated by the WiFi identification selected by the identification selection input in response to the identification selection input.
[0103] In another optional example, the scanning module 201 is specifically configured to:
[0104] In a case where the WiFi scanning function is disabled and a team-up triggering input of a foreground running game application is received, a game engine of the game application sends a WiFi scanning request message to a WiFi framework;
[0105] The WiFi framework determines that the WiFi scanning request message received has a priority higher than a priority threshold in a case where the WiFi scanning request message is received;
[0106] The WiFi scanning is performed.
[0107] In another optional example, the WiFi scanning control apparatus comprises:
[0108] The determining module is configured to determine a scanned geographic position according to a scanning result of the WiFi scanning;
[0109] The sending module is configured to send the scanned geographic position as auxiliary positioning information to the game application;
[0110] The determining module is further configured to determine a team-up space range according to the auxiliary positioning information, the team-up space range being a space range centered on the scanned geographic position;
[0111] The adding module is configured to add at least one game user located within the team-up space range into the same game queue.
[0112] In another optional example, the WiFi scanning control apparatus further comprises:
[0113] The rejecting module is configured to reject the WiFi scanning request message in a case where the WiFi scanning function is disabled and the WiFi scanning request message received has a priority lower than a priority threshold.
[0114] In another optional example, the scanning module 201 is specifically configured to perform the WiFi scanning on each WiFi channel for a first dwell time;
[0115] The first dwell time is less than a second dwell time, the second dwell time being a channel dwell time in a slow WiFi scanning mode, and the first dwell time being a channel dwell time in a fast WiFi scanning mode.
[0116] In another optional example, the WiFi scanning control apparatus further includes:
[0117] The disabling module is configured to disable the WiFi scanning function in a case that the application running in the foreground has a network delay lower than the delay threshold.
[0118] In another optional example, the WiFi scanning control apparatus further includes:
[0119] The resuming module is configured to enable the WiFi scanning function in a case that the application switches to a background running state or a closed state.
[0120] The WiFi scanning control apparatus in the embodiments of the present application can be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices other than a terminal. For example, the electronic device can be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a mobile Internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), and the like. The electronic device can also be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, and the like. The embodiments of the present application are not limited in this regard.
[0121] The WiFi scanning control apparatus in the embodiments of the present application can be an apparatus with an operating system. The operating system can be an Android operating system, an IOS operating system, or other possible operating systems, and the embodiments of the present application are not limited in this regard.
[0122] The WiFi scanning control apparatus provided by the embodiments of the present application can implement all the processes implemented by the method embodiment of FIG. 1, and thus repeated details are not described herein.
[0123] Optionally, as shown in FIG. 3, the embodiment of the present application further provides an electronic device 100, comprising a processor 110, a memory 119, a program or instruction stored in the memory 119 and executable on the processor 110, which, when executed by the processor 110, implements each process of the above-mentioned WiFi scanning control method embodiment and achieves the same technical effects. To avoid repetition, details are not described herein.
[0124] It should be noted that the electronic device in the embodiment of the present application includes the above-mentioned mobile electronic device and non-mobile electronic device.
[0125] Please refer to FIG. 4, which is a schematic diagram of the hardware structure of an electronic device for implementing the embodiment of the present application. 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, etc.
[0126] Those skilled in the art can understand that the electronic device 100 can further include a power supply (such as a battery) for powering each component, and the power supply can be logically connected to the processor 120 through a power management system, so as to realize the functions of managing charging, discharging, and power consumption management through the power management system. The electronic device structure shown in FIG. 4 does not constitute a limitation on the electronic device, and the electronic device can include more or fewer components than shown, or combine certain components, or different component arrangements, which are not described herein.
[0127] The processor 120 is configured 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.
[0128] The processor 120 is configured to disable the WiFi scanning function when the scanning time length of the WiFi scanning exceeds a time length threshold.
[0129] In the present application, the system can only respond to the request with a priority higher than a threshold and perform WiFi scanning when the WiFi scanning function is disabled by default, and the WiFi scanning function is disabled again when the scanning time length exceeds a time length threshold. In this way, only when a WiFi scanning request message with a high priority is initiated, a short WiFi scanning is allowed within a specified time window. In this way, unnecessary network delay can be reduced, and the user can successfully complete network scanning when needed, thereby meeting the user's WiFi scanning needs.
[0130] In another optional example, the processor 120 is specifically configured to:
[0131] In a case where the WiFi scanning function is prohibited and a control input to the WiFi scanning control is received, it is determined that a WiFi scanning request message with a priority higher than a priority threshold is received;
[0132] WiFi scanning is performed.
[0133] In another optional example, the display unit 126 is configured to display a WiFi scanning result, the scanning result including at least one WiFi identifier, and each WiFi identifier indicating a scanned WiFi network;
[0134] The processor 120 is configured to receive an identifier selection input to one of the at least one WiFi identifier.
[0135] The processor 120 is configured to connect to a WiFi network indicated by the WiFi identifier selected by the identifier selection input in response to the identifier selection input.
[0136] In another optional example, the processor 120 is specifically configured to:
[0137] In a case where the WiFi scanning function is prohibited and a team-up trigger input to a foreground running game application is received, a game engine of the game application sends a WiFi scanning request message to a WiFi framework;
[0138] The WiFi framework determines that a WiFi scanning request message with a priority higher than a priority threshold is received in a case where the WiFi scanning request message is received.
[0139] WiFi scanning is performed.
[0140] In another optional example, the processor 120 is further configured to:
[0141] According to a scanning result of the WiFi scanning, a scanned geographic location is determined.
[0142] The scanned geographic location is sent to the game application as auxiliary positioning information.
[0143] The game application determines a team-up space range according to the auxiliary positioning information, and the team-up space range is a space range centered on the scanned geographic location.
[0144] At least one game user located in the team-up space range is added to the same game queue.
[0145] In another optional example, the processor 120 is further configured to, in a case where the WiFi scanning function is prohibited and a WiFi scanning request message with a priority lower than the priority threshold is received, reject the WiFi scanning request message.
[0146] In another optional example, the processor 120 is further configured to perform the WiFi scanning on each WiFi channel for a first dwell time length;
[0147] The first dwell time length is less than the second dwell time length, and the second dwell time length is a channel dwell time length in the slow WiFi scanning mode, and the first dwell time length is a channel dwell time length in the fast WiFi scanning mode.
[0148] In another optional example, the processor 120 is configured to disable the WiFi scanning function in a case that the network delay of the application running in the foreground is less than a delay threshold.
[0149] In another optional example, the processor 120 is configured to enable the WiFi scanning function in a case that the application switches to a background running or a closed state.
[0150] It should be understood that in the embodiments of the present application, the input unit 124 can include a graphics processor (GPU) 1241 and a microphone 1242. The graphics processor 1241 processes image data of a still picture or a 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 can include a display panel 1261, which can be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 127 includes at least one of a touch panel 1271 and other input devices 1272. The touch panel 1271 is also called a touch screen. The touch panel 1271 can include a touch detection device and a touch controller. The other input devices 1272 can include, but are not limited to, a physical keyboard, function keys (such as volume control keys, on-off keys, etc.), a trackball, a mouse, an operation lever, and the like, which will not be described here.
[0151] The memory 129 can be used to store software programs and various data. The memory 129 can mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area can store an operating system, application programs or instructions required by at least one function (such as a sound playing function, an image playing function, etc.), and the like. In addition, the memory 129 can include a volatile memory or a non-volatile memory, or the memory 129 can include both a volatile memory and a non-volatile memory. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synch link DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM). The memory 129 in the embodiments of the present application includes but is not limited to these and any other suitable types of memory.
[0152] The processor 120 can 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 an application program, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 120.
[0153] The embodiments of the present application also provide a readable storage medium, and the readable storage medium stores programs or instructions, which are executed by a processor to realize various processes of the above-mentioned WiFi scanning control method embodiments and achieve the same technical effects. To avoid repetition, details are not described herein.
[0154] The processor is a processor in the electronic device in the above embodiments. The readable storage medium includes a computer readable storage medium, such as a computer readable only memory (ROM), a random access memory (RAM), a magnetic disc or an optical disc, etc.
[0155] The embodiment of the present application further provides a chip, which comprises a processor and a communication interface. The communication interface is coupled with the processor. The processor is used to run programs or instructions, to realize the processes of the WiFi scanning control method embodiments and to achieve the same technical effects. To avoid repetition, details are not described herein.
[0156] It should be understood that the chip mentioned in the embodiment of the present application can also be referred to as a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0157] The 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 realize the processes of the WiFi scanning control method embodiments and to achieve the same technical effects. To avoid repetition, details are not described herein.
[0158] It should be noted that, in this document, the term "comprising" or "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or device. Without more limitations, the element defined by the statement "comprising a" does 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 method and device in the embodiment of the present application is not limited to the order of performing the functions as shown or discussed, but can also include performing the functions in a substantially simultaneous manner or in a reverse order, for example, the described method can be performed in an order different from that described, and various steps can also be added, omitted or combined. In addition, the features described with reference to some examples can be combined in other examples.
[0159] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned example methods can be realized by means of software and a necessary general hardware platform, and of course, can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a computer software product in essence or in the form of a part that contributes to the prior art, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk) and includes a plurality of instructions for causing a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application.
[0160] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above-mentioned specific embodiments, and the above-mentioned specific embodiments are only illustrative and not restrictive. Those skilled in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the scope protected by the claims.
Claims
1. A WiFi scan control method, comprising: performing WiFi scan in a case that a WiFi scan function is disabled and a WiFi scan request message with a priority higher than a priority threshold is received; disabling the WiFi scan function in a case that a scan duration of the WiFi scan exceeds a duration threshold.
2. The method of claim 1, wherein, The performing WiFi scan in a case that a WiFi scan function is disabled and a WiFi scan request message with a priority higher than a priority threshold is received, comprises: determining that a WiFi scan request message with a priority higher than a priority threshold is received in a case that a control input to a WiFi scan control is received while the WiFi scan function is disabled; performing WiFi scan.
3. The method of claim 2, wherein, The performing WiFi scan further comprises: displaying a WiFi scan result, the scan result comprising at least one WiFi identifier, one WiFi identifier indicating one scanned WiFi network; receiving an identifier selection input to one of the at least one WiFi identifier; connecting to the WiFi network indicated by the selected WiFi identifier in response to the identifier selection input.
4. The method of claim 1, wherein, The performing WiFi scan in a case that a WiFi scan function is disabled and a WiFi scan request message with a priority higher than a priority threshold is received, comprises: sending a WiFi scan request message by a game engine of a foreground running game application to a WiFi framework in a case that a team-up trigger input to the foreground running game application is received; determining that a WiFi scan request message with a priority higher than a priority threshold is received by the WiFi framework in a case that the WiFi scan request message is received; performing WiFi scan.
5. The method of claim 4, wherein, The performing WiFi scan further comprises: determining a scan geographic location according to a scan result of the WiFi scan; sending the scan geographic location as auxiliary positioning information to the game application; determining a team-up space range according to the auxiliary positioning information by the game application, the team-up space range being a space range centered on the scan geographic location; adding at least one game user located in the team-up space range to a same game queue.
6. The method of claim 1, wherein, The method further comprises: rejecting a WiFi scan request message in a case that the WiFi scan request message has a priority lower than the priority threshold while the WiFi scan function is disabled.
7. The method of claim 1, wherein, The performing WiFi scan comprises: performing WiFi scan on each WiFi channel for a first dwell duration; wherein the first dwell duration is less than a second dwell duration, the second dwell duration being a channel dwell duration in a slow WiFi scan mode, and the first dwell duration being a channel dwell duration in a fast WiFi scan mode.
8. The method of claim 1, wherein, The performing WiFi scan further comprises: disabling the WiFi scan function in a case that a foreground running application has a network delay lower than a delay threshold.
9. The method of claim 8, wherein, The method further comprises: after the disabling the WiFi scan function in a case that a foreground running application has a network delay lower than a delay threshold, In a case where the application program switches to a background running state or a closed state, enable a WiFi scanning function.
10. A WiFi scanning control apparatus, comprising: a scanning module configured to perform WiFi scanning in a case where the WiFi scanning function is disabled and a WiFi scanning request message with a priority higher than a priority threshold is received; a disabling module configured to disable the WiFi scanning function in a case where a scanning duration of the WiFi scanning exceeds a duration threshold.
11. The apparatus of claim 10, wherein, The scanning module is specifically configured to: determine that the WiFi scanning request message with the priority higher than the priority threshold is received in a case where the WiFi scanning function is disabled and a control input to a WiFi scanning control is received; and perform the WiFi scanning.
12. The apparatus of claim 11, wherein, The WiFi scanning control apparatus further comprises: a display module configured to display a WiFi scanning result, the scanning result comprising at least one WiFi identifier, and one WiFi identifier indicating one WiFi network scanned; a receiving module configured to receive an identifier selection input to one of the at least one WiFi identifier; and a connecting module configured to connect to the WiFi network indicated by the WiFi identifier selected by the identifier selection input.
13. The apparatus of claim 10, wherein, The scanning module is specifically configured to: in a case where the WiFi scanning function is disabled and a team-up triggering input to a foreground running game application is received, a game engine of the game application sends a WiFi scanning request message to a WiFi framework; and the WiFi framework determines that the WiFi scanning request message with the priority higher than the priority threshold is received in a case where the WiFi scanning request message is received. The WiFi scanning control apparatus further comprises:
14. The apparatus of claim 13, wherein, a determining module configured to determine a scanned geographic location according to a scanning result of the WiFi scanning; and a sending module configured to send the scanned geographic location as auxiliary positioning information to the game application. The determining module is further configured to determine a team-up space range as a space range centered on the scanned geographic location according to the auxiliary positioning information. The WiFi scanning control apparatus further comprises: a rejecting module configured to reject a WiFi scanning request message in a case where the WiFi scanning function is disabled and the WiFi scanning request message with a priority lower than the priority threshold is received.
15. The apparatus of claim 10, wherein, The scanning module is specifically configured to perform the WiFi scanning on each WiFi channel for a first dwell duration. The first dwell duration is less than a second dwell duration, the second dwell duration being a channel dwell duration in a slow WiFi scanning mode, and the first dwell duration being a channel dwell duration in a fast WiFi scanning mode.
16. The apparatus of claim 10, wherein, The WiFi scanning control apparatus further comprises: a disabling module configured to disable the WiFi scanning function in a case where a foreground running application has a network delay lower than a delay threshold.
17. The apparatus of claim 10, wherein, The WiFi scanning control apparatus further comprises: 18. The apparatus of claim 17, wherein, A recovery module is configured to enable the WiFi scanning function when the application program is switched to a background running state or a closed state.
19. An electronic device comprising a processor and a memory, the memory storing programs or instructions executable on the processor, the programs or instructions, when executed by the processor, implement the steps of the WiFi scanning control method according to any one of claims 1-9.
Citation Information
Patent Citations
Scanning method, user equipment and base station
CN103716857A
WiFi scanning method and mobile terminal
CN106604361A
WiFi scanning method, electronic equipment and storage medium
CN118264741A
WiFi scanning control method, device and equipment
CN119277476A
Methods and devices for supporting remote scan and priority operations
US11096120B1