Display device and wi-fi scan control method
By adjusting the WiFi scanning strategy based on the connection status and operating mode of the display device's controller, the problem of unstable device calibration during WiFi scanning is solved, ensuring the stability of WiFi Direct connected devices and the user experience.
Patent Information
- Application Number
- CN202411082774.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2044-08-07
AI Technical Summary
Unstable WiFi P2P data transmission, especially during WiFi scanning, leads to unstable device calibration functions and a degraded user experience.
The display device's controller adjusts the timing and method of the system's WiFi scanning based on the WiFi connection status and the target device's operating mode. This includes stopping scanning when WiFi is not connected and the target device is in calibration mode, adjusting the scanning cycle, and disabling frame roaming mode to ensure the stability of the device's calibration function.
It improves the success rate of calibration function for WiFi Direct devices, resolves the data transmission instability issue caused by WiFi scanning, and enhances the user's network experience.
Smart Images

Figure CN119520888B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology. More specifically, it relates to a display device and a WiFi scanning control method. Background Technology
[0002] As home entertainment systems become increasingly complex, more and more devices need to be connected. WiFi P2P (Peer-to-Peer, WiFi Direct) technology enables direct connections between multiple devices without the need for a central access point (such as a router). This technology has been adopted in devices such as smart TVs, wireless speakers, and smartphones.
[0003] However, while WiFi P2P technology can support direct connections between devices, the stability of the connection may be affected in actual use, especially during WiFi scanning. For example, when WiFi scanning is performed in MCC (Multi-Channel Concurrency) mode, the WiFi channel will be switched away from the P2P channel, causing unstable WiFi P2P data transmission. In other words, WiFi scanning will cause unstable WiFi P2P data transmission of the device. Summary of the Invention
[0004] An exemplary embodiment of this application provides a display device and a WiFi scanning control method to solve the technical problem of unstable usage status, such as the calibration of target devices directly connected to the display device via WiFi, during system WiFi scanning.
[0005] The technical solutions provided in this application are as follows:
[0006] In a first aspect, embodiments of this application provide a display device, including:
[0007] monitor;
[0008] A controller connected to the display is configured to:
[0009] Obtain the power-on information of the display device, perform a system WiFi scan according to a preset period based on the system Framework, and obtain the WiFi connection status of the display device;
[0010] Obtain the operating mode of the target device that is connected to the display device via WiFi Direct;
[0011] If the WiFi connection status is determined to be WiFi not connected and the operating mode is calibration mode, the system WiFi scanning is stopped.
[0012] In some embodiments, the controller is further configured to:
[0013] If the WiFi connection status is WiFi not connected and the working mode is uncalibrated mode, determine whether the display device is connected to the target device;
[0014] When the display device is connected to the target device, the number of times the WiFi has been scanned is obtained;
[0015] When the number of times the WiFi has been scanned exceeds the target number, the system WiFi scan is performed according to the target period based on the system Framework.
[0016] In some embodiments, the controller is further configured to:
[0017] When the display device is not connected to the target device, or when the number of WiFi scans is less than or equal to the target number, the system WiFi scan is performed according to a preset cycle.
[0018] In some embodiments, the controller is further configured to:
[0019] When the WiFi connection status is WiFi connected and the working mode is calibration mode, the frame roaming mode is turned off.
[0020] In some embodiments, the controller is further configured to:
[0021] When the WiFi connection status is WiFi connected and the working mode is uncalibrated mode, determine whether the display device is connected to the target device;
[0022] If the display device and the target device are connected, the frame roaming mode is turned off.
[0023] In some embodiments, the controller is further configured to:
[0024] When the WiFi connection status is WiFi disconnected and the working mode is calibration mode, the system WiFi scanning is stopped.
[0025] In some embodiments, the controller is further configured to:
[0026] When the WiFi connection status is WiFi disconnected and the working mode is uncalibrated, determine whether the display device is connected to the target device;
[0027] When the display device is connected to the target device, the system WiFi scan is stopped;
[0028] If the display device is not connected to the target device, the system performs a WiFi scan according to the set cycle.
[0029] In some embodiments, the controller, in the mode of acquiring a target device that is directly connected to the display device via WiFi, is specifically configured as follows:
[0030] Obtain the target attribute value of the target device;
[0031] The operating mode of the target device is determined based on the target attribute value.
[0032] In some embodiments, when the controller performs the function of determining whether the display device is connected to the target device, it is specifically configured to:
[0033] Retrieve the target device connection identifier from the settings database;
[0034] The display device is determined to be connected to the target device based on the target device connection identifier.
[0035] Secondly, embodiments of this application provide a WiFi scanning control method applied to a display device, the method comprising:
[0036] Obtain the power-on information of the display device, perform a system WiFi scan according to a preset period based on the system Framework, and obtain the WiFi connection status of the display device;
[0037] Obtain the operating mode of the target device that is connected to the display device via WiFi Direct;
[0038] If the WiFi connection status is determined to be WiFi not connected and the operating mode is calibration mode, the system WiFi scanning is stopped.
[0039] In some embodiments, the method further includes:
[0040] If the WiFi connection status is WiFi not connected and the working mode is uncalibrated mode, determine whether the display device is connected to the target device;
[0041] When the display device is connected to the target device, the number of times the WiFi has been scanned is obtained;
[0042] When the number of times the WiFi has been scanned exceeds the target number, the system WiFi scan is performed according to the target period based on the system Framework.
[0043] In some embodiments, the method further includes:
[0044] When the display device is not connected to the target device, or when the number of WiFi scans is less than or equal to the target number, the system WiFi scan is performed according to a preset cycle.
[0045] In some embodiments, the method further includes:
[0046] When the WiFi connection status is WiFi connected and the working mode is calibration mode, the frame roaming mode is turned off.
[0047] In some embodiments, the method further includes:
[0048] When the WiFi connection status is WiFi connected and the working mode is uncalibrated mode, determine whether the display device is connected to the target device;
[0049] If the display device and the target device are connected, the frame roaming mode is turned off.
[0050] In some embodiments, the method further includes:
[0051] When the WiFi connection status is WiFi disconnected and the working mode is calibration mode, the system WiFi scanning is stopped.
[0052] In some embodiments, the method further includes:
[0053] When the WiFi connection status is WiFi disconnected and the working mode is uncalibrated, determine whether the display device is connected to the target device;
[0054] When the display device is connected to the target device, the system WiFi scan is stopped;
[0055] If the display device is not connected to the target device, the system performs a WiFi scan according to the set cycle.
[0056] In some embodiments, the controller, in the mode of acquiring a target device that is directly connected to the display device via WiFi, is specifically configured as follows:
[0057] Obtain the target attribute value of the target device;
[0058] The operating mode of the target device is determined based on the target attribute value.
[0059] In some embodiments, when the controller performs the function of determining whether the display device is connected to the target device, it is specifically configured to:
[0060] Retrieve the target device connection identifier from the settings database;
[0061] The display device is determined to be connected to the target device based on the target device connection identifier.
[0062] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to, when executing the computer program, cause the electronic device to implement the WiFi scanning control method described in the second aspect or any embodiment of the second aspect.
[0063] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a computing device, causes the computing device to implement the WiFi scanning control method described in the second aspect or any embodiment of the second aspect.
[0064] Fifthly, embodiments of this application provide a computer program product that, when run on a computer, enables the computer to implement the WiFi scanning control method described in the second aspect or any embodiment of the second aspect.
[0065] As can be seen from the above technical solutions, the display device and WiFi scanning control method provided in this application embodiment obtain the power-on information of the display device, perform system WiFi scanning according to a preset cycle based on the system Framework, and obtain the WiFi connection status of the display device; obtain the working mode of the target device connected to the display device via WiFi direct connection; and stop the system WiFi scanning when it is determined that the WiFi connection status is WiFi not connected and the working mode is calibration mode. This application embodiment is used to solve the technical problem of unstable usage status of target devices directly connected to the display device via WiFi during system WiFi scanning, such as calibration. By stopping the system WiFi scanning when the display device is not connected to WiFi and the target device is in calibration mode, the calibration function of the target device is guaranteed during system WiFi scanning, thereby ensuring the stability of the target device during system WiFi scanning and improving the user experience. Attached Figure Description
[0066] To more clearly illustrate the implementation methods in the embodiments of this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings.
[0067] Figure 1A scenario architecture diagram of the WiFi scanning control method in some embodiments is shown;
[0068] Figure 2 Hardware configuration block diagrams of the control device are shown in some embodiments;
[0069] Figure 3 A hardware configuration block diagram of a display device is shown in some embodiments;
[0070] Figure 4 A software configuration diagram of a display device in some embodiments is shown;
[0071] Figure 5 Example diagrams of channel switching in some embodiments are shown;
[0072] Figure 6 An example diagram of a display device system framework according to some embodiments is shown;
[0073] Figure 7 An example diagram of a WiFi scanning control method according to some embodiments is shown;
[0074] Figure 8 A flowchart of a WiFi scanning control method according to some embodiments is shown;
[0075] Figure 9 A scenario flowchart of a WiFi scanning control method according to some embodiments is shown;
[0076] Figure 10 A flowchart of another WiFi scanning control method according to some embodiments is shown;
[0077] Figure 11 A flowchart of yet another WiFi scanning control method according to some embodiments is shown;
[0078] Figure 12 A flowchart of another WiFi scanning control method according to some embodiments is shown;
[0079] Figure 13 A scenario example diagram of a WiFi scanning existing control method according to some embodiments is shown;
[0080] Figure 14 A flowchart of another WiFi scanning control method according to some embodiments is shown;
[0081] Figure 15 A scenario example diagram of another WiFi scanning control method according to some embodiments is shown;
[0082] Figure 16A scenario example diagram of another WiFi scanning control method according to some embodiments is shown. Detailed Implementation
[0083] To make the objectives and implementation methods of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the exemplary embodiments described are only some embodiments of this application, and not all embodiments.
[0084] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.
[0085] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.
[0086] The display device provided in this application can have various implementation forms, such as a television, a smart television, a laser projection device, a monitor, an electronic bulletin board, an electronic table, etc. Figure 1 and Figure 2 This is one specific embodiment of the display device of this application.
[0087] Figure 1 This is a schematic diagram illustrating the operational scenario between the display device and the control unit according to the embodiment. Figure 1 As shown, the user can operate the display device 200 through the smart device 300 or the control device 100.
[0088] In some embodiments, the control device 100 may be a remote control. Communication between the remote control and the display device includes infrared protocol communication, Bluetooth protocol communication, and other short-range communication methods, controlling the display device 200 wirelessly or via wired means. Users can control the display device 200 by inputting user commands through buttons on the remote control, voice input, control panel input, etc.
[0089] In some embodiments, a smart device 300 (such as a mobile terminal, tablet computer, computer, laptop computer, etc.) may also be used to control the display device 200. For example, an application running on the smart device may be used to control the display device 200.
[0090] In some embodiments, the display device may receive instructions not through the aforementioned smart devices or control devices, but through touch or gestures.
[0091] In some embodiments, the display device 200 can also be controlled in ways other than the control device 100 and the smart device 300. For example, it can be controlled by directly receiving the user's voice commands through a module configured inside the display device 200 for acquiring voice commands, or it can be controlled by receiving the user's voice commands through a voice control device set outside the display device 200.
[0092] In some embodiments, the display device 200 also communicates with the server 400. The display device 200 may communicate via a local area network (LAN), wireless local area network (WLAN), and other networks. The server 400 may provide various content and interactive features to the display device 200. The server 400 may be a cluster or multiple clusters, and may include one or more types of servers.
[0093] Figure 2 An exemplary block diagram of the configuration of the control device 100 according to an exemplary embodiment is shown. Figure 2 As shown, the control device 100 includes a controller 110, a communication interface 130, a user input / output interface 140, a memory, and a power supply. The control device 100 can receive user input operation commands and convert the operation commands into commands that the display device 200 can recognize and respond to, thus acting as an intermediary for interaction between the user and the display device 200.
[0094] In some embodiments, the display device 200 includes at least one of a tuner 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface.
[0095] In some embodiments, the controller includes a processor, a video processor, an audio processor, a graphics processor, RAM, ROM, and a first interface to an nth interface for input / output.
[0096] In some embodiments, the display 260 includes a display screen component for presenting an image, a driving component for driving image display, a component for receiving image signals from the controller output, and a user control UI interface for displaying video content, image content, menu control interface, and user control UI interface.
[0097] In some embodiments, the display 260 may be a liquid crystal display, an OLED display, or a projection display, and may also be a projection device and a projection screen.
[0098] In some embodiments, the communicator 220 is a component used to communicate with external devices or servers according to various communication protocol types. For example, the communicator may include at least one of a Wi-Fi module, a Bluetooth module, a wired Ethernet module, other network communication protocol chips or near-field communication protocol chips, and an infrared receiver. The display device 200 can establish the transmission and reception of control signals and data signals with the external control device 100 or the server 400 through the communicator 220.
[0099] In some embodiments, the user interface can be used to receive control signals from the control device 100 (e.g., an infrared remote control).
[0100] In some embodiments, detector 230 is used to acquire signals from the external environment or to interact with the outside world. For example, detector 230 includes a light receiver, a sensor for acquiring ambient light intensity; or, detector 230 includes an image acquisition device, such as a camera, which can be used to acquire external environmental scenes, user attributes, or user interaction gestures; or, detector 230 includes a sound acquisition device, such as a microphone, for receiving external sounds.
[0101] In some embodiments, the external device interface 240 may include, but is not limited to, one or more interfaces such as: High Definition Multimedia Interface (HDMI), analog or data high-definition component input interface (component), composite video input interface (CVBS), USB input interface (USB), RGB port, etc. It may also be a composite input / output interface formed by multiple interfaces mentioned above.
[0102] In some embodiments, the tuner 210 acquires broadcast television signals via wired or wireless reception and demodulates audio and video signals, such as EPG data signals, from multiple wireless or wired broadcast television signals.
[0103] In some embodiments, the controller 250 and the tuner 210 may be located in different separate devices, that is, the tuner 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.
[0104] In some embodiments, the controller 250 controls the operation of the display device and responds to user operations via various software control programs stored in memory. The controller 250 controls the overall operation of the display device 200. For example, in response to receiving a user command to select a UI object to display on the display 260, the controller 250 can perform operations related to the object selected by the user command.
[0105] In some embodiments, the object can be any of the optional objects, such as a hyperlink, an icon, or other operable controls. Operations related to the selected object include: displaying links to hyperlinked pages, documents, images, etc., or performing operations corresponding to the program associated with the icon.
[0106] In some embodiments, the controller includes at least one of a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), RAM (random access memory), ROM (read-only memory), a first to an nth interface for input / output, a communication bus, etc.
[0107] Users can input commands through a graphical user interface (GUI) displayed on the monitor 260, and the user input interface receives the user input commands through the GUI. Alternatively, users can input commands by entering specific sounds or gestures, and the user input interface receives the user input commands by recognizing the sounds or gestures through sensors.
[0108] In some embodiments, a "user interface" is the medium through which an application or operating system interacts and exchanges information with a user, converting information between its internal form and a form acceptable to the user. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be an icon, window, control, or other interface element displayed on the screen of an electronic device. Controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.
[0109] See Figure 4 In some embodiments, the system is divided into four layers, from top to bottom: the Applications layer (referred to as the "Application Layer"), the Application Framework layer (referred to as the "Framework Layer"), the Android runtime and system library layer (referred to as the "System Runtime Layer"), and the kernel layer.
[0110] In some embodiments, at least one application runs in the application layer. These applications may be Windows programs, system settings programs, or clock programs that come with the operating system; they may also be applications developed by third-party developers. In specific implementations, the application packages in the application layer are not limited to the examples above.
[0111] The framework layer provides application programming interfaces (APIs) and a programming framework for applications. The application framework layer includes predefined functions. It acts as a central processing unit, determining the actions taken by applications within the application layer. Through the API, applications can access system resources and obtain system services during execution.
[0112] like Figure 4 As shown, the application framework layer in this embodiment includes managers, content providers, etc., wherein the managers include at least one of the following modules: ActivityManager, which interacts with all activities running in the system; LocationManager, which provides access to system location services for system services or applications; PackageManager, which retrieves various information related to application packages currently installed on the device; NotificationManager, which controls the display and clearing of notification messages; and WindowManager, which manages icons, windows, toolbars, wallpapers, and desktop widgets on the user interface.
[0113] In some embodiments, the Activity Manager manages the lifecycle of individual applications and common navigation and back functions, such as controlling application exit, opening, and back actions. The Window Manager manages all window programs, such as obtaining the screen size, determining if a status bar is present, locking the screen, capturing the screen, and controlling display window changes (e.g., shrinking the display window, shaking the display, distorting the display, etc.).
[0114] In some embodiments, the system runtime library layer provides support for the upper layer, namely the framework layer. When the framework layer is used, the Android operating system runs the C / C++ libraries contained in the system runtime library layer to implement the functions that the framework layer needs to perform.
[0115] In some embodiments, the kernel layer is a layer between hardware and software. For example... Figure 4As shown, the kernel layer includes at least one of the following drivers: audio driver, display driver, Bluetooth driver, camera driver, WIFI driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power driver.
[0116] In practical applications, target devices such as wireless speakers and display devices such as TVs form a network using WiFi P2P connections. However, the user's WiFi function and WiFi P2P connection share the same WiFi chip hardware, operating in MCC mode. Therefore, WiFi scanning can affect target devices such as wireless speakers.
[0117] Understandably, WiFi scanning has two main impacts on target devices such as wireless speakers: for example, the calibration function of the target device, such as when the wireless speaker's position changes and WiFi P2P data transmission is used during calibration, and if WiFi scanning is performed at this time, it will cause calibration failure; another example is the audio playback effect of the wireless speaker. When the TV uses WiFi P2P to transmit audio data to the wireless speaker, if WiFi is scanning, it will cause the speaker's sound to stutter.
[0118] As an example, such as Figure 5 As shown, this includes P2P channels and WLAN channels. For example, when a TV uses WiFi P2P to transmit audio data to a wireless speaker, the P2P working time on the P2P channel is T1. If WiFi scanning is performed, the P2P channel needs to be switched to the WLAN channel for T2, and the working time on the WLAN channel is T3. Then, the WLAN channel needs to be switched back to the P2P channel for T2, which causes unstable WiFi P2P data transmission and results in stuttering sound from the wireless speaker.
[0119] The display device and WiFi scanning control method of this application embodiment can ensure the successful calibration function of target devices such as wireless speakers, and can optimize the data transmission stability of target devices, such as the problem of audio stuttering in wireless speakers, thereby improving the user's network experience.
[0120] In some embodiments, see Figure 6 The system framework diagram of WiFi scanning control in this application includes an application layer, a system layer, a kernel layer, a driver layer, and a kernel layer. Specifically, the system layer calls the WiFiCond process, which communicates with the kernel, through WiFiConnectivityManager. WiFiCond communicates with the kernel through Netlink, and then the kernel notifies the driver layer Wifiko to perform WiFi scanning.
[0121] Specifically, such as Figure 7 As shown, the system's WiFi scanning uses the WiFiConnectivityManager class to call the WiFiScanner interface. The AsyncChannel sends a message to WiFiScanningServiceImpl (the WiFi scanning service implementation class), which then passes it to WiFiCondScannerImpl (the WiFi daemon scanner implementation class), and finally to WiFiNative (a WiFi interface class). WiFiNative then calls WiFiCondControl (the WiFi daemon control) to WiFiCond, which interacts with the kernel. WiFiCond finally notifies the kernel to perform the scan in the driver.
[0122] Specifically, once the scan results are ready, the kernel will notify WiFiCond, then WiFiCond will call back to WiFiNative, and then WiFiNative will notify WiFiCondScannerImpl to update the scan results mLatestSingleScanResult through WiFiMonitor.
[0123] Furthermore, WiFiCondScannerImpl sends the latest scan results WiFiScanningServiceImpl to WiFiScanner, and finally notifies ScanRequestProxy to update the scan results mLestScanResults required by the application.
[0124] The WiFi scanning control process in this embodiment will be described in detail below.
[0125] Figure 8 A flowchart of a WiFi scanning control method according to some embodiments is shown. An embodiment of this application provides a display device in which the controller is configured to perform... Figure 8 The WiFi scanning control method includes:
[0126] Step 801: Obtain the power-on information of the display device, perform a system WiFi scan according to a preset period based on the system Framework, and obtain the WiFi connection status of the display device.
[0127] In this embodiment, the system WiFi scan request refers to a WiFi scan initiated by the system (e.g., Android system) installed on the display device. For example, after the display device is powered off, a system WiFi scan needs to be initiated upon powering on; or after the display device is put into sleep mode, a system WiFi scan needs to be initiated upon powering on. As an example, after the display device is powered on, the system framework performs a system WiFi scan according to a preset period; wherein, the preset period is selected and set according to the application scenario.
[0128] In this embodiment, the WiFi connection status refers to whether the display device is connected to WiFi, including WiFi not connected, WiFi connected, and WiFi disconnected. Specifically, the WiFi server obtains network working information through a network acquisition function, and determines the WiFi connection status based on this information. For example, the WiFiService first obtains the network working information NetworkInfo through the network acquisition function getActiveNetworkInfo(), and then uses NetworkInfo.isConnected() within the network working information to determine whether the network is connected.
[0129] In this embodiment, the WiFi connection status of the display device can be monitored in real time and the corresponding network connection attribute values can be updated. For example, network connection attribute value A indicates that WiFi is not connected, network connection attribute value B indicates that WiFi is connected, and network connection attribute value C indicates that WiFi is disconnected, thereby obtaining the WiFi connection status based on the queried network connection attribute values.
[0130] Step 802: Obtain the working mode of the target device that is connected to the display device via WiFi Direct.
[0131] In this embodiment, the display device can be a television or similar device, and the target device refers to a device that is directly connected to the display device via WiFi, such as a wireless speaker or a smartphone, depending on the application scenario. "Directly connected to the display device via WiFi" can be understood as the display device and the target device being connected via WiFi directly; in this case, the display device and the target device may or may not be connected.
[0132] In the embodiments of this application, there may be one or more target devices. It is understood that the target device has a corresponding target application on the display device, and the working mode of the target device can be determined based on the target attribute value corresponding to the target application. For example, the target attribute value of the target device is obtained, and the working mode of the target device is determined based on the target attribute, such as calibration mode, sleep mode, etc. Here, calibration mode refers to the target device performing position calibration processing.
[0133] Step 803: If the WiFi connection status is determined to be WiFi not connected and the working mode is calibration mode, stop the system WiFi scan.
[0134] In this embodiment of the application, when the target device is in calibration mode, in order to ensure the accuracy of the target device calibration, the device WiFi is not connected, thereby stopping the system WiFi scan to ensure the calibration function of the target device.
[0135] In the example above, by stopping the system WiFi scan when the display device is not connected to WiFi and the target device is in calibration mode, the calibration function of the target device is guaranteed during the system WiFi scan, thereby ensuring the stability of the target device during the system WiFi scan and improving the user experience.
[0136] Reference Figure 9 As shown, Figure 9 For implementation Figure 8 A schematic diagram of the display device illustrating the WiFi scanning control method. Used to implement... Figure 9 The display device of the WiFi scanning control method shown may include: a startup acquisition module 901, an acquisition module 902, and a processing module 903. The startup acquisition module 901 is used to acquire the power-on information of the display device, perform a system WiFi scan according to a preset cycle based on the system framework, and acquire the WiFi connection status of the display device. The acquisition module 902 is used to acquire the operating mode of the target device connected to the display device via WiFi direct connection. The processing module 903 is used to stop the system WiFi scan when it is determined that the WiFi connection status is WiFi not connected and the operating mode is calibration mode.
[0137] Figure 10 A flowchart of another WiFi scanning control method according to some embodiments is shown. This embodiment further optimizes the above-described WiFi scanning control method based on the previous embodiments. Figure 10 As shown, the method also includes:
[0138] In some embodiments of this application, when the WiFi connection status is WiFi not connected and the working mode is uncalibrated mode, it is determined whether the display device and the target device are connected.
[0139] In this embodiment, when the display device is not connected to WiFi and the target device is not in calibration mode, it is necessary to further determine whether the display device and the target device are connected. Here, whether the display device and the target device are connected can be understood as whether the display device and the target device are transmitting data, such as a scenario where a TV transmits audio to a wireless speaker for playback.
[0140] In this embodiment of the application, when the WiFi connection status is WiFi not connected and the target device's working mode is uncalibrated, that is, the display device is not connected to WiFi and the target device is in uncalibrated mode, it is further determined whether the display device and the target device are connected. Specifically, the target device connection identifier is obtained from the setting database based on the WiFi server, and the connection identifier is used to determine whether the display device and the target device are connected.
[0141] Specifically, after the target device is successfully connected, the target device application of the display device sets the target device connection identifier in the database to a first target value, such as 1; after the target device is disconnected, the target device application of the display device sets the target device connection identifier in the database to a second target value, such as 0.
[0142] In some embodiments of this application, when the display device is connected to the target device, the number of WiFi scans is obtained, and when the number of WiFi scans is greater than the target number, the system WiFi scan is performed according to the target period.
[0143] In this embodiment of the application, when the display device is connected to the target device, the number of times WiFi has been scanned is obtained. It can be understood that after the system WiFi scan is started, the system performs WiFi scans according to a preset period, such as 20s, 40s, 80s and 160s (finally maintaining 160s). The number of times WiFi has been scanned refers to the number of times WiFi scans have been performed.
[0144] In this embodiment of the application, the target number can be selected and set according to the application scenario, for example, 3. When the number of WiFi scans is greater than the target number, the system WiFi scan is performed according to the target period. That is, when the number of WiFi scans reaches a certain number, the WiFi scan period can be adjusted. The target period can be selected and set according to the application scenario. Since the display device and the target device are in a connected state, in order to ensure the stability of data transmission of the target device, the target period is greater than the preset period, for example, the target period is 1 hour.
[0145] In some embodiments of this application, when the display device is not connected to the target device, or when the number of WiFi scans is less than or equal to the target number, the system WiFi scan is performed according to a preset cycle.
[0146] In this embodiment of the application, when the display device is not connected to the target device, or when the number of WiFi scans is less than or equal to the target number, the system performs WiFi scanning according to a preset cycle.
[0147] This effectively solves the problem of WiFi scanning affecting the direct WiFi transmission of data on the target device, ensuring the success rate of the target device calibration function, and also solves problems such as sound stuttering on the target device caused by WiFi scanning, thus improving the user's network experience.
[0148] Figure 11 A flowchart of yet another WiFi scanning control method according to some embodiments is shown. This embodiment further optimizes the above-described WiFi scanning control method based on the previous embodiments. Figure 11 As shown, the method includes:
[0149] In some embodiments of this application, when the WiFi connection status is WiFi connected and the working mode is calibration mode, the frame roaming mode is turned off.
[0150] In some embodiments of this application, when the WiFi connection status is WiFi connected and the working mode is uncalibrated, it is determined whether the display device and the target device are connected.
[0151] In some embodiments of this application, the frame roaming mode is turned off when the display device and the target device are connected.
[0152] In this embodiment of the application, the native Android system supports frame roaming by default. Therefore, when the WiFi connection status is WiFi connected and the working mode is calibration mode, in order to ensure the calibration function, the frame roaming mode needs to be turned off, that is, the roaming mode needs to be turned off.
[0153] In this embodiment of the application, when the WiFi connection status is WiFi connected and the working mode is uncalibrated, it is determined whether the display device and the target device are connected. That is, the display device is WiFi connected and the target device is in uncalibrated mode. Further determination is made on whether the display device and the target device are connected. Specifically, the target device connection identifier is obtained from the setting database based on the WiFi server, and the connection of the display device and the target device is determined based on the target device connection identifier.
[0154] Specifically, after the target device is successfully connected, the target device application of the display device sets the target device connection identifier in the database to a first target value, such as 1; after the target device is disconnected, the target device application of the display device sets the target device connection identifier in the database to a second target value, such as 0.
[0155] In this embodiment of the application, when the display device is connected to the target device, in order to ensure the stability of data transmission on the target device, it is necessary to turn off the frame roaming mode, that is, turn off the roaming mode.
[0156] Therefore, when the display device is connected to WiFi, roaming is turned off when the target device is in calibration mode or when the target device is not in calibration mode but is in data transmission state. This ensures the success rate of the target device calibration function, while solving problems such as sound stuttering caused by WiFi scanning on the target device, and improving the user's network experience.
[0157] Figure 12 A flowchart of another WiFi scanning control method according to some embodiments is shown. This embodiment further optimizes the above-described WiFi scanning control method based on the previous embodiments. Figure 12 As shown, the method includes:
[0158] In some embodiments of this application, when the WiFi connection status is WiFi disconnected and the working mode is calibration mode, the system WiFi scanning is stopped.
[0159] In some embodiments of this application, when the WiFi connection status is WiFi disconnected and the working mode is uncalibrated, it is determined whether the display device and the target device are connected.
[0160] In some embodiments of this application, when the display device is connected to the target device, the system WiFi scanning is stopped; when the display device is not connected to the target device, the system WiFi scanning is performed according to a set cycle.
[0161] In this embodiment, when the display device connects to WiFi and then disconnects, if the WiFi connection status is WiFi disconnected and the working mode is calibration mode, the system WiFi scanning is stopped; if the target device is in uncalibrated mode, it is necessary to further determine whether the display device and the target device are connected. Specifically, the target device connection identifier is obtained from the setting database based on the WiFi server, and the connection identifier of the target device is used to determine whether the display device and the target device are connected.
[0162] In this embodiment, when the display device is connected to the target device, the system WiFi scanning is stopped to ensure the stability of data transmission on the target device. When the display device is not connected to the target device, the system WiFi scanning is performed according to a set period. The set period can be set as needed, such as 20 minutes.
[0163] Therefore, when the display device's WiFi connection is lost, the system WiFi scanning stops when the target device is in calibration mode or when the target device is not in calibration mode but is in data transmission state. This ensures the success rate of the target device calibration function and solves problems such as sound stuttering caused by WiFi scanning, thus improving the user's network experience.
[0164] Based on the description of the foregoing embodiments, the display device uses different methods for WiFi scanning when WiFi is not connected, WiFi is connected, and WiFi is disconnected, such as... Figure 13 As shown, step 13.1 displays the device is powered on; step 13.2 indicates WiFi is not connected; step 13.3 starts the periodicScanTimerHandler (periodic scan timer handler); step 13.4 performs scans at 20s, 40s, 80s, and 160s intervals (finally settling on 160s); step 13.5 checks if automatic reconnection is possible; if not, continues to step 13.4; if yes, proceeds to step 13.6, WiFi connection successful; step 13.7 checks if the Framework supports roaming; if not, proceeds to step 13.8. Stop WiFi scanning; if supported, proceed to step 13.9 to determine if the sent / received traffic is below the threshold; if not, proceed to step 13.10 to determine if the underlying layer supports roaming; if supported, proceed to step 13.11 to stop WiFi scanning; if not supported, proceed to step 13.12 to perform scanning at 20s, 40s, 80s, and 160s intervals (finally maintaining 160s); step 13.13 disconnect the WiFi connection; step 13.14 start the watchdogHandler (monitoring thread); step 13.15 maintain a 20-minute interval for periodic scanning.
[0165] Specifically, after the display device is powered on, if the WiFi is not connected, the Framework will start the periodicScanTimerHandler timer, which will execute scans in sequence at intervals of 20s, 40s, 80s, and 160s (finally maintaining 160s). When the Index (number of WiFi scans) is 1, 2, or 3, the intervals are 20s, 40s, and 80s respectively. When the Index increases to more than 3, the interval remains unchanged at 160s.
[0166] Specifically, after a successful WiFi connection, the system first checks whether the Framework supports roaming. Since the native Android system supports roaming by default, it then checks whether the received and sent data traffic is low (e.g., below a certain data traffic threshold). This is usually triggered when the router signal is weak. The system then checks whether the underlying layer supports roaming to determine whether to perform a periodic scan.
[0167] Specifically, after the WiFi connection is lost, two timers will be started: one is watchdogHandler, which maintains a 20-minute interval and performs a scan periodically; the other is periodicScanTimerHandler, which performs a scan periodically at 20s, 40s, 80s, and 160s (finally settling on 160s).
[0168] Figure 14 A flowchart of another WiFi scanning control method according to some embodiments is shown. This embodiment further optimizes the above-described WiFi scanning control method based on the above embodiments. Figure 14 As shown, the method includes:
[0169] In some embodiments of this application, the display device is powered on and initiates a system WiFi scan to obtain the WiFi connection status of the display device.
[0170] In some embodiments of this application, target attribute values of the target device are obtained, and the working mode of the target device is determined based on the target attribute values.
[0171] In some embodiments of this application, when the WiFi connection status is WiFi not connected and the working mode is calibration mode, the system WiFi scanning is stopped.
[0172] In some embodiments of this application, when the WiFi connection status is WiFi not connected and the working mode is uncalibrated mode, the target device connection identifier in the settings database is obtained, and the display device is determined to be connected to the target device based on the target device connection identifier.
[0173] In some embodiments of this application, when the display device is connected to the target device, the number of WiFi scans is obtained. When the number of WiFi scans is greater than the target number, the system WiFi scan is performed according to the target period. When the display device is not connected to the target device, or when the number of WiFi scans is less than or equal to the target number, the system WiFi scan is performed according to the preset period.
[0174] In some embodiments of this application, when the WiFi connection status is WiFi connected and the working mode is calibration mode, the frame roaming mode is turned off; when the WiFi connection status is WiFi connected and the working mode is uncalibrated mode, it is determined whether the display device and the target device are connected.
[0175] In some embodiments of this application, when the display device and the target device are connected, the frame roaming mode is turned off, and when the WiFi connection status is WiFi disconnected and the working mode is calibration mode, the system WiFi scanning is stopped.
[0176] In some embodiments of this application, when the WiFi connection status is WiFi disconnected and the working mode is uncalibrated, it is determined whether the display device and the target device are connected. If the display device and the target device are connected, the system WiFi scanning is stopped. If the display device and the target device are not connected, the system WiFi scanning is performed according to the set cycle.
[0177] For example, when a target device (e.g., a wireless speaker) application on a display device (e.g., a television) enters calibration mode, it sets the target attribute value "sys.vt.calibration_status" to 1. After calibration is complete, it sets the target attribute value "sys.vt.calibration_status" to 0.
[0178] For example, after the target device (e.g., a wireless speaker) application of the display device (e.g., a TV) successfully connects to the target device, it sets the target device connection identifier "sound_wireless_speaker_enable" in the database to 1; after the target device disconnects, the target device application of the display device sets the target device connection identifier "sound_wireless_speaker_enable" in the database to 0.
[0179] As an example, Figure 15As shown, step 15.1: The system initiates a scan; step 15.2: Determines if the target device is in calibration mode; if the target device is in calibration mode, proceed to step 15.3: Do not scan, i.e., stop scanning; if the target device is not in calibration mode, check the device's WiFi connection status, step 15.4: WiFi not connected; step 15.5: Perform scans at intervals of 20s, 40s, 80s, and 160s (finally maintaining 160s); step 15.6: Determines if the target device is currently connecting; if not, continue with step 15.5; if yes, proceed to step 15.7: Change the maximum interval from 160 seconds to 1 hour; step 15.8: WiFi connection successful; step 15.9: Determines if the target device is currently connecting; if not, proceed to step 15.3: Do not scan; if yes, proceed to step 15.1. 0. Determine if the underlying layer supports roaming; if supported, proceed to step 15.3 (do not scan); if not supported, proceed to step 15.11 (scan at 20s, 40s, 80s, 160s intervals, ultimately maintaining 160s); Step 15.12 (disconnect WiFi); Step 15.13 (scan at 20s, 40s, 80s, 160s intervals, ultimately maintaining 160s); Step 15.14 (determine if the target device is currently connected); if not, continue with step 15.13; if yes, proceed to step 15.15 (change the maximum interval from 160 seconds to 1 hour); Step 15.16 (maintain 20-minute intervals and perform scans periodically); Step 15.17 (determine if the target device is currently connected); if not, continue with step 15.16; if yes, proceed to step 15.18 (block scan).
[0180] Specifically, after the system initiates a WiFi scan, it first determines whether the target device is in calibration mode. If so, the scan is blocked; if it is not in calibration mode, it needs to be handled according to three main scenarios.
[0181] The first scenario: After powering on, the WiFi is not connected. If it is determined that the target device is not connected, then a scan is performed at intervals of 20s, 40s, 80s, and 160s (finally maintaining 160s). If a scan during this period detects that the target device is connected, then it is necessary to check whether the interval is 160s. If so, then the maximum time interval is changed to 1 hour; otherwise, the scan is performed at intervals of 20s, 40s, and 80s.
[0182] The second scenario: After a successful WiFi connection, if it is determined that the target device is connected, the scan is blocked; if the target device is not connected, then continue to check whether the underlying layer supports roaming. If the driver supports roaming, the framework is not needed to scan, and the underlying layer can roam to a better WiFi network; if the underlying layer does not support roaming, then the scan is performed according to a cycle of 20s, 40s, 80s, and 160s (ultimately set to 160s).
[0183] The third scenario: If the WiFi connection is lost and then established, the system will start two scheduled scanning tasks. One task will perform scans at intervals of 20s, 40s, 80s, and 160s (finally set at 160s). If a target device connects during this task, the maximum time interval needs to be changed to 1 hour; otherwise, the maximum 160-second scan interval will be maintained. The other task will perform a fixed scan every 20 minutes. If a target device is detected to be connected during this period, the scan will stop.
[0184] As another example, such as Figure 16 As shown, step 16.1 Power on; step 16.2 WiFi not connected; step 16.3 Start periodicScanTimerHandler; step 16.4 Check if "sys.vt.calibration_status" is 1; if it is 1, proceed to step 16.5 Stop scanning; if it is not 1, proceed to step 16.6 Check if the database "sound_wireless_speaker_enable" is 1; if it is 1, proceed to step 16.7 Check if the WiFi scan count index is greater than 3; if it is greater than 3, proceed to step 16.8 Scan at 1-hour intervals; if it is not 1 or the index is less than or equal to 3, proceed to step 16. Scanning is performed at 920s, 40s, 80s, and 160s intervals (finally set to 160s); Step 16.10 checks if automatic reconnection is possible; if not, proceed to step 16.6; if yes, step 16.11 indicates successful WiFi connection; a successful WiFi connection can also be achieved manually; Step 16.12 checks if "sys.vt.calibration_status" is 1; if it is 1, proceed to step 16.13 to disable Framework roaming; if it is not 1, proceed to step 16.14 to check if the database "sound_wireless_speaker_enable" is 1; if it is 1, proceed to step 16.13; if it is not 1, proceed according to... Figure 13 The following steps outline the subsequent scan and judgment process: Step 16.15: Disconnect the WiFi connection; Step 16.6: Start the watchdogHandler; Step 16.17: Check if "sys.vt.calibration_status" is 1; if it is 1, proceed to Step 16.18: Stop the scan; if it is not 1, proceed to Step 16.19: Check if the database "sound_wireless_speaker_enable" is 1; if it is 1, proceed to Step 16.18; if it is not 1, proceed to Step 16.20: Maintain a 20-minute interval and perform scans periodically.
[0185] Specifically, taking a TV as the display device and a wireless speaker as the target device as an example, before the TV connects to WiFi, after starting periodicScanTimerHandler, before each scan, it first checks if the attribute "sys.vt.calibration_status" is 1. If it is 1, it means the wireless speaker is in calibration mode, so the scan stops. If it is not 1, it continues to check if the setting database "sound_wireless_speaker_enable" is 1. If it is 1, it means the wireless speaker is connected, so it continues to check if the Index is greater than 3. If it is greater than 3, it scans every 1 hour; otherwise, it performs scans at 20s, 40s, 80s, and 160s (ultimately set to 160s) intervals.
[0186] Specifically, after successfully connecting to WiFi, the system first checks if the attribute "sys.vt.calibration_status" is 1. If it is 1, Framework roaming is disabled, and the system will no longer perform scanning. Otherwise, the system checks if the database setting "sound_wireless_speaker_enable" is 1. If it is 1, Framework roaming is disabled, and scanning is stopped. If it is not 1, the system continues to check the traffic and whether the underlying system supports roaming, maintaining the original Android logic.
[0187] Specifically, when the WiFi connection is lost, the handling of periodicScanTimerHandler is the same as the first step when WiFi is not connected. The handling of watchdogHandler is as follows: first, it checks if the attribute "sys.vt.calibration_status" is 1; if it is, WiFi scanning stops. Otherwise, it checks if the database value "sound_wireless_speaker_enable" is 1; if it is, scanning stops; otherwise, it continues scanning periodically every 20 minutes.
[0188] This effectively solves the problem of the system's WiFi scanning affecting the direct WiFi transmission data of the target device, ensuring the success rate of the target device's calibration function, and also solves the problem of WiFi scanning causing the target device to stutter, such as when playing sound, thus improving the user's network experience.
[0189] In some embodiments, this application also provides an electronic device, including: a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to cause the electronic device to implement the WiFi scanning control method described in any of the above embodiments when executing the computer program.
[0190] In some embodiments, this application provides a computer-readable storage medium storing a computer program that, when executed by a computing device, causes the computing device to implement the WiFi scanning control method described in any of the above embodiments.
[0191] In some embodiments, this application provides a computer program product that, when run on a computer, enables the computer to implement the WiFi scanning control method described in the second aspect or any embodiment of the second aspect.
[0192] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0193] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, thereby enabling those skilled in the art to better utilize the described embodiments and various different variations of embodiments suitable for specific use considerations.
Claims
1. A display device, characterized by comprising: The display device comprises: a display; a controller connected to the display, the controller being configured to: obtain boot information of the display device, perform system WiFi scanning based on a system Framework at a preset period, and obtain a WiFi connection state of the display device; obtain a working mode of a target device connected to the display device in a WiFi direct mode; stop the system WiFi scanning when it is determined that the WiFi connection state is WiFi not connected and the working mode is a calibration mode.
2. The display device of claim 1, wherein, The controller is further configured to: determine whether the display device is connected to the target device when the WiFi connection state is WiFi not connected and the working mode is a non-calibration mode; obtain a WiFi scanning frequency when the display device is connected to the target device; perform the system WiFi scanning based on the system Framework at a target period when the WiFi scanning frequency is greater than a target frequency.
3. The display device of claim 2, wherein, The controller is further configured to: perform the system WiFi scanning at the preset period when the display device is not connected to the target device or the WiFi scanning frequency is less than or equal to the target frequency.
4. The display device of claim 1, wherein, The controller is further configured to: turn off a Framework roaming mode when the WiFi connection state is WiFi connected and the working mode is the calibration mode.
5. The display device of claim 1, wherein, The controller is further configured to: determine whether the display device is connected to the target device when the WiFi connection state is WiFi connected and the working mode is the non-calibration mode; turn off the Framework roaming mode when the display device is connected to the target device.
6. The display device of claim 5, wherein, The controller is further configured to: stop the system WiFi scanning when the WiFi connection state is WiFi disconnected and the working mode is the calibration mode.
7. The display device of claim 6, wherein, The controller is further configured to: determine whether the display device is connected to the target device when the WiFi connection state is WiFi disconnected and the working mode is the non-calibration mode; stop the system WiFi scanning when the display device is connected to the target device; perform the system WiFi scanning at a set period when the display device is not connected to the target device.
8. The display device of claim 1, wherein, The controller is further configured to: obtain a target attribute value of the target device; determine the working mode of the target device based on the target attribute value.
9. The display device of claim 2, wherein, The controller is further configured to: obtain a target device connection identifier in a setting database; determine whether the display device is connected to the target device based on the target device connection identifier.
10. A method of WiFi scan control, the method comprising: The display device comprises: obtain boot information of the display device, perform system WiFi scanning based on a system Framework at a preset period, and obtain a WiFi connection state of the display device; Acquire a working mode of a target device connected with the display device through a WiFi direct connection; In a case where it is determined that the WiFi connection state is WiFi not connected and the working mode is a calibration mode, stop the system WiFi scanning.
Citation Information
Patent Citations
Scanning method and system for use in coexistence of dual modes and single channel
CN105792389A
Scanning parameter determination method and electronic equipment
CN113613230A