Communication method and device, and storage medium

By detecting the signal strength and packet loss rate of the physical channel, the terminal dynamically switches the media access control mode, solving the problems of high power consumption under high interference and privacy leakage under low interference, and realizing energy saving and secure switching under different interference environments.

CN121968267APending Publication Date: 2026-05-01SHENZHEN GUANGTONG YILIAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN GUANGTONG YILIAN TECH CO LTD
Filing Date
2026-01-30
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Using dynamic MAC addresses for BLE broadcasting in high-interference situations increases power consumption, while using fixed MAC addresses in non-high-interference situations increases the risk of privacy leaks.

Method used

By detecting the signal strength and packet loss rate of the physical channel, the system dynamically decides to switch the media access control mode. The terminal switches to a fixed media access control mode to reduce power consumption under high interference conditions, and switches to a dynamic media access control mode to reduce the risk of privacy leakage under low interference or no interference conditions.

Benefits of technology

It effectively reduces terminal power consumption and lowers the risk of privacy leaks, while ensuring adaptive switching under different interference environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121968267A_ABST
    Figure CN121968267A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a communication method, equipment and a storage medium. The method comprises the following steps: a terminal detects the signal strength of a physical channel and sends a detection packet used for determining the packet loss rate of the physical channel on the physical channel; the terminal switches a media access control mode under the condition that the signal strength of the physical channel meets a first condition and the packet loss rate of the physical channel meets a second condition, and the media access control mode comprises a dynamic media access control mode and a fixed media access control mode. The method can reduce power consumption and reduce the risk of privacy disclosure of the terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Communication methods, devices and storage media Technical Field

[0001] This application relates to the field of communication technology, and in particular to communication methods, devices and storage media. Background Technology

[0002] The terminal can use a fixed media access control (MAC) address for Bluetooth Low Energy (BLE) broadcasting, or it can use a dynamic MAC address for BLE broadcasting.

[0003] Using dynamic MAC addresses for BLE broadcasting under high interference conditions results in continuous hash calculations to determine the MAC address, thus increasing terminal power consumption. Conversely, using fixed MAC addresses under non-high interference conditions increases the risk of terminal privacy leaks. Therefore, reducing power consumption and mitigating the risk of terminal privacy leaks are unresolved issues. Summary of the Invention

[0004] This application provides a communication method, device, and storage medium that can reduce power consumption and lower the risk of terminal privacy leakage.

[0005] In a first aspect, embodiments of this application provide a communication method. This method can be applied to a terminal, such as a terminal or a device within a terminal. The method includes: the terminal detecting the signal strength of a physical channel and transmitting probe packets on the physical channel to determine the packet loss rate of the physical channel; when the signal strength of the physical channel meets a first condition and the packet loss rate of the physical channel meets a second condition, the terminal switches a media access control mode, wherein the media access control mode includes a dynamic media access control mode and a fixed media access control mode.

[0006] In this method, the terminal dynamically decides to switch the Media Access Control (MAC) mode based on the signal strength and packet loss rate of the physical channel. This helps the terminal switch the MAC mode under high interference conditions to reduce power consumption, and the terminal switches the MAC mode under non-high interference conditions to reduce the risk of terminal privacy leakage.

[0007] In one alternative implementation, if the signal strength of the physical channel meets a first condition, the terminal performs the step of sending a probe packet on the physical channel to determine the packet loss rate of the physical channel.

[0008] In this implementation, the terminal only sends a probe packet on the physical channel when the signal strength of the physical channel meets the first condition, which helps to reduce resource waste.

[0009] In one optional implementation, the terminal switches the media access control mode when the signal strength of the physical channel meets a first condition and the packet loss rate of the physical channel meets a second condition. Specifically, the terminal switches the media access control mode to a fixed media access control mode when the signal strength of the physical channel is greater than a first threshold and the packet loss rate of the physical channel is greater than a second threshold.

[0010] In this implementation, a signal strength in the physical channel greater than a first threshold indicates the presence of additional signals in the physical channel causing a stronger signal, such as interference signals. A packet loss rate in the physical channel greater than a second threshold indicates significant interference in the physical channel. Therefore, the terminal can switch the media access control mode to a fixed media access control mode under high interference conditions based on the signal strength and packet loss rate of the physical channel, thereby reducing power consumption.

[0011] In one optional implementation, the physical channel includes multiple broadcast channels. The terminal switches the media access control mode to a fixed media access control mode when the signal strength of the physical channel is greater than a first threshold and the packet loss rate of the physical channel is greater than a second threshold. Specifically, the terminal switches the media access control mode to a fixed media access control mode when the signal strength of at least one broadcast channel is greater than the first threshold and the packet loss rate of at least one broadcast channel is greater than the second threshold. In this implementation, the terminal switches the media access control mode to a fixed media access control mode as long as the signal strength and packet loss rate of at least one broadcast channel meet the conditions. This facilitates a rapid response by the terminal to high interference situations and reduces power consumption.

[0012] In one optional implementation, the terminal switches the media access control mode when the signal strength of the physical channel meets a first condition and the packet loss rate of the physical channel meets a second condition. Specifically, when the signal strength of the physical channel is less than a third threshold and the duration of the signal strength of the physical channel being less than the third threshold is greater than a fourth threshold, and the packet loss rate of the physical channel is less than a fifth threshold, the media access control mode is switched to dynamic media access control mode.

[0013] In this implementation, a signal strength of less than the third threshold in the physical channel indicates that there may be no additional signals in the physical channel, such as interference signals. A duration of the signal strength being less than the third threshold for a duration greater than the fourth threshold indicates that the signal strength being less than the third threshold is not caused by instantaneous signal fluctuations. A packet loss rate of less than the fifth threshold indicates that the physical channel may have little or no interference. Therefore, the terminal can switch the media access control mode to dynamic media access control mode based on the signal strength, duration of the signal strength, and packet loss rate of the physical channel, under conditions of no or minimal interference, thereby helping to reduce the risk of terminal privacy leakage.

[0014] In one optional implementation, the physical channel includes multiple broadcast channels. When the signal strength of the physical channel is less than a third threshold and the duration of the signal strength of the physical channel being less than the third threshold is greater than a fourth threshold, and the packet loss rate of the physical channel is less than a fifth threshold, the terminal switches the media access control mode to dynamic media access control mode. Specifically, when the signal strength of multiple broadcast channels is less than the third threshold and the duration of the signal strength of multiple broadcast channels being less than the third threshold is greater than a fourth threshold, and the packet loss rate of multiple broadcast channels is less than a fifth threshold, the terminal switches the media access control mode to dynamic media access control mode.

[0015] In this implementation, the terminal switches the media access control mode to the dynamic media access control mode only when the signal strength, duration of signal strength and packet loss rate of multiple broadcast channels all meet the conditions. This can reduce false switching caused by instantaneous signal fluctuations and ensure the necessity of switching.

[0016] In one optional implementation, when the terminal switches the media access control mode to fixed media access control mode, it changes the type of the protocol data unit in the broadcast packet header information to non-connectable non-directional broadcast.

[0017] In this implementation, when the terminal is in fixed media access control mode, the type of the protocol data unit in the broadcast packet header information is changed to non-connectable non-directional broadcast. This is beneficial for the terminal to terminate hash calculation and close the connection request detection circuit, link layer connection state machine, and connection parameter negotiation module, thereby further saving RF front-end power consumption.

[0018] Secondly, embodiments of this application provide a communication device, which includes: a detection module for detecting the signal strength of a physical channel; a communication module for sending probe packets on the physical channel to determine the packet loss rate of the physical channel; and a processing module for switching a media access control mode when the signal strength of the physical channel meets a first condition and the packet loss rate of the physical channel meets a second condition. The media access control mode includes a dynamic media access control mode and a fixed media access control mode.

[0019] In addition, other alternative implementations of the communication device in this regard can be found in the relevant content of the first aspect above, and will not be described in detail here.

[0020] Thirdly, embodiments of this application provide a communication device, which includes a communication module, a power module, a storage module, and a chip, wherein: the power module is used to provide power to the communication device; the storage module is used to store data and instructions; the communication module is used for internal communication within the communication device, or for communication between the communication device and external devices; and the chip is used to execute the method described in the first aspect above.

[0021] Fourthly, this application also provides a computer device, the computer device comprising: a memory and a processor, wherein the memory stores a computer program, and the computer program, when executed by the processor, implements the steps of the method described above.

[0022] Fifthly, this application also provides a computer storage medium storing a computer program that, when executed by a processor, implements the steps of the method described above.

[0023] Sixthly, this application also provides a computer program product containing instructions that, when executed on a communication device, implement the steps of the method described above. Attached Figure Description

[0024] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without any creative effort.

[0025] Figure 1 is a schematic diagram of the architecture of a broadcast system provided in an embodiment of this application; Figure 2 is a schematic flowchart of a communication method provided in an embodiment of this application; Figure 3 is a schematic flowchart of another communication method provided in an embodiment of this application; Figure 4 is a schematic flowchart of another communication method provided in an embodiment of this application; Figure 5 is a schematic diagram of the structure of a communication device provided in an embodiment of this application; Figure 6 is a schematic diagram of the structure of a communication equipment provided in an embodiment of this application; Figure 7 is a schematic diagram of the structure of a computer device provided in an embodiment of this application.

[0026] The realization of the objectives, functional features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and textual descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation

[0027] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0028] It should be understood that the terms "comprising" or "including" indicate the presence of the stated features, steps, operations, elements, components, items, types, and / or groups, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, types, and / or groups. The terms "or," "and / or," and "comprising at least one of the following," as used in this application, can be interpreted as inclusive, or mean any one or any combination thereof. For example, "comprising at least one of the following: A, B, C" means "any one of the following: A; B; C; A and B; A and C; B and C; A and B and C," and similarly, "A, B, or C" or "A, B, and / or C" means "any one of the following: A; B; C; A and B; A and C; B and C; A and B and C." Exceptions to this definition only occur when the combination of elements, functions, steps, or operations is inherently mutually exclusive in some way.

[0029] It should be understood that although the steps in the flowcharts of this application's embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0030] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0031] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.

[0032] The following describes the broadcast system architecture applicable to the embodiments of this application. Figure 1 is a schematic diagram of the architecture of a broadcast system provided in an embodiment of this application. As shown in Figure 1, the broadcast system includes at least two terminals, namely terminal 101a and terminal 101b. Terminal 101a has broadcast capability and can send broadcast messages to the outside world. Terminal 101b has broadcast receiving capability and can receive broadcast messages from terminal 101a in real time. The broadcast messages include, but are not limited to, data collected by terminal 101a and the identifier of terminal 101a.

[0033] Terminal 101a can be a Bluetooth Low Energy (BLE) device, using a fixed Media Access Control (MAC) address or a dynamic MAC address for BLE broadcasting to send broadcast messages. Terminal 101a can also be called a terminal device, user equipment (UE), mobile station (MS), mobile terminal (MT), etc. It can be a device with wireless transceiver capabilities; it can be deployed on land, including indoors or outdoors, handheld or vehicle-mounted; it can also be deployed on water (such as on ships); and it can also be deployed in the air (such as on airplanes, balloons, and satellites). Terminal 101a can be a UE, fixed equipment, mobile equipment, handheld device, wearable device, cellular phone, smartphone, session initiation protocol (SIP) phone, tablet computer, laptop computer, PDA, personal computer, mobile internet device (MID), VR device, AR device, smart book, vehicle, satellite, global positioning system (GPS) device, drone, robot, helicopter, aircraft, ship, remote control equipment, wireless terminal or industrial equipment in industrial control, wireless terminal in self-driving, wireless terminal in remote medical surgery, wireless terminal in smart grid, wireless terminal in transportation safety, sensing terminal in communication and sensing integration, cellular phone, cordless phone, session initiation protocol (SIP) phone, wireless local loop (WLL) station, or personal digital assistant (PDA) according to the 3rd generation partnership project (3GPP) standard.

[0034] To facilitate understanding of the communication method disclosed in the embodiments of this application, the relevant terms are explained below.

[0035] (1) BLE broadcasting BLE broadcasting is a wireless transmission method, which refers to BLE devices periodically sending broadcast packets to the surrounding area to realize one-way information notification or to realize device discovery before connection.

[0036] BLE broadcasts include connectable non-directional broadcasts (ADV_IND), connectable directional broadcasts (ADV_DIRECT_IND), non-connectable non-directional broadcasts (ADV_NONCONN_IND), and scannable non-directional broadcasts (ADV_SCAN_IND). Connectable non-directional broadcasts mean the BLE device can be scanned and connected to by any device; connectable directional broadcasts mean the BLE device can only be scanned and connected to by specific devices; non-connectable non-directional broadcasts mean the BLE device only sends broadcast messages and cannot be scanned or connected to; and scannable non-directional broadcasts mean the BLE device can be scanned by any device but cannot be connected to.

[0037] (2) BLE Broadcast Channel The BLE broadcast channel is the channel used by BLE devices to send broadcast messages during the broadcast phase. Among them, the BLE broadcast channel includes three channels in the 2.4 GHz band, specifically channel 37, channel 38 and channel 39.

[0038] (3) Fixed MAC mode Fixed MAC mode refers to the working mode in which the terminal broadcasts through a fixed MAC address. The fixed MAC address consists of an organizationally unique identifier (OUI) and a device serial number, and is stored in the terminal's flash memory.

[0039] (4) Dynamic MAC mode Dynamic MAC mode refers to the working mode in which the terminal broadcasts through a dynamic MAC address. The dynamic MAC address is obtained by the terminal through hash calculation, conforms to the static random address specification, and is stored in the terminal's flash memory.

[0040] (5) Wireless Fidelity (WiFi) Interference WiFi interference can be called non-narrowband interference, which usually manifests as broadband signals with a wide energy distribution. Terminals can distinguish the type of interference by physical layer signal characteristics, protocol behavior differences, or spectrum analysis techniques. For example, if a terminal can detect a wide-amplitude flat-top energy peak at 2.4 GHz using a spectrum analyzer, it can determine that the type of interference is WiFi interference.

[0041] (6) Bluetooth Interference Bluetooth interference can be called narrowband interference, and its energy is concentrated in a specific frequency band. Among them, physical layer packet loss rate detection is more sensitive to narrowband interference with obvious frequency domain characteristics, and can be effectively avoided by channel switching. Terminals can distinguish the type of interference by physical layer signal characteristics, protocol behavior differences, or spectrum analysis techniques. For example, if a terminal can detect a sawtooth-shaped fast switching energy peak at 2.4 GHz using a spectrum analyzer, it can determine that the type of interference is Bluetooth interference.

[0042] (7) Received Signal Strength Indicator (RSSI) RSSI is a key indicator used in wireless communication to quantify the signal strength at the receiving end. The unit is decibel milliwatt (dBm), and it is usually a negative value. The closer the value is to 0, the stronger the received signal power. However, in normal communication, RSSI has a reasonable range. For example, if RSSI > -80 dBm, RSSI has exceeded the signal strength threshold for normal communication, which means that in addition to the target useful signal and the ambient noise, the total signal power captured by the receiving end also includes interference signals.

[0043] In addition, different values ​​of RSSI can reflect different interference states. Table 1 is a table showing the correspondence between RSSI values ​​and interference states provided in the embodiments of this application.

[0044] Table 1. Correspondence between RSSI values ​​and interference states

[0045] Under high interference conditions, data packet collisions and retransmissions become more severe. If the terminal uses a dynamic MAC address for broadcasting, the increased power consumption is due to factors including, but not limited to: the terminal needs to frequently perform hash calculations to generate the dynamic MAC address; the terminal needs to transmit and receive data more frequently; and the terminal is frequently woken up to handle communication tasks, preventing it from effectively entering a low-power sleep state. In non-high interference (e.g., low interference or no interference) conditions, if the terminal uses a fixed MAC address, its address will be exposed for an extended period, increasing the risk of privacy leaks. Therefore, reducing power consumption and mitigating the risk of terminal privacy leaks remains an unresolved issue.

[0046] To address the aforementioned problems, this application proposes a communication method and related apparatus, which will be described in detail below with reference to the accompanying drawings.

[0047] Please refer to Figure 2, which is a flowchart illustrating a communication method provided in an embodiment of this application. The method is described from the perspective of a terminal. As shown in Figure 2, the method includes, but is not limited to, the following steps: S201. The terminal detects the signal strength of the physical channel and sends probe packets on the physical channel to determine the packet loss rate of the physical channel.

[0048] Optionally, the signal strength of the physical channel can be represented by RSSI. Since different RSSI values ​​correspond to different interference states, the signal strength of different physical channels also corresponds to different interference states. For example, a physical channel signal strength greater than -80 dBm indicates that the terminal is in a high interference state; a physical channel signal strength greater than -90 dBm and less than or equal to -80 dBm indicates that the terminal is in a medium interference state; and a physical channel signal strength less than or equal to -90 dBm indicates that the terminal is in a low interference or no interference state.

[0049] In one optional implementation, the terminal detects the signal strength of the physical channel using the RSSI sampling algorithm at the bottom layer of the BLE protocol stack. Therefore, the terminal can monitor the signal strength of the physical channel in real time using the RSSI sampling algorithm at the bottom layer of the BLE protocol stack, which helps the terminal determine the interference status based on the signal strength of the physical channel.

[0050] In an optional implementation, S201 includes: the terminal detecting the signal strength of the physical channel; and, if the signal strength of the physical channel meets a first condition, the terminal sending a probe packet on the physical channel to determine the packet loss rate of the physical channel. It is evident that the terminal only sends the probe packet on the physical channel if the signal strength of the physical channel meets the first condition, which helps to reduce resource waste.

[0051] S202. When the signal strength of the physical channel meets the first condition and the packet loss rate of the physical channel meets the second condition, the terminal switches the media access control mode.

[0052] The media access control modes include dynamic media access control mode and fixed media access control mode. Specifically, S202 can be: when the signal strength of the physical channel meets a first condition and the packet loss rate of the physical channel meets a second condition, the terminal switches the media access control mode to fixed media access control mode; or, when the signal strength of the physical channel meets the first condition and the packet loss rate of the physical channel meets the second condition, the terminal switches the media access control mode to dynamic media access control mode.

[0053] The two switching methods will be explained below.

[0054] Method 1: The terminal switches the media access control mode to fixed media access control mode.

[0055] In one optional implementation, S202 includes: when the signal strength of the physical channel is greater than a first threshold and the packet loss rate of the physical channel is greater than a second threshold, the terminal switches the media access control mode to a fixed media access control mode. For example, the terminal switches the media access control mode to a fixed media access control mode when the signal strength of the physical channel is greater than -80 dBm and the packet loss rate of the physical channel is greater than 10%. The value of the first threshold can be determined based on the RSSI range corresponding to the high interference state; however, this embodiment does not limit the values ​​of the first and second thresholds.

[0056] As can be seen, if the signal strength of the physical channel is greater than the first threshold (e.g., -80 dBm), it indicates the presence of additional signals (such as interference signals) in the physical channel, resulting in a strong signal and the terminal being in a high-interference state. If the packet loss rate of the physical channel is greater than the second threshold, it indicates significant interference in the physical channel. In this approach, the terminal switches the media access control mode to a fixed media access control mode under high-interference conditions, which helps reduce power consumption.

[0057] In one optional implementation, the physical channels include multiple broadcast channels. When the signal strength of the physical channels is greater than a first threshold and the packet loss rate of the physical channels is greater than a second threshold, the terminal switches the media access control mode to a fixed media access control mode. This includes: when the signal strength of at least one broadcast channel is greater than the first threshold and the packet loss rate of at least one broadcast channel is greater than the second threshold, the terminal switches the media access control mode to a fixed media access control mode. Optionally, the multiple broadcast channels include channels 37, 38, and 39.

[0058] It is evident that if the signal strength and packet loss rate of at least one broadcast channel meet the requirements, the terminal will switch the media access control mode to the fixed media access control mode. This helps the terminal to react quickly to high interference conditions and reduce power consumption.

[0059] Method 2: The terminal switches the media access control mode to dynamic media access control mode.

[0060] In one optional implementation, S202 includes: the terminal switching the media access control mode to dynamic media access control mode when the signal strength of the physical channel is less than a third threshold, the duration of the physical channel signal strength being less than the third threshold is greater than a fourth threshold, and the packet loss rate of the physical channel is less than a fifth threshold. For example, the terminal switches the media access control mode to dynamic media access control mode when the signal strength of the physical channel is less than -90 dBm, the duration of the physical channel signal strength being less than -90 dBm is greater than 3 seconds, and the packet loss rate of the physical channel is less than 10%. The value of the third threshold can be determined based on the RSSI range corresponding to low interference or no interference states; this application does not limit the values ​​of the third, fourth, and fifth thresholds.

[0061] As can be seen, if the signal strength of the physical channel is less than the third threshold (e.g., -90 dBm), it indicates that there may be no additional signals (e.g., interference signals) in the physical channel, and the terminal is in a low-interference or non-interference state. If the duration of the physical channel signal strength being less than the third threshold (e.g., -90 dBm) is greater than the fourth threshold (e.g., 3 seconds), it indicates that the signal strength being less than the third threshold is not caused by instantaneous signal fluctuations. If the packet loss rate of the physical channel is less than the fifth threshold, it indicates that the physical channel may have no interference or minimal interference. In this method, switching the media access control mode to dynamic media access control mode when the terminal is in a low-interference or non-interference state helps reduce the risk of terminal privacy leakage.

[0062] In one optional implementation, the physical channel includes multiple broadcast channels. When the signal strength of the physical channel is less than a third threshold and the duration of the signal strength of the physical channel being less than the third threshold is greater than a fourth threshold, and the packet loss rate of the physical channel is less than a fifth threshold, the terminal switches the media access control mode to dynamic media access control mode. This includes: when the signal strength of multiple broadcast channels is less than the third threshold and the duration of the signal strength of multiple broadcast channels being less than the third threshold is greater than a fourth threshold, and the packet loss rate of multiple broadcast channels is less than a fifth threshold, the terminal switches the media access control mode to dynamic media access control mode.

[0063] It is evident that the terminal only switches the media access control mode to dynamic media access control mode when the signal strength, duration of signal strength, and packet loss rate of multiple broadcast channels all meet the requirements. This reduces erroneous switching caused by instantaneous signal fluctuations and ensures the necessity of switching.

[0064] As can be seen, in this embodiment, the terminal dynamically decides to switch the media access control mode based on the signal strength and packet loss rate of the physical channel. This is beneficial for the terminal to switch the media access control mode under high interference conditions to reduce power consumption; and for the terminal to switch the media access control mode under low interference or no interference conditions to reduce the risk of terminal privacy leakage.

[0065] The embodiments of this application are applicable to scenarios that are not wireless fidelity (WIFI) or do not involve narrowband interference.

[0066] The terminal in this application embodiment can detect the interference in its environment by physical layer signal characteristics, protocol behavior differences, or spectrum analysis technology. For example, the terminal can distinguish whether the environment it is in is WiFi interference or Bluetooth interference by physical layer signal characteristics, protocol behavior differences, or spectrum analysis technology.

[0067] The terminal in this embodiment can also maintain the current media access control mode without switching under moderate interference conditions.

[0068] The terminal in this application embodiment can also adaptively adjust the broadcast interval. For example, in scenarios with low interference or low real-time requirements, a longer broadcast interval (e.g., 1 second) is used to reduce power consumption; while in scenarios requiring fast response, a shorter broadcast interval (e.g., 100 milliseconds) is used to meet real-time requirements.

[0069] The following will illustrate, with reference to Figures 3 and 4, how the terminal dynamically decides to switch modes based on the signal strength and packet loss rate of the physical channel under different media access control modes.

[0070] In the steps shown in Figure 3, under high interference conditions, the terminal switches from dynamic media access control mode to fixed media access control mode and changes the type of protocol data unit in the broadcast packet header information to non-connectable non-directional broadcast. This allows the terminal to disable the hash calculation unit and disconnect connection-related circuits, thereby reducing power consumption. Please refer to Figure 3, which is a flowchart illustrating another communication method provided in an embodiment of this application. As shown in Figure 3, the method includes, but is not limited to, the following steps: S301. The terminal detects the signal strength of the physical channel.

[0071] The relevant content in S301 can be found in the relevant description in S201 above, and will not be repeated here.

[0072] S302. When the signal strength of the physical channel is greater than a first threshold, the terminal sends a probe packet on the physical channel to determine the packet loss rate of the physical channel.

[0073] Optionally, the value of the first threshold can be determined based on the RSSI range corresponding to the high interference state. For example, the first threshold is -80 dBm, but the embodiment of this application does not limit the value of the first threshold.

[0074] As can be seen in S302, if the signal strength of the physical channel is greater than the first threshold (e.g., -80 dBm), it indicates that there is an additional signal (e.g., interference signal) in the physical channel, resulting in a strong signal strength and the terminal being in a high interference state. Therefore, the terminal sends a probe packet on the physical channel to determine the packet loss rate of the physical channel, which helps the terminal determine the packet loss rate of the physical channel and further determine the interference situation of the environment in which the terminal is located.

[0075] In one optional implementation, the physical channel includes multiple broadcast channels, and S302 includes: when the signal strength of at least one broadcast channel is greater than a first threshold, the terminal transmits probe packets for determining the packet loss rate of the physical channel on the multiple broadcast channels. Optionally, the multiple broadcast channels include channel 37, channel 38, and channel 39. For example, when the signal strength of at least one broadcast channel is greater than -80 dBm, the terminal transmits probe packets for determining the packet loss rate three times within one second on channels 37, 38, and 39.

[0076] It is evident that the terminal triggers accelerated verification when the signal strength of at least one broadcast channel is greater than the first threshold (e.g., -80 dBm), which helps the terminal quickly determine the packet loss rate of the broadcast channel in order to further determine the interference situation in the terminal's environment.

[0077] Optionally, before executing S302, the terminal periodically sends probe packets on the physical channel. For example, the terminal sends probe packets on the physical channel at a period of 60 seconds to monitor the status of the physical channel in real time.

[0078] S303. When the packet loss rate of the physical channel is greater than the second threshold, the terminal switches the dynamic media access control mode to the fixed media access control mode.

[0079] Optionally, the second threshold can be 10%, but the value of the second threshold is not limited in this application embodiment.

[0080] As can be seen, in S303, the packet loss rate of the physical channel is greater than the second threshold, indicating that the interference of the physical channel is large. The terminal can further determine that the terminal is in a high interference state, so the terminal switches the dynamic media access control mode to the fixed media access control mode, which can reduce power consumption.

[0081] In an optional implementation, S303 includes: when the packet loss rate of at least one broadcast channel is greater than a second threshold, the terminal switches the media access control mode to a fixed media access control mode. It is evident that if the signal strength and packet loss rate of at least one broadcast channel meet the conditions, the terminal switches the media access control mode to the fixed media access control mode. This facilitates a rapid response by the terminal to high interference situations, thereby reducing power consumption.

[0082] In one optional implementation, when the terminal switches the media access control mode to a fixed media access control mode, it changes the type of the protocol data unit (PDU) in the broadcast packet header to a non-connectable non-directional broadcast. In this method, changing the PDU type in the broadcast packet header to a non-connectable non-directional broadcast (ADV_NONCONN_IND) in fixed media access control mode helps the terminal terminate hash calculations and disable the connection request detection circuit, link layer connection state machine, and connection parameter negotiation module, thereby further saving RF front-end power consumption.

[0083] In the steps shown in Figure 4, when the environment meets the requirements (such as the signal strength of the physical channel being consistently below a threshold and the packet loss rate of the physical channel being below a threshold), the terminal switches from the fixed media access control mode to the dynamic media access control mode. This reduces erroneous switching caused by instantaneous signal fluctuations, ensures the necessity of switching, and reduces the risk of terminal privacy leakage. Please refer to Figure 4, which is a flowchart illustrating another communication method provided by an embodiment of this application. As shown in Figure 4, the method includes, but is not limited to, the following steps: S401. The terminal detects the signal strength of the physical channel.

[0084] The relevant content in S401 can be found in the relevant description in S201 above, and will not be repeated here.

[0085] S402. When the signal strength of the physical channel is less than the third threshold, the terminal sends a probe packet in the physical channel to determine the packet loss rate of the physical channel.

[0086] Optionally, the value of the third threshold can be determined based on the RSSI range corresponding to the low-interference or no-interference state. For example, the third threshold is -90 dBm, and this application does not limit the value of the third threshold.

[0087] It is evident that if the signal strength of the physical channel is less than the third threshold (e.g., -90 dBm), it indicates that there may be no additional signals (e.g., interference signals) in the physical channel, and the terminal is in a low-interference or interference-free state. Therefore, the terminal sends probe packets in the physical channel to determine the packet loss rate of the physical channel, which is helpful for the terminal to determine the packet loss rate of the physical channel and further determine the interference situation of the environment in which the terminal is located.

[0088] In one optional implementation, S402 includes: when the signal strength of the physical channel is less than a third threshold and the duration of the signal strength of the physical channel being less than the third threshold is greater than a fourth threshold, the terminal sends a probe packet on the physical channel to determine the packet loss rate of the physical channel. For example, when the signal strength of the physical channel is less than -90 dBm and the duration of the signal strength of the physical channel being less than -90 dBm is greater than 3 seconds, the terminal sends a probe packet on the physical channel to determine the packet loss rate of the physical channel.

[0089] As can be seen, if the signal strength of the physical channel is less than the third threshold (e.g., -90 dBm), it indicates that there may be no additional signals (e.g., interference signals) in the physical channel, and the terminal is in a low-interference or interference-free state. If the duration of the physical channel signal strength being less than the third threshold is greater than the fourth threshold, it indicates that the signal strength being less than the third threshold is not caused by instantaneous signal fluctuations. In this method, the terminal only sends probe packets when the physical channel signal strength is less than the third threshold and the duration of the physical channel signal strength being less than the third threshold is greater than the fourth threshold. This helps to reduce false transmissions caused by instantaneous signal fluctuations, reduce resource waste, and ensure the necessity of sending probe packets.

[0090] In one optional implementation, the physical channel includes multiple broadcast channels. When the signal strength of the physical channel is less than a third threshold and the duration of the signal strength being less than the third threshold is greater than a fourth threshold, the terminal sends a probe packet on the physical channel to determine the packet loss rate of the physical channel. This includes: when the signal strength of all multiple broadcast channels is less than the third threshold and the duration of the signal strength being less than the third threshold is greater than the fourth threshold, the terminal sends a probe packet on the physical channel to determine the packet loss rate of the physical channel. Optionally, the multiple broadcast channels include channel 37, channel 38, and channel 39.

[0091] It is evident that the terminal only switches the media access control mode to dynamic media access control mode when the signal strength, duration of signal strength, and packet loss rate of multiple broadcast channels all meet the requirements. This reduces false transmissions caused by instantaneous signal fluctuations and ensures the necessity of sending probe packets.

[0092] S403. When the packet loss rate of the physical channel is less than the fifth threshold, the terminal switches the fixed media access control mode to the dynamic media access control mode.

[0093] Optionally, the fifth threshold can be 10%, but the value of the fifth threshold is not limited in this application embodiment.

[0094] As can be seen, in S403, the packet loss rate of the physical channel is less than the fifth threshold, indicating that the physical channel may be free of interference or have low interference. The terminal can further determine that the terminal is in a low-interference or non-interference state, thereby the terminal switches the fixed media access control mode to the dynamic media access control mode, which helps to reduce the risk of terminal privacy leakage.

[0095] In one optional implementation, S403 includes: when the packet loss rate of multiple broadcast channels is less than a fifth threshold, the terminal switches from a fixed media access control mode to a dynamic media access control mode.

[0096] It is evident that the terminal only switches the media access control mode when the packet loss rate of multiple broadcast channels meets the requirements, thereby ensuring the necessity of mode switching.

[0097] Please refer to Figure 5, which is a schematic diagram of the structure of a communication device provided in an embodiment of this application. The communication device includes at least a detection module 501, a communication module 502, and a processing module 503, wherein: the detection module 501 is used to detect the signal strength of the physical channel; the communication module 502 is used to send probe packets on the physical channel to determine the packet loss rate of the physical channel; and the processing module 503 is used to switch the media access control mode when the signal strength of the physical channel meets a first condition and the packet loss rate of the physical channel meets a second condition. The media access control mode includes a dynamic media access control mode and a fixed media access control mode.

[0098] In one optional implementation, the communication module 502 is configured to perform the step of sending a probe packet on the physical channel to determine the packet loss rate of the physical channel when the signal strength of the physical channel meets a first condition.

[0099] In one optional implementation, the processing module 503 is used to switch the media access control mode when the signal strength of the physical channel meets a first condition and the packet loss rate of the physical channel meets a second condition. Specifically, when the signal strength of the physical channel is greater than a first threshold and the packet loss rate of the physical channel is greater than a second threshold, the media access control mode is switched to a fixed media access control mode.

[0100] In one optional implementation, the physical channel includes multiple broadcast channels. The processing module 503 is used to switch the media access control mode to a fixed media access control mode when the signal strength of the physical channel is greater than a first threshold and the packet loss rate of the physical channel is greater than a second threshold. Specifically, the media access control mode is switched to a fixed media access control mode when the signal strength of one broadcast channel is greater than the first threshold and the packet loss rate of at least one broadcast channel is greater than the second threshold.

[0101] In one optional implementation, the processing module 503 is used to switch the media access control mode when the signal strength of the physical channel meets the first condition and the packet loss rate of the physical channel meets the second condition. Specifically, when the signal strength of the physical channel is less than a third threshold and the duration of the signal strength of the physical channel being less than the third threshold is greater than a fourth threshold, and the packet loss rate of the physical channel is less than a fifth threshold, the media access control mode is switched to dynamic media access control mode.

[0102] In one optional implementation, the physical channel includes multiple broadcast channels. The processing module 503 is configured to switch the media access control mode to a dynamic media access control mode when the signal strength of the physical channel is less than a third threshold, the duration of the signal strength of the physical channel being less than the third threshold is greater than a fourth threshold, and the packet loss rate of the physical channel is less than a fifth threshold. Specifically, the media access control mode is switched to a dynamic media access control mode when the signal strength of multiple broadcast channels is less than the third threshold, the duration of the signal strength of multiple broadcast channels being less than the third threshold is greater than a fourth threshold, and the packet loss rate of multiple broadcast channels is less than a fifth threshold.

[0103] In one optional implementation, the processing module 503 is configured to change the type of the protocol data unit in the broadcast packet header information to a non-connectable non-directional broadcast when the media access control mode is switched to a fixed media access control mode.

[0104] The embodiments of this application and the method embodiments shown above are based on the same concept and have the same technical effects. For the specific principles, please refer to the description of the embodiments shown above, which will not be repeated here.

[0105] Please refer to Figure 6, which is a schematic diagram of the structure of a communication device provided in an embodiment of this application. This communication device can perform the relevant steps of the terminal device in the aforementioned method embodiments. The communication device includes: a communication module 601, a power module 602, a storage module 603, and a chip 604.

[0106] The power module 602 is used to provide power to the communication device; the storage module 603 is used to store data and instructions; the communication module 601 is used for internal communication within the communication device or for communication between the communication device and external devices; and the chip 604 is used to execute the method executed by the terminal device in the above method embodiments.

[0107] The implementation of this communication device can be found in the relevant content of the above method embodiments, and will not be described in detail here.

[0108] The embodiments of this application and the above-described method embodiments are based on the same concept and have the same technical effects. For the specific principles, please refer to the description of the above-described method embodiments, which will not be repeated here.

[0109] Please refer to Figure 7, which is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device includes at least a processor 701, a memory 703, and a user interface 702. The processor 701, the memory 703, and the user interface 702 are interconnected. The memory 703 is used to store computer programs, which include program instructions. The processor 701 is used to execute the program instructions.

[0110] Memory 703 may include volatile memory, such as random-access memory (RAM); memory 703 may also include non-volatile memory, such as flash memory, solid-state drive (SSD), etc.; memory 703 may also include a combination of the above types of memory.

[0111] Processor 701 may be a central processing unit (CPU). Processor 701 may further include hardware chips. The aforementioned hardware chips may be application-specific integrated circuits (ASICs), programmable logic devices (PLDs), etc. The aforementioned PLDs may be field-programmable gate arrays (FPGAs), generic array logic (GALs), etc.

[0112] In an optional implementation, memory 703 is also used to store program instructions. Processor 701 can invoke program instructions to perform the following steps: detecting the signal strength of the physical channel and sending probe packets on the physical channel to determine the packet loss rate of the physical channel; and switching a media access control mode, including a dynamic media access control mode and a fixed media access control mode, when the signal strength of the physical channel meets a first condition and the packet loss rate of the physical channel meets a second condition.

[0113] The embodiments of this application and the method embodiments shown above are based on the same concept and have the same technical effects. For the specific principles, please refer to the description of the embodiments shown above, which will not be repeated here.

[0114] This application also provides a computer-readable storage medium storing a detection program, which, when executed by a processor, implements the steps of a communication method in any of the above embodiments.

[0115] The embodiments of the mobile terminal and computer-readable storage medium provided in this application include all the technical features of the above-described communication method embodiments. The extended and explanatory content of the specification is basically the same as the embodiments of the above-described method, and will not be repeated here.

[0116] This application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to perform the methods described in the various possible implementations above.

[0117] This application also provides a chip, including a memory and a processor. The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a device with the chip installed performs the methods described in the various possible implementations above.

[0118] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0119] The steps in the method of this application embodiment can be adjusted, combined, or deleted according to actual needs.

[0120] The units in the device of this application embodiment can be merged, divided, and deleted according to actual needs.

[0121] In this application, the same or similar terms, concepts, technical solutions and / or application scenario descriptions are generally described in detail only when they appear for the first time. When they appear again, they are generally not repeated for the sake of brevity. When understanding the technical solutions and other contents of this application, the same or similar terms, concepts, technical solutions and / or application scenario descriptions that are not described in detail later can be referred to their previous relevant detailed descriptions.

[0122] In this application, the descriptions of the various embodiments have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0123] The technical features of the present application can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of the present application.

[0124] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, controlled terminal, or network device, etc.) to execute the methods of each embodiment of this application.

[0125] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) 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 (e.g., floppy disk, storage disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., SSD), etc.

[0126] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A communication method, characterized in that, The method includes: detecting the signal strength of a physical channel and sending probe packets on the physical channel to determine the packet loss rate of the physical channel; and switching a media access control mode when the signal strength of the physical channel meets a first condition and the packet loss rate of the physical channel meets a second condition, wherein the media access control mode includes a dynamic media access control mode and a fixed media access control mode.

2. The method according to claim 1, characterized in that, If the signal strength of the physical channel meets the first condition, the step of sending a probe packet on the physical channel to determine the packet loss rate of the physical channel is performed.

3. The method according to claim 1 or 2, characterized in that, The step of switching the media access control mode when the signal strength of the physical channel meets the first condition and the packet loss rate of the physical channel meets the second condition includes: switching the media access control mode to the fixed media access control mode when the signal strength of the physical channel is greater than the first threshold and the packet loss rate of the physical channel is greater than the second threshold.

4. The method according to claim 3, characterized in that, The physical channel includes multiple broadcast channels. Switching the media access control mode to the fixed media access control mode when the signal strength of the physical channel is greater than a first threshold and the packet loss rate of the physical channel is greater than a second threshold includes: switching the media access control mode to the fixed media access control mode when the signal strength of at least one broadcast channel is greater than the first threshold and the packet loss rate of the at least one broadcast channel is greater than the second threshold.

5. The method according to claim 1 or 2, characterized in that, The step of switching the media access control mode when the signal strength of the physical channel meets the first condition and the packet loss rate of the physical channel meets the second condition includes: switching the media access control mode to dynamic media access control mode when the signal strength of the physical channel is less than a third threshold and the duration of the signal strength of the physical channel being less than the third threshold is greater than a fourth threshold, and the packet loss rate of the physical channel is less than a fifth threshold.

6. The method according to claim 5, characterized in that, The physical channel includes multiple broadcast channels. Switching the media access control mode to dynamic media access control mode when the signal strength of the physical channel is less than a third threshold, the duration of the signal strength being less than the third threshold is greater than a fourth threshold, and the packet loss rate of the physical channel is less than a fifth threshold includes: switching the media access control mode to dynamic media access control mode when the signal strength of all multiple broadcast channels is less than the third threshold, the duration of the signal strength being less than the third threshold is greater than the fourth threshold, and the packet loss rate of all multiple broadcast channels is less than the fifth threshold.

7. The method according to claim 4, characterized in that, The method further includes: when the media access control mode is switched to fixed media access control mode, changing the type of the protocol data unit in the broadcast packet header information to non-connectable non-directional broadcast.

8. A module device, characterized in that, The module device includes a communication module, a power module, a storage module, and a chip, wherein: the power module is used to provide power to the module device; the storage module is used to store data and instructions; the communication module is used for internal communication within the module device, or for communication between the module device and external devices; and the chip is used to execute the method as described in any one of claims 1 to 7.

9. A computer device, characterized in that, The computer device includes: a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, it implements the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 7.