Network control method and electronic equipment
By reducing the BT network bit rate and/or disabling BT network scanning, the intermittent audio problem caused by BT and Wi-Fi networks competing for antennas is resolved, achieving a balance between Wi-Fi network stability and BT device audio output.
Patent Information
- Application Number
- CN202410338763.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-20
- Publication Date
- 2025-09-30
AI Technical Summary
In electronic devices, when BT networks and Wi-Fi networks work at the same time, they occupy each other's antennas, causing the Wi-Fi network to be intermittent, increasing latency and reducing user experience.
By lowering the BT network bitrate and/or turning off BT network scanning, you can reduce interference with the Wi-Fi network and avoid intermittent connections.
Effectively reduce Wi-Fi network latency, improve user Internet experience, and ensure BT devices output better audio when appropriate.
Smart Images

Figure CN120730433A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a network control method and electronic equipment. Background Art
[0002] Currently, most electronic devices support Bluetooth (BT) technology and Wireless Fidelity (Wi-Fi) technology, and more and more scenarios require BT networks and Wi-Fi networks to work simultaneously.
[0003] In some electronic devices, BT and Wi-Fi networks share antennas to transmit and receive data. Therefore, when BT and Wi-Fi networks are operating simultaneously, they will compete for antenna space, resulting in intermittent Wi-Fi connectivity and increased Wi-Fi latency, which degrades the user experience. Summary of the Invention
[0004] The embodiments of the present application provide a network control method and electronic device, which can avoid intermittent Wi-Fi network connection, reduce Wi-Fi network latency, and improve the user's Internet experience when the BT network and Wi-Fi network are operating simultaneously.
[0005] In a first aspect, an embodiment of the present application provides a network control method, which includes the following steps: detecting that a first application is running in the foreground; in response to the first application running in the foreground, when the electronic device is in a first coexistence scenario of a Bluetooth BT network and a Wireless Fidelity Wi-Fi network, reducing the bit rate of the BT network and / or turning off network scanning of the BT network.
[0006] In the method provided in an embodiment of the present application, when a first application running in the foreground of an electronic device is in a first coexistence scenario of a BT network and a Wi-Fi network, the method reduces the bit rate of the BT network or turns off the network scanning of the BT network, or reduces the bit rate of the BT network and turns off the network scanning of the BT network at the same time. In other words, by reducing the bit rate of the BT network and turning off the network scanning of the BT network, the electronic device reduces the interference of the BT network on the use of the Wi-Fi network, avoids intermittent connection of the Wi-Fi network, reduces the latency of the Wi-Fi network, and improves the user's Internet experience.
[0007] In one implementation, the first application includes a delay-sensitive application and / or a speed measurement application. When the application running in the foreground of the electronic device is a delay-sensitive application and / or a speed measurement application, the BT network and the Wi-Fi network will compete for the antenna, causing the BT network to interfere with the Wi-Fi network. The electronic device reduces the interference of the BT network on the use of the Wi-Fi network by reducing the bit rate of the BT network and turning off the network scanning of the BT network, thereby avoiding intermittent Wi-Fi network, reducing the delay of the Wi-Fi network, and improving the user's Internet experience.
[0008] In one implementation, the first coexistence scenario includes: the Wi-Fi network and the BT network are in the same frequency band, and the BT network is in a media playback state and a call closed state. When the electronic device is in the first coexistence scenario, the BT network and the Wi-Fi network will compete for antenna space, causing the BT network to interfere with the Wi-Fi network. In this way, the electronic device reduces the interference of the BT network on the use of the Wi-Fi network by reducing the BT network bit rate and / or disabling network scanning of the BT network, thereby avoiding intermittent Wi-Fi network connections, reducing Wi-Fi network latency, and improving the user's Internet experience.
[0009] In one implementation, reducing the BT network bitrate includes reducing the BT network bitrate to the first bitrate when the current BT network bitrate is greater than the first bitrate. This allows the electronic device to reduce the BT network bitrate, avoiding intermittent Wi-Fi network connectivity, reducing Wi-Fi network latency, and improving the user's online experience.
[0010] In one implementation, after lowering the bit rate of the BT network, the method further includes: detecting that a second application is running in the foreground, the second application including a non-delay-sensitive application and / or a non-speed measurement application; and increasing the bit rate of the BT network in response to the second application running in the foreground. When the application running in the foreground of the electronic device is a non-delay-sensitive application and / or a non-speed measurement application, although the BT network will compete with the Wi-Fi network for the antenna and the Wi-Fi network has a high latency, it does not affect the user's experience of using the Wi-Fi network. The electronic device can increase the bit rate of the BT network, which is conducive to the BT device outputting better audio through the BT network.
[0011] In one implementation, after closing the network scan of the BT network, the method further includes: detecting that a second application is running in the foreground, the second application including a non-delay-sensitive application and / or a non-speed measurement application; and in response to the second application running in the foreground, starting the network scan of the BT network. When the application running in the foreground of the electronic device is a non-delay-sensitive application and / or a non-speed measurement application, although the BT network will compete with the Wi-Fi network for the antenna and the Wi-Fi network has a high latency, it does not affect the user's experience of using the Wi-Fi network. The electronic device can start the network scan of the BT network, which is conducive to the BT device outputting better audio through the BT network.
[0012] In one implementation, after reducing the bit rate of the BT network, the method further includes increasing the bit rate of the BT network when the electronic device switches to a second coexistence scenario of the BT network and the Wi-Fi network. That is, when the BT network and the Wi-Fi network of the electronic device already meet the second coexistence scenario, the BT network will not interfere with the Wi-Fi network. The electronic device can increase the bit rate of the BT network, which is conducive to the BT device outputting better audio through the BT network.
[0013] In one implementation, after disabling BT network scanning, the method further includes: enabling BT network scanning when the electronic device switches to a second coexistence scenario of the BT network and the Wi-Fi network. That is, when the BT network and the Wi-Fi network of the electronic device already satisfy the second coexistence scenario, the BT network will not interfere with the Wi-Fi network. Enabling BT network scanning on the electronic device facilitates better audio output from the BT device via the BT network.
[0014] In one implementation, the second coexistence scenario includes: the Wi-Fi network and the BT network are in the same frequency band, and the BT network is in a call-enabled state. When the electronic device is in the second coexistence scenario, the BT network does not interfere with the Wi-Fi network. In this way, the electronic device ensures better audio output from the BT device via the BT network by increasing the BT network bitrate and / or enabling BT network scanning.
[0015] In one implementation, after reducing the bit rate of the BT network, the method further includes: increasing the bit rate of the BT network when the electronic device switches to a third coexistence scenario of the BT network and the Wi-Fi network. When the BT network and the Wi-Fi network of the electronic device already meet the third coexistence scenario, the BT network will not interfere with the Wi-Fi network. The electronic device can increase the bit rate of the BT network, which is conducive to the BT device outputting better audio through the BT network.
[0016] In one implementation, after disabling network scanning for the BT network, the method further includes: enabling network scanning for the BT network when the electronic device switches to a third coexistence scenario of the BT network and the Wi-Fi network. That is, when the BT network and the Wi-Fi network of the electronic device already satisfy the third coexistence scenario, the BT network will not interfere with the Wi-Fi network. Enabling network scanning for the BT network by the electronic device facilitates better audio output by the BT device over the BT network.
[0017] In one implementation, the third coexistence scenario includes: the Wi-Fi network and the BT network are in the same frequency band, the BT network is in a media-off state, and the call-off state. When the electronic device is in the third coexistence scenario, the BT network does not interfere with the Wi-Fi network. In this way, the electronic device ensures better audio output from the BT device via the BT network by increasing the BT network bitrate and / or enabling network scanning for the BT network.
[0018] In one implementation, after reducing the bit rate of the BT network, the method further includes: when the electronic device switches to a non-coexistence scenario of the BT network and the Wi-Fi network, increasing the bit rate of the BT network. In other words, when the BT network and the Wi-Fi network of the electronic device have satisfied the non-coexistence scenario, the BT network will not compete with the Wi-Fi network for antenna space, and the BT network will not interfere with the Wi-Fi network. The electronic device can increase the bit rate of the BT network, which is conducive to the BT device outputting better audio through the BT network.
[0019] In one implementation, after turning off network scanning for the BT network, the method further includes: turning on network scanning for the BT network when the electronic device switches to a non-coexistence scenario between the BT network and the Wi-Fi network. That is, when the BT network and the Wi-Fi network of the electronic device have satisfied the non-coexistence scenario, the BT network will not compete with the Wi-Fi network for antenna space, and the BT network will not interfere with the Wi-Fi network. The electronic device can turn on network scanning for the BT network, which is conducive to the BT device outputting better audio through the BT network.
[0020] In one implementation, a non-coexistence scenario includes the Wi-Fi network and the BT network being in different frequency bands. When the BT network and Wi-Fi network of an electronic device meet the non-coexistence scenario, the BT network will not compete with the Wi-Fi network for antenna space, and the BT network will not interfere with the Wi-Fi network. The electronic device can increase the BT network bitrate and / or enable BT network scanning, which facilitates better audio output from the BT device over the BT network.
[0021] In one implementation, detecting that the first application is running in the foreground includes: the Wi-Fi service module of the electronic device detecting a change in the application running in the foreground; if the application running in the foreground changes to a delay-sensitive application or a speed measurement application, the Wi-Fi service module determines that the first application is running in the foreground. In this way, when the application running in the foreground of the electronic device is a delay-sensitive application and / or a speed measurement application, the BT network and the Wi-Fi network will compete with each other for antennas, causing interference between the BT network and the Wi-Fi network. The electronic device reduces the interference of the BT network on the use of the Wi-Fi network by reducing the bit rate of the BT network and turning off the network scanning of the BT network, thereby avoiding the intermittent Wi-Fi network, reducing the delay of the Wi-Fi network, and improving the user's Internet experience.
[0022] In one implementation, before detecting that the first application is running in the foreground, the method further includes: the Wi-Fi service module of the electronic device obtains a first broadcast message sent by the Wi-Fi management module, the first broadcast message including the frequency band of the Wi-Fi network; the Wi-Fi service module obtains a second broadcast message sent by the BT management module of the electronic device, the second broadcast message including the media working status of the BT network and the call working status of the BT network; the Wi-Fi service module determines a first coexistence scenario of the BT network and the Wi-Fi network based on the first broadcast message and the second broadcast message. When the electronic device is in the first coexistence scenario of the BT network and the Wi-Fi network, the BT network and the Wi-Fi network will compete for the antenna, causing the BT network to interfere with the Wi-Fi network. The electronic device reduces the interference of the BT network on the use of the Wi-Fi network by reducing the bit rate of the BT network and turning off the network scanning of the BT network, thereby avoiding the intermittent connection of the Wi-Fi network, reducing the latency of the Wi-Fi network, and improving the user's Internet experience.
[0023] In one implementation, reducing the bitrate of a BT network includes: the Wi-Fi service module of the electronic device sends a first instruction to the Wi-Fi driver module, the first instruction including a first bitrate, which is less than the current bitrate of the BT network; the Wi-Fi driver module of the electronic device sends the first instruction to the Wi-Fi firmware of the electronic device; the Wi-Fi firmware sends the first instruction to the BT firmware of the electronic device; and the BT firmware, upon receiving the first instruction, reduces the bitrate of the BT network to the first bitrate. In this way, the electronic device can reduce the bitrate of the BT network, avoid intermittent Wi-Fi network connectivity, reduce Wi-Fi network latency, and improve the user's online experience.
[0024] In one implementation, disabling BT network scanning includes: the Wi-Fi service module of the electronic device sending a second instruction to the BT service module of the electronic device; and the BT service module receiving the second instruction and disabling BT network scanning. In this way, the electronic device can disable BT network scanning, thereby avoiding intermittent Wi-Fi network connectivity, reducing Wi-Fi network latency, and improving the user's online experience.
[0025] In one implementation, detecting that a second application is running in the foreground includes: a Wi-Fi service module of the electronic device detecting a change in the foreground application; and if the foreground application changes to a non-latency-sensitive application or a non-speed-measurement application, the Wi-Fi service module determining that the second application is running in the foreground. When the foreground application of the electronic device is a non-latency-sensitive application and / or a non-speed-measurement application, the BT network and the Wi-Fi network will not compete for antenna space, and the electronic device can increase the BT network bitrate, which facilitates the BT device to output better audio via the BT network.
[0026] In one implementation, increasing the bitrate of the BT network includes: the Wi-Fi service module of the electronic device sends a third instruction to the Wi-Fi driver module of the electronic device, the third instruction including a second bitrate, where the second bitrate is greater than the current bitrate of the BT network; the Wi-Fi driver sends the third instruction to the Wi-Fi firmware of the electronic device; the Wi-Fi firmware sends the third instruction to the BT firmware of the electronic device; and the BT firmware, upon receiving the third instruction, increases the bitrate of the BT network to the second bitrate. In other words, by increasing the bitrate of the BT network, the electronic device can facilitate better audio output from the BT device over the BT network.
[0027] In one implementation, initiating a BT network scan includes: a Wi-Fi service module of the electronic device sending a fourth instruction to a BT service module of the electronic device; and the BT service module initiating a BT network scan upon receiving the fourth instruction. The electronic device can increase the bit rate of the BT network to facilitate better audio output by the BT device over the BT network.
[0028] In a second aspect, the present application provides a network control device that implements the electronic device behavior described in the method of the first aspect. This functionality can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the aforementioned functionality, such as a Wi-Fi management unit or module.
[0029] In a third aspect, an embodiment of the present application provides an electronic device, which includes a memory and one or more processors; the memory is coupled to the processor; wherein computer program code is stored in the memory, and the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the network control method provided in the first aspect and any possible design method thereof.
[0030] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the network control method provided in the first aspect and any possible design method thereof.
[0031] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device executes the network control method provided in the first aspect and any possible design method thereof.
[0032] It can be understood that the beneficial effects that can be achieved by the technical solutions provided in the second to fifth aspects mentioned above can be referred to the beneficial effects in the first aspect and any possible design method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0034] Figure 1 This is a scenario diagram of a network control method provided by an embodiment of the present application;
[0035] Figure 2 This is a schematic diagram of BT network and Wi-Fi network interference provided by the embodiment of the present application. Figure 1 ;
[0036] Figure 3 This is a schematic diagram of BT network and Wi-Fi network interference provided by the embodiment of the present application. Figure 2 ;
[0037] Figure 4 This is a test diagram of a network control method provided by an embodiment of the present application. Figure 1 ;
[0038] Figure 5 This is a test result diagram of a network control method provided by an embodiment of the present application. Figure 1 ;
[0039] Figure 6 This is a test diagram of a network control method provided by an embodiment of the present application. Figure 2 ;
[0040] Figure 7 This is a test result diagram of a network control method provided by an embodiment of the present application. Figure 2 ;
[0041] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0042] Figure 9 A software architecture diagram of an electronic device provided in an embodiment of the present application;
[0043] Figure 10 A process for providing a network control method for the embodiment of the present application Figure 1 ;
[0044] Figure 11 A process for providing a network control method for the embodiment of the present application Figure 2 ;
[0045] Figure 12 A process for providing a network control method for the embodiment of the present application Figure 3 ;
[0046] Figure 13 A process for providing a network control method for the embodiment of the present application Figure 4 ;
[0047] Figure 14 A process for providing a network control method for the embodiment of the present application Figure 5 ;
[0048] Figure 15 A process for providing a network control method for the embodiment of the present application Figure 6 ;
[0049] Figure 16 A process for providing a network control method for the embodiment of the present application Figure 7 ;
[0050] Figure 17 A process for providing a network control method for the embodiment of the present application Figure 8 ;
[0051] Figure 18 A process for providing a network control method for the embodiment of the present application Figure 9 ;
[0052] Figure 19 A process for providing a network control method for the embodiment of the present application Figure 10 ;
[0053] Figure 20 A process for providing a network control method for the embodiment of the present application Figure 10 one;
[0054] Figure 21 A process for providing a network control method for the embodiment of the present application Figure 10 two;
[0055] Figure 22 A schematic diagram of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] The following will clearly describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments of the present application, other embodiments obtained by ordinary technicians in this field without making any creative work are all within the scope of protection of this application.
[0057] Hereinafter, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature identified with "first," "second," etc., may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0058] In addition, in this application, directional terms such as "upper", "lower", "inner" and "outer" are defined relative to the orientation of the components in the drawings. It should be understood that these directional terms are relative concepts. They are used for relative description and clarification, and they can change accordingly according to changes in the orientation of the components in the drawings.
[0059] The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application. The embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0060] In order to facilitate technical personnel to understand the technical solutions of the embodiments of the present application, the technical terms involved in the embodiments of the present application are explained below.
[0061] Bluetooth (BT) technology is an open global standard for wireless data and voice communications. It is a specialized short-range wireless technology that establishes a communication environment for fixed and mobile devices based on low-cost, short-range wireless connections, such as Bluetooth headsets. The BT network operates in the 2.4 GHz ISM band.
[0062] Bit rate, also known as bit rate, is a term used in telecommunications and computing to describe the number of bits transmitted or processed in a network per unit time. For ease of description, the bit rate of a BT network is referred to as the BT bit rate in this embodiment.
[0063] An encoder is a device that compiles and converts signals or data into a specific encoding format for communication, transmission, and storage. Generally speaking, there is a one-to-one correspondence between encoding formats and bit rates. Taking Table 1 as an example, a BT encoder can provide multiple audio encodings, and different audio encodings correspond to different BT bit rates. The higher the BT bit rate, the better the audio quality.
[0064] Table 1
[0065]
[0066] The embodiments of the present application will be described below with reference to the accompanying drawings.
[0067] With the development of electronic devices, more and more electronic devices support both BT technology and Wi-Fi technology, so that they can use the BT network while being connected to the Wi-Fi network.
[0068] Figure 1 This is a scenario diagram of a network control method provided in an embodiment of the present application.
[0069] For example, Figure 1 As shown in (a) and (b) in FIG, taking a mobile phone as an example, after receiving the user's operation of selecting a Wi-Fi network in the available Wi-Fi list on the Wi-Fi management page 11, the mobile phone connects to the Wi-Fi network selected by the user to surf the Internet, and displays the status icon 101 of the connected Wi-Fi network in the status bar. Figure 1 As shown in (b) and (c) of FIG, after the user selects the Bluetooth headset from the list of available BT devices on the BT management interface 12, the mobile phone establishes a Bluetooth network connection with the selected BT device and displays a Bluetooth network connected status icon 102 in the status bar. In this way, the user can use the Bluetooth headset to play music and other audio resources while the phone is connected to both the Wi-Fi network and the Bluetooth network.
[0070] like Figure 2 As shown in the figure, in some electronic devices, the 2.4GHz Wi-Fi network and the BT network will share the antenna to send and receive data. Therefore, in the scenario where the 2.4GHz Wi-Fi network and the BT network coexist, the Wi-Fi network and the BT network will compete with each other for the antenna. Figure 2Antenna A in the BT network causes the Wi-Fi network to be unable to send or receive data packets while the BT network is sending or receiving data packets.
[0071] For example, Figure 3 As shown in the figure, when only Wi-Fi is working, Wi-Fi can continuously send and receive data packets. When Wi-Fi and BT networks coexist, they compete for antenna space, so data packets can only be sent and received using antenna time division multiplexing. This increases the latency of Wi-Fi data packet transmission and reception, causing users to experience intermittent Wi-Fi connection and a reduced user experience.
[0072] The following combination Figure 4 and Figure 5 Taking the ping latency between electronic devices and routers as an example, this article explains in more detail the reasons for increased Wi-Fi network latency when Wi-Fi networks and BT networks coexist in the 2.4 GHz frequency band.
[0073] like Figure 4 As shown in the figure, in the scenario where only the Wi-Fi network is connected, the electronic device sends a ping request to the router at the xth millisecond. After receiving the ping request, the router immediately sends a ping reply to the electronic device. The electronic device receives the ping reply at the (x+t)th millisecond, where t is in milliseconds. Therefore, the ping delay between the electronic device and the router is t milliseconds.
[0074] Continue as Figure 4 As shown, in the scenario where the BT network and Wi-Fi network coexist, the electronic device sends a ping request to the router in the xth millisecond. After the router receives the ping request, it cannot immediately send a ping reply to the electronic device because the antenna is preempted by the BT network. After waiting for T milliseconds, the BT network no longer preempts the antenna, and the router sends a ping reply to the electronic device in (x+t+T) milliseconds. It can be seen that the ping delay between the electronic device and the router is t+T milliseconds. In other words, compared to the scenario where the electronic device is only connected to the Wi-Fi network, the ping delay is higher in the scenario where the BT network and Wi-Fi network coexist, so the user experience of using the Wi-Fi network is worse.
[0075] Figure 5 Table 2 shows the corresponding relationship between different audio encoding and ping delay in the scenario of connecting only to Wi-Fi network and the scenario of BT network and Wi-Fi network coexisting. Figure 5 As shown in Table 2:
[0076] When connected only to Wi-Fi, the ping delay between the electronic device and the router is 4 milliseconds.
[0077] In scenarios where BT networks and Wi-Fi networks coexist;
[0078] If the BT network uses SBC encoding, the ping delay between the electronic device and the router is 24 milliseconds;
[0079] If the BT network uses AAC encoding, the ping delay between the electronic device and the router is 23 milliseconds;
[0080] If the BT network uses APTX encoding, the ping delay between the electronic device and the router is 24.6 milliseconds;
[0081] If the BT network uses LDAC330 encoding, the ping delay between the electronic device and the router is 25 milliseconds;
[0082] If the BT network uses LDAC660 encoding, the ping delay between the electronic device and the router is 47.3 milliseconds;
[0083] If the BT network uses LDAC990 encoding, the ping delay between the electronic device and the router is 152 milliseconds.
[0084] Table 2
[0085]
[0086] This shows that in the scenario where BT networks and Wi-Fi networks coexist, the ping delay between electronic devices and routers is related to the audio encoding used by the BT network. The higher the BT bit rate corresponding to the audio encoding, the higher the ping delay.
[0087] It should be noted that the unit of the above delay is only milliseconds as an example, and other time units can also be used, which is not limited here.
[0088] The following combination Figure 6 and Figure 7 Taking gaming latency as an example, this article explains in more detail the reasons why Wi-Fi network latency increases when the 2.4GHz Wi-Fi network and BT network coexist.
[0089] like Figure 6 As shown in the figure, in the scenario where only Wi-Fi network is connected, the client sends a message to the server at time t0. ’ The server's reply message is received at the moment. In other words, the game delay between the client and the server is t0 ’ -t0 milliseconds.
[0090] In the scenario where BT network and Wi-Fi network coexist, the client sends a message to the server at time t0. After that, because the antenna is occupied by the BT network, the client cannot receive the reply message from the server during the period of antenna occupation. After the BT network no longer preempts the antenna, the client ’ At t1 after the time, the server receives the reply message. In other words, the game delay between the client and the server is t1-t0 ’ It can be seen that the game delay in the scenario where the electronic device is only connected to the Wi-Fi network and the BT network and Wi-Fi network coexist is increased by t1-t0 compared to the game delay in the scenario where the electronic device is only connected to the Wi-Fi network. ’ milliseconds, so users have a worse gaming experience using Wi-Fi networks.
[0091] Figure 7 Table 3 shows the corresponding relationship between different audio encoding and game delay in the scenario of connecting only to Wi-Fi network and the scenario of BT network and Wi-Fi network coexisting. Figure 7 As shown in Table 3:
[0092] When connected only to a Wi-Fi network, the game latency between the client and the server is 24 milliseconds.
[0093] In the scenario where BT and Wi-Fi networks coexist:
[0094] If the BT network uses SBC encoding, the game delay between the client and the server is 41 milliseconds;
[0095] If the BT network uses AAC encoding, the game delay between the client and the server is 32 milliseconds;
[0096] If the BT network uses LDAC330 encoding, the game delay between the client and the server is 35 milliseconds;
[0097] If the BT network uses LDAC990 encoding, the game delay between the client and the server is 169 milliseconds.
[0098] Table 3
[0099]
[0100] It should be noted that in the above example of game latency, for ease of understanding, only the client receiving data packets is taken as an example. The above process also applies to the client sending data packets.
[0101] In summary, the two examples above show that when a BT network and a 2.4 GHz Wi-Fi network coexist, the BT network and Wi-Fi network compete for antenna space, increasing Wi-Fi network latency and degrading user experience.
[0102] To solve the above problems, an embodiment of the present application provides a network control method, which reduces Wi-Fi network latency in a scenario where a BT network and a 2.4 GHz Wi-Fi network coexist, meets users' Internet access needs, and improves the user experience.
[0103] The solutions provided in the embodiments of the present application can be applied to electronic devices. For example, the electronic devices may be mobile phones, tablet computers, smart watches, desktop computers, laptop computers, handheld computers, notebook computers, ultra-mobile personal computers (UMPCs), netbooks, as well as cellular phones, personal digital assistants (PDAs), augmented reality (AR) and virtual reality (VR) devices, and other devices including BT firmware and Wi-Fi firmware. The embodiments of the present application do not impose any particular restrictions on the specific form of the electronic devices.
[0104] In addition, it should be noted that the network control method provided in the embodiments of the present application can be applied to scenarios where Wi-Fi networks and BT networks coexist on electronic devices. For example, a Wi-Fi network in the 2.4 GHz frequency band and a BT network share antennas to transmit and receive data, resulting in a poor Wi-Fi network.
[0105] For example, taking mobile phone 800 as an example of the above electronic device, Figure 8 Schematic diagram of the structure of mobile phone 800 is shown. Figure 8 As shown, the mobile phone 800 may include a processor 810, an external memory interface 820, an internal memory 821, a mobile communication module 830, a wireless communication module 840, a charging management module 850, a power management module 860, a battery 870, an antenna 1, an antenna 2, an audio module 880, a sensor module 890, a button 891, a motor 892, an indicator 893, a display screen 894, and a subscriber identification module (SIM) card interface 895, etc.
[0106] It should be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the mobile phone 800. In other embodiments of the present application, the mobile phone 800 may include more or fewer components than shown, or some components may be combined or separated, or the components may be arranged differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0107] The processor 810 may include one or more processing units. For example, the processor 810 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0108] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0109] A memory may also be provided in the processor 810 for storing instructions and data. In some embodiments, the memory in the processor 810 is a cache memory. The memory may store instructions or data that the processor 810 has just used or is cyclically used. If the processor 810 needs to use the instruction or data again, it may be directly called from the memory. Repeated access is avoided, the waiting time of the processor 810 is reduced, and the efficiency of the system is improved. In some embodiments, the processor 810 may include one or more interfaces. In an embodiment of the present application, the processor 810 may be used to reduce the bit rate of the BT network when it is determined that the current scenario is a coexistence scenario in which the BT network and the Wi-Fi network are working simultaneously and the application of the electronic device is a delay-sensitive application or a speed measurement application, thereby improving the user's Internet experience using the Wi-Fi network.
[0110] In some embodiments, the processor 810 may include one or more interfaces, such as an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, and the like.
[0111] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 810 may be coupled to the touch sensor 890D, a charger, a flash, etc. via different I2C bus interfaces. For example, the processor 810 may be coupled to the touch sensor 890D via the I2C interface, enabling communication between the processor 810 and the touch sensor 890D via the I2C bus interface, thereby implementing the touch function of the electronic device 800.
[0112] The I2S interface can be used for audio communication. In some embodiments, the processor 810 can include multiple I2S buses. The processor 810 can be coupled to the audio module 880 via the I2S bus to enable communication between the processor 810 and the audio module 880. In some embodiments, the audio module 880 can transmit audio signals to the wireless communication module 840 via the I2S interface, thereby enabling the functions of making calls or playing media audio via a Bluetooth device in the embodiments of the present application.
[0113] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 880 and the wireless communication module 840 can be coupled via a PCM bus interface. In some embodiments, the audio module 880 can also transmit audio signals to the wireless communication module 840 via the PCM interface, enabling the function of making calls or playing media audio via a Bluetooth device. Both the I2S interface and the PCM interface can be used for audio communication.
[0114] It should be understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only for illustrative purposes and does not constitute a structural limitation on the electronic device.
[0115] The charging management module 850 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. While charging the battery 870, the charging management module 850 can also provide power to the mobile phone 800 through the power management module 860.
[0116] The power management module 860 is connected to the battery 870. The power management module 860 receives input from the battery 870 and / or the charging management module 850 and provides power to the processor 810, the internal memory 821, the display 894, and the wireless communication module 840 (such as a Wi-Fi chip). The power management module 860 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 860 can also be provided in the processor 810. In other embodiments, the power management module 860 and the charging management module 850 can also be provided in the same device.
[0117] The wireless communication function of the mobile phone 800 can be implemented through antenna 1, antenna 2, mobile communication module 830, wireless communication module 840, modem processor and baseband processor.
[0118] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in mobile phone 800 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antenna can be used in conjunction with a tuning switch. In this embodiment of the present application, a Wi-Fi network and a BT network can share an antenna in the 2.4 GHz frequency band.
[0119] The mobile communication module 830 can provide wireless communication solutions for mobile phone 800, including 2G / 3G / 4G / 5G. The mobile communication module 830 may include at least one filter, a switch, a power amplifier, a low-noise amplifier (LNA), etc. The mobile communication module 830 can receive electromagnetic waves from antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modem processor for demodulation.
[0120] The wireless communication module 840 can provide wireless communication solutions for the mobile phone 800, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. In some embodiments of the present application, when the wireless communication module 840 provides WLAN and BT solutions on the mobile phone 800, the wireless communication module 840 may include the Wi-Fi firmware and BT firmware in the present application.
[0121] In some embodiments, antenna 1 of mobile phone 800 is coupled to mobile communication module 830 , and antenna 2 is coupled to wireless communication module 840 , so that mobile phone 800 can communicate with the network and other devices through wireless communication technology.
[0122] Mobile phone 800 implements display functions through a GPU, display screen 894, and an application processor. The GPU is a microprocessor for image processing that connects display screen 894 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 810 may include one or more GPUs that execute program instructions to generate or modify display information.
[0123] Display screen 894 is used to display images, videos, etc. Display screen 894 includes a display panel. For example, display screen 894 may be a touch screen. In some embodiments of the present application, after a user opens different applications, the display screen may be used to display different application interfaces, such as a speed measurement interface, a real-time game interface, and a real-time voice call interface.
[0124] The external memory interface 820 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 800.
[0125] The internal memory 821 can be used to store computer executable program codes, which include instructions. The internal memory 821 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the mobile phone 800 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 821 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 810 executes various functions and data processing of the mobile phone 800 by running instructions stored in the internal memory 821 and / or instructions stored in a memory provided in the processor 810.
[0126] The electronic device 800 can implement audio functions such as music playback, voice calls, and recording through the audio module 880, speaker 880A, receiver 880B, microphone 880C, and application processor.
[0127] The audio module 880 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 880 can also be used to encode and decode audio signals. In some embodiments, the audio module 880 can be provided in the processor 810, or some functional modules of the audio module 880 can be provided in the processor 810.
[0128] The speaker 880A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 800 can listen to music or listen to hands-free calls through the speaker 880A.
[0129] Receiver 880B, also known as a "handset," converts audio signals into sound signals. When electronic device 800 receives a call or voice message, the user can hold receiver 880B close to their ear to listen. In this embodiment, receiver 880B is used to receive voice calls or voice messages for latency-sensitive applications.
[0130] Microphone 880C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a voice call or implementing voice communication, the user can speak by putting their mouth close to the microphone 880C to input the sound signal into the microphone 880C. The electronic device 800 can be provided with at least one microphone 880C. In other embodiments, the electronic device 800 can be provided with two microphones 880C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 800 can also be provided with three, four or more microphones 880C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.
[0131] The sensor module 890 may include a pressure sensor 890A, a fingerprint sensor 890B, a temperature sensor 890C, a touch sensor 890D, and the like.
[0132] Among them, the pressure sensor 890A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 890A can be set on the display screen 894. There are many types of pressure sensors 890A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a device including at least two parallel plates with conductive material. When a force acts on the pressure sensor 890A, the capacitance between the electrodes changes. The mobile phone 800 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 894, the mobile phone 800 detects the intensity of the touch operation based on the pressure sensor 890A. The mobile phone 800 can also calculate the position of the touch based on the detection signal of the pressure sensor 890A. In an embodiment of the present application, the pressure sensor senses whether the application has changed based on the user's touch operation.
[0133] Fingerprint sensor 890B is used to collect fingerprints. Mobile phone 800 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint answering calls, etc.
[0134] Temperature sensor 890C is used to detect temperature. In some embodiments, mobile phone 800 uses the temperature detected by temperature sensor 890C to implement temperature management strategies. For example, when the temperature reported by temperature sensor 890C exceeds a threshold, mobile phone 800 reduces the performance of the processor located near temperature sensor 890C to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is below another threshold, mobile phone 800 heats battery 870 to prevent abnormal shutdown of mobile phone 800 due to low temperature. In other embodiments, when the temperature is below yet another threshold, mobile phone 800 boosts the output voltage of battery 870 to prevent abnormal shutdown due to low temperature.
[0135] Touch sensor 890D, also known as a "touch device," can be disposed on display screen 894. Touch sensor 890D and display screen 894 form a touch screen, also known as a "touch screen." Touch sensor 890D is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to an application processor to determine the type of touch event. Visual output related to the touch operations can be provided via display screen 894. In other embodiments, touch sensor 890D can also be disposed on the surface of mobile phone 800, in a location different from that of display screen 894.
[0136] Keys 891 include a power button, a volume button, etc. Keys 891 can be mechanical keys or touch keys. Mobile phone 800 can receive key inputs and generate key signal inputs related to user settings and function control of mobile phone 800.
[0137] Motor 892 can generate vibration prompts. Motor 892 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. Motor 892 can also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 894. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0138] Indicator 893 can be an indicator light, which can be used to indicate charging status, power changes, and can also be used to indicate messages, missed calls, notifications, etc.
[0139] The SIM card interface 895 is used to connect a SIM card. The SIM card can be connected to or disconnected from the mobile phone 800 by inserting or removing the SIM card into or from the SIM card interface 895.
[0140] USB port 896 is an interface that complies with USB standards and specifications, and may be a Mini USB port, a Micro USB port, a USB Type-C port, or the like. USB port 896 can be used to connect a charger to charge the electronic device, transfer data between the electronic device and peripheral devices, connect headphones to play audio, and connect other electronic devices, such as augmented reality devices.
[0141] It is understandable that, in general, the realization of electronic device functions requires not only hardware support but also software cooperation. The software system of the electronic device can adopt a layered architecture, event-driven architecture, micro-core architecture, micro-service architecture, or cloud architecture. Taking the system as an example, the software structure of the electronic device is illustrated.
[0142] Figure 9 A schematic diagram of the layered architecture of a software system of an electronic device provided in an embodiment of the present application.
[0143] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: application layer, application framework layer, Libs & Services layer, and kernel layer, from top to bottom.
[0144] In one possible implementation, the electronic device may execute a network control method provided in an embodiment of the present application based on the Wi-Fi service module and the BT service module of the Libs&Services layer. Figure 9 The software architecture of the electronic device shown is suitable for a scenario where a Wi-Fi network and a BT network coexist.
[0145] like Figure 9 As shown, the application layer may include a series of application packages, including camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, game, broadband speed tester, security manager speed tester and other applications.
[0146] The application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0147] like Figure 9 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0148] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, touch the screen, drag the screen, take screenshots, etc.
[0149] Content providers are used to store and retrieve data and make it accessible to applications. Data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0150] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.
[0151] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0152] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.
[0153] The Libs & Services layer can include multiple library modules and service modules. For example, a Wi-Fi management module, a BT management module, a Wi-Fi service module, and a BT service module. The Android system can load the corresponding modules for the device hardware, enabling the application framework layer to access the device hardware.
[0154] The Wi-Fi management module is used to periodically send Wi-Fi broadcast messages. In the embodiment of the present application, the Wi-Fi broadcast message may include the frequency band of the Wi-Fi network.
[0155] The BT management module is used to periodically send BT broadcast messages. In an embodiment of the present application, the BT broadcast message may include the media working status of the BT network, the call working status of the BT network and the current bit rate of the BT network.
[0156] The Wi-Fi service module is used to handle related operations when the BT network and Wi-Fi network coexist. For example, it is used to determine whether the BT network and Wi-Fi network are in the first coexistence scenario, to determine whether the foreground application has changed, to send instructions to reduce the BT network bit rate, and to disable network scanning for the BT network.
[0157] The BT service module is configured to receive instructions sent by the Wi-Fi service module and operate the BT network according to the instructions. In the embodiment of the present application, an operation instruction to close BT scanning is received and the operation is performed.
[0158] The kernel layer is the layer between hardware and software. The kernel layer includes at least display drivers, Wi-Fi drivers, audio drivers, sensor drivers, etc.
[0159] It is understood that the structures illustrated in the embodiments of the present application do not constitute specific limitations on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0160] The following describes the modules and interactions between modules involved in the network control method provided in the embodiment of the present application.
[0161] like Figure 10 As shown, Figure 10 A process for providing a network control method for the embodiment of the present application Figure 1 , the method may include the following steps:
[0162] S101. The Wi-Fi service module of the electronic device obtains a first broadcast message sent by the Wi-Fi management module of the electronic device.
[0163] Among them, the first Wi-Fi broadcast message is a system broadcast message, which can be understood as a broadcast message within a system, such as a system broadcast message of the Android system. That is to say, the broadcast message is used for interaction between modules within a system, and does not include broadcast messages that interact with other devices through antennas. Exemplarily, the Wi-Fi management module can periodically send broadcast messages of the Wi-Fi network, and the Wi-Fi service module can monitor the broadcast messages of the Wi-Fi network to obtain the required broadcast messages of the Wi-Fi network, such as the first broadcast message. The broadcast message of the Wi-Fi network may include the frequency band of the Wi-Fi network, the channel of the Wi-Fi network, the channel width of the Wi-Fi network, etc.
[0164] The first broadcast message includes the frequency band of the Wi-Fi network. For example, if the electronic device is currently connected to a 2.4 GHz Wi-Fi network, the frequency band of the Wi-Fi network included in the first broadcast message is 2.4 GHz. If the electronic device is currently connected to a 5 GHz Wi-Fi network, the frequency band of the Wi-Fi network included in the first broadcast message is 5 GHz.
[0165] S102. The Wi-Fi service module of the electronic device obtains a second broadcast message sent by the BT management module of the electronic device.
[0166] The second Wi-Fi broadcast message may be a system broadcast message, such as an Android system broadcast message. For example, the BT management module periodically sends BT network broadcast messages, and the Wi-Fi service module periodically monitors BT network broadcast messages to obtain required BT network broadcast messages, such as the second broadcast message. The BT network broadcast message may include information such as the BT network's media status, call status, and bitrate.
[0167] The second broadcast message includes the media working status of the BT network and the call working status of the BT network. The media working status of the BT network may include the BT network being in the media off state or the BT network being in the media on state. The call working status of the BT network may include the BT network being in the call off state and the BT network being in the call on state. The BT network being in the media on state means that media audio data can be transmitted through the BT network, such as when a user listens to music. The BT network being in the media off state means that media audio data cannot be transmitted through the BT network. The BT network being in the call on state means that call audio data can be transmitted through the BT network, such as when a user makes a call. The BT network being in the call off state means that call audio data cannot be transmitted through the BT network.
[0168] In this way, the Wi-Fi service module can determine the working state of the BT network based on the second broadcast message, for example, whether the BT network is in a media playing state or a call closing state.
[0169] S103 . The Wi-Fi service module determines a first coexistence scenario of the BT network and the Wi-Fi network based on the first broadcast message and the second broadcast message.
[0170] In the embodiments of the present application, the coexistence scenario of the BT network and the Wi-Fi network refers to the electronic device being connected to the BT network and the Wi-Fi network at the same time, and the BT network and the Wi-Fi network are located in the same frequency band. When the BT network and the Wi-Fi network are located in the same frequency band, there are multiple coexistence scenarios of the BT network and the Wi-Fi network based on the media working state of the BT network and the call working state of the BT network. For example, the first coexistence scenario, the second coexistence scenario, and the third coexistence scenario.
[0171] Table 4
[0172]
[0173] With reference to Table 4, the first coexistence scenario involves the Wi-Fi network and the BT network operating on the same frequency band, with the BT network in media playback mode and the BT network in call inactivity. In this first coexistence scenario, the BT network will interfere with the Wi-Fi network. This is because both the Wi-Fi network and the BT network operate in the 2.4 GHz frequency band and share a common antenna. Users are simultaneously using the Wi-Fi network to access the internet and the BT network to receive media audio. This means that at the same time, both the Wi-Fi network and the BT network are transmitting and receiving data packets, resulting in interference. Continuing with Table 4, the second coexistence scenario involves the Wi-Fi network and the BT network operating in the same frequency band and a call inactivity. In this second coexistence scenario, the BT network will not interfere with the Wi-Fi network. Although both the Wi-Fi network and the BT network operate in the 2.4 GHz frequency band and share a common antenna, users only use the BT network's call mode to make and receive calls, ignoring Wi-Fi access and using the BT network for call audio. Therefore, during the same time period, only the BT network is transmitting and receiving data packets, resulting in no interference.
[0174] Continuing with Table 4, the third coexistence scenario includes the Wi-Fi network and the BT network being in the same frequency band, and the BT network is in the media-off state and the BT network is in the call-off state. In the third coexistence scenario, the BT network will not interfere with the Wi-Fi network. Although the Wi-Fi network and the BT network are both in the 2.4GHz frequency band and share an antenna, the fact that the BT network is in the media-off state and the call-off state indicates that the user is not using the BT network to play audio, that is, the BT network is only in a connected state, not in a working state. In other words, during the same time period, only the Wi-Fi network is sending and receiving data packets, so interference will occur.
[0175] Exemplarily, when the first broadcast message includes that the frequency band of the Wi-Fi network is the 2.4 GHz band, and the second message includes that the BT network is in a media playback state and that the BT network is in a call closed state, the Wi-Fi service module determines that the first coexistence scenario of the BT network and the Wi-Fi network is present. In other words, when the Wi-Fi network and the BT network are in the same frequency band, the BT network is in a media playback state, and the BT network is in a call closed state, the Wi-Fi service module determines that the electronic device is in the first coexistence scenario of the BT network and the Wi-Fi network.
[0176] S104 . In the first coexistence scenario of the BT network and the Wi-Fi network, the Wi-Fi service module detects a change in the application running in the foreground.
[0177] For example, in the first coexistence scenario of the BT network and the Wi-Fi network, the Wi-Fi service module can obtain application information of the application running in the foreground (hereinafter referred to as the foreground application), such as the application package name, and detect whether the foreground application has changed based on the obtained application information. For example, if the foreground application changes from application 1 to application 2, the Wi-Fi service module determines that the foreground application has changed.
[0178] S105 . If the application running in the foreground changes to a delay-sensitive application or a speed measurement application, the Wi-Fi service module determines that the first application is running in the foreground.
[0179] In a specific implementation, the Wi-Fi service module may match the application information of the foreground application with the application information of the preset first application. If the application information of the foreground application matches the application information of any preset first application, the Wi-Fi service module determines that the first application is running in the foreground.
[0180] In some examples, the electronic device may pre-set an application list for the first application, which may include at least one preset package name of the first application. In this way, the Wi-Fi service module may match the package name of the foreground application with the package names in the application list of the first application. If the package name of the foreground application is the same as any package name in the application list, the Wi-Fi service module determines that the first application is running in the foreground.
[0181] In other examples, the Wi-Fi service module can determine the event that the first application needs to execute, match the event in the foreground application with the event that the first application needs to execute, and if the event in the foreground application is the same as the event that the first application needs to execute, the Wi-Fi service module determines that the first application is running in the foreground. Among them, the first application is a delay-sensitive application or a speed test application. Among them, delay-sensitive applications refer to applications that are sensitive to network delay requirements, and delay-sensitive applications require the network to have low delay, low jitter and zero packet loss rate. For example, delay-sensitive applications can be real-time game applications or real-time audio / video calls in chat applications. Speed test applications refer to applications used to test network speed, and speed test applications generally have high requirements for network speed and delay. For example, the speed test application can be a speed test application for security manager speed test.
[0182] In one example, after the Wi-Fi service module detects a change in the application running in the foreground, it detects that the application running in the foreground changes from a music application to a real-time game application, and then determines that the first application is running in the foreground.
[0183] It should be noted that the order of steps S103 and S104 can be changed. For example, the Wi-Fi service module can first perform step S104 and then perform step S103. In other words, the Wi-Fi service module can first determine that the first application is running in the foreground, and then determine the first coexistence scenario of the BT network and the Wi-Fi network. The order of these steps is not strictly limited.
[0184] S106. The Wi-Fi service module sends a first instruction to the Wi-Fi driver module.
[0185] The first instruction includes a first bit rate, wherein the first bit rate may be a bit rate preset in the electronic device, or a bit rate pushed to the electronic device by the manufacturer of the electronic device through a software update, which is not specifically limited in the embodiment of the present application.
[0186] In a specific implementation, the first bit rate may be a lower BT bit rate corresponding to audio encoding, such as 128 kbps, 276 kbps, 345 kbps, etc. For example, a lower BT bit rate may be selected from Table 1 as the first bit rate.
[0187] In one implementation, before executing step S106, the Wi-Fi service module may also obtain the current bit rate of the BT network from the BT management module, and determine whether to send the first instruction to the Wi-Fi driver module based on the relationship between the first bit rate and the current bit rate of the BT network.
[0188] In some examples, the BT management module may configure the current bit rate of the BT network in a second broadcast message, and use the second broadcast message to send the current bit rate of the BT network to the Wi-Fi service module.
[0189] In other examples, the BT management module may also send the current bit rate of the BT network to the Wi-Fi service module separately.
[0190] In other examples, the Wi-Fi service module may send a request to the BT management module for obtaining the current bit rate of the BT network. After receiving the request, the BT management module sends the current bit rate of the BT network to the Wi-Fi service module.
[0191] Next, if the first bit rate is less than the current bit rate of the BT network, the Wi-Fi service module sends a first instruction to the Wi-Fi driver module. If the first bit rate is greater than or equal to the current bit rate of the BT network, the Wi-Fi service module does not send the first instruction to the Wi-Fi driver module.
[0192] In one example, the first bitrate can be set to 345kbps. If the Wi-Fi service module obtains from the BT management module that the current bitrate of the BT network is 990kbps, the Wi-Fi service module sends a first instruction to the Wi-Fi driver module, wherein the first instruction includes the first bitrate of 345kbps. If the Wi-Fi service module obtains from the BT management module that the current bitrate of the BT network is 128kbps, the Wi-Fi service module does not send the first instruction to the Wi-Fi driver module.
[0193] It should be noted that the setting of the first bit rate in the above example is set according to actual needs and may also be other values in Table 1, which is not specifically limited here.
[0194] S107 . The Wi-Fi driver module of the electronic device sends the first instruction to the Wi-Fi firmware of the electronic device.
[0195] After receiving the first instruction, the Wi-Fi driver module of the electronic device sends the first instruction to the Wi-Fi firmware of the electronic device.
[0196] S108. The Wi-Fi firmware sends the first instruction to the BT firmware of the electronic device.
[0197] After receiving the first instruction, the Wi-Fi firmware of the electronic device sends the first instruction to the BT firmware of the electronic device.
[0198] S109. The BT firmware receives the first instruction and reduces the bit rate of the BT network to the first bit rate.
[0199] After receiving the first instruction, the BT firmware of the electronic device reduces the current bit rate of the BT network to the first bit rate according to the first bit rate in the first instruction.
[0200] After the BT firmware reduces the bit rate of the BT network to the first bit rate, the BT firmware may send a service-side notification to the BT service module, instructing the BT service module to use the first bit rate for subsequent service processing.
[0201] In summary, when the electronic device is in the first coexistence scenario of the BT network and the Wi-Fi network, the interference to the Wi-Fi network can be reduced by reducing the bit rate of the BT network, thereby reducing the delay to the Wi-Fi network and improving the user experience of using the Wi-Fi network.
[0202] like Figure 11 As shown, Figure 11 A process for providing a network control method for the embodiment of the present application Figure 2 , the method may include the following steps:
[0203] S111. The Wi-Fi service module of the electronic device obtains a first broadcast message sent by the Wi-Fi management module of the electronic device.
[0204] S112. The Wi-Fi service module of the electronic device obtains the second broadcast message sent by the BT management module of the electronic device.
[0205] S113 . The Wi-Fi service module determines a first coexistence scenario of the BT network and the Wi-Fi network based on the first broadcast message and the second broadcast message.
[0206] S114. The Wi-Fi service module detects a change in the application running in the foreground.
[0207] S115 . If the application running in the foreground changes to a delay-sensitive application or a speed measurement application, the Wi-Fi service module determines that the first application is running in the foreground.
[0208] Among them, the specific description of S111-S115 can refer to the specific description of the corresponding content in S101-S105 in the above embodiment, and will not be repeated here.
[0209] S116. The Wi-Fi service module sends a second instruction to the BT service module of the electronic device.
[0210] The second instruction is used to instruct to turn off the network scan of the BT network. The network scan of the BT network refers to the electronic device monitoring the broadcast data sent by other BT devices or actively sending broadcast data. The network scan of the BT network can be a scan performed during the process of establishing a connection between the electronic device and the BT device, or it can be a scan of the BT network continued after the electronic device and the BT device have established a connection, and the information scanned after obtaining the connection status is used for subsequent business use of the BT network. The network scan of the BT network in the embodiment of the present application refers to continuing the network scan of the BT network after the electronic device and the BT device have established a connection.
[0211] S117. The BT service module receives the second instruction and turns off the network scan of the BT network.
[0212] BT network scanning requires the antenna to be occupied. In the first coexistence scenario between BT and Wi-Fi, BT's periodic network scanning can affect Wi-Fi latency, causing intermittent Wi-Fi access. Therefore, to ensure that BT network scanning does not occupy the antenna, you need to disable BT network scanning.
[0213] In other words, by turning off BT network scanning, we can avoid interference with the Wi-Fi network caused by BT network scanning, thereby reducing the delay to the Wi-Fi network and improving the user experience of using the Wi-Fi network.
[0214] like Figure 12 As shown, Figure 12 A process for providing a network control method for the embodiment of the present application Figure 3 , the method may include the following steps:
[0215] S1201. The Wi-Fi service module of the electronic device obtains a first broadcast message sent by the Wi-Fi management module of the electronic device.
[0216] S1202. The Wi-Fi service module of the electronic device obtains a second broadcast message sent by the BT management module of the electronic device.
[0217] S1203. The Wi-Fi service module determines a first coexistence scenario of the BT network and the Wi-Fi network based on the first broadcast message and the second broadcast message.
[0218] S1204. The Wi-Fi service module detects a change in the application running in the foreground.
[0219] S1205. If the application running in the foreground changes to a delay-sensitive application or a speed measurement application, the Wi-Fi service module determines that the first application is running in the foreground.
[0220] S1206. The Wi-Fi service module of the electronic device sends a first instruction to the Wi-Fi driver module.
[0221] S1207. The Wi-Fi driver module of the electronic device sends the first instruction to the Wi-Fi firmware of the electronic device.
[0222] S1208. The Wi-Fi firmware sends the first instruction to the BT firmware of the electronic device.
[0223] S1209. The BT firmware receives the first instruction and reduces the bit rate of the BT network to the first bit rate.
[0224] S1210. The Wi-Fi service module sends a second instruction to the BT service module of the electronic device.
[0225] S1211. The BT service module receives the second instruction and turns off the network scan of the BT network.
[0226] In summary, when the electronic device is in the first coexistence scenario of the BT network and the Wi-Fi network, in order to further reduce the latency of the Wi-Fi network, the bit rate of the BT network can also be reduced and the network scanning of the BT network can be turned off at the same time to improve the user's Internet experience.
[0227] like Figure 13 As shown, Figure 13 A process for providing a network control method for the embodiment of the present application Figure 4 , the method may include the following steps:
[0228] S1301. The Wi-Fi service module of the electronic device obtains a first broadcast message sent by the Wi-Fi management module of the electronic device.
[0229] S1302. The Wi-Fi service module of the electronic device obtains a second broadcast message sent by the BT management module of the electronic device.
[0230] S1303. The Wi-Fi service module determines a first coexistence scenario of the BT network and the Wi-Fi network based on the first broadcast message and the second broadcast message.
[0231] S1304: In the first coexistence scenario of the BT network and the Wi-Fi network, the Wi-Fi service module detects a change in the application running in the foreground.
[0232] S1305. The Wi-Fi service module determines that the first application is running in the foreground.
[0233] S1306. The Wi-Fi service module of the electronic device sends a first instruction to the Wi-Fi driver module.
[0234] S1307. The Wi-Fi driver module of the electronic device sends the first instruction to the Wi-Fi firmware of the electronic device.
[0235] S1308. The Wi-Fi firmware sends the first instruction to the BT firmware of the electronic device.
[0236] S1309. The BT firmware receives the first instruction and reduces the bit rate of the BT network to the first bit rate.
[0237] Among them, the specific description of steps S1301 to S1309 can refer to the specific description of the corresponding contents in steps S101 to S109 in the above embodiment, and will not be repeated here.
[0238] S1310. The Wi-Fi service module detects a change in the application running in the foreground.
[0239] The specific description of step S1310 can refer to the specific description of the corresponding content in step S104 and step S1304 in the above embodiment, and will not be repeated here.
[0240] S1311. The Wi-Fi service module determines that the second application is running in the foreground.
[0241] Exemplarily, according to the information of the application running in the foreground obtained in step S1310, the information of the preset application that matches the second application is matched. If the application after the application running in the foreground changes and the application information of the second application matches the application information of the second application, the Wi-Fi service module determines that the second application is running in the foreground.
[0242] In some examples, an application list for the second application is pre-set, and the package name of the information of the application running in the foreground is matched with the application list of the second application. When the package name of the information of the application running in the foreground is the same as the package name in the application list, the Wi-Fi service module determines that the second application is running in the foreground.
[0243] In other examples, an event that the second application needs to execute is determined, and an event in the application running in the foreground is matched with an event that the second application needs to execute. When the event in the application running in the foreground is the same as the event that the second application needs to execute, the Wi-Fi service module determines that the second application is running in the foreground.
[0244] The second application is a non-delay-sensitive application or a non-speed measurement application.
[0245] In one example, after the Wi-Fi service module detects a change in the application running in the foreground, it detects that the application running in the foreground changes from a real-time game application to a music application, and then determines that the second application is running in the foreground.
[0246] S1312. The Wi-Fi service module sends a third instruction to the Wi-Fi driver module.
[0247] The third instruction includes a second bitrate. The second bitrate may be a bitrate preset by the electronic device, a bitrate pushed to the electronic device by the manufacturer of the electronic device through a software update, or the current bitrate of the BT network before being reduced to the first bitrate in step S109. This embodiment of the present application does not specifically limit this.
[0248] In a specific implementation, the second bit rate may be a lower BT bit rate corresponding to audio encoding, such as 128 kbps, 276 kbps, 345 kbps, etc. For example, a lower BT bit rate may be selected from Table 1 as the second bit rate.
[0249] The second bit rate is used to indicate an increase in the bit rate of the BT network. The second bit rate can be obtained from Table 1.
[0250] In one example, the second bit rate is set to 660kbps. If the Wi-Fi service module obtains from the BT management module that the current bit rate of the BT network is 345kbps, the Wi-Fi service module sends a third instruction to the Wi-Fi driver module, and the third instruction includes the second bit rate of 660kbps.
[0251] It should be noted that the second bit rate in the above example is set according to actual needs and may also be other values in Table 1, which is not specifically limited here. S1313. The Wi-Fi driver sends the third instruction to the Wi-Fi firmware of the electronic device.
[0252] After receiving the third instruction, the Wi-Fi driver module of the electronic device sends the third instruction to the Wi-Fi firmware of the electronic device.
[0253] S1314. The Wi-Fi firmware sends the third instruction to the BT firmware of the electronic device.
[0254] After receiving the third instruction, the Wi-Fi firmware of the electronic device sends the third instruction to the BT firmware of the electronic device.
[0255] S1315. The BT firmware receives the third instruction and increases the bit rate of the BT network to the second bit rate.
[0256] After receiving the third instruction, the BT firmware of the electronic device increases the current bit rate of the BT network to the second bit rate according to the third instruction.
[0257] After the BT firmware increases the bit rate of the BT network to the second bit rate, a service-side notification is sent to the BT service module, informing it to use the second bit rate for subsequent service processing.
[0258] In an embodiment of the present application, after the Wi-Fi service module reduces the BT network bit rate and / or shuts down the BT network's network scanning operation, if the application running in the foreground is no longer the first application but the second application, although the BT network and the Wi-Fi network will compete for the antenna and the Wi-Fi network latency will be high, it will not affect the user's experience of using the Wi-Fi network. In this case, it is necessary to restore the bit rate of the electronic device's BT network, that is, to increase the bit rate of the electronic device's BT network to ensure subsequent service use.
[0259] Combine Figure 14 Come and see, Figure 14 A process for providing a network control method for the embodiment of the present application Figure 5 , the method may include the following steps:
[0260] S1401. The Wi-Fi service module of the electronic device obtains a first broadcast message sent by the Wi-Fi management module of the electronic device.
[0261] S1402. The Wi-Fi service module of the electronic device obtains a second broadcast message sent by the BT management module of the electronic device.
[0262] S1403. The Wi-Fi service module determines a first coexistence scenario of the BT network and the Wi-Fi network based on the first broadcast message and the second broadcast message.
[0263] S1404: In the first coexistence scenario of the BT network and the Wi-Fi network, the Wi-Fi service module detects a change in the application running in the foreground.
[0264] S1405. The Wi-Fi service module determines that the first application is running in the foreground.
[0265] S1406. The Wi-Fi service module sends a second instruction to the BT service module of the electronic device.
[0266] S1407. The BT service module receives the second instruction and turns off the network scan of the BT network.
[0267] Among them, the specific description of steps S1401 to S1407 can refer to the specific description of the corresponding contents in steps S111 to S117 in the above embodiment, and will not be repeated here.
[0268] S1408. The Wi-Fi service module detects a change in the application running in the foreground.
[0269] S1409. The Wi-Fi service module determines that the second application is running in the foreground.
[0270] Among them, the specific description of steps S1408-step S1409 can refer to the specific description of the corresponding content in steps S1310-step S1311 in the above embodiment, and will not be repeated here.
[0271] S1410. The Wi-Fi service module of the electronic device sends a fourth instruction to the BT service module of the electronic device.
[0272] The fourth instruction is used to instruct to start the network scan of the BT network.
[0273] S1411. The BT service module receives the fourth instruction and starts network scanning of the BT network.
[0274] In summary, after the above-mentioned Wi-Fi service module reduces the bit rate of the BT network and / or turns off the network scanning operation of the BT network, the application running in the foreground is no longer the first application but the second application. In an embodiment of the present application, after the above-mentioned Wi-Fi service module reduces the bit rate of the BT network and / or turns off the network scanning operation of the BT network, if the application running in the foreground is no longer the first application but the second application, although the BT network will compete with the Wi-Fi network for the antenna and the Wi-Fi network latency is high, it will not affect the user's experience of using the Wi-Fi network. At this time, it is necessary to restore the network scanning of the BT network of the electronic device, that is, to turn on the network scanning of the BT network of the electronic device to ensure the subsequent use of services.
[0275] Figure 15 A process for providing a network control method for the embodiment of the present application Figure 6 , the method may include the following steps:
[0276] S1501. The Wi-Fi service module of the electronic device obtains a first broadcast message sent by the Wi-Fi management module of the electronic device.
[0277] S1502. The Wi-Fi service module of the electronic device obtains a second broadcast message sent by the BT management module of the electronic device.
[0278] S1503. The Wi-Fi service module determines a first coexistence scenario of the BT network and the Wi-Fi network based on the first broadcast message and the second broadcast message.
[0279] S1504: In the first coexistence scenario of the BT network and the Wi-Fi network, the Wi-Fi service module detects a change in the application running in the foreground.
[0280] S1505. If the application running in the foreground changes to a delay-sensitive application or a speed measurement application, the Wi-Fi service module determines that the first application is running in the foreground.
[0281] S1506. The Wi-Fi service module of the electronic device sends a first instruction to the Wi-Fi driver module.
[0282] S1507. The Wi-Fi driver module of the electronic device sends the first instruction to the Wi-Fi firmware of the electronic device.
[0283] S1508. The Wi-Fi firmware sends the first instruction to the BT firmware of the electronic device.
[0284] S1509. The BT firmware receives the first instruction and reduces the bit rate of the BT network to the first bit rate.
[0285] S1510. The Wi-Fi service module sends a second instruction to the BT service module of the electronic device.
[0286] S1511. The BT service module receives the second instruction and turns off the network scan of the BT network.
[0287] Among them, the specific description of steps S1501 to S1510 can refer to the specific description of the corresponding contents in steps S1201 to S1211 in the above embodiment, and will not be repeated here.
[0288] S1512. The Wi-Fi service module detects a change in the application running in the foreground.
[0289] S1513. The Wi-Fi service module determines that the second application is running in the foreground.
[0290] S1514. The Wi-Fi service module of the electronic device sends a third instruction to the Wi-Fi driver module of the electronic device.
[0291] S1515. The Wi-Fi driver sends the third instruction to the Wi-Fi firmware of the electronic device.
[0292] S1516. The Wi-Fi firmware sends the third instruction to the BT firmware of the electronic device.
[0293] S1517. The BT firmware receives the third instruction and increases the bit rate of the BT network to the second bit rate.
[0294] Among them, the specific description of steps S1512 to S1517 can refer to the specific description of the corresponding contents in steps S1312 to S1315 in the above embodiment, and will not be repeated here.
[0295] S1518. The Wi-Fi service module of the electronic device sends a fourth instruction to the BT service module of the electronic device.
[0296] S1519. The BT service module receives the fourth instruction and starts network scanning of the BT network.
[0297] Among them, the specific description of steps S1518-step S1519 can refer to the specific description of the corresponding contents in steps S1410-step S1411 in the above embodiment, and will not be repeated here.
[0298] Figure 16 A process for providing a network control method for the embodiment of the present application Figure 7 , the method may include the following steps:
[0299] S1601. The Wi-Fi service module of the electronic device obtains a first broadcast message sent by the Wi-Fi management module of the electronic device.
[0300] S1602. The Wi-Fi service module of the electronic device obtains the second broadcast message sent by the BT management module of the electronic device.
[0301] S1603. The Wi-Fi service module determines a first coexistence scenario of the BT network and the Wi-Fi network based on the first broadcast message and the second broadcast message.
[0302] S1604. In the first coexistence scenario of the BT network and the Wi-Fi network, the Wi-Fi service module detects a change in the application running in the foreground.
[0303] S1605. The Wi-Fi service module determines that the first application is running in the foreground.
[0304] S1606. The Wi-Fi service module of the electronic device sends a first instruction to the Wi-Fi driver module.
[0305] S1607. The Wi-Fi driver module of the electronic device sends the first instruction to the Wi-Fi firmware of the electronic device.
[0306] S1608. The Wi-Fi firmware sends the first instruction to the BT firmware of the electronic device.
[0307] S1609. The BT firmware receives the first instruction and reduces the bit rate of the BT network to the first bit rate.
[0308] Among them, the specific description of steps S1601 to S1609 can refer to the specific description of the corresponding contents in steps S101 to S109 in the above embodiment, and will not be repeated here.
[0309] S1610. The Wi-Fi service module determines that the electronic device switches from the first coexistence scenario of the BT network and the Wi-Fi network to a non-first coexistence scenario of the BT network and the Wi-Fi network.
[0310] In the embodiment of the present application, the non-first coexistence scenario of the BT network and the Wi-Fi network includes not only the first coexistence scenario, the second coexistence scenario, and the third coexistence scenario, but also a non-coexistence scenario. Among them, the non-coexistence scenario includes that the BT network and the Wi-Fi network of the device do not exist at the same time or exist at the same time but in different frequency bands. The BT network and the Wi-Fi network do not exist at the same time means that the BT network is in working state, but the Wi-Fi network is not in working state, or the Wi-Fi network is in working state, but the BT network is not in working state. If the BT network and the Wi-Fi network do not exist at the same time, there will be no interference to the Wi-Fi network. The BT network and the Wi-Fi network exist at the same time but in different frequency bands means that the Wi-Fi network is not in the 2.4GHz frequency band. For example, the Wi-Fi network is in the 5GHz frequency band and the BT network is in the 2.4GHz frequency band.
[0311] In one implementation, the Wi-Fi service module obtains a third broadcast message sent by the Wi-Fi management module; and based on the third broadcast message, determines a non-first coexistence scenario of the BT network and the Wi-Fi network.
[0312] Exemplarily, when the first broadcast message includes that the Wi-Fi network frequency band is the 5GHz frequency band, the Wi-Fi service module determines that the electronic device switches from the first coexistence scenario of the BT network and the Wi-Fi network to the non-coexistence scenario of the BT network and the Wi-Fi network. That is, the Wi-Fi service module determines that the electronic device is in a non-first coexistence scenario of the BT network and the Wi-Fi network based on the fact that the Wi-Fi network and the BT network are not in the same frequency band, that is, the Wi-Fi network is in the 5GHz frequency band and the BT network is in the 2.4GHz frequency band. The Wi-Fi service module determines that the electronic device is in a non-first coexistence scenario of the BT network and the Wi-Fi network.
[0313] S1611. The Wi-Fi service module of the electronic device sends a third instruction to the Wi-Fi driver module of the electronic device.
[0314] S1612. The Wi-Fi driver sends the third instruction to the Wi-Fi firmware of the electronic device.
[0315] S1613. The Wi-Fi firmware sends the third instruction to the BT firmware of the electronic device.
[0316] S1614. The BT firmware receives the third instruction and increases the bit rate of the BT network to the second bit rate.
[0317] Among them, the specific description of S1611-S1614 can refer to the specific description of the corresponding content in S1312-S1315 in the above embodiment, and will not be repeated here.
[0318] In summary, after the above-mentioned Wi-Fi service module reduces the bit rate of the BT network and / or turns off the network scanning operation of the BT network, when switching from the first coexistence scenario of the BT network and the Wi-Fi network to the non-first coexistence scenario of the BT network and the Wi-Fi network, the BT network will not interfere with the Wi-Fi network and will not cause the Wi-Fi network delay to increase. At this time, it is necessary to restore the bit rate of the BT network of the electronic device, that is, to increase the bit rate of the BT network of the electronic device to ensure subsequent business use.
[0319] Combine Figure 17 As shown, Figure 17 A process for providing a network control method for the embodiment of the present application Figure 8 , the method may include the following steps:
[0320] S1701. The Wi-Fi service module of the electronic device obtains a first broadcast message sent by the Wi-Fi management module of the electronic device.
[0321] S1702. The Wi-Fi service module of the electronic device obtains the second broadcast message sent by the BT management module of the electronic device.
[0322] S1703. The Wi-Fi service module determines a first coexistence scenario of the BT network and the Wi-Fi network based on the first broadcast message and the second broadcast message.
[0323] S1704: In the first coexistence scenario of the BT network and the Wi-Fi network, the Wi-Fi service module detects a change in the application running in the foreground.
[0324] S1705. The Wi-Fi service module determines that the first application is running in the foreground.
[0325] S1706. The Wi-Fi service module sends a second instruction to the BT service module of the electronic device.
[0326] S1707. The BT service module receives the second instruction and turns off the network scan of the BT network.
[0327] Among them, the specific description of steps S1701 to S1707 can refer to the specific description of the corresponding contents in steps S1210 to S1211 in the above embodiment, and will not be repeated here.
[0328] S1708. The Wi-Fi service module determines that the electronic device switches from the first coexistence scenario of the BT network and the Wi-Fi network to a non-first coexistence scenario of the BT network and the Wi-Fi network.
[0329] Among them, the specific description of S1708 can refer to the specific description of the corresponding content in step S1610 in the above embodiment, and will not be repeated here.
[0330] S1709. The Wi-Fi service module of the electronic device sends a fourth instruction to the BT service module of the electronic device.
[0331] S1710. The BT service module receives the fourth instruction and starts network scanning of the BT network.
[0332] In summary, after the above-mentioned Wi-Fi service module reduces the bit rate of the BT network and / or turns off the network scanning operation of the BT network, when switching from the first coexistence scenario of the BT network and the Wi-Fi network to the non-first coexistence scenario of the BT network and the Wi-Fi network, the BT network will not interfere with the Wi-Fi network, so there will be no high latency of the Wi-Fi network. At this time, it is necessary to resume the network scanning of the BT network of the electronic device, that is, to turn off the network scanning of the BT network of the electronic device to ensure subsequent business use.
[0333] like Figure 18 As shown, Figure 18 A process for providing a network control method for the embodiment of the present application Figure 9 , the method may include the following steps:
[0334] S1801. The Wi-Fi service module of the electronic device obtains a first broadcast message sent by the Wi-Fi management module of the electronic device.
[0335] S1802. The Wi-Fi service module of the electronic device obtains the second broadcast message sent by the BT management module of the electronic device.
[0336] S1803. The Wi-Fi service module determines a first coexistence scenario of the BT network and the Wi-Fi network based on the first broadcast message and the second broadcast message.
[0337] S1804. In the first coexistence scenario of the BT network and the Wi-Fi network, the Wi-Fi service module detects a change in the application running in the foreground.
[0338] S1805. The Wi-Fi service module determines that the first application is running in the foreground.
[0339] S1806. The Wi-Fi service module of the electronic device sends a first instruction to the Wi-Fi driver module.
[0340] S1807. The Wi-Fi driver module of the electronic device sends the first instruction to the Wi-Fi firmware of the electronic device.
[0341] S1808. The Wi-Fi firmware sends the first instruction to the BT firmware of the electronic device.
[0342] S1809. The BT firmware receives the first instruction and reduces the bit rate of the BT network to the first bit rate.
[0343] S1810. The Wi-Fi service module sends a second instruction to the BT service module of the electronic device.
[0344] S1811. The BT service module receives the second instruction and turns off the network scan of the BT network.
[0345] S1812. The Wi-Fi service module determines that the electronic device switches from the first coexistence scenario of the BT network and the Wi-Fi network to a non-first coexistence scenario of the BT network and the Wi-Fi network.
[0346] S1813. The Wi-Fi service module of the electronic device sends a third instruction to the Wi-Fi driver module of the electronic device.
[0347] S1814. The Wi-Fi driver sends the third instruction to the Wi-Fi firmware of the electronic device.
[0348] S1815. The Wi-Fi firmware sends the third instruction to the BT firmware of the electronic device.
[0349] S1816. The BT firmware receives the third instruction and increases the bit rate of the BT network to the second bit rate.
[0350] S1817. The Wi-Fi service module of the electronic device sends a fourth instruction to the BT service module of the electronic device.
[0351] S1818. The BT service module receives the fourth instruction and starts network scanning of the BT network.
[0352] In summary, after the above-mentioned Wi-Fi service module reduces the bit rate of the BT network and / or turns off the network scanning operation of the BT network, when switching from the first coexistence scenario of the BT network and the Wi-Fi network to the non-first coexistence scenario of the BT network and the Wi-Fi network, the BT network will not interfere with the Wi-Fi network, so there will be no high Wi-Fi network latency. At this time, it is necessary to restore the network scanning of the BT network and the bit rate of the BT network of the electronic device, that is, turn off the network scanning of the BT network of the electronic device and increase the bit rate of the BT network to ensure subsequent business use.
[0353] The above is an explanation of the modules and the interactions between modules involved in the network control method provided in the embodiment of the present application. Now we will show it from the perspective of the processing flow of the method. Figure 19To introduce the specific process of implementing network control method for electronic equipment.
[0354] like Figure 19 As shown, Figure 19 A network control method flow diagram is provided for the embodiment of the present application. Figure 10 , the method includes S191-S192.
[0355] S191. The electronic device detects that a first application is running in the foreground, where the first application includes a delay-sensitive application and / or a speed measurement application.
[0356] The electronic device detects the application running in the foreground and determines whether the application running in the foreground is the first application. Specifically, when the electronic device detects a change in the application running in the foreground, it determines whether the application running in the foreground is a latency-sensitive application and / or a speed measurement application. If the application running in the foreground is a latency-sensitive application and / or a speed measurement application, it determines whether the application running in the foreground is the first application.
[0357] Exemplarily, the electronic device monitors the application running in the foreground, obtains the package name of the application when the application running in the foreground changes, matches the obtained package name with the package name in the preset first application list, and if the match is successful, determines that the electronic device detects that the first application is running in the foreground.
[0358] Step S191, ie, the electronic device detecting that the currently running application is the first application, can be implemented by referring to the aforementioned step S105, which will not be described in detail here.
[0359] S192. In response to the first application running in the foreground, the electronic device reduces the bit rate of the BT network and / or turns off network scanning of the BT network when the electronic device is in a first coexistence scenario of the Bluetooth BT network and the Wireless Fidelity Wi-Fi network.
[0360] When it is determined that the application running in the foreground is the first application, the electronic device further determines whether the electronic device itself is in the first coexistence scenario of the BT network and the Wireless Fidelity Wi-Fi network. When the electronic device is in the first coexistence scenario of the BT network and the Wi-Fi network, the bit rate of the BT network is reduced and / or the network scanning of the BT network is turned off.
[0361] In the first coexistence scenario of the BT network and the Wi-Fi network, the electronic device reduces the interference of the BT network on the Wi-Fi network by reducing the bit rate of the BT network and / or turning off the scanning of the BT network, thereby improving the user experience of using the Wi-Fi network.
[0362] In some embodiments, combined Figure 20 As shown, Figure 20A network control method flow diagram is provided for the embodiment of the present application. Figure 10 1. The method includes: steps S201 to S209.
[0363] Step S201: The electronic device detects whether the foreground application is the first application.
[0364] Step S201 can be specifically implemented by the aforementioned steps S104-S105.
[0365] If it is detected that the foreground application is the first application, the electronic device executes step S202.
[0366] Step S202: The electronic device determines whether it is in a first coexistence scenario of a BT network and a Wi-Fi network.
[0367] Step S202 can be specifically implemented by the aforementioned steps S101-S103.
[0368] If the BT network and the Wi-Fi network coexist in the first scenario, the electronic device performs step S203 or step S205.
[0369] Step S203: The electronic device determines whether the bit rate of the BT network is greater than the first bit rate.
[0370] Step S203 can be specifically implemented by the aforementioned step S106.
[0371] If the bit rate of the BT network is greater than the first bit rate, the electronic device executes step S204.
[0372] Step S204: The electronic device reduces the bit rate of the BT network to the first bit rate.
[0373] Step S204 can be specifically implemented by the aforementioned steps S106-S109.
[0374] In step S205 , the electronic device turns off the BT network scan.
[0375] Step S205 can be specifically implemented by the aforementioned steps S116-S117.
[0376] In step S206 , the electronic device continues to detect whether the foreground application is the second application.
[0377] Step S206 can be specifically implemented by the aforementioned steps S1310-S1311.
[0378] If it is detected that the foreground application is the second application, the electronic device executes step S208 or step S209.
[0379] Step S208: The electronic device starts a network scan of the BT network.
[0380] Step S208 can be specifically implemented by the aforementioned steps S1406-S1407.
[0381] Step S209: The electronic device increases the bit rate of the BT network to a second bit rate.
[0382] Step S209 can be specifically implemented by the aforementioned steps S1312-S1315.
[0383] If it is detected that the foreground application is not the second application, the electronic device executes step S207.
[0384] Step S207 : The electronic device determines whether the electronic device is in the second coexistence scenario, the third coexistence scenario, or the non-coexistence scenario.
[0385] Step S207 can be specifically implemented by the aforementioned step S1601.
[0386] If the electronic device is in the second coexistence scenario, the third coexistence scenario, or the non-coexistence scenario, step S208 or step S209 is executed.
[0387] In summary, when the BT network and Wi-Fi network of an electronic device are in a coexistence scenario when working at the same time, by reducing the BT network bit rate and / or turning off the BT network network scan, the intermittent Wi-Fi network can be avoided, the Wi-Fi network latency can be improved, and the user experience of using the Wi-Fi network can be improved. At the same time, in order to ensure the use of subsequent services, when the BT network and Wi-Fi network of the electronic device are not in a coexistence scenario when working at the same time, by increasing the BT network bit rate and turning on the BT network network scan, the audio quality of the BT device using the BT network can be improved.
[0388] In another example, refer to Figure 20 The method includes: steps S201-S204 and steps S206-S207, S209.
[0389] Step S201: The electronic device detects whether the foreground application is the first application.
[0390] Step S201 can be specifically implemented by the aforementioned steps S104-S105.
[0391] If it is detected that the foreground application is the first application, the electronic device executes step S202.
[0392] Step S202: The electronic device determines whether it is in a first coexistence scenario of a BT network and a Wi-Fi network.
[0393] Step S202 can be specifically implemented by the aforementioned steps S101-S103.
[0394] If the BT network and the Wi-Fi network coexist in the first scenario, the electronic device performs step S203.
[0395] Step S203: The electronic device determines whether the bit rate of the BT network is greater than the first bit rate.
[0396] Step S203 can be specifically implemented by the aforementioned step S106.
[0397] If the bit rate of the BT network is greater than the first bit rate, the electronic device executes step S204.
[0398] Step S204: The electronic device reduces the bit rate of the BT network to the first bit rate.
[0399] Step S204 can be specifically implemented by the aforementioned steps S106-S109.
[0400] In step S206 , the electronic device continues to detect whether the foreground application is the second application.
[0401] Step S206 can be specifically implemented by the aforementioned steps S1310-S1311.
[0402] If it is detected that the foreground application is the second application, the electronic device executes step S209.
[0403] Step S209: The electronic device increases the bit rate of the BT network to a second bit rate.
[0404] Step S209 can be specifically implemented by the aforementioned steps S1312-S1315.
[0405] If it is detected that the foreground application is not the second application, the electronic device executes step S207.
[0406] Step S207 : The electronic device determines whether the electronic device is in the second coexistence scenario, the third coexistence scenario, or the non-coexistence scenario.
[0407] Step S207 can be specifically implemented by the aforementioned step S1601.
[0408] If the electronic device is in the second coexistence scenario, the third coexistence scenario, or the non-coexistence scenario, step S209 is executed.
[0409] In summary, when the BT network and Wi-Fi network of an electronic device are both operating simultaneously, reducing the BT network bit rate can avoid intermittent Wi-Fi network interruptions, improve Wi-Fi network latency, and enhance the user experience when using the Wi-Fi network. To ensure subsequent service usage, in the case where the BT network and Wi-Fi network of an electronic device are not operating simultaneously, increasing the BT network bit rate can improve the audio quality of the BT device using the BT network.
[0410] In yet another example, referring to Figure 20 The method includes: steps S201-S202 and steps S205-S208.
[0411] Step S201: The electronic device detects whether the foreground application is the first application.
[0412] Step S201 can be specifically implemented by the aforementioned steps S104-S105.
[0413] If it is detected that the foreground application is the first application, the electronic device executes step S202.
[0414] Step S202: The electronic device determines whether it is in a first coexistence scenario of a BT network and a Wi-Fi network.
[0415] Step S202 can be specifically implemented by the aforementioned steps S101-S103.
[0416] If the BT network and the Wi-Fi network coexist in the first scenario, the electronic device performs step S205.
[0417] In step S205 , the electronic device turns off the BT network scan.
[0418] Step S205 can be specifically implemented by the aforementioned steps S116-S117.
[0419] In step S206 , the electronic device continues to detect whether the foreground application is the second application.
[0420] Step S206 can be specifically implemented by the aforementioned steps S1310-S1311.
[0421] If it is detected that the foreground application is the second application, the electronic device executes step S208.
[0422] Step S208: The electronic device starts a network scan of the BT network.
[0423] Step S208 can be specifically implemented by the aforementioned steps S1406-S1407.
[0424] If it is detected that the foreground application is not the second application, the electronic device executes step S207.
[0425] Step S207 : The electronic device determines whether the electronic device is in the second coexistence scenario, the third coexistence scenario, or the non-coexistence scenario.
[0426] Step S207 can be specifically implemented by the aforementioned step S1601.
[0427] If the electronic device is in the second coexistence scenario, the third coexistence scenario, or the non-coexistence scenario, step S208 is executed.
[0428] In summary, when the BT network and Wi-Fi network of an electronic device are both in operation, disabling BT network scanning can avoid intermittent Wi-Fi network connections, improve Wi-Fi network latency, and enhance the user experience when using Wi-Fi. At the same time, to ensure subsequent service usage, when the BT network and Wi-Fi network of an electronic device are not in operation at the same time, enabling BT network scanning can improve the audio quality of the BT device using the BT network.
[0429] In other embodiments, combined Figure 21 shown. Figure 21 A network control method flow diagram is provided for the embodiment of the present application. Figure 10 2. This embodiment differs from the above embodiment in that:
[0430] In one example, after the electronic device implements steps S201 - S205 , step S207 is executed.
[0431] Step S207 : The electronic device determines whether the electronic device is in the second coexistence scenario, the third coexistence scenario, or the non-coexistence scenario.
[0432] Step S207 can be specifically implemented by the aforementioned step S1601.
[0433] If the electronic device is in the second coexistence scenario, the third coexistence scenario, or the non-coexistence scenario, step S208 or step S209 is executed.
[0434] Step S208: The electronic device starts a network scan of the BT network.
[0435] Step S208 can be specifically implemented by the aforementioned steps S1406-S1407.
[0436] Step S209: The electronic device increases the bit rate of the BT network to a second bit rate.
[0437] Step S209 can be specifically implemented by the aforementioned steps S1312-S1315.
[0438] In summary, when the BT network and Wi-Fi network of an electronic device are in a coexistence scenario where they are both working at the same time, by reducing the bit rate of the BT network and / or turning off network scanning of the BT network, intermittent Wi-Fi network connections can be avoided, the latency of the Wi-Fi network can be improved, and the user experience of using the Wi-Fi network can be enhanced. At the same time, to ensure the use of subsequent services, in the case where the BT network and Wi-Fi network of an electronic device are not in a coexistence scenario where they are both working at the same time, the audio quality of the BT device using the BT network can be improved by increasing the bit rate of the BT network and turning on network scanning of the BT network.
[0439] In another example, continue to combine Figure 21 As shown, after the electronic device implements steps S201-S204, step S207 is executed.
[0440] If the electronic device is in the second coexistence scenario, the third coexistence scenario, or the non-coexistence scenario, step S209 is executed.
[0441] Step S209: The electronic device increases the bit rate of the BT network to a second bit rate.
[0442] Step S209 can be specifically implemented by the aforementioned steps S1312-S1315.
[0443] If the electronic device is in the second coexistence scenario, the third coexistence scenario, or the non-coexistence scenario, step S209 is executed.
[0444] In summary, when the BT network and Wi-Fi network of an electronic device are both operating simultaneously, reducing the BT network bit rate can avoid intermittent Wi-Fi network interruptions, improve Wi-Fi network latency, and enhance the user experience when using the Wi-Fi network. To ensure subsequent service usage, in the case where the BT network and Wi-Fi network of an electronic device are not operating simultaneously, increasing the BT network bit rate can improve the audio quality of the BT device using the BT network.
[0445] In yet another example, continue to combine Figure 21 As shown, after the electronic device implements steps S201-S204, step S207 is executed.
[0446] Step S207 can be specifically implemented by the aforementioned step S1601.
[0447] If the electronic device is in the second coexistence scenario, the third coexistence scenario, or the non-coexistence scenario, step S208 is executed.
[0448] Step S208: The electronic device starts a network scan of the BT network.
[0449] Step S208 can be specifically implemented by the aforementioned steps S1406-S1407.
[0450] In summary, when the BT network and Wi-Fi network of an electronic device are both working at the same time, disabling BT network scanning can avoid intermittent Wi-Fi network connections, improve Wi-Fi network latency, and enhance the user experience when using Wi-Fi. At the same time, to ensure subsequent service usage, in the case where the BT network and Wi-Fi network of an electronic device are not working at the same time, enabling BT network scanning can improve the audio quality of the BT device using the BT network.
[0451] The embodiments provided in the present application above have introduced the various schemes of the network control method provided in the present application. It is understandable that, in order to implement the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
[0452] The embodiment of the present application can divide the functional modules of the above-mentioned electronic device according to the above-mentioned method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0453] Some other embodiments of the present application provide an electronic device, which may include: a memory, a Wi-Fi chip, a BT chip, and one or more processors. The memory, Wi-Fi chip, BT chip, and processor are coupled. The memory is used to store computer program code, which includes computer instructions. When the processor executes the computer instructions, the electronic device can perform the various functions or steps performed in the above method embodiments. The structure of the electronic device can refer to Figure 8 The electronic device shown takes a mobile phone as an example.
[0454] The present application also provides a chip system. Figure 22As shown, the chip system 2200 includes at least one processor 2201 and at least one interface circuit 2202. The processor 2201 and the interface circuit 2202 can be interconnected via lines. For example, the interface circuit 2202 can be used to receive signals from other devices (such as a memory of an electronic device). For another example, the interface circuit 2202 can be used to send signals to other devices (such as the processor 2201). Exemplarily, the interface circuit 2202 can read instructions stored in the memory and send the instructions to the processor 2201. When the instructions are executed by the processor 2201, the electronic device can execute the various steps in the above embodiments. Of course, the chip system 2200 can also include other discrete components, which is not specifically limited in the embodiments of the present application.
[0455] An embodiment of the present application further provides a computer storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes the various functions or steps executed by the electronic device in the above-mentioned method embodiment.
[0456] An embodiment of the present application further provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the functions or steps executed by the electronic device in the above method embodiment.
[0457] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0458] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0459] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0460] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0461] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0462] The above content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0463] It should be noted that those skilled in the art will readily conceive of other embodiments of the present application after considering the specification and practicing the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered merely as exemplary, and the true scope of this application is indicated by the claims.
[0464] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A network control method, characterized in that: include: Detecting that the first application is running in the foreground; In response to the first application running in the foreground, when the electronic device is in a first coexistence scenario of a Bluetooth BT network and a Wireless Fidelity Wi-Fi network, the bit rate of the BT network is reduced and / or network scanning of the BT network is turned off.
2. The network control method according to claim 1, wherein: The first application includes a delay-sensitive application and / or a speed measurement application.
3. The network control method according to claim 1, wherein: The first coexistence scenario includes: The Wi-Fi network and the BT network are located in the same frequency band, and the BT network is in a media playing state and a call closed state.
4. The network control method according to claim 1, wherein: The reducing the bit rate of the BT network includes: When the current bit rate of the BT network is greater than the first bit rate, the bit rate of the BT network is reduced to the first bit rate.
5. The network control method according to claim 1, wherein: After reducing the bit rate of the BT network, the method further includes: Detecting that a second application is running in the foreground, where the second application includes a non-latency-sensitive application and / or a non-speed measurement application; In response to the second application running in the foreground, the bit rate of the BT network is increased.
6. The network control method according to claim 1, characterized in that: After closing the network scan of the BT network, the method further includes: Detecting that a second application is running in the foreground, where the second application includes a non-latency-sensitive application and / or a non-speed measurement application; In response to the second application running in the foreground, network scanning of the BT network is started.
7. The network control method according to claim 1, characterized in that: After lowering the bit rate of the BT network, the method further includes: when the electronic device switches to a second coexistence scenario of the BT network and the Wi-Fi network, increasing the bit rate of the BT network.
8. The network control method according to claim 1, wherein: After the network scanning of the BT network is turned off, the method further includes: when the electronic device switches to a second coexistence scenario of the BT network and the Wi-Fi network, turning on the network scanning of the BT network.
9. The network control method according to claim 7 or 8, characterized in that: The second coexistence scenario includes: the Wi-Fi network and the BT network are located in the same frequency band, and the BT network is in a call-on state.
10. The network control method according to claim 1, characterized in that: After lowering the bit rate of the BT network, the method further includes: when the electronic device switches to a third coexistence scenario of the BT network and the Wi-Fi network, increasing the bit rate of the BT network.
11. The network control method according to claim 1, wherein: After turning off the network scan of the BT network, the method further includes: turning on the network scan of the BT network when the electronic device switches to a third coexistence scenario of the BT network and the Wi-Fi network.
12. The network control method according to claim 10 or 11, characterized in that: The third coexistence scenario includes: the Wi-Fi network and the BT network are located in the same frequency band, the BT network is in a media-off state, and the BT network is in a call-off state.
13. The network control method according to claim 1, characterized in that: After lowering the bit rate of the BT network, the method further includes: when the electronic device switches to a non-coexistence scenario of the BT network and the Wi-Fi network, increasing the bit rate of the BT network.
14. The network control method according to claim 1, wherein: After the network scanning of the BT network is turned off, the method further includes: when the electronic device switches to a non-coexistence scenario of the BT network and the Wi-Fi network, turning on the network scanning of the BT network.
15. The network control method according to claim 13 or 14, characterized in that: The non-coexistence scenario includes: the Wi-Fi network and the BT network are located in different frequency bands.
16. The network control method according to any one of claims 1 to 15, characterized in that: The detecting that the first application is running in the foreground includes: The Wi-Fi service module of the electronic device detects a change in the application running in the foreground; If the application running in the foreground changes to a delay-sensitive application or a speed measurement application, the Wi-Fi service module determines that the first application is running in the foreground.
17. The network control method according to any one of claims 1 to 15, characterized in that: Before detecting that the first application is running in the foreground, the method further includes: The Wi-Fi service module of the electronic device obtains a first broadcast message sent by the Wi-Fi management module, where the first broadcast message includes a frequency band of the Wi-Fi network; The Wi-Fi service module obtains a second broadcast message sent by the BT management module of the electronic device, where the second broadcast message includes a media working status of the BT network and a call working status of the BT network; The Wi-Fi service module determines a first coexistence scenario of the BT network and the Wi-Fi network based on the first broadcast message and the second broadcast message.
18. The network control method according to any one of claims 1 to 15, characterized in that: The reducing the bit rate of the BT network includes: The Wi-Fi service module of the electronic device sends a first instruction to the Wi-Fi driver module, where the first instruction includes a first bit rate, and the first bit rate is lower than a current bit rate of the BT network; The Wi-Fi driver module of the electronic device sends the first instruction to the Wi-Fi firmware of the electronic device; The Wi-Fi firmware sends the first instruction to the BT firmware of the electronic device; The BT firmware receives the first instruction and reduces the bit rate of the BT network to the first bit rate.
19. The network control method according to any one of claims 1 to 15, characterized in that: The step of disabling the network scan of the BT network includes: The Wi-Fi service module of the electronic device sends a second instruction to the BT service module of the electronic device; The BT service module receives the second instruction and turns off the network scanning of the BT network.
20. The network control method according to claim 5 or 6, characterized in that: The detecting that the second application is running in the foreground includes: The Wi-Fi service module of the electronic device detects a change in the application running in the foreground; If the application running in the foreground changes to a non-delay-sensitive application or a non-speed measurement application, the Wi-Fi service module determines that the second application is running in the foreground.
21. The network control method according to any one of claims 5, 7, 10, and 13, characterized in that: The increasing the bit rate of the BT network includes: The Wi-Fi service module of the electronic device sends a third instruction to the Wi-Fi driver module of the electronic device, where the third instruction includes a second bit rate, and the second bit rate is greater than a current bit rate of the BT network; The Wi-Fi driver sends the third instruction to the Wi-Fi firmware of the electronic device; The Wi-Fi firmware sends the third instruction to the BT firmware of the electronic device; The BT firmware receives the third instruction and increases the bit rate of the BT network to the second bit rate.
22. The network control method according to any one of claims 6, 8, 11 and 14, characterized in that: The starting of the network scanning of the BT network includes: The Wi-Fi service module of the electronic device sends a fourth instruction to the BT service module of the electronic device; The BT service module receives the fourth instruction and starts network scanning of the BT network.
23. An electronic device, characterized in that: The electronic device includes: a memory and one or more processors; the memory is coupled to the processor; wherein the memory is used to store computer program code, and the computer program code includes computer instructions; when the computer instructions are executed by the processor, the electronic device executes the method as described in any one of claims 1-22.
24. A computer-readable storage medium, characterized in that The method comprises computer instructions; when the computer instructions are executed on an electronic device, the electronic device is caused to execute the method according to any one of claims 1 to 22.