Dual-mode Bluetooth control method and device, computer equipment and storage medium
Spectrum sensing and dynamic spectrum management are carried out through SDR technology, which solves the interference problem of dual-mode Bluetooth devices in the 2.4GHz ISM band, realizes efficient coexistence and reliable communication of the devices, and improves performance.
Patent Information
- Application Number
- CN202411461258.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-01-07
AI Technical Summary
Dual-mode Bluetooth devices are prone to interference when using the same 2.4GHz ISM band, resulting in communication conflicts and signal collisions, affecting the reliability and performance of the device.
Software-defined radio (SDR) technology is used for spectrum perception and dynamic spectrum management. By scanning idle channels, selecting suitable target channels, monitoring communication connection status, and dynamically adjusting channel allocation to achieve the coexistence of dual-mode Bluetooth and reducing interference.
It effectively reduces the interference level of dual-mode Bluetooth devices, improves communication reliability and efficiency, and enhances the performance of the device in complex wireless environments.
Smart Images

Figure CN119277536A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication management technology, and in particular to a dual-mode Bluetooth control method, device, computer equipment and storage medium. Background Art
[0002] With the development of smart home technology, more and more devices use Bluetooth and low-power Bluetooth for wireless communication. However, since they use the same 2.4GHz ISM frequency band, interference between them has become a common problem. Traditional solutions often cannot solve this problem well, especially when there is dual-mode Bluetooth in the air conditioning system and communication is carried out through dual-mode Bluetooth, the interference phenomenon is more serious. Dual-mode Bluetooth refers to supporting both traditional classic Bluetooth (Bluetooth, BT) and low-power Bluetooth (Bluetooth Low Energy, BLE). Among them, classic Bluetooth (BT) refers to the traditional Bluetooth technology using 79 1MHz channels from 2402MHz to 2480MHz; low-power Bluetooth (BLE) is Bluetooth designed to work in the 2.4GHz ISM bandwidth and has 40 2MHz channels. It can be seen that both classic Bluetooth (BT) and low-power Bluetooth (BLE) work in the 2.4GHz frequency band, so they may interfere with each other when operating in the same environment. The main reasons for interference are as follows:
[0003] (1) Frequency band sharing: Dual-mode Bluetooth devices support both classic Bluetooth and low-power Bluetooth in the 2.4 GHz band. The 2.4 GHz band is a very crowded wireless band that also includes Wi-Fi, ZigBee, and many other wireless communication protocols. Therefore, this frequency band sharing can easily lead to mutual interference between the signals.
[0004] (2) Simultaneous operation: When a dual-mode Bluetooth device attempts to use classic Bluetooth and low-power Bluetooth at the same time, the two Bluetooth communication protocols may compete for the same frequency resources, resulting in communication conflicts and interference.
[0005] (3) Signal collision: Classic Bluetooth uses frequency band hopping technology to reduce interference, while Bluetooth LE uses a different channel management method. Therefore, when the two modes try to transmit data at the same time, their signals may collide, and in some cases even cause data packets to be lost or retransmitted, thus exacerbating the interference phenomenon.
[0006] (4) Resource scheduling: Dual-mode Bluetooth devices require more complex and sophisticated resource scheduling to ensure that both Bluetooth modes can obtain the necessary bandwidth and computing resources. Therefore, if improper scheduling occurs, it may cause a decline in service quality and increase the chance of interference.
[0007] (5) Hardware limitations: Some devices may not have sufficiently advanced hardware (such as a more complex RF front end) to efficiently handle two modes of Bluetooth communication at the same time, which may also cause interference.
[0008] Therefore, how to achieve the coexistence of dual-mode Bluetooth in a device, reduce the interference of the dual-mode Bluetooth, and ensure the reliability of the device during the communication process is a problem that technicians in this field need to solve. Summary of the invention
[0009] The embodiments of the present invention provide a dual-mode Bluetooth control method, device, computer equipment and storage medium, which are intended to achieve the coexistence effect of dual-mode Bluetooth in the device, reduce the interference level of dual-mode Bluetooth during work, improve the communication reliability of the device, and thus improve the performance of the device.
[0010] In a first aspect, an embodiment of the present invention provides a dual-mode Bluetooth control method, comprising:
[0011] Establish network communication connection with target device using dual-mode Bluetooth;
[0012] Spectrum sensing is performed through the SDR platform to scan and obtain the current idle channels, and spectrum decision is made on the idle channels to select the target channel that can be used for dual-mode Bluetooth communication;
[0013] sending the target channel to a target device based on the network communication connection to establish a Bluetooth communication connection with the target device;
[0014] The target channel is monitored to determine whether the Bluetooth communication connection is terminated, and the target channel of the dual-mode Bluetooth is adjusted according to the determination result.
[0015] In a second aspect, an embodiment of the present invention provides a dual-mode Bluetooth control device, comprising:
[0016] A first connection unit, used to establish a network communication connection with a target device using dual-mode Bluetooth;
[0017] A channel selection unit is used to perform spectrum sensing through the SDR platform to scan and obtain the current idle channels, and perform spectrum decision on the idle channels to select a target channel that can be used for dual-mode Bluetooth communication;
[0018] a second connection unit, configured to send the target channel to a target device based on the network communication connection, so as to establish a Bluetooth communication connection with the target device;
[0019] The channel monitoring unit is used to monitor the target channel to determine whether the Bluetooth communication connection is terminated, and to adjust the target channel of the dual-mode Bluetooth according to the determination result.
[0020] In a third aspect, an embodiment of the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the dual-mode Bluetooth control method as described in the first aspect when executing the computer program.
[0021] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the dual-mode Bluetooth control method as described in the first aspect is implemented.
[0022] The embodiment of the present invention provides a dual-mode Bluetooth control method, device, computer equipment and storage medium, the method comprising: establishing a network communication connection with a target device using dual-mode Bluetooth; performing spectrum sensing through an SDR platform to scan and obtain the current idle channel, and performing spectrum decision on the idle channel to select a target channel that can be used for dual-mode Bluetooth communication; sending the target channel to the target device based on the network communication connection to establish a Bluetooth communication connection with the target device; monitoring the target channel to determine whether the Bluetooth communication connection is ended, and regulating the target channel of the dual-mode Bluetooth according to the determination result. The embodiment of the present invention dynamically allocates and adjusts the spectrum of the dual-mode Bluetooth in the device by introducing SDR technology (software defined radio technology), so that not only can the coexistence of dual-mode Bluetooth in the device be achieved, but also the interference degree of the dual-mode Bluetooth in the work can be reduced through dynamic spectrum management, and the communication reliability and efficiency of the device in a complex wireless environment can be improved, thereby improving the performance of the device. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0024] Figure 1 A schematic diagram of a dual-mode Bluetooth control method provided by an embodiment of the present invention;
[0025] Figure 2 A schematic diagram of a sub-flow chart of step S101 in a dual-mode Bluetooth control method provided by an embodiment of the present invention;
[0026] Figure 3 A schematic flow chart of step S102 in a dual-mode Bluetooth control method provided by an embodiment of the present invention;
[0027] Figure 4A schematic flow chart of step S103 in a dual-mode Bluetooth control method provided by an embodiment of the present invention;
[0028] Figure 5 A schematic block diagram of a dual-mode Bluetooth control device provided by an embodiment of the present invention;
[0029] Figure 6 A first sub-schematic block diagram of a dual-mode Bluetooth control device provided by an embodiment of the present invention;
[0030] Figure 7 A second sub-schematic block diagram of a dual-mode Bluetooth control device provided by an embodiment of the present invention;
[0031] Figure 8 This is a third sub-schematic block diagram of a dual-mode Bluetooth control device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0033] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0034] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0035] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0036] See below Figure 1 , an embodiment of the present invention provides a dual-mode Bluetooth control method, which specifically includes: steps S101 to S104.
[0037] Step S101, establishing a network communication connection with a target device using dual-mode Bluetooth;
[0038] Step S102: Spectrum sensing is performed through the SDR platform to scan and obtain current idle channels, and spectrum decision is performed on the idle channels to select a target channel that can be used for dual-mode Bluetooth communication;
[0039] Step S103: sending the target channel to the target device based on the network communication connection to establish a Bluetooth communication connection with the target device;
[0040] Step S104: monitor the target channel to determine whether the Bluetooth communication connection is terminated, and adjust the target channel of the dual-mode Bluetooth according to the determination result.
[0041] In this embodiment, the target device with dual-mode Bluetooth is first connected to the network, and then the current communication channel is scanned through the SDR platform to obtain the idle channels therein, and then the target channel available to the target device is selected from the idle channels, and then a Bluetooth communication connection is established with the target device according to the target channel. After the Bluetooth communication connection is successfully established, the Bluetooth communication connection is continuously monitored to determine whether the Bluetooth communication connection with the target device is terminated, and the target channel allocated to the target device is dynamically adjusted according to the determination result.
[0042] This embodiment introduces SDR technology (software defined radio technology) to dynamically allocate and adjust the spectrum of the dual-mode Bluetooth in the device. This not only can achieve the coexistence of dual-mode Bluetooth in the device, but also can reduce the interference level of dual-mode Bluetooth at work through dynamic spectrum management, and can also improve the communication reliability and efficiency of the device in a complex wireless environment, enhance the stability and reliability of data transmission, thereby significantly improving the user experience and improving the functional efficiency of the device.
[0043] It should be noted that the implementation subject of the dual-mode Bluetooth control method provided in this embodiment may be a server or a service terminal, and the target device may be a smart home device such as an air conditioner or other device using dual-mode Bluetooth. The main body of the SDR platform is usually set on the server side. Here, the reasons why the server side is the main body may specifically include the following points:
[0044] 1. Centralized control: The server acts as a central node, responsible for managing and coordinating all connected devices. It can uniformly manage and control the behavior of each device to ensure the coordinated work of the system.
[0045] 2. Data storage and processing. The server has powerful computing and storage capabilities, can process large amounts of data, and perform complex calculations and analyses. Therefore, the server can store historical data of all devices, including real-time monitoring data of device status, operation logs, fault records, maintenance records, etc. These data are very useful for analyzing device performance and optimizing system operation. In addition, the server can manage user accounts and permissions to ensure that only authorized users can access and control the device.
[0046] 3. Communication coordination: The server is responsible for issuing control instructions to each device to ensure the accuracy and timeliness of the instructions; in addition, the server regularly collects status information from the device to maintain the real-time and consistency of the system.
[0047] 4. Security. The server can deploy firewalls and intrusion detection systems to protect the system from external attacks, and can also implement data encryption and secure transmission protocols to ensure the security of data during transmission.
[0048] In general, the server, as a central node, is responsible for managing and coordinating all connected devices to ensure efficient, safe, and reliable operation of the system. The device end (such as an air conditioner) is an execution node, receiving instructions and reporting status to support the normal operation of the system. This architecture not only fully utilizes the resource advantages of the server, but also ensures the security and maintainability of the system.
[0049] In an actual application scenario, in order to facilitate user operation, a graphical user interface (GUI) can be developed, and the user can be allowed to select different device settings on the GUI, such as setting the operating parameters of the air conditioner such as temperature and wind speed. This interface can be a standalone application or a web application, and communicates with the back end of the SDR platform, so that the user can easily configure and control the Bluetooth settings in the device. Preferably, the graphical user interface can be set to display real-time signal quality indicators and fault diagnosis tools.
[0050] In one embodiment, if Figure 2 As shown, the step S101 includes: steps S201 to S204.
[0051] Step S201, receiving a registration request sent by a target device, and performing security verification on the target device through an SDR platform according to the registration request; wherein the registration request includes device information;
[0052] Step S202: after the security verification is passed, sending access rights to the target device through the SDR platform according to the device information;
[0053] Step S203, determining whether a confirmation feedback of the target device on the access permission is received, and after receiving the confirmation feedback, determining that the network communication connection is successful;
[0054] Step S204: After the network communication connection is successful, the target device is monitored and managed through the SDR platform, and the configuration of the target device is updated based on the monitoring and management results.
[0055] In this embodiment, when the target device accesses the network (i.e., a local area network, such as WiFi), it will send a registration request to the SDR platform. The registration request usually includes the identification information of the device, the device type, and other technical parameters that may be required. Of course, it is understandable that one SDR platform may correspond to multiple devices, so in order to quickly identify and distinguish each device, a unique identifier, such as a MAC address or serial number, can also be set for each device. After receiving the registration request, the SDR platform can authenticate and authorize the target device, such as using a password, digital certificate, or other forms of security verification. When the verification passes, the SDR platform will configure the corresponding parameters according to the function of the device and the network policy, and grant the device corresponding access rights. After receiving the configuration and authorization from the SDR platform, the device usually needs to send back a confirmation signal to complete the registration process. After the registration is completed, the SDR platform will continue to monitor the status and communication behavior of the device to ensure the stable operation of the network, and update the configuration of the device when necessary.
[0056] It should be noted that the network is the basis for communication between the device and the server. After the device is connected to the local area network, it can interact and integrate with the SDR platform in various ways. For details, please refer to the following aspects:
[0057] (1) Security and authority management: The local area network needs to ensure security. The SDR platform can manage the authority of connected devices to prevent unauthorized access and operation.
[0058] (2) Data monitoring and management: The equipment can send data such as operating status, temperature, humidity, etc. to the SDR platform in real time through the local area network for monitoring and management by the SDR platform. This helps improve energy efficiency, fault detection, and maintenance management.
[0059] (3) Control and adjustment: The SDR platform can send control instructions to the device through the local area network, such as power on and off, temperature setting, etc., to achieve remote control and automated management.
[0060] (4) Data analysis and optimization: The SDR platform can use the received data to analyze and optimize the operation mode of the equipment to achieve energy saving or improve comfort. For example, through data analysis, peak hours can be identified and the operation strategy of the air conditioner can be adjusted.
[0061] (5) Integration and interoperability: In an IoT environment, devices, SDR platforms, and other equipment (such as sensors, monitoring systems, etc.) can be interconnected through a local area network to form an integrated intelligent management system.
[0062] In general, the relationship between the device and the SDR platform is to achieve data interaction, control and management through the local area network. This relationship not only improves the intelligence level of the device, but also provides users with more efficient management and control methods. In the future smart home, this integration method will also play an increasingly important role.
[0063] In a specific embodiment, the step S204 includes:
[0064] When it is monitored that the target device meets the preset update conditions, a configuration update instruction is generated; wherein the preset update conditions include: the automatic update mechanism is triggered and / or an update instruction sent by the user is received; the configuration update instruction includes the configuration parameters to be updated;
[0065] Sending the configuration update instruction to the target device so that the target device performs configuration update;
[0066] Obtain result feedback of the target device configuration update, and record an update log of the target device.
[0067] In this embodiment, after the target device is registered, the SDR platform will continue to monitor the device status and communication behavior of the target device to ensure the stable operation of the network, and update the device configuration when necessary. For example, when the user issues a configuration update instruction or the set automatic update mechanism is triggered, the target device needs to be updated. When updating the configuration, the server first generates a configuration update instruction, which may include new configuration parameters and other content. Then the server sends the configuration update instruction to the target device through the network. The target device receives the configuration update instruction issued by the server and applies the new configuration parameters according to the received instruction. Furthermore, after applying the new configuration, the target device reports the update result to the server, such as information on the success or failure of the update, etc. The server can also record the update log of the target device for subsequent analysis and auditing.
[0068] In some optional embodiments, the automatic update mechanism may be deemed to be triggered when the following situations occur:
[0069] (1) Performance optimization: When it is detected that the device performance is insufficient or there is room for optimization, the SDR platform can update the device configuration to improve the performance and efficiency of the device.
[0070] (2) Security updates: In order to respond to newly discovered security threats or vulnerabilities, the SDR platform will update the security configuration of the device regularly or when necessary to ensure the security of the device.
[0071] (3) Functional enhancement: When new features or services are available, the SDR platform updates the device configuration to enable these new features and provide a better user experience.
[0072] (4) System maintenance: During system maintenance, the SDR platform may update the configuration of the device to fix known issues or make necessary adjustments.
[0073] (5) Policy changes: When network policies or management policies change, the SDR platform will update the device configuration according to the new policy to ensure that the device meets the latest management requirements.
[0074] In addition, the specific update time and configuration information can be determined according to actual conditions and needs. SDR platforms usually implement these updates through automated management and monitoring systems to ensure that the update process has minimal impact on the normal operation of the device. Of course, in some scenarios, users can manually select devices and update their configurations through the management interface.
[0075] In some other optional embodiments, when performing a configuration update, the parameters of the configuration update may specifically include:
[0076] (1) Network configuration:
[0077] IP address – the IP address of the device;
[0078] Subnet Mask – Subnet mask;
[0079] Gateway Address – Gateway address;
[0080] DNS server – DNS server address;
[0081] Routing configuration - the routing table and routing configuration of the device;
[0082] Network Interfaces – Network interface configuration of the device;
[0083] Network Protocol - The network protocol used by the device (such as IPv4, IPv6, etc.).
[0084] (2) Communication protocols and standards:
[0085] Communication protocol - the communication protocol used by the device (such as TCP / IP, UDP, etc.);
[0086] Standard version - the communication standard version supported by the device (such as IEEE 802.11, LTE, etc.);
[0087] Protocol parameters——specific parameter configuration of the communication protocol.
[0088] (3) Security configuration:
[0089] Encryption algorithm - the encryption algorithm used by the device (such as AES, DES, etc.);
[0090] Key management – the generation, distribution and management of cryptographic keys;
[0091] Authentication mechanism - the device's authentication mechanism (such as username / password, digital certificate, etc.); access control - the device's access control policy (such as ACL, firewall rules, etc.); security audit - the device's security audit log configuration.
[0092] (4) User configuration:
[0093] User permissions – user permissions and access control;
[0094] User management - user management information (such as account information, role assignment, etc.);
[0095] (5) Frequency configuration:
[0096] Center frequency – the center frequency at which the device operates;
[0097] Bandwidth – the operating bandwidth of the device;
[0098] Frequency range – the frequency range supported by the device;
[0099] Channel Configuration – The channel configuration used by the device.
[0100] (6) Transmitting and receiving parameters:
[0101] Transmit power – the maximum transmit power of the device;
[0102] Receive sensitivity – the receiving sensitivity of the device;
[0103] RF Gain – The RF gain of the device;
[0104] Noise suppression – noise suppression parameters of the device;
[0105] Dynamic Range – The dynamic range of the device.
[0106] (7) Modulation and demodulation parameters:
[0107] Modulation mode - the modulation mode used by the device (such as QPSK, 16-QAM, etc.);
[0108] Demodulation mode - the demodulation mode used by the device;
[0109] Symbol rate – the symbol rate of modulation and demodulation;
[0110] Coding method - the encoding method of data transmission (such as convolutional coding, Turbo coding, etc.).
[0111] (8) Function enabling and disabling:
[0112] Functional Modules – The enabled or disabled status of the functional modules of the device;
[0113] Services – the enabled or disabled status of services provided by the device;
[0114] Interface – The enabled or disabled state of the device’s interface.
[0115] (9) Maintenance and management:
[0116] Logging – the logging level and content of the device;
[0117] Diagnostic tools – diagnostic tools and diagnostic parameters of the equipment;
[0118] Firmware Version – the firmware version of the device;
[0119] Update strategy - the update strategy and time of the device;
[0120] Fault recovery - the device's fault recovery mechanism.
[0121] (10) Monitoring and alarming:
[0122] Monitoring parameters - monitoring parameters of the equipment (such as temperature, voltage, current, etc.);
[0123] Alarm threshold - the alarm threshold of the device;
[0124] Alarm notification - the device's alarm notification mechanism (such as email, SMS, etc.).
[0125] (11)Others.
[0126] In one embodiment, if Figure 3 As shown, the step S102 includes: steps S301 to S304.
[0127] Step S301: Perform frequency scanning through the SDR platform within a preset frequency band to collect channel information of each channel within the frequency band; wherein the channel information includes channel signals, interference sources, and channel occupancy;
[0128] Step S302: performing signal processing on the channel signal to obtain the signal strength of the channel signal;
[0129] Step S303: Based on the signal strength, classify the channel signal using a machine learning algorithm to obtain illegal signals and interference sources in the channel signal;
[0130] Step S304: Select a channel with the lowest interference level from interference sources and / or the lowest channel occupancy as the target channel.
[0131] In this embodiment, after the device registration is completed and the device is connected to the network, the dynamic channel allocation adjustment process is started, that is, a comprehensive scan is performed through the SDR platform to obtain available idle channels and cover all Bluetooth communication channels to collect and analyze detailed data on signal strength, interference sources and channel occupancy. Here, if it is detected that a licensed user (PU, Primary User) is using the channel, the SDR platform continues to perform scans regularly. If it is detected that the channel is not occupied, it is determined based on the collected channel information which Bluetooth channels are least interfered and have a low occupancy rate, and the corresponding channels are used as the target channels.
[0132] Specifically, first determine the frequency band range that needs to be scanned. For Bluetooth communication, the frequency band scanning range is usually 2.402GHz-2.480GHz. Therefore, scanning parameters such as resolution, time interval and sampling rate can be set based on this. For example, set the frequency step between 2.402GHz and 2.480GHz, and scan in steps of 1MHz. For another example, set the sampling rate to 20MHz or higher to capture detailed signals of each channel. After the settings are completed, start the scan. Specifically, the frequency scan can be started through SDR hardware (such as USRP, HackRF, etc.). Next, signal acquisition can be performed. The SDR hardware converts the received analog signal into a digital signal through an analog-to-digital converter (ADC), and then stores the collected digital signal in a cache, memory or database for subsequent processing.
[0133] For the collected signal, first select the appropriate FFT (i.e. Fast Fourier Transform) window (such as Hanning window, Heyman window, etc.) to convert the time domain signal into a frequency domain signal to analyze the frequency components of the signal; then use a bandpass filter or low-pass filter to remove noise and unnecessary signals to improve the signal-to-noise ratio; then according to the Bluetooth standard, the modulated signal is restored to the original data through the GFSK (Gaussian frequency shift key) demodulation algorithm to analyze the signal content, such as signal strength, interference source detection and channel occupancy analysis. In this way, the channel that meets the standard (i.e., the lowest interference level and the lowest channel occupancy) can be selected and used as the target channel.
[0134] Specifically, when performing signal strength analysis, the FFT result is used to calculate the signal strength of each channel, usually in dBm; the signal strength of each channel is statistically analyzed to calculate its average value, peak value and distribution. When performing interference source detection, a spectrum diagram is first generated based on the above content, and the signal strength distribution of each channel is displayed to identify abnormal signals. Then, the short-time Fourier transform (STFT) is used to analyze the time variation of the signal to identify intermittent interference, and then the collected signals are classified using support vector machines (SVM), decision trees or deep learning models. When performing channel occupancy analysis, the signal strength of each channel is calculated by counting the time ratio that exceeds the threshold, and then the distribution of the signal strength of each channel is displayed using a histogram or box plot, and finally the spectrum diagram and time series diagram of the interference source are generated.
[0135] Furthermore, the collected and analyzed data can be stored in a database for subsequent analysis and decision-making. Detailed reports can also be generated using tools such as Python or MATLAB, including spectrum graphs, interference source reports, and optimization suggestions.
[0136] In practical applications, when evaluating and analyzing channel information, the collected and analyzed data (including spectrum diagrams, signal strength, interference source distribution, channel occupancy, etc.) are first stored in a database for subsequent analysis and decision-making. Then, features useful for interference source identification and classification, such as frequency, intensity, duration, periodicity, etc., are selected and extracted from the data. The classification model is then trained using historical data and known interference source data so that the classification model can identify different types of interference sources; in addition, the model can be retrained regularly using accumulated data to improve the accuracy and robustness of the model. At the same time, an independent validation set can be used to evaluate the performance of the model and adjust the model parameters.
[0137] In one embodiment, if Figure 4 As shown, the step S103 includes: steps S401 to S404.
[0138] Step S401, determining the communication address and communication protocol of the target device, and generating a connection request signal accordingly;
[0139] Step S402: modulate the connection request signal to the target channel through the SDR platform, and send the connection request signal through the antenna, so that the target device monitors the connection request signal on the target channel, and then generates and sends a corresponding response signal according to the connection request signal;
[0140] Step S403: receiving a response signal sent by the target device, generating a first confirmation signal based on the response signal, and then sending the first confirmation signal to the target device, so that the target device returns a corresponding second confirmation signal;
[0141] Step S404: establishing a Bluetooth communication connection with the target device on the target channel based on the first confirmation signal and the second confirmation signal.
[0142] In this embodiment, when establishing a Bluetooth communication connection with the target through the target channel, the address (such as MAC address) and communication protocol of the target device are first determined. After the determination, the SDR platform modulates the connection request signal containing information such as device identification, connection type, and protocol version to the selected target channel, and then sends it out through the antenna. The target device monitors on the selected channel to receive the connection request signal from the server, then demodulates the received signal and parses the information therein. If the information in the connection request meets the requirements, a response signal is generated and sent back to the server through the same channel. After receiving the response from the target device, the server continues to send a confirmation signal to the target device; after receiving the confirmation signal, the target device sends a final confirmation signal, thereby achieving a handshake. Here, the handshake protocol usually uses a standard Bluetooth or a custom handshake protocol to ensure that both parties confirm that the connection is successful. After the handshake is successful, the server and the target device establish a connection on the selected channel, and then data can be exchanged on the connected channel according to the communication protocol.
[0143] In one embodiment, monitoring the target channel to determine whether the Bluetooth communication connection is terminated, and adjusting the target channel of the dual-mode Bluetooth according to the determination result, includes:
[0144] When it is detected that the Bluetooth communication connection has not ended, determining whether the permitted user of the target device reuses another channel;
[0145] If it is determined that the permitted user of the target device reuses other channels, releasing the target channel;
[0146] If it is determined that the permitted user of the target device has not reused other channels, continue to scan the current idle channels to confirm whether to update the current target channel;
[0147] When it is detected that the Bluetooth communication connection is terminated, the target channel is released.
[0148] In this embodiment, when monitoring the target channel, if it is detected that the Bluetooth communication connection corresponding to the target channel has not ended, it is further determined whether the permitted user (PU, Primary User) of the corresponding target device has reused other channels except the target channel. If it is determined that the permitted user has reused other channels, the target channel is released; if it is determined that the permitted user has not reused other channels, the SDR platform continues to scan the currently available idle channels to dynamically adjust the target channel. If it is detected that the Bluetooth communication connection corresponding to the target channel has ended, the corresponding target channel is released and the Bluetooth communication process ends.
[0149] Here, it should be noted that in addition to detecting whether the communication is terminated, the present embodiment monitors the target channel and can also monitor and identify illegal signals or interference sources in the spectrum in real time through the SDR platform. Once interference is detected, the SDR platform can respond quickly, such as automatically switching to a frequency band with less interference. At the same time, the SDR platform can also learn and record the characteristics of the interference source, providing data support for future interference prevention and response strategies.
[0150] It should also be noted that in the SDR platform, when the communication is not ended and the Primary User (PU) does not reuse a channel, the system still needs to return to channel sensing. This does not mean that the selected channel cannot continue to be used, but to ensure efficient use of the spectrum and avoid potential interference. The specific reasons can be:
[0151] (1) Dynamic spectrum management problem. Spectrum usage is dynamic, and the activities of PUs may change at any time. Even if the current PU does not reuse a channel, there is no guarantee that it will not be reused during the communication process. In this embodiment, through regular channel sensing (i.e., real-time channel scanning), the SDR platform can detect the usage of the spectrum in real time to ensure that the PU does not reuse the current channel.
[0152] (2) Potential interference problem (PU priority). PU has priority in spectrum use. If a PU reuses a channel and the secondary user (SU) does not release the channel immediately, it will interfere with the PU's communication. In this embodiment, through channel perception, the SDR platform can detect PU activities in a timely manner and ensure that the channel can be released immediately when the PU reuses it, avoiding interference with the PU's communication.
[0153] (3) Communication quality assurance issues. Even if the PU does not reuse a channel, other interference sources (such as other SUs, Wi-Fi devices, microwave ovens, etc.) may affect the signal quality of the current channel. In this embodiment, through channel perception, the SDR platform can detect the signal strength and interference of the current channel to ensure communication quality.
[0154] (4) Security and reliability issues. Other SUs or devices may use the current channel at the same time, causing conflicts with other devices. In this embodiment, through channel perception, the SDR platform can promptly detect and respond to potential security threats to ensure the security of communications.
[0155] In one embodiment, the monitoring of the target channel to determine whether the Bluetooth communication connection is terminated, and adjusting the target channel of the dual-mode Bluetooth according to the determination result, further includes:
[0156] When it is detected that the target channel has a preset end condition, determining that the Bluetooth communication connection is ended;
[0157] When the preset termination condition of the target channel is not detected, determining that the Bluetooth communication connection is not terminated;
[0158] The end condition includes any one or more of a preset timeout mechanism being triggered, a heartbeat signal not being received within a preset time, and a predetermined end mark being received.
[0159] This embodiment can specifically use a timeout mechanism, a heartbeat mechanism, and a protocol end flag to determine whether the Bluetooth communication connection is ended. Among them, the timeout mechanism refers to setting a communication timeout period, and the SDR platform will continue to monitor the data stream on the target channel. If no data packet or heartbeat signal is received within the time range, the SDR platform considers that the communication is over. The heartbeat mechanism refers to setting a heartbeat interval (for example, 5 seconds) during initialization, and regularly sending a heartbeat signal through the target channel. The SDR platform continuously monitors the heartbeat signal on the channel. If no heartbeat signal is received within a certain period of time, the SDR platform considers that the communication is over. The protocol end flag refers to defining a specific end flag or end packet in the communication protocol. When the end flag or end packet is received, the communication is considered to be over.
[0160] Taking the protocol end flag as an example, first define a specific end flag or end packet in the communication protocol, and the target device of the protocol sends the end flag or end packet after the communication ends. Then the SDR platform continuously monitors the data stream on the target channel to detect whether there is an end flag or end packet. If the end flag or end packet is detected, the SDR platform confirms that the communication is over.
[0161] Figure 5 A schematic block diagram of a dual-mode Bluetooth control device 500 provided in an embodiment of the present invention, the device 500 includes:
[0162] The first connection unit 501 is used to establish a network communication connection with a target device using dual-mode Bluetooth;
[0163] The channel selection unit 502 is used to perform spectrum sensing through the SDR platform to scan and obtain the current idle channels, and perform spectrum decision on the idle channels to select a target channel that can be used for dual-mode Bluetooth communication;
[0164] A second connection unit 503, configured to send the target channel to a target device based on the network communication connection, so as to establish a Bluetooth communication connection with the target device;
[0165] The channel monitoring unit 504 is used to monitor the target channel to determine whether the Bluetooth communication connection is terminated, and adjust the target channel of the dual-mode Bluetooth according to the determination result.
[0166] In one embodiment, if Figure 6 As shown, the first connection unit 501 includes:
[0167] The registration request unit 601 is used to receive a registration request sent by a target device, and perform security verification on the target device through the SDR platform according to the registration request; wherein the registration request includes device information;
[0168] The permission sending unit 602 is used to send access rights to the target device through the SDR platform according to the device information after the security verification is passed;
[0169] A feedback connection unit 603 is used to determine whether a confirmation feedback of the target device on the access permission is received, and after receiving the confirmation feedback, determine that the network communication connection is successful;
[0170] The monitoring management unit 604 is used to monitor and manage the target device through the SDR platform after the network communication connection is successful, and to update the configuration of the target device based on the monitoring and management results.
[0171] In one embodiment, the monitoring management unit 704 includes:
[0172] An instruction generation unit, configured to generate a configuration update instruction when monitoring that the target device meets a preset update condition; wherein the preset update condition includes: an automatic update mechanism is triggered and / or an update instruction sent by a user is received; and the configuration update instruction includes configuration parameters to be updated;
[0173] A configuration update unit, configured to send the configuration update instruction to the target device so that the target device performs configuration update;
[0174] The log recording unit is used to obtain the result feedback of the target device configuration update and record the update log of the target device.
[0175] In one embodiment, if Figure 7 As shown, the channel selection unit 502 includes:
[0176] The frequency scanning unit 701 is used to perform frequency scanning through the SDR platform within a preset frequency band to collect channel information of each channel within the frequency band; wherein the channel information includes channel signals, interference sources and channel occupancy;
[0177] A signal processing unit 702, configured to perform signal processing on the channel signal to obtain a signal strength of the channel signal;
[0178] A signal classification unit 703, configured to classify the channel signal using a machine learning algorithm based on the signal strength to obtain illegal signals and interference sources in the channel signal;
[0179] The target selection unit 704 is configured to select a channel with the lowest interference level from the interference source and / or the lowest channel occupancy as the target channel.
[0180] In one embodiment, if Figure 8 As shown, the second connection unit 503 includes:
[0181] The signal generating unit 801 is used to determine the communication address and communication protocol of the target device and generate a connection request signal accordingly;
[0182] The signal modulation unit 802 is used to modulate the connection request signal to the target channel through the SDR platform, and send the connection request signal through the antenna, so that the target device can monitor the connection request signal on the target channel, and then generate and send a corresponding response signal according to the connection request signal;
[0183] A signal interaction unit 803 is configured to receive a response signal sent by the target device, generate a first confirmation signal based on the response signal, and then send the first confirmation signal to the target device so that the target device returns a corresponding second confirmation signal;
[0184] The Bluetooth connection unit 804 is configured to establish a Bluetooth communication connection with the target device on the target channel based on the first confirmation signal and the second confirmation signal.
[0185] In one embodiment, the channel monitoring unit 504 includes:
[0186] A channel determination unit, for determining whether a permitted user of the target device reuses another channel when detecting that the Bluetooth communication connection has not been terminated;
[0187] A first determination unit, configured to release the target channel if it is determined that the permitted user of the target device reuses another channel;
[0188] A second determination unit is configured to continue scanning the current idle channels to confirm whether to update the current target channel if it is determined that the permitted user of the target device has not reused other channels;
[0189] The channel releasing unit is used to release the target channel when it is detected that the Bluetooth communication connection is terminated.
[0190] In one embodiment, the channel monitoring unit 504 further includes:
[0191] A third determination unit is used to determine that the Bluetooth communication connection is terminated when a preset termination condition is detected on the target channel;
[0192] a fourth determination unit, configured to determine that the Bluetooth communication connection is not terminated when the preset termination condition of the target channel is not detected;
[0193] The end condition includes any one or more of a preset timeout mechanism being triggered, a heartbeat signal not being received within a preset time, and a predetermined end mark being received.
[0194] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.
[0195] The embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed, the steps provided in the above embodiment can be implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0196] The embodiment of the present invention also provides a computer device, which may include a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps provided in the above embodiment may be implemented. Of course, the computer device may also include various network interfaces, power supplies and other components.
[0197] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of this application.
[0198] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A dual-mode Bluetooth control method, characterized in that: include: Establish network communication connection with target device using dual-mode Bluetooth; Spectrum sensing is performed through the SDR platform to scan and obtain the current idle channels, and spectrum decision is made on the idle channels to select the target channel that can be used for dual-mode Bluetooth communication; sending the target channel to a target device based on the network communication connection to establish a Bluetooth communication connection with the target device; The target channel is monitored to determine whether the Bluetooth communication connection is terminated, and the target channel of the dual-mode Bluetooth is adjusted according to the determination result.
2. The dual-mode Bluetooth control method according to claim 1, characterized in that: The step of establishing a network communication connection with a target device using dual-mode Bluetooth includes: Receiving a registration request sent by a target device, and performing security verification on the target device through an SDR platform according to the registration request; wherein the registration request includes device information; After the security verification is passed, the access permission is sent to the target device through the SDR platform according to the device information; Determining whether a confirmation feedback of the target device on the access permission is received, and after receiving the confirmation feedback, determining that the network communication connection is successful; After the network communication connection is successful, the target device is monitored and managed through the SDR platform, and the configuration of the target device is updated based on the monitoring and management results.
3. The dual-mode Bluetooth control method according to claim 2, characterized in that: The monitoring and managing the target device through the SDR platform, and updating the configuration of the target device based on the monitoring and management results, includes: When it is monitored that the target device meets the preset update conditions, a configuration update instruction is generated; wherein the preset update conditions include: the automatic update mechanism is triggered and / or an update instruction sent by the user is received; the configuration update instruction includes the configuration parameters to be updated; Sending the configuration update instruction to the target device so that the target device performs configuration update; Obtain result feedback of the target device configuration update, and record an update log of the target device.
4. The dual-mode Bluetooth control method according to claim 1, characterized in that: The spectrum sensing is performed through the SDR platform to scan and obtain the current idle channels, and spectrum decision is performed on the idle channels to select the target channel that can be used for dual-mode Bluetooth communication, including: Perform frequency scanning through the SDR platform within a preset frequency band to collect channel information of each channel within the frequency band; wherein the channel information includes channel signals, interference sources and channel occupancy; Performing signal processing on the channel signal to obtain the signal strength of the channel signal; Based on the signal strength, the channel signal is classified and processed by using a machine learning algorithm to obtain illegal signals and interference sources in the channel signal; A channel with the lowest interference level from interference sources and / or the lowest channel occupancy is selected as the target channel.
5. The dual-mode Bluetooth control method according to claim 1, characterized in that: The sending the target channel to the target device based on the network communication connection to establish a Bluetooth communication connection with the target device includes: Determine the communication address and communication protocol of the target device, and generate a connection request signal accordingly; Modulating the connection request signal to the target channel through the SDR platform, and sending the connection request signal through an antenna, so that the target device monitors the connection request signal on the target channel, and then generates and sends a corresponding response signal according to the connection request signal; receiving a response signal sent by the target device, generating a first confirmation signal based on the response signal, and then sending the first confirmation signal to the target device so that the target device returns a corresponding second confirmation signal; Based on the first confirmation signal and the second confirmation signal, a Bluetooth communication connection is established with the target device on the target channel.
6. The dual-mode Bluetooth control method according to claim 1, characterized in that: The monitoring of the target channel to determine whether the Bluetooth communication connection is terminated, and adjusting the target channel of the dual-mode Bluetooth according to the determination result, includes: When it is detected that the Bluetooth communication connection has not ended, determining whether the permitted user of the target device reuses another channel; If it is determined that the permitted user of the target device reuses other channels, releasing the target channel; If it is determined that the permitted user of the target device has not reused other channels, continue to scan the current idle channels to confirm whether to update the current target channel; When it is detected that the Bluetooth communication connection is terminated, the target channel is released.
7. The dual-mode Bluetooth control method according to claim 1, characterized in that: The monitoring of the target channel to determine whether the Bluetooth communication connection is terminated, and adjusting the target channel of the dual-mode Bluetooth according to the determination result, further includes: When it is detected that the target channel has a preset end condition, determining that the Bluetooth communication connection is ended; When the preset termination condition of the target channel is not detected, determining that the Bluetooth communication connection is not terminated; The end condition includes any one or more of a preset timeout mechanism being triggered, a heartbeat signal not being received within a preset time, and a predetermined end mark being received.
8. A dual-mode Bluetooth control device, characterized in that: include: A first connection unit, used to establish a network communication connection with a target device using dual-mode Bluetooth; A channel selection unit is used to perform spectrum sensing through the SDR platform to scan and obtain the current idle channels, and perform spectrum decision on the idle channels to select a target channel that can be used for dual-mode Bluetooth communication; a second connection unit, configured to send the target channel to a target device based on the network communication connection, so as to establish a Bluetooth communication connection with the target device; The channel monitoring unit is used to monitor the target channel to determine whether the Bluetooth communication connection is terminated, and to adjust the target channel of the dual-mode Bluetooth according to the determination result.
9. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the dual-mode Bluetooth control method as claimed in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the dual-mode Bluetooth control method according to any one of claims 1 to 7 is implemented.