A scanning control system, method and electronic device
By introducing a software optimization algorithm module into the Bluetooth chip, the time ratio of the three-level automatic gain control is adjusted in real time, which solves the problem of low success rate of Bluetooth low power scanning, improves the reliability and stability of Bluetooth devices, and reduces R&D costs.
Patent Information
- Application Number
- CN202210800198.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-06
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2042-07-06
AI Technical Summary
The existing Bluetooth Low Energy scanning success rate is low, which leads to reduced Bluetooth reliability and stability. In addition, AGC modules have high design costs and long development cycles, and scanning time is wasted on unnecessary AGC levels.
By working together with the Bluetooth chip scheduling module, scan scheduling module, receive packet module and software optimization algorithm module, the time ratio of the three-level automatic gain control is adjusted in real time. The AGC threshold is dynamically adjusted based on the number of packet signal strengths received in the recent period to improve the scanning success rate.
It improves Bluetooth scanning capabilities and the timeliness of information reporting, reduces R&D costs, and enhances the reliability and stability of Bluetooth devices.
Smart Images

Figure CN115190462B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wireless communication Bluetooth technology, and in particular to a scanning control system, method, and electronic device. Background Technology
[0002] As people's lives become more modernized, the demand for communication technology is also increasing. Among them, Bluetooth technology, characterized by low cost and short range, is highly favored by the market and has become one of the most widely used wireless connection and communication technologies.
[0003] Bluetooth chips include an Automatic Gain Control (AGC) module. Due to the defects in the existing AGC implementation, the scanning success rate is low, requiring a change in the AGC module design. This results in high R&D costs and long development cycles, affecting the chip's usability scenarios. In particular, the fixed time-sharing scheduling based on AGC has obvious shortcomings, with scanning packet reception success rates being low and scanning time slices being wasted on unnecessary AGC levels.
[0004] This has led to the current problem of low success rate in Bluetooth Low Energy scanning, reducing the reliability and stability of Bluetooth. Summary of the Invention
[0005] The purpose of this invention is to provide a scanning control system, method, and electronic device to solve the problem of low success rate of existing low-power dental scanning, which reduces the reliability and stability of Bluetooth.
[0006] In a first aspect, the present invention provides a scanning control system, the system comprising:
[0007] The Bluetooth chip scheduling module, as well as the scan scheduling module and the receiving packet module respectively connected to the Bluetooth chip scheduling module, further include a software optimization algorithm module connected at one end to the receiving packet module and at the other end to the scan scheduling module;
[0008] The Bluetooth chip scheduling module is used to send corresponding scheduling instructions to the scanning scheduling module;
[0009] The Bluetooth chip scheduling module is also used to provide corresponding scan packet data to the receiving packet module;
[0010] The receiving packet module is used to parse the signal strength of the corresponding packet based on the scanned packet data and send the signal strength to the software optimization algorithm module;
[0011] The software optimization algorithm module is used to accumulate and count multiple signal strengths received within a preset time period, adjust the time ratio of the three-level automatic gain control based on the multiple signal strengths, and set the target automatic gain threshold corresponding to the three-level automatic gain control based on the time ratio within the preset automatic gain level period.
[0012] The scan scheduling module is used to initiate scan scheduling based on the scheduling instruction and the target automatic gain threshold until the scan is completed.
[0013] With the above technical solution, the scanning control system provided in this application includes: a Bluetooth chip scheduling module, a scanning scheduling module and a receiving packet module respectively connected to the Bluetooth chip scheduling module, and a software optimization algorithm module connected at one end to the receiving packet module and at the other end to the scanning scheduling module; the software optimization algorithm module is used to accumulate and count multiple signal strengths received within a preset time period, adjust the time ratio of three-level automatic gain control based on the multiple signal strengths, and set the target automatic gain threshold corresponding to the three-level automatic gain control based on the time ratio within a preset automatic gain level period; the scanning scheduling module is used to start scanning scheduling based on the scheduling command and the target automatic gain threshold until scanning is completed, that is, the time ratio of the three-level automatic gain control can be adjusted in real time by the software optimization algorithm module. The time ratio of the three-level automatic gain control can be dynamically adjusted in real time according to the number of packet signal strengths received in the recent period, thereby improving Bluetooth scanning capability, helping the Bluetooth protocol to report the current scanning information to the upper layer application in a timely manner, improving reporting timeliness and user experience.
[0014] In one possible implementation, the Bluetooth chip scheduling module is configured to issue corresponding scheduling instructions to the scanning scheduling module, including:
[0015] The Bluetooth chip scheduling module is used to enable Bluetooth Low Energy scanning service after the Bluetooth Low Energy application is started, and to send corresponding scheduling instructions to the scanning scheduling module.
[0016] In one possible implementation, the scan scheduling module is further configured to set different automatic gain initial thresholds within the time proportions of the three-level automatic gain control based on a default initial value.
[0017] In one possible implementation, the software optimization algorithm module is used to accumulate and statistically analyze multiple signal strengths received within a preset time period, adjust the time proportion of the three-level automatic gain control based on the multiple signal strengths, and set the target automatic gain threshold corresponding to the three-level automatic gain control based on the time proportion within a preset automatic gain level period, including:
[0018] The software optimization algorithm module is used to accumulate and statistically analyze the signal strengths received within a preset time period, adjust the time proportion of the three-level automatic gain control based on the multiple signal strengths, update the initial automatic gain threshold based on the time proportion within the preset automatic gain level cycle, and determine the target automatic gain threshold.
[0019] In one possible implementation, the preset automatic gain control period range is greater than or equal to 100 milliseconds and less than or equal to 150 milliseconds.
[0020] In a second aspect, the present invention also provides a scanning control method, applied to any of the scanning control systems described in the first aspect, the method comprising:
[0021] The Bluetooth chip scheduling module sends a corresponding scheduling instruction to the scanning scheduling module;
[0022] The Bluetooth chip scheduling module provides the corresponding scan packet data to the receiving packet module;
[0023] The receiving packet module parses the signal strength of the corresponding packet based on the scanned packet data and sends the signal strength to the software optimization algorithm module;
[0024] The software optimization algorithm module accumulates and counts multiple signal strengths received within a preset time period, adjusts the time proportion of the three-level automatic gain control based on the multiple signal strengths, and sets the target automatic gain threshold corresponding to the three-level automatic gain control based on the time proportion within the preset automatic gain level period.
[0025] The scan scheduling module initiates scan scheduling based on the scheduling instruction and the target automatic gain threshold until the scan is completed.
[0026] In one possible implementation, the Bluetooth chip scheduling module sends a corresponding scheduling instruction to the scan scheduling module, including:
[0027] After the Bluetooth Low Energy application is started, the Bluetooth chip scheduling module enables the Bluetooth Low Energy scanning service and sends corresponding scheduling instructions to the scanning scheduling module.
[0028] In one possible implementation, before the Bluetooth chip scheduling module provides the corresponding scan packet data to the receiving packet module, the method further includes:
[0029] The scanning scheduling module sets different initial thresholds for automatic gain control within the time proportions of the three levels of automatic gain control, based on the default initial value.
[0030] In one possible implementation, the software optimization algorithm module accumulates and statistically analyzes multiple signal strengths received within a preset time period, adjusts the time proportion of the three-level automatic gain control based on the multiple signal strengths, and sets the target automatic gain threshold corresponding to the three-level automatic gain control based on the time proportion within a preset automatic gain level period, including:
[0031] The software optimization algorithm module accumulates and counts multiple signal strengths received within a preset time period, adjusts the time proportion of the three-level automatic gain control based on the multiple signal strengths, updates the initial automatic gain threshold based on the time proportion within the preset automatic gain level cycle, and determines the target automatic gain threshold.
[0032] The beneficial effects of the scanning control method provided in the second aspect are the same as those of the scanning control system described in the first aspect or any possible implementation of the first aspect, and will not be repeated here.
[0033] Thirdly, the present invention also provides an electronic device comprising: one or more processors; and one or more machine-readable media having instructions stored thereon, which, when executed by the one or more processors, cause the device to perform the scanning control method described in any possible implementation of the second aspect.
[0034] The beneficial effects of the electronic device provided in the third aspect are the same as those of the scanning control method described in the second aspect or any possible implementation of the second aspect, and will not be repeated here. Attached Figure Description
[0035] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:
[0036] Figure 1 This paper shows a schematic diagram of the structure of a scanning control system provided in an embodiment of the present application;
[0037] Figure 2 A schematic diagram of a scan scheduling and software optimization framework provided in an embodiment of this application is shown;
[0038] Figure 3 A flowchart illustrating a scanning control method provided in an embodiment of this application is shown;
[0039] Figure 4 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention;
[0040] Figure 5 This is a schematic diagram of the chip structure provided in an embodiment of the present invention.
[0041] Figure label:
[0042] 101-Bluetooth chip scheduling module; 102-Scanning scheduling module; 103-Receive packet module; 104-Software optimization algorithm module; 400-Electronic device; 410-Processor; 420-Communication interface; 430-Memory; 440-Communication line; 500-Chip; 540-Bus system. Detailed Implementation
[0043] To facilitate a clear description of the technical solutions in the embodiments of the present invention, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect. For example, the first threshold and the second threshold are merely used to distinguish different thresholds and do not limit their order. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that the terms "first" and "second" are not necessarily different.
[0044] It should be noted that in this invention, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0045] In this invention, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, a combination of a and b, a combination of a and c, a combination of b and c, or a, b, and c, where a, b, and c can be single or multiple.
[0046] Figure 1 A schematic diagram of a scanning control system provided in an embodiment of this application is shown, as follows: Figure 1 As shown, the scanning control system includes:
[0047] The Bluetooth chip scheduling module 101, the scan scheduling module 102 and the receiving packet module 103 respectively connected to the Bluetooth chip scheduling module 101, and the software optimization algorithm module 104 connected at one end to the receiving packet module 103 and at the other end to the scan scheduling module 102.
[0048] The Bluetooth chip scheduling module is used to send corresponding scheduling instructions to the scanning scheduling module;
[0049] The Bluetooth chip scheduling module is also used to provide corresponding scan packet data to the receiving packet module;
[0050] The receiving packet module is used to parse the signal strength of the corresponding packet based on the scanned packet data and send the signal strength to the software optimization algorithm module;
[0051] The software optimization algorithm module is used to accumulate and count multiple signal strengths received within a preset time period, adjust the time ratio of the three-level automatic gain control based on the multiple signal strengths, and set the target automatic gain threshold corresponding to the three-level automatic gain control based on the time ratio within the preset automatic gain level period.
[0052] The scan scheduling module is used to initiate scan scheduling based on the scheduling instruction and the target automatic gain threshold until the scan is completed.
[0053] In summary, the scanning control system provided in this application includes: a Bluetooth chip scheduling module, a scanning scheduling module and a receiving packet module respectively connected to the Bluetooth chip scheduling module, and a software optimization algorithm module connected at one end to the receiving packet module and at the other end to the scanning scheduling module. The software optimization algorithm module is used to accumulate and statistically analyze multiple signal strengths received within a preset time period, adjust the time proportion of three-level automatic gain control based on the multiple signal strengths, and set target automatic gain thresholds corresponding to the three-level automatic gain control based on the time proportions within a preset automatic gain level period. The scanning scheduling module is used to initiate scanning scheduling based on the scheduling command and the target automatic gain thresholds until scanning is completed. That is, the time proportion of the three-level automatic gain control can be adjusted in real time by the software optimization algorithm module. The time proportion of the three-level automatic gain control can be dynamically adjusted in real time based on the number of packet signal strengths received in the recent period, thereby improving Bluetooth scanning capabilities and helping the Bluetooth protocol to promptly report current scanning information to upper-layer applications, improving reporting timeliness and user experience.
[0054] The scanning control system in this application can dynamically adjust the problem to be solved by the AGC software algorithm in real time. The software optimization algorithm module can adjust the time ratio of the three AGC levels in real time. The time ratio of the three AGC levels can be dynamically adjusted in real time based on the number of received packet signal strengths in the recent period, thereby improving the Bluetooth scanning capability. This helps the Bluetooth protocol to report the current scanning information to the upper layer application in a timely manner, improving the timeliness of reporting and the user experience.
[0055] Optionally, the Bluetooth chip scheduling module is used to enable the Bluetooth Low Energy scanning service after the Bluetooth Low Energy application is started, and to send corresponding scheduling instructions to the scanning scheduling module.
[0056] After the Bluetooth Low Energy (BLE) application is started, the Bluetooth chip scheduling module sends a scheduling command to the scanning scheduling module to control the scanning scheduling module to scan unconnectable broadcast packets. The software optimization algorithm module counts the most recent 400 broadcast packets and adjusts the three-level AGC time ratio in real time according to the signal strength of the packets, which is to say, adjusts the three-level automatic gain control time ratio.
[0057] Optionally, the Bluetooth chip scheduling module can be used to schedule Bluetooth outputs (tx) and inputs (rx), including scheduling functions such as Bluetooth scanning, broadcast transmission, and connected state.
[0058] Optionally, the scan scheduling module is also used to set different automatic gain initial thresholds within the time proportion of the three-level automatic gain control based on the default initial value.
[0059] The scan scheduling module can initiate scan scheduling by setting the AGC value according to the software optimization algorithm module. When the Bluetooth chip scheduling module executes scan scheduling, it can perform packet receiving operations based on the current AGC value.
[0060] Optionally, the software optimization algorithm module is used to accumulate and statistically analyze multiple signal strengths received within a preset time period, adjust the time proportion of the three-level automatic gain control based on the multiple signal strengths, update the initial automatic gain threshold based on the time proportion within the preset automatic gain level cycle, and determine the target automatic gain threshold.
[0061] Optionally, the receiving packet module can analyze the signal strength of the scanning packet data after the Bluetooth chip scheduling module receives the scanning packet data in the air, and then hand it over to the software optimization algorithm module for processing.
[0062] Optionally, the preset automatic gain control period range is greater than or equal to 100 milliseconds and less than or equal to 150 milliseconds.
[0063] The specific process of the software optimization algorithm in this application is as follows: The receiving packet module 103 sends the signal strength to the optimization software algorithm module 104. Specifically, the signal strength of the currently received packets can be counted for each packet. The number of three-level automatic gain control can include the number of low-level signal strength, the number of medium-level signal strength, and the number of high-level signal strength. The number of signal strengths greater than 240 can be determined as the number of high-level signal strengths. The number of signal strengths greater than 230 and less than or equal to 240 within a certain period of time can be determined as the number of medium-level signal strengths. The number of signal strengths greater than 210 and less than 230 within a certain period of time can be determined as the number of low-level signal strengths. The AGC (Automatic Gain Control) levels are divided into three levels: a low level with an AGC value of 15, a medium level with a time percentage equal to the fixed AGC time percentage plus the medium AGC time percentage, resulting in a medium AGC value of 35, and a high level with a time percentage equal to the time percentage of AGC that can be dynamically changed in real time (the sum of the low, medium, and high AGC time percentages) minus the low AGC time percentage minus the high AGC time percentage, resulting in a high AGC value of 60. The software optimization algorithm module 104 can scan and statistically analyze within the preset automatic gain control level cycle, resetting it every second. It can further determine and adjust the target automatic gain thresholds (low, medium, and high AGC values) corresponding to the three automatic gain control levels, and output the corresponding target automatic gain thresholds to the scan scheduling module 102.
[0064] Figure 2 This illustration shows a schematic diagram of a scan scheduling and software optimization framework provided in an embodiment of this application, as shown below. Figure 2 As shown, after the Bluetooth chip scheduling module starts the Bluetooth Low Energy application, it initiates low-power scanning and sends corresponding scheduling instructions to the scanning scheduling module 102. The scanning scheduling module sets different initial automatic gain thresholds within the time proportions of the three-level automatic gain control based on the default initial value. The Bluetooth Low Energy Physical Layer (BLE PHY) module sends scan data packets into the air through the radio frequency unit. When the radio frequency module (RF) receives the data packets in the air during the receiving phase, the modem can demodulate the data packets according to the different AGC settings, parse the signal strength value (RSSI value) of the data packets, that is, parse the scan result, further parse the low-power scanning device information, and report the broadcast packet value received by the scan result to the Bluetooth Low Energy application layer. The three-level AGC time proportions can be updated through the software optimization algorithm module 104 according to the data packet signal strength value to improve the low-power scanning success rate.
[0065] `scan_count` represents the total number of packets received within a certain period, and `rssi` represents the signal strength of the currently received packets. `high_rssi_cnt` represents the number of packets with an `rssi` greater than 240 within a certain period, `media_rssi_cnt` can represent the number of packets with an `rssi` greater than 230 and less than or equal to 240 within a certain period, and `low_rssi_cnt` can represent the number of packets with an `rssi` greater than 210 and less than 230 within a certain period. `rand` can represent a random number between 0 and 50ms. `Dur` represents the total execution time of the three AGC levels, representing a three-level AGC scheduling cycle. `low_rssi_time` represents the proportion of low-level AGC, `media_rssi_time` represents the proportion of medium-level AGC, and `high_rssi_time` represents the proportion of high-level AGC.
[0066] Among them, high_rssi_time=auto_agc_per-low_rssi_time-media_rssi_time;
[0067] auto_agc_per can represent the percentage of time that AGC can dynamically change in real time;
[0068] Among them, auto_agc_per=low_rssi_time+media_rssi_time+high_rssi_time;
[0069] Among them, fix_agc_per represents the percentage of time spent in the fixed AGC (Automatic Gauge Control) phase;
[0070] And for fix_agc_per+auto_agc_per=100
[0071] In this application, after the system is powered on, the default percentage of time for AGC that can be dynamically changed in real time is 40%, the default percentage of time for fixed AGC (medium-level) is 60%, the default percentage of low-level AGC is 13%, the default percentage of medium-level AGC is 13%, and the default percentage of high-level AGC is 14%.
[0072] The three-level AGC scheduling cycle (preset automatic gain control cycle) is set to the total execution time of the three AGC levels. The total execution time of the three AGC levels can be changed, but the range is greater than or equal to 100 milliseconds and less than or equal to 150 milliseconds.
[0073] The default value for counting packets with an RSSI greater than 240 over a certain period, counting packets with an RSSI greater than 230 and less than or equal to 240 over a certain period, counting packets with an RSSI greater than 210 and less than 230 over a certain period, and the total number of packets received over a certain period is 0.
[0074] When the system starts running, it can receive packets according to the default values. Each time a broadcast packet is received, the receiving packet module can parse the signal strength (RSSI) of the packet. When the RSSI is greater than 240, the value of high_rssi_cnt (the number of RSSI values greater than 240 over a period of time) is incremented by 1. When the RSSI is greater than 230 and not greater than 240, the value of media_rssi_cnt (the number of RSSI values greater than 230 and less than or equal to 240 over a period of time) is incremented by 1. When the RSSI is not greater than 230 and greater than 210, the value of low_rssi_cnt (the number of RSSI values greater than 210 and less than 230 over a period of time) is incremented by 1.
[0075] Furthermore, the time percentages for medium-level and low-level AGC can be adjusted based on the values of high_rssi_cnt, media_rssi_cnt, and low_rssi_cnt. When high_rssi_cnt is greater than 5, the time percentage for low-level AGC is decreased by 1, the time percentage for medium-level AGC is decreased by 1, and the time percentage for high-level AGC is set to 0. When low_rssi_cnt is greater than 5, the time percentage for low-level AGC is increased by 1, the time percentage for medium-level AGC is decreased by 1, and the time percentage for low-level AGC is set to 0.
[0076] In this application, the AGC value (target automatic gain threshold) for three time periods within the preset automatic gain level cycle is set in real time based on the real-time changes in the time proportions of low-level AGC and medium-level AGC. The target automatic gain threshold for the low-level AGC is set within the time period corresponding to the time proportion of low-level AGC, the target automatic gain threshold for the medium-level AGC is set within the time period corresponding to the time proportions of medium-level AGC and the time proportion of fixed AGC in the medium level, and the target automatic gain threshold for the high-level AGC is set within the remaining time period. The target automatic gain threshold for the low-level AGC is less than the target automatic gain threshold for the medium level, which is less than the target automatic gain threshold for the high level.
[0077] It should be noted that the maximum time percentage for low-level AGC is the percentage of time that AGC can dynamically change in real time minus 5, and the minimum value is 5. When scanning both near and far devices simultaneously, the time percentage for low-level AGC can be set to at least 5 and the maximum to be the percentage of time that AGC can dynamically change in real time minus 5. This ensures that both near and far devices are scanned, improving the scanning success rate.
[0078] It should be noted that the maximum time percentage for high-end AGC is the dynamic time percentage that AGC can change in real time minus 5, and the minimum value is 5. When scanning both near and far devices simultaneously, the time percentage for high-end AGC can be set to at least 5 and the maximum to be the dynamic time percentage that AGC can change in real time minus 5. This ensures that both near and far devices are scanned, improving the scanning success rate.
[0079] In this application, the time percentages for high-end AGC, mid-end AGC, and low-end AGC are reset every second to 14, 13, and 13 respectively. This effectively avoids the problem of reduced scanning success rates for near- or far-range devices due to the low-end and mid-end AGC time percentages not returning to appropriate values when both far- and near-range devices are sending broadcast packets. Specifically, when both far- and near-range devices are present, and the broadcast data volume differs significantly between far- and near-range devices, devices with lower broadcast data volume are less likely to be scanned. To prevent this from continuing, the AGC time percentages are reset to their initial values every second. This increases the probability that devices with lower broadcast data volume can be scanned within this time period, thus improving the scanning success rate of devices with lower broadcast data volume.
[0080] In this application, Dur represents the total execution time of the three AGC levels, which is also the preset automatic gain control (AGC) level cycle time, representing a three-level AGC scheduling cycle. Dur can be set to a random number between 100 milliseconds and 150 milliseconds. This avoids the problem where the AGC value of the scanning device does not fall within the range required by the broadcasting device due to the broadcasting device periodically sending broadcasts, while the scanning device also periodically scans. In other words, it ensures that the AGC value of the scanning device falls within the range required by the broadcasting device. Specifically, it avoids the broadcasting device periodically sending broadcasts, while the scanner also periodically scans other broadcasting devices. When the scanner configures the AGC value required by the broadcasting device, the broadcasting device periodically skips the time period of that AGC level. When Dur is configured as a random number, the broadcast is periodic, and the AGC level configured by Dur has a chance to fall within the broadcast cycle. For example, if the current Dur is 100ms, the AGC value is 15 for the first 13ms, 35 for the next 74ms, and 60 for the last 13ms. If Dur remains constant and scanning is performed periodically, and a distant device periodically broadcasts a message in the first 13ms, the AGC value will be at a low level for the first 13ms, making it difficult to scan distant devices and resulting in a low scan success rate. However, if Dur is variable, say 120ms, the subsequent low-level AGC scanning cycles will overlap with the broadcasting device's cycle, causing the broadcast to fall within a medium or high-level AGC scheduling cycle, making it easier to scan distant devices and thus improving the scan success rate.
[0081] In this application, fix_agc_per represents the time percentage of the fixed AGC medium level. Typically, the fixed AGC medium level time percentage sets the AGC to level 35. AGC level 35 can demodulate data packets that would otherwise require levels 25-45, and level 35 can effectively scan Bluetooth devices between 1.5 meters and 6 meters. Therefore, setting the fixed AGC medium level time percentage to 60 means that within a preset automatic gain control cycle, at least 60% of the time corresponds to an AGC value of 35, and the remaining 40% of the time is set according to the time percentages of high-level AGC, medium-level AGC, and low-level AGC.
[0082] Specifically, `fix_agc_per` is a mid-range AGC value. Experiments show that a mid-range AGC value can effectively demodulate packets in the 25-45 AGC range, and also mostly demodulate packets in the 20-25 and 45-50 ranges. However, for demodulating packets less than 20 and greater than 50, an AGC value of 35 is insufficient, requiring adjustment to either decrease or increase the AGC value. For example, with an AGC value of 35, if a device 12 meters away is broadcasting 100 packets, only about 10 will be correctly received. If the AGC value is 60, all 100 broadcast packets will be correctly received. Similarly, if a device 0.2 meters away is broadcasting 100 packets, only 20 will be received. However, with an AGC value of 15, all 100 broadcast packets will be correctly received. Setting fix_agc_per ensures that broadcast devices covering 2-8m can be scanned well in most application scenarios, meeting the needs of everyday home products.
[0083] For example, the process of software optimization algorithms includes:
[0084] Sub-step S1: If RSSI is greater than 240, increment high_rssi_cnt by 1. When high_rssi_cnt is 6, it means that 6 long-distance broadcast packets have been received. At this time, it is necessary to reduce the proportion of low-bandwidth packets and increase the proportion of high-bandwidth packets. Decrease low_rssi_time by 1 and media_rssi_time by 1. The proportion of high-bandwidth packets is auto_agc_per - low_rssi_time - media_rssi_time. High_rssi_cnt needs to be set to 0.
[0085] Sub-step S2: If RSSI is greater than 230 and not greater than 240, no action is taken, and media_rssi_time is reduced in the other two increments.
[0086] Sub-step S3: If RSSI is greater than 210 and not greater than 230, increment low_rssi_cnt by 1. When low_rssi_cnt is 6, it means that 6 nearby broadcast packets have been received. At this time, it is necessary to increase the proportion of low-bandwidth time and decrease the proportion of high-bandwidth time. Increment low_rssi_time by 1 and decrement media_rssi_time by 1. The proportion of high-bandwidth time is auto_agc_per - low_rssi_time - media_rssi_time, and low_rssi_cnt needs to be set to 0.
[0087] Sub-step S4: For example, the default low_rssi_time is 13. After receiving 6 long-distance packets, the software modifies low_rssi_time to 12 and media_rssi_time to 12. After receiving another 6 long-distance packets, low_rssi_time is changed to 11 and media_rssi_time to 11. If long-distance packets are continuously received, low_rssi_time and media_rssi_time will be modified sequentially until the value of low_rssi_time is 5 and media_rssi_time is 0. At this point, the minimum value of low_rssi_time is reached. In this case, the time percentage of low_rssi_time is 5, the percentage of media_rssi_time is 0, and the percentage of high_rssi_time is 35%. During this period until the end of the scheduling cycle, AGC is in the high position for 35% of the time, in the low position for 5% of the time, and in the medium position for 60% of the time. This is beneficial for scanning long-distance devices and improving the success rate of long-distance scanning.
[0088] Sub-step S5: For example, the default low_rssi_time is 13. After receiving 6 near-range packets, the software modifies low_rssi_time to 14 and media_rssi_time to 12. Subsequently, after receiving 6 far-range packets, low_rssi_time is changed to 15 and media_rssi_time to 11. If far-range packets are continuously received, low_rssi_time and media_rssi_time will be modified sequentially until the value of low_rssi_time is 35 and media_rssi_time is 0. At this point, the value of low_rssi_time is the highest. In this case, the time percentage of low_rssi_time is 35%, the percentage of media_rssi_time is 0%, and the percentage of high_rssi_time is 5%. During this period until the end of the scheduling cycle, AGC is in the low gear for 35% of the time, in the high gear for 5% of the time, and in the medium gear for 60% of the time. This is beneficial for scanning near-range devices and improving the success rate of near-range scanning.
[0089] Sub-step S6: For example, if the default low_rssi_time is 13, after receiving 6 medium-range packets, the software does not make any changes. After receiving another 6 medium-range packets, the software does not make any changes. If medium-range packets are continuously received, the software does not make any changes. In this case, the time percentage of low_rssi_time is 13, the time percentage of media_rssi_time is 13, and the time percentage of high_rssi_time is 14. At this time, until the end of the scheduling cycle, AGC is in the low position for 13% of the time, in the high position for 14% of the time, and in the medium position for 13% of the time. This is beneficial for scanning medium-range devices and improving the success rate of medium-range scanning.
[0090] Sub-step S7: For example, the default low_rssi_time is 13 and media_rssi_time is 13. After receiving 6 near-range packets, low_rssi_time is incremented by 1. After receiving 6 far-range packets, the software modifies low_rssi_time by decrementing by 1. If the speed of receiving near-range packets is equal to the speed of receiving far-range packets, low_rssi_time will approach 20, media_rssi_time will be 0, and high_rssi_time will approach 20. At this time until the end of the scheduling cycle, AGC is in the low gear 20% of the time, in the high gear 20% of the time, and in the medium gear 60% of the time. This is beneficial for scanning medium-range devices, while also taking into account scanning both far-range and near-range devices. If the packet reception rate at close range is greater than that at long range, then `low_rssi_time` will approach 35, `media_rssi_time` will be 0, and `high_rssi_time` will approach 5. During this period, until the end of the scheduling cycle, AGC will be at a low level 35% of the time, at a high level 5% of the time, and at a medium level 60% of the time. This is advantageous for scanning close-range devices but disadvantageous for scanning long-range devices. Conversely, if the packet reception rate at close range is less than that at long range, then `low_rssi_time` will approach 5, `media_rssi_time` will be 0, and `high_rssi_time` will approach 35. During this period, until the end of the scheduling cycle, AGC will be at a low level 5% of the time, at a high level 35% of the time, and at a medium level 60% of the time. This is advantageous for scanning long-range devices but disadvantageous for scanning close-range devices.
[0091] In this application, a scanning control system addresses the problem that existing methods use AGC values calculated after the last received data packet, leading to reception failures due to inappropriate AGC values. By fixing three AGC values, the software analyzes the received signal strength of recently received packets and adjusts the time percentage corresponding to each AGC value in real time. The Bluetooth scheduling module then sets the corresponding AGC value, increasing the Bluetooth scanning success rate by 70%, avoiding the need for Bluetooth chip redesign and tape-out, and reducing costs.
[0092] In summary, the scanning control system provided in this application includes: a Bluetooth chip scheduling module, a scanning scheduling module and a receiving packet module respectively connected to the Bluetooth chip scheduling module, and a software optimization algorithm module connected at one end to the receiving packet module and at the other end to the scanning scheduling module. The software optimization algorithm module is used to accumulate and statistically analyze multiple signal strengths received within a preset time period, adjust the time proportion of three-level automatic gain control based on the multiple signal strengths, and set target automatic gain thresholds corresponding to the three-level automatic gain control based on the time proportions within a preset automatic gain level period. The scanning scheduling module is used to initiate scanning scheduling based on the scheduling command and the target automatic gain thresholds until scanning is completed. That is, the time proportion of the three-level automatic gain control can be adjusted in real time by the software optimization algorithm module. The time proportion of the three-level automatic gain control can be dynamically adjusted in real time based on the number of packet signal strengths received in the recent period, thereby improving Bluetooth scanning capabilities and helping the Bluetooth protocol to promptly report current scanning information to upper-layer applications, improving reporting timeliness and user experience.
[0093] Figure 3 This illustration shows a flowchart of a scanning control method provided in an embodiment of this application, which is applied to... Figure 1 The scanning control system, such as Figure 3 As shown, the method includes:
[0094] Step 201: The Bluetooth chip scheduling module sends a corresponding scheduling instruction to the scanning scheduling module.
[0095] The scanning scheduling module sets different initial thresholds for automatic gain control within the time proportion of the three levels of automatic gain control based on the default initial value. After the Bluetooth Low Energy application is started, the Bluetooth Low Energy scanning service is enabled, and the corresponding scheduling instruction is sent to the scanning scheduling module.
[0096] Step 202: The Bluetooth chip scheduling module provides the corresponding scan packet data to the receiving packet module.
[0097] Step 203: The receiving packet module parses the signal strength of the corresponding packet based on the scanned packet data and sends the signal strength to the software optimization algorithm module.
[0098] Step 204: The software optimization algorithm module accumulates and counts the multiple signal strengths received within a preset time period, adjusts the time ratio of the three-level automatic gain control based on the multiple signal strengths, and sets the target automatic gain threshold corresponding to the three-level automatic gain control based on the time ratio within the preset automatic gain level period.
[0099] The software optimization algorithm module accumulates and counts multiple signal strengths received within a preset time period, adjusts the time proportion of the three-level automatic gain control based on the multiple signal strengths, updates the initial automatic gain threshold based on the time proportion within the preset automatic gain level cycle, and determines the target automatic gain threshold.
[0100] Step 205: The scan scheduling module initiates scan scheduling based on the scheduling instruction and the target automatic gain threshold until the scan is completed.
[0101] In summary, the scanning control method provided in this application involves the Bluetooth chip scheduling module issuing a corresponding scheduling instruction to the scanning scheduling module, and the Bluetooth chip scheduling module providing corresponding scanning packet data to the receiving packet module. The receiving packet module parses the signal strength of the corresponding packet based on the scanning packet data and sends the signal strength to the software optimization algorithm module. The software optimization algorithm module accumulates and counts multiple signal strengths received within a preset time period, adjusts the time proportion of three-level automatic gain control based on the multiple signal strengths, and sets target automatic gain thresholds corresponding to the three-level automatic gain control based on the time proportions within a preset automatic gain level period. The scanning scheduling module initiates scanning scheduling based on the scheduling instruction and the target automatic gain thresholds until scanning is completed. That is, the time proportion of the three-level automatic gain control can be adjusted in real time by the software optimization algorithm module. The time proportion of the three-level automatic gain control can be dynamically adjusted in real time based on the number of packet signal strengths received in the recent period, thereby improving Bluetooth scanning capability and helping the Bluetooth protocol to report the current scanning information to the upper layer application in a timely manner, improving reporting timeliness and user experience.
[0102] The scanning control method provided by this invention can achieve, for example... Figure 1 The scanning control system shown is not described in detail here to avoid repetition.
[0103] The electronic device in this embodiment of the invention can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, a mobile electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc., while a non-mobile electronic device can be a server, network-attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This embodiment of the invention does not impose specific limitations.
[0104] The electronic device in this embodiment of the invention can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this embodiment of the invention does not impose specific limitations.
[0105] Figure 4 A schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention is shown. Figure 4 As shown, the electronic device 400 includes a processor 410.
[0106] like Figure 4 As shown, the processor 410 described above can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the present invention.
[0107] like Figure 4 As shown, the electronic device 400 may further include a communication line 440. The communication line 440 may include a path for transmitting information between the components.
[0108] Optional, such as Figure 4 As shown, the above-described electronic device may further include a communication interface 420. There may be one or more communication interfaces 420. The communication interface 420 may use any transceiver-like device for communicating with other devices or communication networks.
[0109] Optional, such as Figure 4As shown, the electronic device may further include a memory 430. The memory 430 stores computer execution instructions for implementing the present invention, and its execution is controlled by a processor. The processor executes the computer execution instructions stored in the memory to implement the method provided in the embodiments of the present invention.
[0110] like Figure 4 As shown, memory 430 can be read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. Memory 430 can exist independently and be connected to processor 410 via communication line 440. Memory 430 can also be integrated with processor 410.
[0111] Optionally, the computer execution instructions in the embodiments of the present invention may also be referred to as application code, and the embodiments of the present invention do not specifically limit this.
[0112] In a specific implementation, as one example, such as Figure 4 As shown, processor 410 may include one or more CPUs, such as Figure 4 CPU0 and CPU1 in the CPU.
[0113] In a specific implementation, as one example, such as Figure 4 As shown, the terminal device may include multiple processors, such as Figure 4 The processors in the system. Each of these processors can be a single-core processor or a multi-core processor.
[0114] Figure 5 This is a schematic diagram of the chip structure provided in an embodiment of the present invention. Figure 5 As shown, the chip 500 includes one or more processors 410.
[0115] Optional, such as Figure 5As shown, the chip also includes a communication interface 420 and a memory 430. The memory 430 may include read-only memory and random access memory, and provides operation instructions and data to the processor. A portion of the memory may also include non-volatile random access memory (NVRAM).
[0116] In some implementations, such as Figure 5 As shown, memory 430 stores the following elements: execution modules or data structures, or subsets thereof, or extended sets thereof.
[0117] In embodiments of the present invention, such as Figure 5 As shown, the corresponding operation is executed by calling the operation instructions stored in the memory (which can be stored in the operating system).
[0118] like Figure 5 As shown, the processor 410 controls the processing operations of any one of the terminal devices. The processor 410 can also be called a central processing unit (CPU).
[0119] like Figure 5 As shown, memory 430 may include read-only memory and random access memory, providing instructions and data to the processor. A portion of memory 430 may also include NVRAM. For example, in an application, memory, communication interfaces, and memory are coupled together via a bus system, which may include, in addition to a data bus, a power bus, a control bus, and a status signal bus, etc. However, for clarity, in... Figure 5 The general labeled all buses as Bus System 540.
[0120] like Figure 5As shown, the methods disclosed in the above embodiments of the present invention can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an ASIC, a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present invention can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0121] On the one hand, a computer-readable storage medium is provided, which stores instructions that, when executed, implement the functions performed by the terminal device in the above embodiments.
[0122] On the one hand, a chip is provided that is used in a terminal device. The chip includes at least one processor and a communication interface. The communication interface and at least one processor are coupled together. The processor is used to run instructions to implement the functions performed by the scanning control method in the above embodiments.
[0123] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present invention are performed entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a terminal, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as a solid-state drive (SSD).
[0124] Although the invention has been described herein in conjunction with various embodiments, those skilled in the art will understand and implement other variations of the disclosed embodiments by reviewing the accompanying drawings, the disclosure, and the appended claims in carrying out the claimed invention. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.
[0125] Although the invention has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made therein without departing from the spirit and scope of the invention. Accordingly, this specification and drawings are merely exemplary descriptions of the invention as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its spirit and scope. Thus, if such modifications and modifications of the invention fall within the scope of the claims and their equivalents, the invention is also intended to include such modifications and modifications.
Claims
1. A scanning control system, characterized in that, The system includes: The Bluetooth chip scheduling module, as well as the scan scheduling module and the receiving packet module respectively connected to the Bluetooth chip scheduling module, further include a software optimization algorithm module connected at one end to the receiving packet module and at the other end to the scan scheduling module; The Bluetooth chip scheduling module is used to send corresponding scheduling instructions to the scanning scheduling module; The Bluetooth chip scheduling module is used to send corresponding scheduling instructions to the scanning scheduling module, including: The Bluetooth chip scheduling module is used to start the Bluetooth Low Energy scanning service after the Bluetooth Low Energy application is started, and to send the corresponding scheduling instruction to the scanning scheduling module. The Bluetooth chip scheduling module is also used to provide corresponding scan packet data to the receiving packet module; The receiving packet module is used to parse the signal strength of the corresponding packet based on the scanned packet data and send the signal strength to the software optimization algorithm module; The software optimization algorithm module is used to accumulate and statistically analyze multiple signal strengths received within a preset time period, adjust the time proportion of the three-level automatic gain control based on the multiple signal strengths, and update the initial automatic gain threshold based on the time proportion within a preset automatic gain level period to determine the target automatic gain threshold; the preset automatic gain level period range is greater than or equal to 100 milliseconds and less than or equal to 150 milliseconds; the specific process of the software optimization algorithm module includes: counting the number of signal strength levels for each packet of the currently received packets, wherein the number of three-level automatic gain control includes the number of low-level signal strength, the number of medium-level signal strength, and the number of high-level signal strength. The number of signal strengths greater than 240 is defined as the high-end signal strength count; the number of signal strengths greater than 230 and less than or equal to 240 within a certain period is defined as the medium-end signal strength count; and the number of signal strengths greater than 210 and less than 230 within a certain period is defined as the low-end signal strength count. AGC levels are divided into three levels: the low-end AGC value is 15; the medium-end time percentage is the sum of the fixed AGC medium-end time percentage and the medium-end AGC percentage, resulting in a medium-end AGC value of 35; and the high-end time percentage is the sum of the dynamically changeable AGC time percentage minus the low-end AGC percentage and then the high-end AGC percentage, resulting in a high-end AGC value of 60. The scan scheduling module is used to initiate scan scheduling based on the scheduling instruction and the target automatic gain threshold until the scan is completed. The scanning scheduling module is also used to set different automatic gain initial thresholds within the time proportion of the three levels of automatic gain control, based on the default initial value.
2. A scanning control method, characterized in that, The method, applied to the scanning control system of claim 1, comprises: The Bluetooth chip scheduling module sends a corresponding scheduling instruction to the scanning scheduling module; The Bluetooth chip scheduling module sends corresponding scheduling instructions to the scanning scheduling module, including: After the Bluetooth Low Energy application is started, the Bluetooth chip scheduling module starts the Bluetooth Low Energy scanning service and sends the corresponding scheduling instruction to the scanning scheduling module. The Bluetooth chip scheduling module provides the corresponding scan packet data to the receiving packet module; The receiving packet module parses the signal strength of the corresponding packet based on the scanned packet data and sends the signal strength to the software optimization algorithm module; The software optimization algorithm module accumulates and counts multiple signal strengths received within a preset time period, adjusts the time proportion of the three-level automatic gain control based on the multiple signal strengths, updates the initial automatic gain threshold based on the time proportion within the preset automatic gain level cycle, and determines the target automatic gain threshold. The scan scheduling module initiates scan scheduling based on the scheduling instruction and the target automatic gain threshold until the scan is completed.
3. The scanning control method according to claim 2, characterized in that, Before the Bluetooth chip scheduling module provides the corresponding scan packet data to the receiving packet module, the method further includes: The scanning scheduling module sets different initial thresholds for automatic gain control within the time proportions of the three levels of automatic gain control, based on the default initial value.
4. An electronic device, characterized in that, include: One or more processors; And one or more machine-readable media thereon storing instructions, which, when executed by the one or more processors, cause the scan control method of any one of claims 2 to 3 to be performed.
Citation Information
Patent Citations
Digital automatic gain control method of communication system and control system thereof
CN101742627A
Wireless communication receiver gain management system
US10270481B1
Low power, low latency, high duty cycle scan for Bluetooth Low Energy
US10848948B1