Control method and electronic equipment

By configuring the first and second communication modules in the electronic device and adjusting the operating parameters of the second communication module according to the conditions of the first communication module, the frequency conflict and inefficiency problems when the two communication modules share the antenna resources are solved. Improves communication efficiency and user experience.

CN119450428APending Publication Date: 2025-02-14LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411676903.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In the case where the two communication modules share the antenna resources, there are problems of frequency resource conflict and low efficiency, especially when communicating between the master and the slave.

Method used

By configuring the first communication module and the second communication module of the electronic device are in an operating state, and in response to the first communication module satisfying the target conditions, the second communication module is controlled to adjust the first operating parameter to the second operating parameter, and to time-division multiplex occupies antenna resources in a way.

Benefits of technology

By adjusting the operating parameters of the second communication module, the time the first communication module occupies antenna resources is changed, the communication needs of the two communication modules are met, the communication efficiency is improved, and the communication experience of users is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119450428A_ABST
    Figure CN119450428A_ABST
Patent Text Reader

Abstract

The invention discloses a control method and electronic equipment. The method comprises the following steps: configuring a first communication module and a second communication module of the electronic equipment to be in a working state; the first communication module is responded to meet the target condition, the second communication module is controlled to be adjusted from a first operation parameter to a second operation parameter, and the first communication module and the second communication module occupy antenna resources of the electronic equipment in a time division multiplexing mode; wherein when the second communication module works with a first operation parameter, the first communication module can use the antenna to transmit data with a first duration, and when the second communication module works with a second operation parameter, the first communication module can use the antenna to transmit data with a second duration, the first duration is different from the second duration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a control method and electronic equipment. Background Art

[0002] At present, when two communication modules share antenna resources, for example, the 2.4G frequency band is shared by Bluetooth and WiFi (wireless fidelity), when the master device and the slave device communicate, the two communication modules share antenna resources, which will cause resource conflicts in frequency. Therefore, the master device usually allocates antenna resources to the two communication modules based on time division multiplexing, but there is still a problem of low efficiency. Summary of the invention

[0003] In view of this, the present application provides a control method and an electronic device as follows:

[0004] A control method, comprising:

[0005] The first communication module and the second communication module of the electronic device are configured to be in working state;

[0006] In response to the first communication module meeting the target condition, controlling the second communication module to adjust the first operating parameter to the second operating parameter, so that the first communication module and the second communication module occupy the antenna resources of the electronic device in a time division multiplexing manner;

[0007] When the second communication module works with the first operating parameters, the first communication module can use the antenna to transmit data for a first duration; when the second communication module works with the second operating parameters, the first communication module can use the antenna to transmit data for a second duration, and the first duration is different from the second duration.

[0008] Preferably, the above method, in response to the first communication module of the electronic device meeting the target condition, controlling the second communication module to adjust the first operating parameter to the second operating parameter includes:

[0009] Determining that the load type of the first communication module changes from a first load type to a second load type;

[0010] Controlling the second communication module to adjust from the first operating parameter to the second operating parameter, so that the operating parameter of the second communication module matches the current load type of the first communication module;

[0011] Among them, the data throughput corresponding to the second load type is greater than the data throughput corresponding to the first load type; when the second communication module works with the first operating parameters, the second communication module can use the antenna to transmit data for a third duration; when the second communication module works with the second operating parameters, the second communication module can use the antenna to transmit data for a fourth duration, and the fourth duration is less than the third duration.

[0012] In the above method, preferably, the determining of the load type of the first communication module is associated with at least one of the following parameters:

[0013] a target application on the electronic device using the first communication module;

[0014] a first transmission rate at which the first communication module receives data;

[0015] The first communication module performs a second transmission rate for sending data.

[0016] In the above method, preferably, the operating parameters of the second communication module match the current load type of the first communication module, including:

[0017] At least one of the scanning parameter and the communication parameter in the operating parameters of the second communication module matches the current load type of the first communication module;

[0018] The scanning parameters are used by the second communication module to scan surrounding slave devices; and the communication parameters are used by the second communication module to perform data transmission with the slave devices connected to the electronic device.

[0019] In the above method, preferably, the scanning parameters include: scanning period and scanning window; the communication parameters include: communication interval and feedback delay;

[0020] Wherein, the second communication module scans the surrounding slave devices once every the duration of the scanning cycle, and each scanning by the second communication module lasts for the duration of the scanning window;

[0021] The second communication module transmits data with the slave device at intervals of the communication interval after connection, and the second communication module allows the slave device to skip the feedback event of the feedback delay amount when no data is sent.

[0022] In the above method, preferably, controlling the second communication module to adjust the first operating parameter to the second operating parameter includes:

[0023] Obtaining connection information of at least one slave device connected to the electronic device at least once through the second communication module; wherein the connection information includes: at least one of the broadcast interval, cumulative number of connections, cumulative connection duration, and duration from the last connection to the current moment of the slave device for the second communication module;

[0024] According to the connection information, the second communication module is controlled to adjust from the first operating parameter to the second operating parameter, so that the operating parameter of the second communication module matches the current load type of the first communication module and the operating parameter of the second communication module matches the connection information.

[0025] The above method preferably controls the second communication module to adjust the first operating parameter to the second operating parameter according to the connection information, including:

[0026] According to the connection information, a connection score corresponding to the slave device is obtained, wherein the size of the connection score represents the tightness of the connection between the slave device and the electronic device;

[0027] According to the connection score, selecting a target device that meets a preferred condition from among the slave devices;

[0028] According to the broadcast interval corresponding to the target device, the operating parameters of the second communication module are adjusted to match the broadcast interval corresponding to the target device.

[0029] Preferably, the method above, obtaining the connection score corresponding to the slave device according to the connection information, comprises:

[0030] Comparing the connection information with the initial information corresponding to the slave device to obtain a comparison result; the initial information corresponding to the slave device includes the connection history information obtained by the electronic device when obtaining the connection score corresponding to the slave device last time;

[0031] According to the comparison result, determining at least one target information having information change in the connection information;

[0032] According to the information change amount corresponding to the target information, the historical score corresponding to the initial information is modified to obtain the connection score corresponding to the slave device.

[0033] In the above method, preferably, the preferred conditions include:

[0034] No connection is established between the target device and the electronic device based on the second communication module;

[0035] Furthermore, the connection score of the target device exceeds a score threshold;

[0036] Moreover, the broadcast interval corresponding to the target device is the highest among the slave devices.

[0037] An electronic device, comprising:

[0038] antenna;

[0039] A first communication module;

[0040] A second communication module; the first communication module and the second communication module occupy the antenna resources in a time division multiplexing manner;

[0041] a processor, configured to configure the first communication module and the second communication module to be in a working state; in response to the first communication module meeting a target condition, controlling the second communication module to adjust a first operating parameter to a second operating parameter;

[0042] When the second communication module works with the first operating parameters, the first communication module can use the antenna to transmit data for a first duration; when the second communication module works with the second operating parameters, the first communication module can use the antenna to transmit data for a second duration, and the first duration is different from the second duration.

[0043] A computer device / equipment / system comprises: a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any one of the control methods.

[0044] A computer-readable storage medium stores a computer program / instruction, which implements the steps of any one of the control methods when executed by a processor.

[0045] A computer program product comprises a computer program / instruction, wherein when the computer program / instruction is executed by a processor, the steps of any one of the control methods are implemented.

[0046] It can be seen from the above technical scheme that in a control method and electronic device disclosed in the present application, two communication modules of different types in the electronic device are configured to be in working state, so that the two communication modules occupy the electronic device in a time-division multiplexing manner. In response to the first communication module meeting the target condition, the second communication module is controlled to be adjusted from the first operating parameter to the second operating parameter, so that when the second communication module works with the first operating parameter, the first communication module can use the antenna to transmit data with the first duration, and when the second communication module works with the adjusted second operating parameter, the first communication module can use the antenna to transmit data with a different second duration. Therefore, the present application changes the duration of the first communication module occupying the antenna resources by adjusting the operating parameters of the second communication module, thereby meeting the communication needs of the first communication module and / or the second communication module by changing the duration of the two communication modules occupying the antenna resources, thereby improving the communication efficiency, thereby improving the communication experience of the user using the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0048] Figure 1 A flow chart of a control method provided in an embodiment of the present application;

[0049] Figure 2 This is a structural diagram of an electronic device in an embodiment of the present application;

[0050] Figure 3 A partial flow chart of a control method provided in an embodiment of the present application;

[0051] Figure 4 Another partial flow chart of a control method provided in an embodiment of the present application;

[0052] Figure 5 A flowchart of another part of a control method provided in an embodiment of the present application;

[0053] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0055] refer to Figure 1 As shown, it is a flow chart of an implementation of a control method provided in an embodiment of the present application. The method can be applicable to an electronic device having at least a first communication module and a second communication module, such as Figure 2 As shown in , the communication types of the first communication module and the second communication module are different, and the first communication module and the second communication module occupy the antenna resources of the electronic device in a time-division multiplexing manner. For example, a mobile phone, tablet device, notebook, server and other devices with a WiFi communication module and a Bluetooth communication module, the WiFi communication module can be referred to as WiFi, and the Bluetooth communication module can be referred to as Bluetooth. WiFi and Bluetooth occupy the antenna resources of the electronic device in a time-division multiplexing manner for data transmission in the electronic device. The technical solution in this embodiment is mainly used to improve the communication experience of users using electronic devices.

[0056] Specifically, the method in this embodiment may include the following steps:

[0057] Step 101: configure a first communication module and a second communication module of an electronic device to be in working state.

[0058] In one implementation, an electronic device may provide a user with an interface for configuring a communication module, such as a first configuration interface for a first communication module and a second configuration interface for a second communication module. A user may enable the first communication module in the first configuration interface and may enable the second communication module in the second configuration interface. Based on this, in this embodiment, in response to user operations, the first communication module and the second communication module are both configured to be in working state.

[0059] For example, taking a mobile phone as an example, a user can turn on Bluetooth and WiFi in the mobile phone setting interface. Based on this, in this embodiment, both WiFi and Bluetooth in the mobile phone can be configured to be in working state.

[0060] Step 102: In response to the first communication module satisfying the target condition, controlling the second communication module to adjust the first operating parameter to the second operating parameter.

[0061] Among them, the second communication module can have multiple operating parameters of different parameter types, and each operating parameter of the second communication module is used to control the second communication module to be in different communication states, such as scanning parameters and communication parameters. The scanning parameters are used by the second communication module to scan surrounding slave devices, and the communication parameters are used by the second communication module to transmit data with slave devices connected to the electronic device.

[0062] Furthermore, each operation parameter of the second communication module may include one or more sub-parameters. For example, the scanning parameter may include parameters such as scanning period and scanning window, and the communication parameter may include parameters such as communication interval and feedback delay.

[0063] Among them, the scanning cycle can also be called the scanning interval or scanning gap (Scan Interval), which means that the second communication module scans the surrounding slave devices once every scanning cycle; the scanning window (Scan Window) means the duration of the second communication module scanning the window each time. The communication interval can also be called the communication gap (Connection Interval), which means that the second communication module and the slave device transmit data every communication interval after the connection; the feedback delay (Slave Latency) means that the second communication module allows the slave device to skip the feedback delay when there is no data to send.

[0064] Based on this, when controlling the second communication module to adjust from the first operating parameter to the second operating parameter in step 102, it may specifically be: controlling the second communication module to adjust from the first parameter value to the second parameter value in at least one operating parameter.

[0065] For example, the scanning period of the second communication module in the scanning parameters is controlled to be adjusted from the first period value to the second period value. For another example, the scanning window of the second communication module in the scanning parameters is controlled to be adjusted from the first window value to the second window value. For another example, the communication period of the second communication module in the communication parameters is controlled to be adjusted from the first period value to the second period value. For another example, the feedback delay amount of the second communication module in the communication parameters is controlled to be adjusted from the first delay amount to the second delay amount. After the parameter value of the operating parameter is adjusted, the duration of the second communication module occupying the antenna resources changes, thereby changing the duration of the first communication module occupying the antenna resources. The change in the duration of occupying the antenna resources here is relative to a fixed reference duration, for example, the duration of occupying the antenna resources changes within a fixed reference duration of 5 seconds.

[0066] Specifically, when the second communication module works with the first operating parameter (first parameter value), the first communication module can use the antenna to transmit data for a first duration; when the second communication module works with the second operating parameter (second parameter value), the first communication module can use the antenna to transmit data for a second duration, and the first duration is different from the second duration.

[0067] It can be seen from the above technical solution that in a control method provided by an embodiment of the present application, two communication modules of different types in an electronic device are configured to be in working state, so that the two communication modules occupy the electronic device in a time-division multiplexing manner. In response to the first communication module meeting the target condition, the second communication module can be controlled to adjust from the first operating parameter to the second operating parameter, so that when the second communication module works with the first operating parameter, the first communication module can use the antenna to transmit data with a first duration, and when the second communication module works with the adjusted second operating parameter, the first communication module can use the antenna to transmit data with a different second duration. Therefore, this embodiment changes the duration of the first communication module occupying the antenna resources by adjusting the operating parameters of the second communication module, thereby meeting the communication needs of the first communication module and / or the second communication module by changing the duration of the two communication modules occupying the antenna resources, thereby improving the communication efficiency, thereby improving the communication experience of the user using the electronic device.

[0068] In one implementation, step 102 may be implemented in the following manner: Figure 3 As shown in:

[0069] Step 301: Determine that the load type of the first communication module changes from a first load type to a second load type.

[0070] Specifically, determining the load type of the first communication module may be associated with at least one of the following parameters. That is, in this embodiment, the load type of the first communication module may be determined by the following parameters:

[0071] A target application on the electronic device using the first communication module;

[0072] a first transmission rate at which the first communication module receives data;

[0073] The first communication module performs a second transmission rate for sending data.

[0074] For example, the target application is an application that uses the first communication module for data communication, such as an online game application, an online shopping application, an online conference application, an online video viewing application, and other applications that communicate data via WiFi; for another example, the first transmission rate may be the downlink rate of WiFi; for another example, the second transmission rate may be the uplink rate of WiFi.

[0075] Specifically, in this embodiment, the target application currently running on the electronic device can be detected, and the first transmission rate and the second transmission rate of the first communication module can be detected through a specific communication interface, and then based on at least one of the three parameters, the current load type of the electronic device using the first communication module can be determined, and accordingly, it can be determined that the current load type of the first communication module has changed from the first load type to the second load type.

[0076] It should be noted that different load types of the first communication module correspond to different data throughputs. For example, the data throughput corresponding to the second load type may be greater than the data throughput corresponding to the first load type; for another example, the data throughput corresponding to the second load type may be less than the data throughput corresponding to the first load type.

[0077] For example, WiFi has three load types: light load, normal load, and heavy load. The data throughput corresponding to the light load type is smaller than the data throughput corresponding to the normal load type, and the data throughput corresponding to the normal load type is smaller than the data throughput corresponding to the heavy load type. Accordingly, WiFi can change from light load to heavy load, and the data throughput of WiFi increases; or WiFi changes from heavy load to normal load, and the data throughput of WiFi decreases.

[0078] Step 302: Control the second communication module to adjust from the first operating parameter to the second operating parameter, so that the operating parameter of the second communication module matches the current load type of the first communication module.

[0079] Among them, when the data throughput corresponding to the second load type is greater than the data throughput corresponding to the first load type, that is, when the first communication module needs to occupy the antenna resources for a longer period of time, after controlling the adjustment of the operating parameters of the second communication module, when the second communication module works with the first operating parameters, the second communication module can use the antenna to transmit data for a third period of time, and when the second communication module works with the second operating parameters, the second communication module can use the antenna to transmit data for a fourth period of time. At this time, the fourth period of time is less than the third period of time. Therefore, the occupation time of the second communication module on the antenna can be reduced to increase the occupation time of the first communication module on the antenna, thereby meeting the user's communication needs for the first communication module.

[0080] When the data throughput corresponding to the second load type is less than the data throughput corresponding to the first load type, that is, the first communication module does not need to occupy the antenna resources for too long, after adjusting the operating parameters of the second communication module, when the second communication module works with the first operating parameters, the second communication module can use the antenna to transmit data for a third time, and when the second communication module works with the second operating parameters, the second communication module can use the antenna to transmit data for a fourth time. At this time, the fourth time is greater than the third time. Therefore, the time that the second communication module occupies the antenna can be increased to reduce the time that the first communication module occupies the antenna, thereby avoiding the first communication module from occupying the antenna too much to meet the user's communication needs for the second communication module.

[0081] Based on the above implementation, the operating parameters of the second communication module match the current load type of the first communication module, specifically: at least one of the scanning parameters and the communication parameters in the operating parameters of the second communication module matches the current load type of the first communication module.

[0082] That is to say, in this embodiment, based on the current load type of the first communication module changing from the first load type to the second load type, at least one of the scanning parameter and the communication parameter in the operating parameters of the second communication module is controlled to match the second load type.

[0083] Specifically, in step 302, when controlling the second communication module to adjust at least one operating parameter from a first parameter value to a second parameter value, the adjusted second parameter value is within a parameter range corresponding to the second load type.

[0084] In one implementation, the load types of the first communication module are divided into three types: light load, normal load and heavy load, and the three load types of light load, normal load and heavy load correspond to the first parameter range, the second parameter range and the third parameter range respectively. When the second load type is heavy load, the first communication module is controlled in step 302 to adjust from the first parameter value to the second parameter value in the third parameter range on at least one operating parameter (such as at least one of the scanning period, scanning window, communication interval and feedback delay); when the second load type is normal load, the first communication module is controlled in step 302 to adjust from the first parameter value to the second parameter value in the second parameter range on at least one operating parameter (such as at least one of the scanning period, scanning window, communication interval and feedback delay); when the second load type is light load, the first communication module is controlled in step 302 to adjust from the first parameter value to the second parameter value in the first parameter range on at least one operating parameter (such as at least one of the scanning period, scanning window, communication interval and feedback delay).

[0085] For example, if the mobile phone WiFi is in a light load type, then the scanning window of the mobile phone's Bluetooth can be set to 100 milliseconds in the corresponding first parameter range, the scanning cycle is 1000 milliseconds in the corresponding first parameter range, the communication interval can be 15 milliseconds in the corresponding first parameter range, and the feedback delay amount can be 0 in the corresponding first parameter range; if the mobile phone WiFi is in a normal load type, then the scanning window of the mobile phone's Bluetooth can be set to 50 milliseconds in the corresponding second parameter range, the scanning cycle is 1000 milliseconds in the corresponding second parameter range, the communication interval can be 50 milliseconds in the corresponding second parameter range, and the feedback delay amount can be 5 in the corresponding second parameter range; if the mobile phone WiFi is in a heavy load type, then the scanning window of the mobile phone's Bluetooth can be set to 25 milliseconds in the corresponding third parameter range, the scanning cycle is 1250 milliseconds in the corresponding third parameter range, the communication interval can be 80 milliseconds in the corresponding third parameter range, and the feedback delay amount can be 10 in the corresponding third parameter range.

[0086] Based on the above implementation scheme, in step 102, when controlling the second communication module to adjust from the first operating parameter to the second operating parameter, it can be implemented in the following manner, such as Figure 4 As shown in:

[0087] Step 401: Obtain connection information of at least one slave device connected to the electronic device at least once through the second communication module.

[0088] The connection information includes at least one of a broadcast interval of the slave device for the second communication module, a cumulative number of connections, a cumulative connection duration, and a duration from the last connection to the current time.

[0089] It should be noted that the connection information is the connection information of the slave devices that are historically connected to the electronic device. The connection information of each slave device is stored in a corresponding storage area in the electronic device in the form of a list. Moreover, the connection information of each slave device is updated each time the electronic device scans the slave device through the second communication module.

[0090] For example, taking a mobile phone as an example, the mobile phone has connection information corresponding to each Bluetooth device that has been connected, as shown in Table 1. The Mac address of each Bluetooth device is used as the device identifier. When the mobile phone Bluetooth scans a Bluetooth device, it reads the corresponding broadcast interval based on the broadcast data packet broadcast by the Bluetooth device, and updates the cumulative number of connections, cumulative connection duration, and the duration from the last connection to the current time (i.e., the last connection time) of the Bluetooth device.

[0091] Table 1 Connection information and connection scores

[0092] MAC Address Broadcast interval (ms) Cumulative number of connections Cumulative connection time Last connection time Connection score A 25 50 4 hours 0.5days ago 100 B 75 20 1hours 5 days ago 70 C 50 3 0.5 hours 10 days ago 10 D 40 1 5 minutes 30 days ago 5

[0093] Step 402: According to the connection information, control the second communication module to adjust the first operating parameter to the second operating parameter.

[0094] The operating parameters of the second communication module match the current load type of the first communication module, and the operating parameters of the second communication module match the connection information. The determination of the current load type of the first communication module can refer to the corresponding content in the above text.

[0095] It should be noted that the operation parameters of the second communication module match the connection information, which can be understood as: the parameter value of the second communication module on the operation parameters matches the connection information, that is, the second parameter value of the second communication module on the adjusted operation parameters matches the connection information.

[0096] Specifically, step 402 can be implemented by the following methods: Figure 5 As shown in:

[0097] Step 501: Obtain a connection score corresponding to a slave device according to the connection information.

[0098] The size of the connection score represents the connection tightness between the slave device and the electronic device.

[0099] Specifically, in step 501, the connection information can be compared with the initial information corresponding to the slave device to obtain a comparison result; then, according to the comparison result, at least one target information with information change is determined in the connection information; finally, according to the amount of information change corresponding to the target information, the historical score corresponding to the initial information is modified to obtain the connection score corresponding to the slave device.

[0100] Among them, the initial information corresponding to the slave device includes the connection history information obtained by the electronic device when it last obtained the connection score corresponding to the slave device. That is to say, each time the electronic device scans the Bluetooth device, it obtains the connection information of each slave device that has been connected once, based on which, the connection information obtained last time is used as the historical connection information, i.e., the initial information, and the connection score corresponding to the slave device is updated once according to the obtained connection information. Specifically, the initial information is compared with the connection information in each information such as the broadcast interval, the cumulative number of connections, the cumulative connection duration, the time from the last connection to the current moment, etc., thereby determining the target information with information changes, such as the change in the time from the last connection to the current moment, the change in the cumulative number of connections, the change in the cumulative connection duration, etc., and then, according to the information change amount corresponding to each target information, such as the change in the duration from the last connection to the current moment, the change in the number of cumulative connections, and the change in the duration of the cumulative connection duration, the historical score corresponding to the initial information is increased or decreased to obtain the updated connection score.

[0101] It should be noted that the greater the connection score, the higher the connection density between the slave device and the electronic device, which means the greater the possibility that the slave device will be connected to the electronic device again. The smaller the connection score, the lower the connection density between the slave device and the electronic device, which means the less likely the slave device will be connected to the electronic device again.

[0102] For example, as shown in Table 1, the last column of Table 1 stores the connection score corresponding to the slave device. The shorter the time from the most recent connection to the current moment becomes, the higher the connection score becomes; the more the cumulative number of connections becomes, the higher the connection score becomes; the longer the cumulative connection time becomes, the higher the connection score becomes.

[0103] Step 502: According to the connection score, select a target device that meets the preferred condition from among the slave devices.

[0104] Among them, if there is only one slave device and it is not connected to the electronic device based on the second communication module, then this slave device is the target device; if there are multiple slave devices that are not connected to the electronic device based on the second communication module, then according to the connection score, a target device that meets the preferred conditions can be selected from these multiple slave devices that are not connected to the electronic device based on the second communication module.

[0105] Specifically, the preferred conditions may include:

[0106] There is no connection established between the target device and the electronic device based on the second communication module; and the connection score of the target device exceeds the score threshold; and the broadcast interval corresponding to the target device is the highest among the slave devices.

[0107] It should be noted that the scoring threshold can be set based on business needs, such as 70 or 80.

[0108] For example, taking the second communication module as Bluetooth, if there are multiple Bluetooth devices that have not established a Bluetooth connection with a mobile phone, one of the Bluetooth devices can be selected as the target device according to the preferred conditions, where the preferred conditions can be: the connection score of the Bluetooth device is greater than 70, and the Bluetooth device has not established a Bluetooth connection with the mobile phone, and the broadcast interval of the Bluetooth device is the highest.

[0109] Step 503: According to the broadcast interval corresponding to the target device, the operating parameters of the second communication module are adjusted to match the broadcast interval corresponding to the target device.

[0110] In one implementation, in step 503, the scanning window in the scanning parameters of the second communication module can be controlled to be adjusted to the broadcast interval corresponding to the target device plus a preset incremental duration, such as 10 milliseconds; correspondingly, the scanning period in the scanning parameters of the second communication module is controlled to be adjusted to a preset multiple of the adjusted scanning window, such as 10 times the scanning window.

[0111] If there is no target device that meets the preferred condition among the slave devices, the parameter value of the operating parameter of the second communication module can be set to a default target value. For example, if no Bluetooth device meets the preferred condition among the Bluetooth devices scanned by the mobile phone, the scanning window of the Bluetooth of the mobile phone can be set to a default target value such as 100 milliseconds, and the scanning period is 1000 milliseconds.

[0112] It should be noted that in step 302, when the second communication module is controlled to adjust from the first operating parameter to the second operating parameter, that is, when the second parameter value is determined in the parameter range corresponding to the second load type, the second parameter value can also be adjusted by Figure 4 and Figure 5 The process shown is implemented.

[0113] refer to Figure 6 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, and the electronic device may include the following structure:

[0114] Antenna 601;

[0115] First communication module 602;

[0116] The second communication module 603; the first communication module 602 and the second communication module 603 occupy the antenna 601 resources in a time division multiplexing manner;

[0117] The processor 604 is configured to configure the first communication module 602 and the second communication module 603 to be in a working state; in response to the first communication module 602 meeting the target condition, control the second communication module 603 to adjust the first operating parameter to the second operating parameter;

[0118] Among them, when the second communication module 603 works with the first operating parameters, the first communication module 602 can use the antenna 601 to transmit data for a first duration, and when the second communication module 603 works with the second operating parameters, the first communication module 602 can use the antenna 601 to transmit data for a second duration, and the first duration is different from the second duration.

[0119] It can be seen from the above technical solution that in an electronic device provided by an embodiment of the present application, two communication modules of different types in the electronic device are configured to be in working state, so that the two communication modules occupy the electronic device in a time-division multiplexing manner. In response to the first communication module meeting the target condition, the second communication module can be controlled to adjust from the first operating parameter to the second operating parameter, so that when the second communication module works with the first operating parameter, the first communication module can use the antenna to transmit data with a first duration, and when the second communication module works with the adjusted second operating parameter, the first communication module can use the antenna to transmit data with a different second duration. Therefore, this embodiment changes the duration of the first communication module occupying the antenna resources by adjusting the operating parameters of the second communication module, thereby meeting the communication needs of the first communication module and / or the second communication module by changing the duration of the two communication modules occupying the antenna resources, thereby improving the communication efficiency, thereby improving the communication experience of the user using the electronic device.

[0120] Taking the scenario where Bluetooth and WiFi share an antenna in a mobile phone as an example, the technical solution of this application is illustrated below:

[0121] If a peripheral device (such as a Bluetooth pen, keyboard, headset, bracelet, etc.) wants to be discovered by a central device (such as a mobile phone or tablet), it will periodically send broadcast packets on Bluetooth channels 37, 38, and 39. The central device needs to initiate periodic scanning. Once the broadcast is found, it can initiate a connection. After the connection, data communication with the peripheral device needs to be at the interval of the connection interval.

[0122] There are five important scanning parameters in the above process: Advertisement Interval, Scan Window, Scan Interval, Connection Interval and Slave Latency.

[0123] Among them, Adv Interval is the broadcast interval of the Bluetooth peripheral (i.e., slave device), ranging from 20ms to 10.48s. Different peripherals are set independently, and the broadcast interval of most peripherals used with mobile phones and tablets is between 25 and 100ms.

[0124] Scan Window is the time period when the central device (i.e. the master device) actually initiates the Bluetooth BLE scan. The range is 2.5ms to 10.24s. If it is too small, it will affect the power consumption. If it is too large, it will take too long for BLE to discover the device.

[0125] Scan Interval is the period for the central device to initiate a scan, including the scan time and sleep time. The range is 2.5ms to 10.24s. If it is too small, it will affect the power consumption. If it is too large, it will take too long for BLE to discover the device.

[0126] Connection Interval is the communication interval between the central device and the slave device after the connection. When the BLE master device and the slave device are successfully connected, a Connection interval will be negotiated. All data between the master device and the slave device can only be sent and received at the Connection interval. The range is 7.5ms to 4 seconds. If it is too small, it will affect power consumption. If it is too large, data will not be sent and received in time, affecting the user experience.

[0127] Slave Latency allows the Peripheral / Slave (i.e. slave device) to skip a certain number of connection events when there is no data to send, and does not need to reply to the Master (i.e. master device) packets in these connection events. Range: 0 to 499.

[0128] Among them, an overly large Scan window or an overly small Connection Interval not only increases the power consumption of Bluetooth itself, but also has an obvious impact on WiFi services, because the device has to allocate more time slices to Bluetooth, while the time slices for WiFi are reduced.

[0129] In view of this, this application proposes a method for improving WiFi throughput when BLE and 2.4G WiFi coexist. The four parameters of the BLE master are dynamically adjusted according to the size of the device's WiFi traffic: Scan window, Scan interval, Connection interval, and Slave latency. In this way, while ensuring the basic BLE experience, as many time slices as possible are allocated to WiFi.

[0130] Furthermore, in this embodiment, the scan window / interval of the master device can be set based on the connection information of the peripheral device scanned by the master device, wherein the scan window needs to be slightly larger than the broadcast interval of the peripheral device.

[0131] Taking Table 1 as an example, in this embodiment, all connected peripherals (i.e., slave devices in the previous text) can be scored, and the scoring criteria can be judged based on the cumulative number of connections, the cumulative connection duration, and the time from the last connection to the current moment (i.e., the last connection time in Table 1), etc. The more frequently used peripherals are, the higher the connection score is. Among them, the initial score can be 30.

[0132] Peripheral scoring can be either plus or minus points. For example, if the last connection time exceeds 10 days, minus 40 points. If the last connection time is less than 0.5 days, plus 20 points. If the number of connections exceeds 10 times, plus 20 points.

[0133] Accordingly, when no peripheral connection score is higher than 70 points, the master device uses the default settings, that is, Scanwindow is 100 milliseconds and Scan interval is 1000 milliseconds.

[0134] When the score of a peripheral device is higher than 70 points, it is divided into the following situations:

[0135] If there is only one peripheral device, its broadcast interval plus 10 milliseconds (or other values, set according to business needs) will be selected as the Scan window of the main device, and the Scan Interval is Scan window×10;

[0136] If there are two peripherals, and neither of them is currently connected to the main device, the one with the larger broadcast interval will be selected plus 10 mm as the Scan window of the main device. The Scan Interval is Scan window×10.

[0137] If there are two peripherals and one of them is connected to the main device, the other broadcast interval plus 10 mm is automatically selected as the Scan window of the main device, and the Scan Interval is Scan window×10.

[0138] If there are two peripheral devices and both are connected to the main device, select the default settings, that is, set the Scan window to 100 mm and the Scan interval to 1000 mm.

[0139] If there are more than two peripherals, the top two peripherals in descending order of connection score are used as the standard. That is, the one with the larger broadcast interval is selected and 10 mm is added as the Scan window of the main device. The Scan Interval is Scan window×10.

[0140] It should be noted that the connection information in Table 1 can be obtained by the master device each time it performs a Bluetooth scan to receive the broadcast data packet broadcast by the slave device, and then obtain the broadcast interval from the broadcast data packet, and count other connection information, such as the cumulative number of connections, the cumulative connection duration, and the duration from the last connection to the current moment.

[0141] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0142] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may 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 this application.

[0143] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0144] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A control method, comprising: The first communication module and the second communication module of the electronic device are configured to be in working state; In response to the first communication module meeting the target condition, controlling the second communication module to adjust the first operating parameter to the second operating parameter, so that the first communication module and the second communication module occupy the antenna resources of the electronic device in a time division multiplexing manner; When the second communication module works with the first operating parameters, the first communication module can use the antenna to transmit data for a first duration; when the second communication module works with the second operating parameters, the first communication module can use the antenna to transmit data for a second duration, and the first duration is different from the second duration.

2. The method according to claim 1, in response to the first communication module of the electronic device meeting the target condition, controlling the second communication module to adjust the first operating parameter to the second operating parameter, comprising: Determining that the load type of the first communication module changes from a first load type to a second load type; Controlling the second communication module to adjust from the first operating parameter to the second operating parameter, so that the operating parameter of the second communication module matches the current load type of the first communication module; The data throughput corresponding to the second load type is greater than the data throughput corresponding to the first load type; when the second communication module operates with the first operating parameter, the second communication module can transmit data using the antenna for a third duration; When the second communication module operates with the second operating parameter, the second communication module can transmit data using the antenna for a fourth duration, and the fourth duration is shorter than the third duration.

3. The method according to claim 2, wherein determining the load type of the first communication module is associated with at least one of the following parameters: a target application on the electronic device using the first communication module; a first transmission rate at which the first communication module receives data; The first communication module performs a second transmission rate for sending data.

4. The method according to claim 2, wherein the operating parameters of the second communication module match the current load type of the first communication module, comprising: At least one of the scanning parameter and the communication parameter in the operating parameters of the second communication module matches the current load type of the first communication module; The scanning parameters are used by the second communication module to scan surrounding slave devices; and the communication parameters are used by the second communication module to perform data transmission with the slave devices connected to the electronic device.

5. The method according to claim 4, wherein the scanning parameters include: Scan cycle and scan window; The communication parameters include: communication interval and feedback delay; Wherein, the second communication module scans the surrounding slave devices once every the duration of the scanning cycle, and each scanning by the second communication module lasts for the duration of the scanning window; The second communication module transmits data with the slave device at intervals of the communication interval after connection, and the second communication module allows the slave device to skip the feedback event of the feedback delay amount when no data is sent.

6. The method according to claim 1 or 2, controlling the second communication module to adjust the first operating parameter to the second operating parameter, comprising: Obtaining connection information of at least one slave device connected to the electronic device at least once through the second communication module; wherein the connection information includes: at least one of the broadcast interval, cumulative connection times, cumulative connection duration, and duration from the last connection to the current time of the slave device for the second communication module; According to the connection information, the second communication module is controlled to adjust from the first operating parameter to the second operating parameter, so that the operating parameter of the second communication module matches the current load type of the first communication module and the operating parameter of the second communication module matches the connection information.

7. The method according to claim 6, controlling the second communication module to adjust the first operating parameter to the second operating parameter according to the connection information, comprising: According to the connection information, a connection score corresponding to the slave device is obtained, wherein the size of the connection score represents the tightness of the connection between the slave device and the electronic device; According to the connection score, selecting a target device that meets a preferred condition from among the slave devices; According to the broadcast interval corresponding to the target device, the operating parameters of the second communication module are adjusted to match the broadcast interval corresponding to the target device.

8. The method according to claim 7, obtaining a connection score corresponding to the slave device according to the connection information, comprising: Comparing the connection information with initial information corresponding to the slave device to obtain a comparison result; The initial information corresponding to the slave device includes connection history information obtained by the electronic device when it last obtained a connection score corresponding to the slave device; According to the comparison result, determining at least one target information having information change in the connection information; According to the information change amount corresponding to the target information, the historical score corresponding to the initial information is modified to obtain the connection score corresponding to the slave device.

9. The method according to claim 7, wherein the preferred conditions include: No connection is established between the target device and the electronic device based on the second communication module; Furthermore, the connection score of the target device exceeds a score threshold; Moreover, the broadcast interval corresponding to the target device is the highest among the slave devices.

10. An electronic device, comprising: antenna; A first communication module; A second communication module; The first communication module and the second communication module occupy the antenna resources in a time division multiplexing manner; a processor, configured to configure the first communication module and the second communication module to be in a working state; in response to the first communication module meeting a target condition, controlling the second communication module to adjust a first operating parameter to a second operating parameter; When the second communication module works with the first operating parameters, the first communication module can use the antenna to transmit data for a first duration; when the second communication module works with the second operating parameters, the first communication module can use the antenna to transmit data for a second duration, and the first duration is different from the second duration.