Display device and WiFi scanning control method
By obtaining the power-on information and WiFi connection status in the controller of the display device, and adjusting the WiFi scanning behavior to cope with the working mode of the target device, the problem of unstable WiFi P2P data transmission is solved, ensuring the stable usage status of the device and the improvement of user experience.
Patent Information
- Application Number
- CN202411082774.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-08-07
AI Technical Summary
WiFi P2P data transmission is unstable, especially during WiFi scanning, resulting in unstable device usage status.
By configuring the controller of the display device to obtain the boot information, perform system WiFi scanning, and obtain the WiFi connection status and the working mode of the target device. Based on this information, stop or adjust WiFi scanning to ensure the calibration function and data transmission of the target device are stable.
It effectively solves the problem of unstable device usage status caused by WiFi scanning, ensures the successful calibration function of the target device, optimizes the stability of data transmission, and improves the user's network experience.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communication technology, and more specifically, to a display device and a WiFi scanning control method. Background Art
[0002] As home entertainment systems become more complex, more and more devices need to be connected. WiFi P2P (Peer-to-Peer, WiFi Direct) technology can support direct connections between multiple devices without going through a central access point (such as a router). This technology has been used in some devices such as smart TVs, wireless speakers, and smartphones.
[0003] However, WiFi P2P technology can support direct connection between devices, but in actual use, the stability of the connection may be affected, especially in the case of WiFi scanning. For example, when WiFi scanning, the driver works in MCC (Multi-Channel Concurrency) mode. Therefore, when WiFi scanning, the WiFi channel will be cut away from the P2P channel, resulting in unstable WiFi P2P data transmission, that is, WiFi scanning will cause unstable WiFi P2P data transmission of the device. Summary of the invention
[0004] The exemplary embodiments of the present application provide a display device and a WiFi scanning control method, which are used to solve the technical problem of unstable usage status such as calibration of a target device directly connected to the display device WiFi during system WiFi scanning.
[0005] The technical solutions provided by the embodiments of this application are as follows:
[0006] In a first aspect, an embodiment of the present application provides a display device, including:
[0007] monitor;
[0008] A controller connected to the display, the controller being configured to:
[0009] Obtain the startup information of the display device, perform system WiFi scanning according to a preset period based on the system Framework, and obtain the WiFi connection status of the display device;
[0010] Obtaining the working mode of the target device connected to the display device via WiFi direct connection;
[0011] When it is determined that the WiFi connection state is WiFi not connected and the working mode is the calibration mode, the system WiFi scanning is stopped.
[0012] In some embodiments, the controller is further configured to:
[0013] When the WiFi connection state is WiFi unconnected and the working mode is uncalibrated mode, determining whether the display device is connected to the target device;
[0014] When the display device is connected to the target device, obtaining the number of WiFi scans;
[0015] When the number of WiFi scans is greater than 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 the number of WiFi scans is less than or equal to the target number, the system WiFi scan is performed according to a preset period.
[0018] In some embodiments, the controller is further configured to:
[0019] When the WiFi connection state is WiFi connected and the working mode is the calibration mode, the framework roaming mode is turned off.
[0020] In some embodiments, the controller is further configured to:
[0021] When the WiFi connection state is that WiFi is connected and the working mode is an uncalibrated mode, determining whether the display device is connected to the target device;
[0022] When the display device is connected to the target device, the framework roaming mode is turned off.
[0023] In some embodiments, the controller is further configured to:
[0024] When the WiFi connection state is WiFi disconnected and the working mode is the calibration mode, the system WiFi scanning is stopped.
[0025] In some embodiments, the controller is further configured to:
[0026] When the WiFi connection state is WiFi disconnected and the working mode is an uncalibrated mode, determining whether the display device is connected to the target device;
[0027] When the display device is connected to the target device, stopping the system WiFi scanning;
[0028] When the display device is not connected to the target device, the system WiFi scan is performed according to a set period.
[0029] In some embodiments, the controller is specifically configured to:
[0030] Obtaining a target attribute value of the target device;
[0031] An operating mode of the target device is determined based on the target attribute value.
[0032] In some embodiments, when the controller determines whether the display device is connected to the target device, the controller is specifically configured to:
[0033] Get the target device connection ID in the setting database;
[0034] It is determined whether the display device is connected to the target device based on the target device connection identifier.
[0035] In a second aspect, an embodiment of the present application provides a WiFi scanning control method, which is applied to a display device, and the method includes:
[0036] Obtain the startup information of the display device, perform system WiFi scanning according to a preset period based on the system Framework, and obtain the WiFi connection status of the display device;
[0037] Obtaining the working mode of the target device connected to the display device via WiFi direct connection;
[0038] When it is determined that the WiFi connection state is WiFi not connected and the working mode is the calibration mode, the system WiFi scanning is stopped.
[0039] In some embodiments, the method further comprises:
[0040] When the WiFi connection state is WiFi unconnected and the working mode is uncalibrated mode, determining whether the display device is connected to the target device;
[0041] When the display device is connected to the target device, obtaining the number of WiFi scans;
[0042] When the number of WiFi scans is greater than 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 comprises:
[0044] When the display device is not connected to the target device, or the number of WiFi scans is less than or equal to the target number, the system WiFi scan is performed according to a preset period.
[0045] In some embodiments, the method further comprises:
[0046] When the WiFi connection state is WiFi connected and the working mode is the calibration mode, the framework roaming mode is turned off.
[0047] In some embodiments, the method further comprises:
[0048] When the WiFi connection state is that WiFi is connected and the working mode is an uncalibrated mode, determining whether the display device is connected to the target device;
[0049] When the display device is connected to the target device, the framework roaming mode is turned off.
[0050] In some embodiments, the method further comprises:
[0051] When the WiFi connection state is WiFi disconnected and the working mode is the calibration mode, the system WiFi scanning is stopped.
[0052] In some embodiments, the method further comprises:
[0053] When the WiFi connection state is WiFi disconnected and the working mode is an uncalibrated mode, determining whether the display device is connected to the target device;
[0054] When the display device is connected to the target device, stopping the system WiFi scanning;
[0055] When the display device is not connected to the target device, the system WiFi scan is performed according to a set period.
[0056] In some embodiments, the controller is specifically configured to:
[0057] Obtaining a target attribute value of the target device;
[0058] An operating mode of the target device is determined based on the target attribute value.
[0059] In some embodiments, when the controller determines whether the display device is connected to the target device, the controller is specifically configured to:
[0060] Get the target device connection ID in the setting database;
[0061] It is determined whether the display device is connected to the target device based on the target device connection identifier.
[0062] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to enable the electronic device to implement the WiFi scanning control method described in the second aspect or any embodiment of the second aspect when executing the computer program.
[0063] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a computing device, the computing device implements the WiFi scanning control method described in the second aspect or any embodiment of the second aspect.
[0064] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on a computer, the computer implements the WiFi scanning control method described in the second aspect or any embodiment of the second aspect.
[0065] It can be seen from the above technical solutions that the display device and WiFi scanning control method provided in the embodiment of the present application obtain the power-on information of the display device, perform system WiFi scanning according to a preset period 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. The embodiment of the present application is used to solve the technical problem of unstable use status such as calibration of the target device directly connected to the display device WiFi during system WiFi scanning. By stopping the system WiFi scanning when the display device WiFi is not connected and the target device is in calibration mode, the calibration function of the target device during system WiFi scanning is guaranteed, thereby ensuring the stability of the use of the target device during system WiFi scanning and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the implementation methods in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technology descriptions. Obviously, the drawings described below are some embodiments of the present application, and a person skilled in the art can also obtain other drawings based on these drawings.
[0067] Figure 1A scenario architecture diagram of a WiFi scanning control method in some embodiments is shown;
[0068] Figure 2 A hardware configuration block diagram of a control device in some embodiments is shown;
[0069] Figure 3 A hardware configuration block diagram of a display device in some embodiments is shown;
[0070] Figure 4 A diagram showing a software configuration in a display device in some embodiments is shown;
[0071] Figure 5 An example diagram showing channel switching in some embodiments;
[0072] Figure 6 An example diagram showing a display device system framework according to some embodiments;
[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] Fig. 9 A scenario flow chart of a WiFi scanning control method according to some embodiments is shown;
[0076] Fig.10 A flowchart of another WiFi scanning control method according to some embodiments is shown;
[0077] Fig.11 A flowchart of another WiFi scanning control method according to some embodiments is shown;
[0078] Fig.12 A flowchart of another WiFi scanning control method according to some embodiments is shown;
[0079] Fig.13 A scene example diagram of an existing control method for WiFi scanning according to some embodiments is shown;
[0080] Fig.14 A flowchart of another WiFi scanning control method according to some embodiments is shown;
[0081] Fig.15 A scene example diagram of another WiFi scanning control method according to some embodiments is shown;
[0082] Fig.16A scenario example diagram of yet another WiFi scan control method according to some embodiments is shown. DETAILED DESCRIPTION
[0083] In order to make the purpose and implementation method of the present application clearer, the exemplary implementation method of the present application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only part of the embodiments of the present application, rather than all the embodiments.
[0084] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.
[0085] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.
[0086] The display device provided in the embodiments of the present application may have various implementation forms, for example, it may be 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 a specific implementation of the display device of the present application.
[0087] Figure 1 FIG. 1 is a schematic diagram of an operation scenario between a display device and a control device according to an embodiment. Figure 1 As shown, the user can operate the display device 200 through the smart device 300 or the control apparatus 100 .
[0088] In some embodiments, the control device 100 may be a remote controller, and the communication between the remote controller and the display device includes infrared protocol communication or Bluetooth protocol communication, and other short-range communication methods, and the display device 200 is controlled wirelessly or wired. The user may control the display device 200 by inputting user commands through buttons on the remote controller, voice input, control panel input, etc.
[0089] In some embodiments, a smart device 300 (such as a mobile terminal, a tablet computer, a computer, a laptop computer, etc.) may also be used to control the display device 200. For example, the display device 200 is controlled using an application running on the smart device.
[0090] In some embodiments, the display device may not use the above-mentioned smart device or control device to receive instructions, but may receive user control through touch or gestures.
[0091] In some embodiments, the display device 200 can also be controlled in a manner other than the control device 100 and the smart device 300. For example, the user's voice command control can be directly received through a module for obtaining voice commands configured inside the display device 200, or the user's voice command control can be received through a voice control device set outside the display device 200.
[0092] In some embodiments, the display device 200 also communicates data with the server 400. The display device 200 may be allowed to communicate via a local area network (LAN), a wireless local area network (WLAN), and other networks. The server 400 may provide various content and interactions to the display device 200. The server 400 may be one cluster or multiple clusters, and may include one or more types of servers.
[0093] Figure 2 Schematically shows a block diagram of a configuration of the control device 100 according to an exemplary embodiment. 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 input operation instructions from the user, and convert the operation instructions into instructions that the display device 200 can recognize and respond to, playing the role of an interactive intermediary between the user and the display device 200.
[0094] In some embodiments, the display apparatus 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, a RAM, a 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 images, and a driving component for driving image display, which is used to receive image signals output from a controller, display video content, image content, and a menu control interface component and a user control UI interface.
[0097] In some embodiments, the display 260 may be a liquid crystal display, an OLED display, and a projection display, and may also be a projection device and a projection screen.
[0098] In some embodiments, the communicator 220 is a component for communicating with an external device or server according to various communication protocol types. For example, the communicator may include at least one of a Wifi module, a Bluetooth module, a wired Ethernet module, and other network communication protocol chips or near field communication protocol chips, and an infrared receiver. The display device 200 can establish 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 may be used to receive a control signal from the control device 100 (eg, an infrared remote controller, etc.).
[0100] In some embodiments, the detector 230 is used to collect signals of the external environment or external interaction. For example, the detector 230 includes a light receiver, a sensor for collecting the intensity of ambient light; or, the detector 230 includes an image collector, such as a camera, which can be used to collect external environment scenes, user attributes or user interaction gestures; or, the detector 230 includes a sound collector, such as a microphone, etc., for receiving external sounds.
[0101] In some embodiments, the external device interface 240 may include, but is not limited to, any one or more of the following: a high-definition multimedia interface (HDMI), an analog or digital high-definition component input interface (component), a composite video input interface (CVBS), a USB input interface (USB), an RGB port, etc. It may also be a composite input / output interface formed by the above multiple interfaces.
[0102] In some embodiments, the tuner-demodulator 210 obtains broadcast television signals through 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-demodulator 210 may be located in different separate devices, that is, the tuner-demodulator 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 through various software control programs stored in the memory. The controller 250 controls the overall operation of the display device 200. For example, in response to receiving a user command for selecting a UI object to be displayed 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 may be any one of the selectable objects, such as a hyperlink, an icon or other operable controls. Operations related to the selected object include: displaying a page, document, image, etc. connected to the hyperlink, or executing a program corresponding to 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), a RAM Random Access Memory (RAM), a ROM (Read-Only Memory, ROM), a first interface to an nth interface for input / output, a communication bus (Bus), etc.
[0107] The user may input a user command through a graphical user interface (GUI) displayed on the display 260, and the user input interface receives the user input command through the graphical user interface (GUI). Alternatively, the user may input a user command through a specific sound or gesture, and the user input interface recognizes the sound or gesture through a sensor to receive the user input command.
[0108] In some embodiments, the "user interface" is a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The commonly used form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be an interface element such as an icon, window, control, etc. displayed on the display screen of an electronic device, where the control can include icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, and other visual interface elements.
[0109] See also Figure 4 In some embodiments, the system is divided into four layers, from top to bottom, namely, the application layer (Applications) layer (referred to as "application layer"), the application framework layer (Application Framework) layer (referred to as "framework layer"), the Android runtime (Android runtime) and system library layer (referred to as "system runtime library layer"), and the kernel layer.
[0110] In some embodiments, at least one application is running in the application layer, and these applications can be window programs, system settings programs, clock programs, etc. provided by the operating system, or applications developed by third-party developers. In specific implementations, the application packages in the application layer are not limited to the above examples.
[0111] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications. The application framework layer includes some predefined functions. The application framework layer is equivalent to a processing center that determines the actions that applications in the application layer take. Through the API interface, applications can access system resources and obtain system services during execution.
[0112] like Figure 4 As shown, in the embodiment of the present application, the application framework layer includes managers, content providers, etc., wherein the manager includes at least one of the following modules: an activity manager (ActivityManager) is used to interact with all activities running in the system; a location manager (Location Manager) is used to provide system services or applications with access to system location services; a package manager (Package Manager) is used to retrieve various information related to the application package currently installed on the device; a notification manager (NotificationManager) is used to control the display and clearing of notification messages; a window manager (Window Manager) is used to manage icons, windows, toolbars, wallpapers, and desktop components on the user interface.
[0113] In some embodiments, the activity manager is used to manage the life cycle of each application and the common navigation back function, such as controlling the exit, opening, and back of the application. The window manager is used to manage all window programs, such as obtaining the display screen size, determining whether there is a status bar, locking the screen, capturing the screen, and controlling the display window changes (for example, reducing the display window, shaking the display, distorting the display, etc.).
[0114] In some embodiments, the system runtime layer provides support for the upper layer, namely the framework layer. When the framework layer is used, the Android operating system will run the C / C++ library contained in the system runtime layer to implement the functions to be implemented by the framework layer.
[0115] In some embodiments, the kernel layer is a layer between hardware and software. 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, etc.
[0116] In actual applications, target devices such as wireless speakers are networked with display devices such as TVs using WiFi P2P connections. However, the WiFi function used by users and the WiFi P2P connection share the same WiFi chip hardware, and the working mode is MCC, so when WiFi scanning, it will affect target devices such as wireless speakers.
[0117] It is understandable that WiFi scanning has two main effects on target devices such as wireless speakers: for example, the calibration function of target devices such as wireless speakers. For example, if the position of the wireless speaker changes, WiFi P2P data will be used for calibration. If WiFi scanning is performed at this time, the calibration will fail. 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, the sound of the speaker will be stuck.
[0118] As an example, Figure 5 As shown, it includes P2P channels and Wlan channels. For example, when the TV uses WiFi P2P to transmit audio data to the 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, and the time to switch the Wlan channel to the P2P channel is T2, which causes the WiFi P2P data transmission to be unstable, resulting in the sound of the wireless speaker being stuck.
[0119] The display device and WiFi scanning control method of the embodiments of the present application can ensure the success of the calibration function of target devices such as wireless speakers, and can optimize the data transmission stability of the target device, 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 the WiFi scanning control of the embodiment of the present application includes an application layer, a system layer, a kernel layer, a driver layer and a kernel layer; specifically, the system layer will call the WiFiCond process that communicates with the kernel through the WiFiConnectivityManager, the WiFiCond communicates with the kernel through the Netlink, and then the kernel notifies the driver layer Wifi ko to perform WiFi scanning.
[0121] Specifically, Figure 7 As shown, the system WiFi scan uses the WiFiConnectivityManager (WiFi connection manager) class to call the WiFiScanner (WiFi scanner) interface, AsyncChannel (asynchronous channel) sends a message to WiFiScanningServiceImpl (WiFi scanning service implementation class), then to WiFiCondScannerImpl (WiFi daemon scanner implementation class), and then to WiFiNative (WiFi an interface class), and then WiFiNative will call WiFiCond that interacts with the kernel through WiFiCondControl (WiFi daemon control), and WiFiCond finally notifies the kernel and then goes to the driver to scan.
[0122] Specifically, when the scan result is ready, the kernel will notify WiFiCond, and then WiFiCond will call back to WiFiNative, and then WiFiNative will notify WiFiCondScannerImpl through WiFiMonitor to update the scan result mLatestSingleScanResult.
[0123] Furthermore, WiFiCondScannerImpl sends the latest scan result to WiFiScanningServiceImpl and then to WiFiScanner, and finally notifies ScanRequestProxy to update the scan result mLastScanResults required by the application.
[0124] The process of WiFi scanning control in this embodiment is described in detail below.
[0125] Figure 8 A flowchart of a WiFi scanning control method according to some embodiments is shown. A display device provided in an embodiment of the present application, a controller is configured to execute Figure 8 The WiFi scanning control method comprises:
[0126] Step 801, obtaining the startup information of the display device, performing system WiFi scanning according to a preset period based on the system Framework, and obtaining the WiFi connection status of the display device.
[0127] In the embodiment of the present application, the system WiFi scan request refers to the WiFi scan initiated by the system (e.g., Android system) installed on the display device. For example, after the display device is turned off, the system WiFi scan needs to be started when it is turned on; for another example, after the display device is in sleep mode, the system WiFi scan needs to be started when it is turned on. As an example, after the display device is turned on, the system framework Framework performs the system WiFi scan according to a preset period; wherein the preset period is selected and set according to the application scenario.
[0128] In the embodiment of the present application, the WiFi connection status refers to whether the display device is connected to WiFi, that is, the WiFi connection status includes connection statuses such as WiFi not connected, WiFi connected, and WiFi disconnected. Specifically, the WiFi server obtains network working information through a network acquisition function, and the WiFi connection status is determined based on the network working information. For example, the WiFiService determines whether the network working information NetworkInfo is obtained through the network acquisition function getActiveNetworkInfo(), and determines whether the network is connected through NetworkInfo.isConnected() in the network working information.
[0129] In an embodiment of the present application, the WiFi connection status of the display device can be monitored in real time and the corresponding network connection attribute value can be updated. For example, the network connection attribute value A indicates that the WiFi is not connected, the network connection attribute value B indicates that the WiFi is connected, and the network connection attribute value C indicates that the WiFi is disconnected, thereby obtaining the WiFi connection status based on the queried network connection attribute value.
[0130] Step 802, obtaining the working mode of the target device connected to the display device via WiFi direct connection.
[0131] In the embodiment of the present application, the display device may be a device such as a television, and the target device refers to a device that is directly connected to the display device via WiFi, such as a wireless speaker, a smart phone, etc., and is specifically selected and set according to the application scenario. Among them, the WiFi direct connection with the display device can be understood as the display device and the target device are connected in a WiFi direct connection mode, at which time the display device and the target device may or may not be connected.
[0132] In an embodiment of the present application, the target device may be one or more. It can be 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.; wherein the calibration mode refers to the target device undergoing position calibration processing.
[0133] Step 803: When it is determined that the WiFi connection state is WiFi not connected and the working mode is the calibration mode, stop the system WiFi scanning.
[0134] In the embodiment of the present application, when the target device is in the calibration mode, in order to ensure the accuracy of the calibration of the target device, the device WiFi is displayed as not connected, thereby stopping the system WiFi scanning to ensure the calibration function of the target device.
[0135] In the above example, by stopping the system WiFi scanning when the display device WiFi is not connected and the target device is in calibration mode, the calibration function of the target device during the system WiFi scanning is guaranteed, thereby ensuring the stability of the target device during the system WiFi scanning and improving the user experience.
[0136] Reference Fig. 9 As shown, Fig. 9 For the realization of Figure 8 The structure diagram of the display device of the WiFi scanning control method shown is used to implement Fig. 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 startup information of the display device, perform system WiFi scanning according to a preset period based on the system Framework, and acquire the WiFi connection status of the display device; the acquisition module 902 is used to acquire the working mode of the target device connected to the display device through the WiFi direct connection mode; the processing module 903 is used to stop the system WiFi scanning when it is determined that the WiFi connection status is WiFi not connected and the working mode is the calibration mode.
[0137] Fig.10 FIG. 1 is a flow chart of another WiFi scanning control method according to some embodiments. Based on the above embodiments, this embodiment further optimizes the above WiFi scanning control method. Fig.10 As shown, the method also includes:
[0138] In some embodiments of the present application, when the WiFi connection state is WiFi not connected and the working mode is an uncalibrated mode, it is determined whether the display device is connected to the target device.
[0139] In an embodiment of the present application, 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 TV transmitting audio to a wireless speaker for playback.
[0140] In an embodiment of the present application, when the WiFi connection status is that WiFi is not connected and the working mode of the target device is an uncalibrated mode, that is, the display device is not connected to WiFi and the target device is in an uncalibrated mode, it is further determined whether the display device and the target device are connected. Specifically, the target device connection identifier in the setting database is obtained based on the WiFi server, and whether the display device and the target device are connected is determined based on the target device connection identifier.
[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 the 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 the second target value, such as 0.
[0142] In some embodiments of the present 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 an embodiment of the present application, when the display device is connected to the target device, the number of WiFi scans is obtained. It can be understood that after starting the system WiFi scan, the system performs WiFi scans according to preset cycles, such as 20s, 40s, 80s and 160s (finally maintaining 160s). The number of WiFi scans refers to the number of times WiFi scans have been performed.
[0144] In an embodiment of the present 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; wherein, 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 the present application, when the display device is not connected to the target device, or the number of WiFi scans is less than or equal to the target number, the system WiFi scan is performed according to a preset period.
[0146] In an embodiment of the present application, when the display device is not connected to the target device or the number of WiFi scans is less than or equal to the target number, the system WiFi scan is performed according to a preset period.
[0147] In this way, the impact of WiFi scanning on the WiFi direct connection data transmission of the target device can be effectively solved, the success rate of the target device calibration function can be guaranteed, and the problem of sound freeze caused by WiFi scanning on the target device can be solved, thereby improving the user's network experience.
[0148] Fig.11 FIG. 1 is a flow chart of another WiFi scanning control method according to some embodiments. Based on the above embodiments, this embodiment further optimizes the above WiFi scanning control method. Fig.11 As shown, the method includes:
[0149] In some embodiments of the present application, when the WiFi connection state is WiFi connected and the working mode is the calibration mode, the framework roaming mode is turned off.
[0150] In some embodiments of the present application, when the WiFi connection state is WiFi connected and the working mode is an uncalibrated mode, it is determined whether the display device is connected to the target device.
[0151] In some embodiments of the present application, when the display device is connected to the target device, the framework roaming mode is turned off.
[0152] In the embodiment of the present application, the Android native system supports framework 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, it is necessary to turn off the framework roaming mode, that is, turn off the roaming mode.
[0153] In an embodiment of the present application, when the WiFi connection status is that WiFi is connected and the working mode is uncalibrated mode, it is determined whether the display device and the target device are connected, that is, the display device WiFi is connected and the target device is in uncalibrated mode, and it is further determined whether the display device and the target device are connected. Specifically, the target device connection identifier in the setting database is obtained based on the WiFi server, and it is determined whether the display device and the target device are connected 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 the 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 the second target value, such as 0.
[0155] In the embodiment of the present application, when the display device is connected to the target device, in order to ensure the stability of data transmission of the target device, it is necessary to close the framework 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 roaming mode is turned off when the target device is not in calibration mode but in data transmission state, thereby ensuring the success rate of the target device calibration function and solving problems such as sound stuttering caused by WiFi scanning on the target device, thereby improving the user's network experience.
[0157] Fig.12 FIG. 1 is a flowchart of another WiFi scanning control method according to some embodiments. Based on the above embodiments, this embodiment further optimizes the above WiFi scanning control method. Fig.12 As shown, the method includes:
[0158] In some embodiments of the present application, when the WiFi connection state is WiFi disconnected and the working mode is the calibration mode, the system WiFi scanning is stopped.
[0159] In some embodiments of the present application, when the WiFi connection state is WiFi disconnected and the working mode is an uncalibrated mode, it is determined whether the display device is connected to the target device.
[0160] In some embodiments of the present application, when the display device is connected to the target device, the system WiFi scan is stopped, and when the display device is not connected to the target device, the system WiFi scan is performed according to the set period.
[0161] In an embodiment of the present application, when the display device is connected to WiFi and then disconnected, 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 in the setting database is obtained based on the WiFi server, and whether the display device and the target device are connected is determined based on the target device connection identifier.
[0162] In an embodiment of the present application, when the display device is connected to the target device, in order to ensure the stability of data transmission of 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 the set period. The set period can be set as needed, for example, 20 minutes.
[0163] Therefore, when the display device WiFi is disconnected, the system WiFi scanning is stopped when the target device is in calibration mode, or the system WiFi scanning is stopped when the target device is not in calibration mode but in data transmission state, thereby ensuring the success rate of the target device calibration function and solving the problem of sound stuttering caused by WiFi scanning, thereby improving the user's network experience.
[0164] Based on the description of the foregoing embodiments, the display device has different ways of scanning WiFi when WiFi is not connected, WiFi is connected, and WiFi is disconnected, such as Fig.13 As shown, step 13.1 displays that the device is turned on; step 13.2 WiFi is not connected; step 13.3 starts periodicScanTimerHandler (periodic scan timer handler); step 13.4 performs scans according to 20s, 40s, 80s, 160s (finally keep 160s) cycles; step 13.5 determines whether to automatically reconnect; if not, continue to step 13.4; if yes, execute step 13.6 WiFi connection is successful; step 13.7 determines whether the Framework supports roaming; if not, execute step 13.8 Stop WiFi scanning; if supported, execute step 13.9 to determine whether the sending traffic / receiving traffic is lower than the threshold; if not, execute step 13.10 to determine whether the underlying layer supports roaming; if supported, execute step 13.11 to stop WiFi scanning; if not supported, execute step 13.12 to perform scanning in cycles of 20s, 40s, 80s, and 160s (finally maintaining 160s); step 13.13 disconnect WiFi connection; step 13.14 start watchdogHandler (monitoring thread); step 13.15 maintain 20 minutes and perform scanning periodically.
[0165] Specifically, after the display device is turned on, if WiFi is not connected, the Framework will start the periodicScanTimerHandler timer and execute scans in cycles of 20s, 40s, 80s, and 160s (finally maintaining 160s) in sequence. When the Index (the number of WiFi scans) is 1, 2, and 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 the WiFi connection is successful, it will first determine whether the Framework supports roaming. The Android native system supports roaming by default, so it will continue to determine whether the received traffic and sent traffic are low (for example, below a certain traffic threshold). Generally, it will be triggered only when the router signal is poor, and then continue to determine whether the underlying layer supports roaming to decide whether to perform periodic scanning.
[0167] Specifically, after the WiFi is disconnected, two timers will be started, one is the watchdogHandler, which is kept at 20 minutes and performs scans periodically, and the other is the periodicScanTimerHandler, which performs scans periodically at 20s, 40s, 80s, and 160s (finally kept at 160s).
[0168] Fig.14 FIG. 1 is a flowchart of another WiFi scanning control method according to some embodiments. Based on the above embodiments, this embodiment further optimizes the above WiFi scanning control method. Fig.14 As shown, the method includes:
[0169] In some embodiments of the present application, the display device is powered on and a system WiFi scan is started to obtain the WiFi connection status of the display device.
[0170] In some embodiments of the present application, a target attribute value of a target device is acquired, and a working mode of the target device is determined based on the target attribute value.
[0171] In some embodiments of the present application, when the WiFi connection state is WiFi not connected and the working mode is the calibration mode, the system WiFi scanning is stopped.
[0172] In some embodiments of the present application, when the WiFi connection status is WiFi not connected and the working mode is uncalibrated mode, the target device connection identifier in the setting database is obtained, and it is determined whether the display device is connected to the target device based on the target device connection identifier.
[0173] In some embodiments of the present 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 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 the present application, when the WiFi connection status is WiFi connected and the working mode is the calibration mode, the framework roaming mode is turned off; when the WiFi connection status is WiFi connected and the working mode is the uncalibrated mode, it is determined whether the display device is connected to the target device.
[0175] In some embodiments of the present application, when the display device is connected to the target device, the framework 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 the present application, when the WiFi connection status is WiFi disconnected and the working mode is uncalibrated mode, it is determined whether the display device is connected to the target device. If the display device is connected to the target device, the system WiFi scan is stopped. If the display device is not connected to the target device, the system WiFi scan is performed according to the set period.
[0177] Exemplarily, after the target device (eg, wireless speaker) application of the display device (eg, TV) enters the calibration mode, the target property value "sys.vt.calibration_status" is set to 1. After the calibration is completed, the target property value "sys.vt.calibration_status" is set to 0.
[0178] Exemplarily, after the target device (e.g., wireless speaker) application of the display device (e.g., TV) is successfully connected, the target device connection identifier "sound_wireless_speaker_enable" in the database will be set to 1; after the target device is disconnected, the target device application of the display device will set the target device connection identifier "sound_wireless_speaker_enable" in the database to 0.
[0179] As an example, Fig.15As shown, in step 15.1, the system initiates a scan; in step 15.2, it is determined whether the target device is in calibration mode; if the target device is in calibration mode, step 15.3 is executed without scanning, that is, scanning is stopped; if the target device is not in calibration mode, the WiFi connection status of the display device is determined, and step 15.4 WiFi is not connected; step 15.5 performs scanning according to a cycle of 20s, 40s, 80s, and 160s (finally maintaining 160s); step 15.6 determines whether the target device is connecting; if not, continue to step 15.5; if yes, execute step 15.7 to change the maximum interval of 160 seconds to 1 hour; step 15.8 WiFi connection is successful; step 15.9 determines whether the target device is connecting; if not, execute step 15.3 without scanning; if yes, execute step 15.1 0 Determine whether the underlying layer supports roaming; if it does, execute step 15.3 without scanning; if it does not, execute step 15.11 to scan at a period of 20s, 40s, 80s, and 160s (finally keep 160s); step 15.12 WiFi is disconnected; step 15.13 to scan at a period of 20s, 40s, 80s, and 160s (finally keep 160s); step 15.14 to determine whether the target device is connecting; if not, continue to step 15.13; if yes, execute step 15.15 to change the maximum interval of 160 seconds to 1 hour; step 15.16 to keep it at 20 minutes and perform scanning periodically; step 15.17 to determine whether the target device is connecting; if not, continue to step 15.16; if yes, execute step 15.18 to block scanning.
[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 not, it needs to be processed according to three major scenarios.
[0181] The first scenario: WiFi is not connected after booting up. If it is determined that the target device is not connected, the scan is performed according to the cycle of 20s, 40s, 80s, and 160s (finally maintained at 160s); if a scan determines that the target device is connected during this period, it is necessary to determine whether the interval is 160s. If so, the maximum time interval is changed to 1 hour. Otherwise, the scan is still performed according to 20s, 40s, and 80s.
[0182] The second scenario: After the WiFi connection is successful, if it is determined that the target device is connecting, the scan is blocked; if the target device is not connected, then continue to see whether the underlying layer supports roaming. If the driver supports roaming, there is no need for the Framework to scan, and the underlying layer can roam to a better WiFi; if the underlying layer does not support roaming, then scan according to the cycle of 20s, 40s, 80s, 160s (finally keep 160s).
[0183] The third scenario: WiFi is connected and then disconnected, then the system will start two scheduled scanning tasks, one is to perform scanning in cycles of 20s, 40s, 80s, and 160s (finally maintaining 160s); during this task, if a target device is connected, the maximum time interval needs to be changed to 1 hour, otherwise the maximum scanning interval of 160 seconds is maintained; the other task is to maintain a fixed scan for 20 minutes. If it is determined that the target device is connected during this period, the scanning will be stopped.
[0184] As another example, Fig.16 As shown, step 16.1 turns on the computer; step 16.2 WiFi is not connected; step 16.3 starts periodicScanTimerHandler; step 16.4 determines whether "sys.vt.calibration_status" is 1; if it is 1, execute step 16.5 to stop scanning; if it is not 1, execute step 16.6 to determine whether the database "sound_wireless_speaker_enable" is 1; if it is 1, execute step 16.7 to determine whether the WiFi scan count Index is greater than 3; if it is greater than 3, execute step 16.8 to scan every 1 hour; if it is not 1 or Index is less than or equal to 3, execute step 16. 920s, 40s, 80s, 160s (finally keep 160s) cycle to perform scanning; Step 16.10 determines whether to automatically reconnect; if not, execute step 16.6; if yes, step 16.11 WiFi connection is successful; where WiFi connection success can also be manually connected to WiFi; Step 16.12 determines whether "sys.vt.calibration_status" is 1; if it is 1, execute step 16.13 to close Framework roaming; if it is not 1, execute step 16.14 to determine whether the database "sound_wireless_speaker_enable" is 1; if it is 1, execute step 16.13; if it is not 1, follow Fig.13 The subsequent scanning and judgment process is shown as follows; step 16.15 disconnects the WiFi connection; step 16.6 starts watchdogHandler; step 16.17 determines whether "sys.vt.calibration_status" is 1; if it is 1, execute step 16.18 to stop scanning; if it is not 1, execute step 16.19 to determine whether the database "sound_wireless_speaker_enable" is 1; if it is 1, execute step 16.18; if it is not 1, execute step 16.20 to maintain 20 minutes and perform scanning periodically.
[0185] Specifically, take the display device as a TV and the target device as a wireless speaker as an example. Before the TV is connected to WiFi, after starting periodicScanTimerHandler, before each scan, it will first determine whether the attribute "sys.vt.calibration_status" is 1. If it is 1, it means that the wireless speaker is in calibration mode, then stop scanning. If it is not 1, continue to determine whether the setting database "sound_wireless_speaker_enable" is 1. If it is 1, it means that the wireless speaker is connecting, then continue to determine whether the Index is greater than 3. If it is greater than 3, scan at intervals of 1 hour, otherwise perform scans at 20s, 40s, 80s, 160s (finally keep 160s) cycles.
[0186] Specifically, after successfully connecting to WiFi, first determine whether the attribute "sys.vt.calibration_status" is 1. If it is 1, Framework roaming is turned off, and the system will no longer perform scanning actions; otherwise, continue to determine whether the setting database "sound_wireless_speaker_enable" is 1. If it is 1, Framework roaming is turned off and no scanning is performed; if it is not 1, then maintain the original Android logic to continue to determine whether the traffic and the underlying layer support roaming.
[0187] Specifically, when WiFi is disconnected, the processing of periodicScanTimerHandler is the same as the processing of WiFi disconnection in the first step. The processing of watchdogHandler is to first determine whether the attribute "sys.vt.calibration_status" is 1. If it is 1, WiFi scanning is stopped. Otherwise, continue to determine whether the database "sound_wireless_speaker_enable" is 1. If it is 1, the scanning is stopped; otherwise, it is maintained at 20 minutes and the scanning is performed periodically.
[0188] In this way, the impact of system WiFi scanning on the WiFi direct connection data transmission of the target device can be effectively solved, the success rate of the target device calibration function can be guaranteed, and at the same time, the problem of WiFi scanning causing the target device to freeze, such as playing sound, can be solved, thereby improving the user's network experience.
[0189] In some embodiments, the embodiments of the present application further provide an electronic device, comprising: a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to enable 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, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a computing device, the computing device implements the WiFi scanning control method described in any of the above embodiments.
[0191] In some embodiments, an embodiment of the present application provides a computer program product. When the computer program product runs on a computer, the computer implements 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 the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0193] For the convenience of explanation, the above description has been made in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or limit the embodiments to the specific forms disclosed above. Based on the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are to better explain the principles and practical applications, so that those skilled in the art can better use the embodiments and various different variations of the embodiments suitable for specific use considerations.
Claims
1. A display device, characterized in that: include: monitor; A controller connected to the display, the controller being configured to: Obtain the startup information of the display device, perform system WiFi scanning according to a preset period based on the system Framework, and obtain the WiFi connection status of the display device; Obtaining the working mode of the target device connected to the display device via WiFi direct connection; When it is determined that the WiFi connection state is WiFi not connected and the working mode is the calibration mode, the system WiFi scanning is stopped.
2. The display device according to claim 1, characterized in that The controller is further configured to: When the WiFi connection state is WiFi unconnected and the working mode is uncalibrated mode, determining whether the display device is connected to the target device; When the display device is connected to the target device, obtaining the number of WiFi scans; When the number of WiFi scans is greater than the target number, the system WiFi scan is performed according to the target period based on the system Framework.
3. The display device according to claim 2, characterized in that The controller is also configured to: When the display device is not connected to the target device, or the number of WiFi scans is less than or equal to the target number, the system WiFi scan is performed according to a preset period.
4. The display device according to claim 1, characterized in that The controller is also configured to: When the WiFi connection state is WiFi connected and the working mode is the calibration mode, the framework roaming mode is turned off.
5. The display device according to claim 1, characterized in that The controller is also configured to: When the WiFi connection state is that WiFi is connected and the working mode is an uncalibrated mode, determining whether the display device is connected to the target device; When the display device is connected to the target device, the framework roaming mode is turned off.
6. The display device according to claim 5, characterized in that The controller is also configured to: When the WiFi connection state is WiFi disconnected and the working mode is the calibration mode, the system WiFi scanning is stopped.
7. The display device according to claim 6, characterized in that The controller is also configured to: When the WiFi connection state is WiFi disconnected and the working mode is an uncalibrated mode, determining whether the display device is connected to the target device; When the display device is connected to the target device, stopping the system WiFi scanning; When the display device is not connected to the target device, the system WiFi scan is performed according to a set period.
8. The display device according to claim 1, characterized in that The controller is specifically configured to: Obtaining a target attribute value of the target device; An operating mode of the target device is determined based on the target attribute value.
9. The display device according to claim 2, characterized in that: When the controller is executing the judgment on whether the display device is connected to the target device, the controller is specifically configured as follows: Get the target device connection ID in the setting database; It is determined whether the display device is connected to the target device based on the target device connection identifier.
10. A WiFi scanning control method, characterized in that: include: Obtain the startup information of the display device, perform system WiFi scanning according to a preset period based on the system Framework, and obtain the WiFi connection status of the display device; Obtaining the working mode of the target device connected to the display device via WiFi direct connection; When it is determined that the WiFi connection state is WiFi not connected and the working mode is the calibration mode, the system WiFi scanning is stopped.
Citation Information
Patent Citations
WiFi direct connecting method and WiFi direct connecting device
CN105392210A
Scanning method and system for use in coexistence of dual modes and single channel
CN105792389A
PRINTING APPARATUS, CONTROL METHOD OF THE SAME, AND storage medium
CN109144434A
WiFi P2P connection method and device, mobile terminal and storage medium
CN113382457A
Scanning parameter determination method and electronic equipment
CN113613230A