CN113490189B - Communication control method, device, electronic equipment and storage medium - Google Patents

Communication control method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113490189B
CN113490189B CN202110666514.0A CN202110666514A CN113490189B CN 113490189 B CN113490189 B CN 113490189B CN 202110666514 A CN202110666514 A CN 202110666514A CN 113490189 B CN113490189 B CN 113490189B
Authority
CN
China
Prior art keywords
target
bluetooth mode
bluetooth
initial
values
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110666514.0A
Other languages
Chinese (zh)
Other versions
CN113490189A (en
Inventor
刘海鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202110666514.0A priority Critical patent/CN113490189B/en
Publication of CN113490189A publication Critical patent/CN113490189A/en
Application granted granted Critical
Publication of CN113490189B publication Critical patent/CN113490189B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present disclosure provides a communication control method, a device, an electronic apparatus, and a storage medium, where the method includes determining a plurality of initial values corresponding to a plurality of scan parameters of a second bluetooth mode if multimedia data is currently transmitted based on the first bluetooth mode and the second bluetooth mode is turned on, the first bluetooth mode and the second bluetooth mode being different; determining a plurality of target values respectively corresponding to the plurality of scanning parameters, wherein the first power consumption of the electronic equipment when the electronic equipment scans the target equipment based on the plurality of target values is smaller than the second power consumption of the electronic equipment when the electronic equipment scans the target equipment based on a plurality of initial values; the plurality of initial values are respectively configured as a corresponding plurality of target values. The method can effectively avoid interference influence of Bluetooth scanning of the second Bluetooth mode on multimedia data transmission of the first Bluetooth mode, and avoid blocking and noise phenomena of the multimedia data, so that the transmission quality and transmission effect of the electronic equipment on the multimedia data in the Bluetooth dual mode can be effectively improved.

Description

Communication control method, device, electronic equipment and storage medium
Technical Field
The disclosure relates to the field of communication technologies, and in particular, to a communication control method, a device, an electronic device and a storage medium.
Background
Starting from bluetooth core specification 4.0, the bluetooth alliance has added a bluetooth low energy (Bluetooth Low Energy, BLE) bluetooth mode, whereby electronic devices supporting (Basic Rate, BR)/(Enhanced Data Rate, EDR), i.e. BR/EDR classical bluetooth mode, and BLE bluetooth mode are rapidly increasing.
However, the BR/EDR classical bluetooth mode and the BLE bluetooth mode are different in specification and applicable scene, and the electronic device supporting the bluetooth dual mode is usually in an application scene where the BR/EDR classical bluetooth mode and the BLE bluetooth mode work simultaneously, for example, scan based on BLE bluetooth, when a foreground application or a background service of the electronic device frequently triggers BLE bluetooth scanning, and there are more devices in the environment that turn on the BLE bluetooth mode, a bluetooth chip built in the electronic device may frequently report a scan result of BLE bluetooth to a host, and due to limitation of bluetooth usage bandwidth, such broadcast communication based on BLE bluetooth may generate a certain interference effect on multimedia data transceiving based on the BR/EDR classical bluetooth mode.
Disclosure of Invention
The present disclosure aims to solve, at least to some extent, one of the technical problems in the related art.
Therefore, an object of the present disclosure is to provide a communication control method, apparatus, electronic device, and storage medium, so that when an electronic device currently transmits multimedia data based on a first bluetooth mode and opens a second bluetooth mode, interference influence of bluetooth scanning of the second bluetooth mode on transmission of the multimedia data in the first bluetooth mode is effectively avoided, and jamming and noise phenomena of the multimedia data are avoided, thereby effectively improving transmission quality and transmission effect of the electronic device on the multimedia data in a bluetooth dual mode.
In order to achieve the above object, a communication control method according to an embodiment of a first aspect of the present disclosure is applied to an electronic device, and includes: if the multimedia data is currently transmitted based on a first Bluetooth mode and a second Bluetooth mode is started, determining a plurality of initial values respectively corresponding to a plurality of scanning parameters of the second Bluetooth mode, wherein the first Bluetooth mode and the second Bluetooth mode are different; determining a plurality of target values respectively corresponding to the plurality of scanning parameters, wherein first power consumption when the electronic equipment scans target equipment based on the plurality of target values is smaller than second power consumption when the electronic equipment scans the target equipment based on the plurality of initial values; the plurality of initial values are respectively configured as a plurality of corresponding target values.
According to the communication control method provided by the embodiment of the first aspect of the disclosure, when the fact that the electronic device currently transmits multimedia data based on the first Bluetooth mode is detected, and the second Bluetooth mode is started, a plurality of initial values corresponding to a plurality of scanning parameters of the second Bluetooth mode are determined, a plurality of target values corresponding to the plurality of scanning parameters are determined, the plurality of initial values are configured to the corresponding plurality of target values, respectively, wherein the first power consumption of the electronic device when the electronic device scans the target device based on the plurality of target values is smaller than the second power consumption of the electronic device when the electronic device scans the target device based on the plurality of initial values, so that the electronic device transmits the multimedia data based on the first Bluetooth mode at present, and interference influence of Bluetooth scanning of the second Bluetooth mode on the transmission of the multimedia data in the first Bluetooth mode is effectively avoided when the second Bluetooth mode is started, and blocking and noise phenomena causing the multimedia data are avoided, and accordingly the transmission quality and the transmission effect of the multimedia data can be effectively improved under the Bluetooth dual mode.
To achieve the above object, a communication control device according to an embodiment of a second aspect of the present disclosure is applied to an electronic device, and includes: the first determining module is used for determining a plurality of initial values respectively corresponding to a plurality of scanning parameters of the second Bluetooth mode when the multimedia data is transmitted based on the first Bluetooth mode and the second Bluetooth mode is started, wherein the first Bluetooth mode and the second Bluetooth mode are different; a second determining module, configured to determine a plurality of target values corresponding to the plurality of scanning parameters, where a first power consumption when the electronic device scans the target device based on the plurality of target values is smaller than a second power consumption when the electronic device scans the target device based on the plurality of initial values; and the configuration module is used for respectively configuring the plurality of initial values into a plurality of corresponding target values.
According to the communication control device provided by the embodiment of the second aspect of the disclosure, when the fact that the electronic device currently transmits multimedia data based on the first Bluetooth mode is detected, and the second Bluetooth mode is started, a plurality of initial values corresponding to a plurality of scanning parameters of the second Bluetooth mode are determined, a plurality of target values corresponding to the plurality of scanning parameters are determined, the plurality of initial values are configured to the corresponding plurality of target values respectively, wherein the first power consumption of the electronic device when the electronic device scans the target device based on the plurality of target values is smaller than the second power consumption of the electronic device when the electronic device scans the target device based on the plurality of initial values, so that the electronic device can effectively avoid interference influence of Bluetooth scanning of the second Bluetooth mode on multimedia data transmission of the first Bluetooth mode when the second Bluetooth mode is started, and prevent the phenomenon of blocking and noise of the multimedia data, and accordingly the transmission quality and the transmission effect of the multimedia data of the electronic device in the Bluetooth dual mode can be effectively improved.
An embodiment of a third aspect of the present disclosure proposes an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements a communication control method as proposed in an embodiment of the first aspect of the present disclosure when the program is executed by the processor.
An embodiment of a fourth aspect of the present disclosure proposes a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a communication control method as proposed by an embodiment of the first aspect of the present disclosure.
An embodiment of a fifth aspect of the present disclosure proposes a computer program product which, when executed by an instruction processor in the computer program product, performs a communication control method as proposed by an embodiment of the first aspect of the present disclosure.
Additional aspects and advantages of the disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the disclosure.
Drawings
The foregoing and/or additional aspects and advantages of the present disclosure will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
fig. 1 is a flow chart of a communication control method according to an embodiment of the disclosure;
fig. 2 is a schematic view of an application scenario in an embodiment of the present disclosure;
fig. 3 is a flow chart illustrating a communication control method according to another embodiment of the present disclosure;
fig. 4 is a flow chart illustrating a communication control method according to another embodiment of the present disclosure;
FIG. 5 is a schematic diagram of the structure of scan parameters in an embodiment of the present disclosure;
Fig. 6 is a schematic structural diagram of a communication control device according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a communication control device according to another embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
Embodiments of the present disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for explaining the present disclosure and are not to be construed as limiting the present disclosure. On the contrary, the embodiments of the disclosure include all alternatives, modifications, and equivalents as may be included within the spirit and scope of the appended claims.
Fig. 1 is a flow chart of a communication control method according to an embodiment of the disclosure.
The present embodiment is exemplified in a communication control method configured in a communication control apparatus.
The communication control method in the present embodiment may be configured in a communication control apparatus, and the communication control apparatus may be provided in an electronic device, which is not limited in this embodiment of the present disclosure.
The present embodiment takes an example in which the communication control method is configured in the electronic apparatus. The electronic device may be a hardware device with various operating systems and imaging devices, such as a mobile phone, a tablet computer, a personal digital assistant, a wearable device, and the like.
The execution body of the embodiment of the present disclosure may be, for example, a central processing unit (Central Processing Unit, CPU) in the electronic device in hardware, or may be, for example, a related background service in the electronic device in software, which is not limited thereto.
The electronic device in the embodiments of the present disclosure may specifically be an electronic device supporting a bluetooth dual mode, for example, the electronic device may support a BR/EDR classical bluetooth mode and a BLE bluetooth mode, which is not limited.
As shown in fig. 1, the communication control method includes:
s101: if the multimedia data is currently transmitted based on the first Bluetooth mode and the second Bluetooth mode is started, a plurality of initial values respectively corresponding to a plurality of scanning parameters of the second Bluetooth mode are determined, and the first Bluetooth mode and the second Bluetooth mode are different.
The first bluetooth mode and the second bluetooth mode are different, that is, the type of the first bluetooth mode and the type of the second bluetooth mode are different, and in the embodiment of the disclosure, the first bluetooth mode and the second bluetooth mode may be bluetooth modes with different version functions in the development process of bluetooth communication, which is not limited.
Optionally, in some embodiments, the power consumption of the second bluetooth mode is lower than the power consumption of the first bluetooth mode, that is, the power consumption of the electronic device when performing bluetooth communication based on the second bluetooth mode may be lower than the power consumption of the electronic device when performing bluetooth communication based on the first bluetooth mode, so that interference influence of low-power bluetooth scanning on relatively high-power bluetooth data transmission can be effectively avoided, and the requirements of the actual bluetooth dual-mode working scenario of the electronic device can be effectively adapted.
For example, the first bluetooth mode may be, for example, a BR/EDR classical bluetooth mode, and the second bluetooth mode may be, for example, a BLE bluetooth mode, whereby the power consumption of the BLE bluetooth mode is typically smaller than that of the BR/EDR classical bluetooth mode, without limitation.
In the embodiment of the disclosure, the current bluetooth dual-mode working state of the electronic device can be detected in real time, for example, a preconfigured bluetooth monitoring interface can be called to monitor whether the electronic device transmits multimedia data based on the first bluetooth mode currently, and trigger to start the second bluetooth mode, and then, the communication control method in the embodiment of the disclosure can be triggered according to the result of actual monitoring judgment.
The multimedia data may be, for example, audio/video data, multimedia data such as call voice data of a user, or video data of a user video, which is not limited.
In the embodiment of the disclosure, if the multimedia data is currently transmitted based on the first bluetooth mode and the second bluetooth mode is turned on, determining a plurality of initial values corresponding to a plurality of scanning parameters of the second bluetooth mode may be triggered, where the electronic device may perform bluetooth scanning on the target device based on a plurality of scanning parameters corresponding to the second bluetooth mode, and the target device may be an electronic device at an opposite end of the second bluetooth communication link currently established with the electronic device.
The plurality of initial values corresponding to the plurality of scanning parameters of the second bluetooth mode may be initial values set corresponding to the scanning parameters of the second bluetooth mode by bluetooth control logic in the electronic device, and accordingly, a value to which the scanning parameters are required to be adjusted according to the determination of the communication control method in the embodiment of the disclosure may be referred to as a target value.
Optionally, the plurality of scan parameters includes: scan interval and scan window, then the plurality of initial values includes: the electronic device may support bluetooth scanning of the target device based on the scanning interval and the scanning window, and the initially configured interval value corresponding to the scanning interval may be referred to as an initial interval value, and the initially configured window value corresponding to the scanning window may be referred to as an initial window value.
Of course, the plurality of scan parameters may also include any other possible scan parameters associated with the bluetooth scan logic of the second bluetooth communication, such as a scan period, a scan frequency, etc., without limitation.
In the embodiment of the disclosure, the processing logic of communication control can be effectively simplified by configuring the scanning interval and the scanning window corresponding to the second Bluetooth mode, so that the control effect is effectively achieved, and meanwhile, the convenience and the convenience of communication control are effectively improved.
S102: and determining a plurality of target values respectively corresponding to the plurality of scanning parameters, wherein the first power consumption when the electronic device scans the target device based on the plurality of target values is smaller than the second power consumption when the electronic device scans the target device based on the plurality of initial values.
The power consumption (that is, may be referred to as a first power consumption) when the electronic device scans the target device based on the plurality of target values, and the power consumption (that is, may be referred to as a second power consumption) when the electronic device scans the target device based on the plurality of initial values.
After determining the initial values corresponding to the scan parameters of the second bluetooth mode, the determining of the target values corresponding to the scan parameters may be triggered.
For example, after determining a plurality of initial values corresponding to a plurality of scanning parameters of the second bluetooth mode, it may be assumed that the initial value is an initial value a, and then, it is determined whether the initial value a is the same as an initial value B of the required lower scanning power consumption, if different, it is determined that the initial value a needs to be adjusted to the initial value B, at this time, the initial value B may be determined as a corresponding target value, and based on the number of scanning parameters being a plurality of, a plurality of target values corresponding to the plurality of scanning parameters may be determined accordingly.
In the embodiment of the disclosure, in order to effectively avoid interference influence of the bluetooth scanning of the second bluetooth mode on the multimedia data transmission of the first bluetooth mode, the interference influence is reduced by adopting a mode of reducing the scanning power consumption of the second bluetooth mode.
That is, if in the second bluetooth mode, a plurality of initial values corresponding to a plurality of scanning parameters are adopted to assist in bluetooth scanning of the target device, the power consumption is larger, and it is determined that the initial values will cause interference to the transmission of the multimedia data in the first bluetooth mode, so that the scanning power consumption can be reduced by adjusting the initial values, that is, a plurality of target values corresponding to the smaller scanning power consumption are determined, and the subsequent steps are triggered.
S103: the plurality of initial values are respectively configured as a corresponding plurality of target values.
After determining the plurality of target values corresponding to the plurality of scan parameters, the plurality of initial values may be configured as the corresponding plurality of target values, respectively.
For example, assuming that the plurality of scan parameters are scan parameters a and B, the corresponding plurality of initial values are initial values a, B, and C, the initial values a, B, and C may be configured as corresponding target values a, B, and C, respectively.
In this embodiment, when it is detected that the electronic device is currently transmitting multimedia data based on the first bluetooth mode and the second bluetooth mode is turned on, a plurality of initial values corresponding to a plurality of scanning parameters of the second bluetooth mode are determined, a plurality of target values corresponding to the plurality of scanning parameters are determined, and the plurality of initial values are configured to the corresponding plurality of target values, respectively.
As shown in fig. 2, fig. 2 is a schematic diagram of an application scenario in an embodiment of the present disclosure, where in fig. 2, a first bluetooth mode may be, for example, a BR/EDR classical bluetooth mode, and a second bluetooth mode may be, for example, a BLE bluetooth mode, which is not limited.
Fig. 2 includes: the electronic device 20, the electronic device 20 has an application/service module 201 built therein, the application/service module 201 may trigger the bluetooth scan of the target device 202 based on the BLE bluetooth mode, where the target device 202 may be one or more of the BR/EDR classical bluetooth mode and the BLE bluetooth mode, the bluetooth module 203 includes a bluetooth host 2031 in the bluetooth module 203, the bluetooth host 2031 may include bluetooth processing logic, may receive a scan result of the BLE bluetooth mode, the bluetooth controller (bluetooth chip) 204 controls the BR/EDR classical bluetooth mode and the BLE bluetooth mode, and periodically reports the bluetooth scan result to the bluetooth host 2031, the electronic device may create in advance a connection-oriented asynchronous Link (Asynchronous connection-oriented Link) and a connection-oriented synchronous Link (Synchronous Connection Oriented Link, SCO) corresponding to the BR/EDR classical bluetooth mode, so as to implement HFP (Hands free Profile) interaction between bluetooth devices based on the ACL Link, for example, negotiating coding parameters of the SCO Link when establishing a call, and transmitting data to the speaker/earpiece/vehicle-mounted device based on the SCO ACL.
The target device 202 may be in a broadcast state (Advertising State, AS) to broadcast bluetooth signals, in which state the target device 202 may be scanned for bluetooth signals by peripheral electronic devices.
Fig. 3 is a flow chart illustrating a communication control method according to another embodiment of the present disclosure.
Referring to fig. 2, the embodiment of the disclosure further provides a communication control method, as shown in fig. 3, including:
s301: if the multimedia data is currently transmitted based on the first Bluetooth mode and the second Bluetooth mode is started, a plurality of initial values respectively corresponding to a plurality of scanning parameters of the second Bluetooth mode are determined, and the first Bluetooth mode and the second Bluetooth mode are different.
S302: and determining a plurality of target values respectively corresponding to the plurality of scanning parameters, wherein the first power consumption when the electronic device scans the target device based on the plurality of target values is smaller than the second power consumption when the electronic device scans the target device based on the plurality of initial values.
S303: the plurality of initial values are respectively configured as a corresponding plurality of target values.
The descriptions of S301 to S303 may be specifically referred to the above embodiments, and are not repeated herein.
S304: the control electronics scans for a target device based on the plurality of target values in a second bluetooth mode.
After determining that the power consumption corresponding to bluetooth scanning of the target device is larger by adopting the plurality of initial values respectively corresponding to the plurality of scanning parameters, and adjusting the initial values to the target values corresponding to the smaller power consumption, the control electronic device can be triggered to scan the target device based on the plurality of target values in the second bluetooth mode.
For example, assuming that the scanning period and the scanning frequency are respectively adjusted to the corresponding target period a and the target frequency B, the electronic device may be controlled to scan the target device in the second bluetooth mode based on the target period a and the target frequency B, so that the scanning power consumption of the second bluetooth mode is reduced, and the influence on the transmission of the multimedia data in the first bluetooth mode is avoided.
Therefore, when the plurality of initial values are respectively configured into the corresponding plurality of target values, the electronic equipment is controlled to scan the target equipment in the second Bluetooth mode based on the plurality of target values, the continuity of communication control can be effectively ensured, the influence of communication control logic on Bluetooth communication effect is avoided, and the overall communication control effect is effectively improved.
S305: if multimedia data is not currently transmitted based on the first Bluetooth mode, a plurality of initial values of the second Bluetooth mode are maintained.
That is, if it is detected that the electronic device is not currently transmitting multimedia data based on the first bluetooth mode, a plurality of initial values of the second bluetooth mode are maintained, that is, a plurality of initial values respectively corresponding to a plurality of scan parameters may be maintained at this time.
It can be understood that if the electronic device is detected not to transmit the multimedia data based on the first bluetooth mode, the execution of the communication control logic on the electronic device may not be triggered, so that the software and hardware resources occupied by the communication control logic can be effectively reduced while the communication control effect is effectively improved.
S306: the control electronics scans the target device in the second bluetooth mode based on the plurality of initial values.
According to the method, after the fact that the electronic equipment does not transmit the multimedia data based on the first Bluetooth mode currently is detected, and the plurality of initial values of the second Bluetooth mode are maintained, the electronic equipment can be directly controlled to scan the target equipment based on the plurality of initial values in the second Bluetooth mode, so that continuity of communication control can be effectively guaranteed, and the influence of communication control logic on Bluetooth communication effect is avoided.
S307: and if the transmission of the multimedia data based on the first Bluetooth mode is stopped, restoring the plurality of target values to the corresponding plurality of initial values.
After the control electronic device scans the target device based on the multiple target values in the second bluetooth mode, the bluetooth status of the electronic device may also be monitored in real time, that is, whether the monitoring electronic device stops transmitting the multimedia data based on the first bluetooth mode, and if the monitoring electronic device stops transmitting the multimedia data based on the first bluetooth mode, the monitoring electronic device may trigger the recovery of the multiple target values to the corresponding multiple initial values.
For example, assuming that the scanning period and the scanning frequency are respectively adjusted to be the corresponding target period a and the corresponding target frequency B, the electronic device may be controlled to scan the target device based on the target period a and the target frequency B in the second bluetooth mode, and then, if the electronic device is monitored to stop transmitting the multimedia data based on the first bluetooth mode, the target period a and the target frequency B may be respectively restored to the corresponding initial period a 'and the corresponding initial frequency B'.
Because the initial value is the Bluetooth control logic in the electronic equipment, the scanning parameter of the second Bluetooth mode is initially set, and therefore when the electronic equipment is determined to stop transmitting the multimedia data based on the first Bluetooth mode, a plurality of target values are restored to a plurality of corresponding initial values, the communication control logic in the embodiment of the disclosure can be fused with the existing Bluetooth control logic, compatibility of the communication control logic and the existing Bluetooth control logic is guaranteed, and accordingly stability of overall Bluetooth communication is guaranteed.
In this embodiment, when it is detected that the electronic device is currently transmitting multimedia data based on the first bluetooth mode and the second bluetooth mode is turned on, a plurality of initial values corresponding to a plurality of scanning parameters of the second bluetooth mode are determined, a plurality of target values corresponding to the plurality of scanning parameters are determined, and the plurality of initial values are configured to the corresponding plurality of target values, respectively. And in the second Bluetooth mode, the electronic equipment is controlled to scan the target equipment based on the target values, so that the continuity of communication control can be effectively ensured, the influence of communication control logic on Bluetooth communication effect is avoided, and the overall communication control effect is effectively improved. If the fact that the electronic equipment does not transmit the multimedia data based on the first Bluetooth mode at present is detected, the communication control logic can be executed on the electronic equipment without triggering, and meanwhile the communication control effect can be effectively improved, and meanwhile software and hardware resources occupied by the communication control logic can be effectively reduced. Because the initial value is the Bluetooth control logic in the electronic equipment, the scanning parameter of the second Bluetooth mode is initially set, and therefore when the electronic equipment is determined to stop transmitting the multimedia data based on the first Bluetooth mode, a plurality of target values are restored to a plurality of corresponding initial values, the communication control logic in the embodiment of the disclosure can be fused with the existing Bluetooth control logic, compatibility of the communication control logic and the existing Bluetooth control logic is guaranteed, and accordingly stability of overall Bluetooth communication is guaranteed.
Fig. 4 is a flow chart of a communication control method according to another embodiment of the present disclosure.
In fig. 4, the scan parameters include: scan interval and scan window, then the plurality of initial values includes: referring to fig. 5, fig. 5 is a schematic structural diagram of a scan parameter in an embodiment of the disclosure, where the scan parameter includes: the scan interval scanInterval and the scan window scanWindow are defined as follows:
scan interval, i.e., the interval of two bluetooth scan initiation times, for example, if scan interval is configured to 5120ms, this indicates that bluetooth scan is initiated every 5120ms, scan window, this parameter is configured to be less than or equal to scan interval, it means that the bluetooth signal packet broadcast by the target device is received only in the scanning window, for example, the scanning window is set to 512ms, and only 512ms will actually trigger to perform bluetooth scanning in the scanning interval.
As shown in fig. 4, the communication control method includes:
s401: if the multimedia data is currently transmitted based on the first Bluetooth mode and the second Bluetooth mode is started, a plurality of initial values respectively corresponding to a plurality of scanning parameters of the second Bluetooth mode are determined, and the first Bluetooth mode and the second Bluetooth mode are different.
S402: a target interval value corresponding to the scanning interval and a target window value corresponding to the scanning window are determined, the target interval value and the target window value being commonly used as a plurality of target values.
The electronic device scans the target device based on the plurality of target values, and the first power consumption is smaller than the second power consumption when the electronic device scans the target device based on the plurality of initial values.
That is, the first power consumption when the control electronic device triggers a bluetooth scan based on the target interval value and the target window value is smaller than the second power consumption when it triggers a bluetooth scan based on the initial interval value and the initial window value.
In the embodiment of the disclosure, the target interval value can be configured to be larger than the initial interval value, and the target window value is smaller than the initial window value, so that the power consumption of Bluetooth scanning is reduced, communication control is more convenient, and the efficiency of communication control is improved.
In the embodiment of the present disclosure, when a plurality of scan parameters respectively correspond to a plurality of initial values, the initial scan parameters may be referred to as an initial scan mode, and an initial interval value and an initial window value in the initial scan mode may be exemplified as follows:
low delay mode:
scan interval scaninterval=4096 ms, scan window scanwindow=4096 ms, and the mode scan interval scaninterval=scan window scanWindow, i.e. full window scan, continues the bluetooth scan.
Balance mode:
scan interval scaninterval=4096 ms, scan window=1024 ms, and this mode combines a balance of power consumption and scan delay.
I.e. the initial interval value may be the scan interval scaninterval=4096 ms, the initial window value may be the scan window scanwindow=4096 ms, or the scan window scanwindow=1024 ms.
S403: the initial interval value is configured as a target interval value and the initial window value is configured as a target window value.
For example, the determined target interval value may be scaninterval=5120 ms, the target window value may be scanwindow=512 ms, and the corresponding mode may be referred to as a low power mode, where the mode scan window is set smaller, which may effectively reduce bluetooth scan power consumption.
The target interval value and the target window value may be set according to an actual bluetooth scanning power consumption requirement of the electronic device, and in practical application, the scanning interval value in the low power consumption mode may be directly determined and used as the target interval value, and the scanning window value in the low power consumption mode may be used as the target window value.
For example: the current electronic device is connected with a Bluetooth headset, dials out or answers a call (transmits audio data), establishes an SCO link through a BR/EDR classical Bluetooth mode to transmit audio data, and during a call, a certain application or service needs to start Bluetooth scanning based on a BLE Bluetooth mode in a low-delay mode or a balanced mode, and can trigger the Bluetooth scanning based on the BLE Bluetooth mode to be actively adjusted to a low-power mode (namely, a scanning interval and a scanning window are configured) so as to avoid that the BLE full-window scanning influences call tone quality; triggering to restore to a low delay mode or a balance mode (i.e. restoring the scanning interval and the scanning window) after the call is ended; if the electronic equipment is in the low-delay mode or the balance mode, and then calls are made or received, the Bluetooth scanning based on the BLE Bluetooth mode can be adjusted to the low-power consumption mode, so that the sound quality of BR/EDR Bluetooth voice call is ensured, and the low-delay mode or the balance mode is restored after the call is ended.
In this embodiment, by transmitting multimedia data based on the first bluetooth mode and starting the second bluetooth mode at the present time, determining a plurality of initial values corresponding to a plurality of scanning parameters of the second bluetooth mode, respectively, determining a target interval value corresponding to a scanning interval and a target window value corresponding to a scanning window, wherein the target interval value and the target window value are jointly used as a plurality of target values, configuring the initial interval value as the target interval value, and configuring the initial window value as the target window value, the interference influence of bluetooth scanning of the second bluetooth mode on the transmission of the multimedia data of the first bluetooth mode is effectively avoided, and the phenomenon of jamming and noise of the multimedia data is avoided, so that the transmission quality and the transmission effect of the multimedia data of the electronic device in the bluetooth dual mode can be effectively improved. The target interval value can be configured to be larger than the initial interval value, and the target window value is smaller than the initial window value, so that the Bluetooth scanning power consumption is reduced, communication control is more convenient, and the communication control efficiency is improved. By adjusting the scanning interval and the scanning window of the second Bluetooth mode, the bandwidth resource of Bluetooth communication is optimized by combining the use scene of the user, so that the transmission of the transmission multimedia data is smoother, and better user experience is brought.
Fig. 6 is a schematic structural diagram of a communication control device according to an embodiment of the present disclosure.
As shown in fig. 6, the communication control device 60 is applied to an electronic apparatus, and includes:
the first determining module 601 is configured to determine a plurality of initial values corresponding to a plurality of scan parameters of the second bluetooth mode when the multimedia data is currently transmitted based on the first bluetooth mode and the second bluetooth mode is turned on, where the first bluetooth mode and the second bluetooth mode are different.
The second determining module 602 is configured to determine a plurality of target values corresponding to the plurality of scanning parameters, where a first power consumption when the electronic device scans the target device based on the plurality of target values is smaller than a second power consumption when the electronic device scans the target device based on the plurality of initial values.
A configuration module 603, configured to configure the plurality of initial values into a plurality of corresponding target values respectively.
In some embodiments of the present disclosure, as shown in fig. 7, further comprising:
the control module 604 is configured to control the electronic device to scan the target device based on the plurality of target values in the second bluetooth mode.
In some embodiments of the present disclosure, wherein,
the configuration module 603 is further configured to maintain a plurality of initial values of the second bluetooth mode when the multimedia data is not currently transmitted based on the first bluetooth mode.
In some embodiments of the present disclosure, wherein,
the control module 604 is further configured to control the electronic device to scan the target device based on the plurality of initial values in the second bluetooth mode.
In some embodiments of the present disclosure, wherein,
the configuration module 603 is further configured to restore the plurality of target values to a corresponding plurality of initial values when the transmission of the multimedia data based on the first bluetooth mode is stopped.
In some embodiments of the present disclosure, the plurality of scan parameters includes: scan interval and scan window, then the plurality of initial values includes: an initial interval value corresponding to the scan interval, and an initial window value corresponding to the scan window.
In some embodiments of the present disclosure, the second determining module 602 is specifically configured to:
determining a target interval value corresponding to the scanning interval and a target window value corresponding to the scanning window, wherein the target interval value and the target window value are used as a plurality of target values together;
the configuration module 603 is specifically configured to configure the initial interval value as the target interval value, and configure the initial window value as the target window value.
In some embodiments of the present disclosure, wherein the target interval value is greater than the initial interval value and the target window value is less than the initial window value.
In some embodiments of the present disclosure, the power consumption of the second bluetooth mode is lower than the power consumption of the first bluetooth mode.
It should be noted that the foregoing explanation of the embodiment of the communication control method is also applicable to the communication control device of this embodiment, and will not be repeated here.
In this embodiment, when it is detected that the electronic device is currently transmitting multimedia data based on the first bluetooth mode and the second bluetooth mode is turned on, a plurality of initial values corresponding to a plurality of scanning parameters of the second bluetooth mode are determined, a plurality of target values corresponding to the plurality of scanning parameters are determined, and the plurality of initial values are configured to the corresponding plurality of target values, respectively.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
The electronic device includes:
a memory 801, a processor 802, and a computer program stored on the memory 801 and executable on the processor 802.
The processor 802 implements the communication control method provided in the above-described embodiment when executing a program.
In one possible implementation, the electronic device further includes:
a communication interface 803 for communication between the memory 801 and the processor 802.
A memory 801 for storing a computer program executable on the processor 802.
The memory 801 may include high-speed RAM memory or may further include non-volatile memory (non-volatile memory), such as at least one magnetic disk memory.
A processor 802 for implementing the communication control method of the above embodiment when executing a program.
If the memory 801, the processor 802, and the communication interface 803 are implemented independently, the communication interface 803, the memory 801, and the processor 802 may be connected to each other through a bus and perform communication with each other. The bus may be an industry standard architecture (Industry Standard Architecture, abbreviated ISA) bus, an external device interconnect (Peripheral Component, abbreviated PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, only one thick line is shown in fig. 8, but not only one bus or one type of bus.
Alternatively, in a specific implementation, if the memory 801, the processor 802, and the communication interface 803 are integrated on a chip, the memory 801, the processor 802, and the communication interface 803 may communicate with each other through internal interfaces.
The processor 802 may be a central processing unit (Central Processing Unit, abbreviated as CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, abbreviated as ASIC), or one or more integrated circuits configured to implement embodiments of the present disclosure.
The present embodiment also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the communication control method as above.
In order to implement the above-described embodiments, the present disclosure also proposes a computer program product that, when executed by a processor, performs the communication control method shown in the above-described embodiments.
It should be noted that in the description of the present disclosure, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Furthermore, in the description of the present disclosure, unless otherwise indicated, the meaning of "a plurality" is two or more.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present disclosure in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present disclosure.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
Furthermore, each functional unit in the embodiments of the present disclosure may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product.
The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present disclosure have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the present disclosure, and that variations, modifications, alternatives, and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the present disclosure.

Claims (12)

1. A communication control method, characterized by being applied to an electronic device, comprising:
if the multimedia data is currently transmitted based on a first Bluetooth mode and a second Bluetooth mode is started, determining a plurality of initial values respectively corresponding to a plurality of scanning parameters of the second Bluetooth mode, wherein the first Bluetooth mode and the second Bluetooth mode are different, the power consumption of the second Bluetooth mode is lower than that of the first Bluetooth mode, and the plurality of scanning parameters comprise: scanning interval and scanning window; the plurality of initial values includes: an initial interval value corresponding to the scan interval, and an initial window value corresponding to the scan window;
determining a target interval value corresponding to the scanning interval and a target window value corresponding to the scanning window, wherein the target interval value and the target window value are used as a plurality of target values together, and the first power consumption of the electronic equipment when scanning the target equipment based on the target values is smaller than the second power consumption of the electronic equipment when scanning the target equipment based on the initial values;
Configuring the initial interval value as the target interval value and configuring the initial window value as the target window value; the target interval value is greater than the initial interval value and the target window value is less than the initial window value.
2. The method as recited in claim 1, further comprising:
and controlling the electronic equipment to scan the target equipment based on the target values in the second Bluetooth mode.
3. The method as recited in claim 1, further comprising:
if the multimedia data is not currently transmitted based on the first Bluetooth mode, maintaining a plurality of initial values of the second Bluetooth mode.
4. A method as recited in claim 3, further comprising:
and controlling the electronic equipment to scan the target equipment based on the initial values in the second Bluetooth mode.
5. The method of claim 2, further comprising, after said controlling said electronic device to scan for a target device based on said plurality of target values in said second bluetooth mode:
and if the transmission of the multimedia data based on the first Bluetooth mode is stopped, restoring the target values to the initial values.
6. A communication control apparatus, characterized by being applied to an electronic device, comprising:
the first determining module is configured to determine, when a second bluetooth mode is turned on and a first bluetooth mode is currently based on the multimedia data, a plurality of initial values corresponding to a plurality of scanning parameters of the second bluetooth mode, respectively, where the first bluetooth mode and the second bluetooth mode are different, and power consumption of the second bluetooth mode is lower than that of the first bluetooth mode, and the plurality of scanning parameters include: scanning interval and scanning window, the plurality of initial values comprises: an initial interval value corresponding to the scan interval, and an initial window value corresponding to the scan window;
a second determining module, configured to determine a plurality of target values corresponding to the plurality of scanning parameters, where a first power consumption when the electronic device scans the target device based on the plurality of target values is smaller than a second power consumption when the electronic device scans the target device based on the plurality of initial values;
a configuration module, configured to configure the plurality of initial values into a plurality of corresponding target values respectively;
the second determining module is specifically configured to:
Determining a target interval value corresponding to the scan interval and a target window value corresponding to the scan window, the target interval value and the target window value being commonly used as the plurality of target values;
the configuration module is specifically configured to configure the initial interval value to be the target interval value, and configure the initial window value to be the target window value;
the target interval value is greater than the initial interval value and the target window value is less than the initial window value.
7. The apparatus as recited in claim 6, further comprising:
and the control module is used for controlling the electronic equipment to scan the target equipment based on the target values in the second Bluetooth mode.
8. The apparatus of claim 6, wherein,
the configuration module is further configured to maintain a plurality of initial values of the second bluetooth mode when the multimedia data is not currently transmitted based on the first bluetooth mode.
9. The apparatus of claim 8, wherein,
the control module is further configured to control the electronic device to scan the target device in the second bluetooth mode based on the plurality of initial values.
10. The apparatus of claim 7, wherein,
the configuration module is further configured to restore the plurality of target values to the corresponding plurality of initial values when transmission of the multimedia data based on the first bluetooth mode is stopped.
11. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any of claims 1-5 when the program is executed.
12. A storage medium, which when executed by a processor of an electronic device, enables the electronic device to perform the method of any one of claims 1-5.
CN202110666514.0A 2021-06-16 2021-06-16 Communication control method, device, electronic equipment and storage medium Active CN113490189B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110666514.0A CN113490189B (en) 2021-06-16 2021-06-16 Communication control method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110666514.0A CN113490189B (en) 2021-06-16 2021-06-16 Communication control method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113490189A CN113490189A (en) 2021-10-08
CN113490189B true CN113490189B (en) 2023-09-19

Family

ID=77935085

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110666514.0A Active CN113490189B (en) 2021-06-16 2021-06-16 Communication control method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113490189B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019009686A1 (en) * 2017-07-07 2019-01-10 엘지전자 주식회사 Method and apparatus for discovering device by using bluetooth low energy technology
WO2021102843A1 (en) * 2019-11-28 2021-06-03 华为技术有限公司 Short-range communication method and device with anti-interference capability

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8737917B2 (en) * 2009-07-24 2014-05-27 Broadcom Corporation Method and system for a dual-mode bluetooth low energy device
US8554141B2 (en) * 2010-06-24 2013-10-08 Broadcom Corporation Method and system for multi-stage device filtering in a bluetooth low energy device
US10375710B2 (en) * 2015-04-13 2019-08-06 Lg Electronics Inc. Method and apparatus for connecting devices using bluetooth low-energy technology
KR20170022001A (en) * 2015-08-19 2017-03-02 엘지전자 주식회사 Data transmiting and receiving method and the device therof
US10555328B2 (en) * 2017-02-17 2020-02-04 Avago Technologies International Sales Pte. Limited Scalable coexistence scheme for WLAN operation with multiple periodic BT connections

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019009686A1 (en) * 2017-07-07 2019-01-10 엘지전자 주식회사 Method and apparatus for discovering device by using bluetooth low energy technology
WO2021102843A1 (en) * 2019-11-28 2021-06-03 华为技术有限公司 Short-range communication method and device with anti-interference capability

Also Published As

Publication number Publication date
CN113490189A (en) 2021-10-08

Similar Documents

Publication Publication Date Title
JP6364834B2 (en) Wireless device and short-range wireless communication method
EP3783957A1 (en) Transmission path switching method and device
US8670556B2 (en) Multi-participant communication system with audio manager responsive to mode change requests
CN111107518A (en) Display method, vehicle-mounted terminal, display system and computer-readable storage medium
WO2020085177A1 (en) Communication device, method for controlling communication device and program
CN113840269B (en) Multimedia data transmission method and device, electronic equipment and storage medium
EP4228309A1 (en) Call method and device
US20210352557A1 (en) Resource pool switching method and apparatus, and mobile terminal, network side device and medium
CN110602683A (en) Bluetooth control method, device, mobile terminal and storage medium
CN113038437A (en) Data transmission method, device, storage medium and terminal equipment
CN113490189B (en) Communication control method, device, electronic equipment and storage medium
WO2024119947A1 (en) Bluetooth communication method and apparatus, electronic device, and computer-readable medium
WO2024060777A1 (en) Bluetooth switching method and apparatus, and bluetooth device and computer-readable medium
US12028724B2 (en) Method and device for configuring network parameter and computer-readable storage medium
WO2022237616A1 (en) Resource pool configuration method and apparatus, and terminal and network side device
CN115884186A (en) Wireless intercom system
WO2021128925A1 (en) Information processing method and apparatus, and device and computer readable storage medium
JP6643841B2 (en) Communication device, communication device control method, and program
JP5090294B2 (en) Wireless communication device
CN110621022A (en) Resource indication method, device and system
CN110265050B (en) AEC audio control system and clock negotiation method thereof
WO2024060750A1 (en) Bluetooth switching method and apparatus, bluetooth connection method and apparatus, and electronic device
US9329891B2 (en) Communication apparatus and communication method
CN112203236B (en) Data transmission method and device
WO2023160266A1 (en) Communication method and communication apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant