Bluetooth module and Wi-Fi module collaborative working method, device and medium

The collaborative working of Bluetooth and Wi-Fi modules through a preset physical serial port and intelligent data management enhances the stability and adaptability of iOS device communication, addressing the limitations of traditional single wireless communication methods.

CN118972815BActive Publication Date: 2024-12-17JUQING NETWORK TECH (JINAN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411434545.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2024-12-17
Estimated Expiration
2044-10-15

AI Technical Summary

Technical Problem

Traditional single wireless communication methods, such as using either Bluetooth or Wi-Fi, struggle to meet the complex and changing network environments and usage scenarios of iOS devices, particularly when handling multiple tasks or large data transmissions, as they operate in different frequency bands and have distinct advantages and application scenarios.

Method used

A method and device for collaborative working of Bluetooth and Wi-Fi modules, involving establishing a communication connection based on a preset physical serial port, performing performance tests, and generating data request commands to ensure efficient and stable data transmission by integrating Bluetooth and Wi-Fi modules, with intelligent data encapsulation and parsing to enhance compatibility and adaptability.

Benefits of technology

This approach improves the convenience, efficiency, and stability of wireless communication by avoiding manual configuration, ensuring timely detection of connection issues, and dynamically adapting to network changes, thereby expanding the communication capabilities and application scenarios of iOS devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118972815B_ABST
    Figure CN118972815B_ABST
Patent Text Reader

Abstract

The embodiments of this specification disclose a method, device and medium for the collaborative work of a Bluetooth module and a Wi-Fi module, which relates to the field of communication technology and is used to solve the problem of low efficiency of existing single communication devices. The method includes: determining that the Bluetooth module corresponding to the current iOS device establishes a communication connection with the Wi-Fi module; updating the communication connection according to the performance test results of the Wi-Fi module and the Bluetooth module and the connection status of the communication connection to obtain an effective communication connection between the effective Bluetooth module and the effective Wi-Fi module; generating a corresponding data request command based on the data demand corresponding to the current task information of the current iOS device; controlling the Bluetooth module to scan the effective Wi-Fi module based on the data request command to obtain the corresponding Wi-Fi signal data; parsing the data frame encapsulated by the Bluetooth module based on the current iOS device to obtain the Wi-Fi signal data corresponding to the current task information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a method, device and medium for collaborative working of a Bluetooth module and a Wi-Fi module. Background Art

[0002] With the rapid development of mobile Internet and Internet of Things technologies, wireless communication technologies have been widely used in various smart devices. As two mainstream wireless communication technologies, Bluetooth and Wi-Fi each have unique advantages and application scenarios. Bluetooth technology performs well in short-range communications with its low power consumption and simple connection characteristics; while Wi-Fi technology has advantages in large data transmission and Internet access with its high speed and wide coverage. Therefore, how to integrate Bluetooth modules and Wi-Fi modules and make them work together has become an important way to improve the wireless communication capabilities of smart devices.

[0003] In smart devices, especially iOS devices, users have higher requirements for the stability and flexibility of wireless communications. Traditionally, since Bluetooth and Wi-Fi are two independent wireless communication technologies, they work in different frequency bands and have different advantages and application scenarios. Therefore, for iOS devices, the traditional single wireless communication method is often difficult to meet the complex and changing network environment and usage scenarios. For example, when it is necessary to handle multiple tasks at the same time, connect multiple devices, or transmit large amounts of data, a single Bluetooth or Wi-Fi connection may not meet the needs. Therefore, how to transmit Wi-Fi related signals during the Bluetooth connection to expand the communication capabilities and application scenarios of iOS devices is a technical problem that needs to be solved. Summary of the invention

[0004] In order to solve the above technical problems, one or more embodiments of this specification provide a method, device and medium for collaborative working of a Bluetooth module and a Wi-Fi module.

[0005] One or more embodiments of this specification adopt the following technical solutions:

[0006] One or more embodiments of this specification provide a method for collaborative working of a Bluetooth module and a Wi-Fi module, the method comprising:

[0007] Determine a Bluetooth module and at least one Wi-Fi module corresponding to the current iOS device, and establish a communication connection between the Bluetooth module and the at least one Wi-Fi module based on a preset physical serial port;

[0008] Obtaining the performance test results of the Wi-Fi module and the Bluetooth module, and the connection status of the communication connection, to update the communication connection according to the performance test results and the connection status, so as to obtain the effective communication connection between the effective Bluetooth module and the effective Wi-Fi module corresponding to the current iOS device;

[0009] Determine current task information corresponding to the current iOS device, and generate a corresponding data request command based on the data demand corresponding to the current task information;

[0010] Controlling the Bluetooth module to scan the valid Wi-Fi module based on the data request command to obtain corresponding Wi-Fi signal data;

[0011] A data frame is obtained after the Wi-Fi signal data is encapsulated according to the Bluetooth module, so as to parse the data frame based on the current iOS device to obtain the Wi-Fi signal data corresponding to the current task information.

[0012] Optionally, in one or more embodiments of the present specification, determining a Bluetooth module and a Wi-Fi module of the current device to establish a communication connection between the Bluetooth module and the Wi-Fi module based on a preset physical serial port specifically includes:

[0013] Obtaining configuration interfaces corresponding to an initial Bluetooth module and an initial Wi-Fi module of the current device, and verifying whether the physical connection and logic level of the initial Bluetooth module and the initial Wi-Fi module match according to the pin connections corresponding to the configuration interfaces;

[0014] If yes, the communication parameters of the initial Bluetooth module and the initial Wi-Fi module are initialized and configured according to the preset configuration information; wherein the preset configuration information includes: bit rate parameters, data format, hardware control flow information and software control flow information;

[0015] Sending preset test data to the initialized Wi-Fi module based on the Bluetooth module after initialization configuration, so as to determine the Bluetooth module and Wi-Fi module of the current device that pass the test according to the preset test data received by the Wi-Fi module after initialization configuration;

[0016] According to the physical connection corresponding to the Bluetooth module and the Wi-Fi module of the current device and the communication parameters, a communication connection between the Bluetooth module and the Wi-Fi module is established.

[0017] Optionally, in one or more embodiments of the present specification, the obtaining the performance test results of the Wi-Fi module and the Bluetooth module specifically includes:

[0018] Obtaining basic information of the current iOS device, the Wi-Fi module, and the Bluetooth module, extracting key data from the basic information according to historical performance test items of the Wi-Fi module and the Bluetooth module, and obtaining performance test keywords;

[0019] Determine the test performance parameters and test subjects corresponding to each of the performance test keywords based on the historical performance test items, group the performance test keywords according to the test subjects and the test performance parameters, and obtain performance test keyword classification groups corresponding to each test performance parameter of each test subject;

[0020] Based on the preset prompt word framework corresponding to the matching of the test subject and the test performance parameter, the performance test keyword classification group is filled into the preset prompt word framework according to the labels corresponding to each position in the preset prompt word framework to obtain the performance test prompt word;

[0021] Input the performance test prompt word into a preset universal large model to obtain a Wi-Fi test code corresponding to the Wi-Fi module and a Bluetooth test code corresponding to the Bluetooth module;

[0022] Execute the Wi-Fi test code and the Bluetooth test code to collect first performance data of the Wi-Fi module and second performance data of the Bluetooth module; wherein the first performance data includes: signal strength and transmission speed; the second performance data includes: power consumption data, transmission rate, transmission distance, and receiving sensitivity;

[0023] The first performance data is compared with a preset first performance data range to determine a first performance test result corresponding to the Wi-Fi module, and the second performance data is compared with a preset second performance data range to determine a second performance test result corresponding to the Bluetooth module.

[0024] Optionally, in one or more embodiments of the present specification, updating the communication connection according to the performance test result and the connection status to obtain a valid communication connection between a valid Bluetooth module and a valid Wi-Fi module corresponding to the current iOS device specifically includes:

[0025] According to the first performance test result and the second performance test result, the Bluetooth module and the Wi-Fi module are screened respectively to determine a valid Wi-Fi module within the preset first performance data range and a valid Bluetooth module within the preset second performance data range;

[0026] Determine an initial valid communication connection corresponding to the valid Bluetooth module and the valid Wi-Fi module within the communication connection;

[0027] According to the connection status corresponding to each of the initial valid communication connections, the initial valid communication connections are screened to determine the valid communication connections between the valid Bluetooth module and the valid Wi-Fi module corresponding to the current iOS device; wherein the connection status includes: connected state, unconnected state, and disconnected state.

[0028] Optionally, in one or more embodiments of the present specification, determining the current task information corresponding to the current iOS device to generate a corresponding data request command based on the data demand corresponding to the current task information specifically includes:

[0029] Determine the current task information corresponding to the current iOS device according to the user interaction information of the current iOS device and the running information of the application program;

[0030] Determine the task condition restriction information in the current task information and the data source corresponding to each of the task condition restriction information; wherein the task condition restriction information includes: data type, data format, and data range;

[0031] Reconstructing the current task information according to the corresponding relationship between the task condition restriction information and the data source corresponding to each task condition restriction information to obtain the data requirement corresponding to the current task information;

[0032] A matching request method is determined based on the data demand, so as to combine the data demand according to the request method to obtain a corresponding data request command.

[0033] Optionally, in one or more embodiments of the present specification, controlling the Bluetooth module to scan the valid Wi-Fi module based on the data request command to obtain corresponding Wi-Fi signal data specifically includes:

[0034] Parsing the data request command to determine the data source and task condition restriction information corresponding to the data request command;

[0035] Determine a list of scanned Wi-Fi modules located in the Bluetooth module according to the data source, and basic data of existing Wi-Fi signals belonging to the valid Wi-Fi modules;

[0036] Determine, based on the existing Wi-Fi signal basic data, that the existing Wi-Fi module returns first Wi-Fi signal data to the Bluetooth module, and filter the first Wi-Fi signal data based on the task condition restriction information to obtain second Wi-Fi signal data;

[0037] Scan the Wi-Fi modules within the preset range of the Bluetooth module according to the data source and the task condition restriction information to determine the third Wi-Fi signal data that meets the requirements among the remaining Wi-Fi modules of the valid Wi-Fi modules; wherein the remaining Wi-Fi modules are valid Wi-Fi modules without the existing Wi-Fi signal basic data;

[0038] The second Wi-Fi signal data and the third Wi-Fi signal data are aggregated to obtain corresponding Wi-Fi signal data.

[0039] Optionally, in one or more embodiments of the present specification, the acquiring of the data frame after the Wi-Fi signal data is encapsulated according to the Bluetooth module, so as to parse the data frame based on the current iOS device to obtain the Wi-Fi signal data corresponding to the current task information, specifically includes:

[0040] Based on a preset encapsulation tool, the Wi-Fi signal data acquired by the Bluetooth module is converted into a preset data format for encapsulation to obtain an encapsulated data frame; wherein the preset data format is a JSON format;

[0041] According to a preset Bluetooth standard protocol, the encapsulated data frame is sent to the current iOS device;

[0042] Initial Wi-Fi signal data after the current iOS device parses the data frame is obtained, and the initial Wi-Fi signal data is secondary screened according to the current task information to obtain Wi-Fi signal data corresponding to the current task information.

[0043] Optionally, in one or more embodiments of the present specification, establishing a communication connection between the Bluetooth module and the Wi-Fi module according to the physical connection corresponding to the Bluetooth module and the Wi-Fi module of the current device and the communication parameters specifically includes:

[0044] Generate a communication connection command based on the network identifier and connection password of the Wi-Fi module;

[0045] Sending the communication connection command to the Wi-Fi module based on the Bluetooth module according to the physical connection and the communication parameters, and determining confirmation information returned by the Wi-Fi module;

[0046] According to the confirmation information, a communication connection is determined that the Bluetooth module is successfully connected to the Wi-Fi module.

[0047] One or more embodiments of this specification provide a device for collaborative operation of a Bluetooth module and a Wi-Fi module, the device comprising:

[0048] at least one processor; and,

[0049] a memory communicatively connected to the at least one processor; wherein,

[0050] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: execute any of the above-mentioned methods.

[0051] One or more embodiments of the present specification provide a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute any of the above-described methods.

[0052] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:

[0053] By presetting the physical serial port to establish the communication connection between the Bluetooth module and the Wi-Fi module, the user avoids the tedious process of manually configuring and connecting different modules, which greatly improves the convenience of use. By obtaining and evaluating the performance test results of the Wi-Fi module and the Bluetooth module and the communication connection status, it is helpful to timely discover and solve potential connection problems, thereby ensuring that the Bluetooth module and the Wi-Fi module can maintain an efficient and stable communication connection. According to the task information corresponding to the current iOS device, the data request command is dynamically generated, and the Bluetooth module is controlled to scan and obtain signal data for the effective Wi-Fi module. It can ensure the pertinence and timeliness of the data request and improve the efficiency and accuracy of task execution. The Bluetooth module encapsulates the acquired Wi-Fi signal data and transmits it to the iOS device as an intermediary so that the iOS device can parse the data frame to obtain the required Wi-Fi signal data, realizes the support for the transmission of Wi-Fi signal data such as Wi-Fi signal strength in the Bluetooth connection, avoids the problem that the iOS device is difficult to obtain Wi-Fi network data during the operation of the existing Bluetooth device, and realizes the collaborative red of multiple wireless communication devices, which helps to expand the communication capabilities and application scenarios of iOS devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. In the drawings:

[0055] Figure 1A schematic diagram of a collaborative working method between a Bluetooth module and a Wi-Fi module provided in an embodiment of this specification;

[0056] Figure 2 A schematic diagram of the structure of a device for collaborative working of a Bluetooth module and a Wi-Fi module provided in an embodiment of this specification;

[0057] Figure 3 A schematic diagram of the structure of a non-volatile storage medium provided in an embodiment of this specification. DETAILED DESCRIPTION

[0058] The embodiments of this specification provide a method, device and medium for collaborative working of a Bluetooth module and a Wi-Fi module.

[0059] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0060] like Figure 1 As shown, the embodiment of this specification provides a schematic flow chart of a method for collaborative working of a Bluetooth module and a Wi-Fi module. Figure 1 It can be seen that in one or more embodiments of this specification, a method for collaborative working of a Bluetooth module and a Wi-Fi module includes:

[0061] S101: Determine a Bluetooth module and at least one Wi-Fi module corresponding to the current iOS device, and establish a communication connection between the Bluetooth module and the at least one Wi-Fi module based on a preset physical serial port.

[0062] Traditionally, Bluetooth and Wi-Fi are two independent wireless communication technologies that work in different frequency bands, each with different advantages and application scenarios. In order to enable the WI-FI module of the iOS device to work together during the connection of the Bluetooth module, that is, to transmit WI-FI related signals. In the embodiment of this specification, the Bluetooth module and at least one Wi-Fi module corresponding to the current iOS device are first determined, so that according to the pre-set physical serial port, a communication connection between the Bluetooth module and at least one Wi-Fi module is established. Prior to this, the current iOS device will search and connect to the Bluetooth module according to the preset application, so that after the Bluetooth module and the WI-FI module establish a communication connection, the relevant Wi-Fi signal data of the WI-FI module can be obtained based on the Bluetooth module.

[0063] Specifically, in one or more embodiments of the present specification, determining the Bluetooth module and the Wi-Fi module of the current device to establish a communication connection between the Bluetooth module and the Wi-Fi module based on a preset physical serial port specifically includes the following process:

[0064] First, obtain the configuration interface corresponding to the initial Bluetooth module and the initial Wi-Fi module of the current device, and then verify whether the physical connection and logic level of the initial Bluetooth module and the initial Wi-Fi module match according to the pin connection corresponding to the configuration interface. That is to say, in the real scenario, the initial Bluetooth module and the initial Wi-Fi module need to meet the requirements of physical connection and logic level, that is, ensure that there is a reliable serial port physical connection between the Bluetooth module and the Wi-Fi module. Usually includes connecting the TX (transmit) and RX (receive) pins, as well as the GND (ground) pin. And it is necessary to ensure that the logic levels of the two modules match. If it is determined based on the above judgment that the physical connection and the logic level meet the requirements, then it is further necessary to initialize the communication parameters of the initial Bluetooth module and the initial Wi-Fi module according to the preset configuration information; wherein the preset configuration information includes: bit rate parameters, data format, hardware control flow information and software control flow information, that is, since the baud rate determines the speed of serial communication, the bit rates of the two modules need to be consistent after the initial configuration, and the data format also needs to be consistent, for example: the data format after the initial configuration includes data bits (usually 8 bits), stop bits (usually 1 bit or 2 bits) and parity bits (usually no check, odd check or even check). In addition, if flow control is required, it is also necessary to ensure that the lighted flow control settings are consistent. Among them, it is also necessary to ensure that the initialization configuration of the two modules is correct, including mode settings, pairing and connection. Then, the preset test data is sent to the initialized Wi-Fi module based on the Bluetooth module after the initial configuration, so as to determine the Bluetooth module and Wi-Fi module of the current device that have passed the test according to the preset test data received by the Wi-Fi module after the initial configuration. Then, according to the physical connection and communication parameters corresponding to the Bluetooth module and the Wi-Fi module of the current device, a communication connection between the Bluetooth module and the Wi-Fi module is established.

[0065] Through the verification process of whether the physical connection and logic level of the initial Bluetooth module and the initial Wi-Fi module match in the above process, it can be ensured that there is a reliable serial port physical connection between the two. This avoids the problem of communication failure caused by poor connection or level mismatch, and improves the stability and reliability of the communication connection. The initial configuration of the communication parameters of the initial Bluetooth module and the initial Wi-Fi module, including bit rate parameters, data format, hardware control flow information and software control flow information, can ensure that the two can efficiently and accurately transmit data during the communication process. Consistent communication parameter settings reduce communication errors and retransmissions caused by parameter mismatch, thereby improving communication efficiency. And enhance the compatibility between Bluetooth modules and Wi-Fi modules of different brands and models, so that the collaborative work between different devices is smoother. The communication connection established on the basis of ensuring that the physical connection, logic level and communication parameters are correct can reduce system crashes or instability caused by improper configuration or connection problems.

[0066] Further, in one or more embodiments of the present specification, establishing a communication connection between the Bluetooth module and the Wi-Fi module according to the physical connection and the communication parameters corresponding to the Bluetooth module and the Wi-Fi module of the current device specifically includes the following process:

[0067] First, a communication connection command is generated according to the network identifier and connection password of the Wi-Fi module. Then, according to the physical connection and communication parameters, the communication connection command is sent to the Wi-Fi module based on the Bluetooth module, and the confirmation information returned by the Wi-Fi module is determined; according to the confirmation information, the communication connection between the Bluetooth module and the Wi-Fi module is determined to be successfully connected. That is, the Bluetooth module sends a connection command through the serial port and tries to connect to the Wi-Fi module. After receiving the connection command, the Wi-Fi module confirms the connection and returns a successful connection message. In this process, the connection command and confirmation information can also be transmitted through multi-level verification and encryption to ensure the integrity and security of the data.

[0068] S102: Obtain the performance test results of the Wi-Fi module and the Bluetooth module, and the connection status of the communication connection, and update the communication connection according to the performance test results and the connection status to obtain a valid communication connection between the valid Bluetooth module and the valid Wi-Fi module corresponding to the current iOS device.

[0069] After the communication connection between the Bluetooth module and the at least one Wi-Fi module is determined based on the above steps, in order to improve the efficiency of the collaborative work between the Bluetooth device and the WI-FI device and avoid the troubles and inconveniences caused by potential problems such as connection interruption and weak signal, the performance test results of the Wi-Fi module and the Bluetooth module, as well as the connection status of the communication connection, will be obtained in the embodiment of this specification. Thus, the effective communication connection between the effective Bluetooth module and the effective Wi-Fi module corresponding to the current iOS device is established. In this process, the communication connection is automatically adjusted and optimized according to the real-time performance test results and connection status to update the communication connection, thereby obtaining an effective communication connection, and the communication connection can be adaptively adjusted to adapt to different network environments, ensuring the continuity and stability of the tasks corresponding to the current iOS device during data transmission.

[0070] Specifically, in one or more embodiments of this specification, obtaining the performance test results of the Wi-Fi module and the Bluetooth module specifically includes the following processes:

[0071] Obtain the basic information of the current iOS device, Wi-Fi module and Bluetooth module, and then extract key data from the basic information according to the historical performance test items of the Wi-Fi module and the Bluetooth module, and obtain performance test keywords. For example, the mapping relationship between the test results and the test parameters is determined based on the historical performance test items, and the extraction of key data can be realized through the mapping relationship. In addition, the test keywords can be extracted based on text mining or natural language processing. For example, after the test data of the historical performance test items are used as training samples for the deep learning network based on the natural language processing technology, the basic information can be input into the trained deep learning network to extract the performance test keywords. Then, the test performance parameters and test subjects corresponding to each performance test keyword are determined according to the historical performance test items, so that the performance test keywords are grouped according to the test subjects and the test performance parameters, and the performance test keyword classification groups corresponding to each test performance parameter of each test subject are obtained. Then, according to the preset prompt word framework corresponding to the test subject and the test performance parameter matching, the performance test keyword classification group is filled into the preset prompt word framework according to the labels corresponding to each position in the preset prompt word framework to obtain the performance test prompt word. Then input the performance test prompt word into the preset general large model to obtain the Wi-Fi test code corresponding to the Wi-Fi module and the Bluetooth test code corresponding to the Bluetooth module. Execute the Wi-Fi test code and the Bluetooth test code to collect the first performance data of the Wi-Fi module and the second performance data of the Bluetooth module. Among them, the first performance data includes: signal strength, transmission speed, and the second performance data includes: power consumption data, transmission rate, transmission distance, and receiving sensitivity. Then, compare the first performance data with the preset first performance data range to determine the first performance test result corresponding to the Wi-Fi module, and compare the second performance data with the preset second performance data range to determine the second performance test result corresponding to the Bluetooth module.

[0072] This process can intelligently extract key data and generate performance test keywords by combining historical performance test projects. The test process is structured and modularized by grouping performance test keywords, matching preset prompt word frameworks, and generating performance test prompt words. And this process covers multiple key performance parameters of Wi-Fi modules and Bluetooth modules, such as signal strength, transmission speed, power consumption data, transmission rate, transmission distance, and receiving sensitivity. This comprehensive performance evaluation helps to more accurately understand the performance status of the module and provides a basis for subsequent collaborative work. By inputting the performance test prompt words into the preset universal large model, Wi-Fi test code and Bluetooth test code for specific test subjects and performance parameters can be automatically generated. By automatically generating prompt words and generating test codes with the help of preset universal large models, R&D personnel are avoided from performing repetitive work and reducing manual labor. This method not only improves the efficiency of code generation, but also ensures the accuracy and consistency of test codes. In addition, by comparing the collected performance data with the preset performance data range, the performance test results of Wi-Fi modules and Bluetooth modules can be accurately evaluated. This result comparison method helps to quickly discover potential performance problems and also helps to provide a clear direction for debugging and optimizing problems.

[0073] Further, in one or more embodiments of the present specification, the communication connection is updated according to the performance test result and the connection status to obtain the effective communication connection between the effective Bluetooth module and the effective Wi-Fi module corresponding to the current iOS device, specifically including the following process:

[0074] First, according to the first performance test result and the second performance test result, the Bluetooth module and the Wi-Fi module are screened respectively to determine the valid Wi-Fi module within the preset first performance data range and the valid Bluetooth module within the preset second performance data range. Then, the initial valid communication connection corresponding to the valid Bluetooth module and the valid Wi-Fi module in the communication connection is determined. According to the connection state corresponding to each initial valid communication connection, the initial valid communication connection is screened to determine the valid communication connection between the valid Bluetooth module and the valid Wi-Fi module corresponding to the current iOS device. Among them, the connection state includes: connected state, unconnected state, and disconnected state. For example: the preset first performance data range is assumed to be signal strength ≥ 80dBm and transmission speed ≥ 40Mbps. Then module A has a signal strength of 90dBm and a transmission speed of 50Mbps, which is within the preset first performance data range, so it is judged to be a valid Wi-Fi module, and module B has a signal strength of 70dBm and a transmission speed of 30Mbps, which is not within the preset performance data range, so it is judged to be an invalid Wi-Fi module. In addition, module C has low power consumption data, stable transmission rate, long transmission distance, and high receiving sensitivity, all of which are within the preset second performance data range, so it is judged to be a valid Bluetooth module. Module D has high power consumption data, unstable transmission rate, short transmission distance, and low receiving sensitivity, which are not within the preset performance data range, so it is judged to be an invalid Bluetooth module. At this time, the connection status of module A is connected, the status of module B is unconnected, the status of module C is connected, and the status of module D is disconnected. Then, according to the performance test results, valid Wi-Fi module A and valid Bluetooth module C can be screened out. Since modules A and C are both in the connected state, and the performance test results show that they are both valid modules, they constitute the initial valid communication connection.

[0075] By screening the performance test results of the Bluetooth module and Wi-Fi module and retaining only those valid modules within the preset performance data range, the modules used for the communication connection can be ensured to have stable performance. This helps to reduce communication interruptions or data transmission errors caused by poor module performance, thereby improving the stability and reliability of the communication connection. Screening out valid modules from multiple Bluetooth modules and Wi-Fi modules can ensure that the current iOS device only establishes a communication connection with the module with the best performance. This helps to optimize the utilization of system resources, avoid unnecessary resource waste, and improve the overall system operation efficiency. This process not only takes into account the performance test results of the module, but also combines the current status of the communication connection. This intelligent connection management method can dynamically adjust the communication connection according to the actual situation, ensure that the device is always connected to the valid module, and improve the user experience. It can flexibly respond to communication needs in different scenarios. Whether it is the addition of new devices or the performance changes of existing devices, the stability and reliability of the communication connection can be ensured by re-screening valid modules. This enhances the adaptability and scalability of the system. In addition, when there is a problem with the communication connection, by viewing the performance test results and connection status, the problem can be quickly located, so it also helps to quickly troubleshoot and improve maintenance efficiency.

[0076] S103: Determine the current task information corresponding to the current iOS device, and generate a corresponding data request command based on the data demand corresponding to the current task information.

[0077] In order to generate accurate data request commands, thereby significantly improving the efficiency and accuracy of data acquisition and reducing errors in manual judgment and data entry, the current task information corresponding to the current iOS device is determined in the embodiment of this specification, so as to automatically generate corresponding data request commands based on the data requirements corresponding to the previous task information. Different tasks may require data of different types and formats. By identifying the current task information, the system can flexibly adjust the data request commands to adapt to different data requirements. At the same time, when resources are limited, accurate data request commands can ensure that only necessary data is obtained, thereby avoiding unnecessary data transmission and processing. This helps to reduce the waste of network bandwidth and computing resources and improve the overall performance of the system.

[0078] Specifically, in one or more embodiments of the present specification, determining the current task information corresponding to the current iOS device to generate a corresponding data request command based on the data demand corresponding to the current task information specifically includes:

[0079] According to the user interaction information of the current iOS device and the running information of the application, the current task information corresponding to the current iOS device is determined. Then, the task condition restriction information in the current task information and the data source corresponding to each task condition restriction information are determined. Among them, the task condition restriction information includes: data type, data format, and data range. In addition, according to the correspondence between the task condition restriction information and the data source corresponding to each task condition restriction information, the current task information is reconstructed to obtain the data requirements corresponding to the current task information. Then, based on the data requirements, the matching request method is determined to combine the data requirements according to the request method to obtain the corresponding data request command. By analyzing the task condition restriction information and the data source in detail, the system can generate accurate data request commands to ensure that only necessary and required signal data is obtained. Requesting only necessary data can reduce the burden of system data processing and optimize resource utilization. At the same time, reducing unnecessary data transmission also helps to reduce network load.

[0080] S104: Control the Bluetooth module to scan the valid Wi-Fi module based on the data request command to obtain corresponding Wi-Fi signal data.

[0081] In order to obtain the corresponding Wi-Fi signal data, the Bluetooth module is controlled in the embodiment of this specification to scan the effective Wi-Fi module based on the data request command to obtain the corresponding Wi-Fi signal data. For example, in a certain application scenario, the current iOS device will generate an instruction to scan Wi-Fi according to the application, and then send an instruction to obtain the scan Wi-Fi through the Bluetooth module to request the relevant data of the Wi-Fi signal. Then, after the Wi-Fi module receives the command to obtain data, it collects the relevant information of the Wi-Fi signal and sends the collected Wi-Fi signal data to the Bluetooth module through the serial port. Using the Bluetooth module as an intermediary, the iOS device only needs to communicate with the Bluetooth module, and the Bluetooth module is responsible for the actual Wi-Fi scanning work, thereby achieving the effect of executing the Wi-Fi module during the running time of the Bluetooth module, which can easily realize the collaborative work between multiple devices and improve the overall performance of the system.

[0082] Specifically, in one or more embodiments of the present specification, controlling the Bluetooth module to scan the valid Wi-Fi module based on the data request command to obtain the corresponding Wi-Fi signal data specifically includes the following process:

[0083] First, the data request command is parsed to determine the data source and task condition restriction information corresponding to the data request command. Then, the list of scanned Wi-Fi modules located in the Bluetooth module is determined according to the data source, and the existing Wi-Fi signal basic data belonging to the valid Wi-Fi module. Then, based on the existing Wi-Fi signal basic data, it is determined that the existing Wi-Fi module returns the first Wi-Fi signal data of the Bluetooth module, and the first Wi-Fi signal data is filtered based on the task condition restriction information to obtain the second Wi-Fi signal data. According to the data source and task condition restriction information, the Wi-Fi modules within the preset range of the Bluetooth module are scanned to determine the third Wi-Fi signal data that meets the requirements in the remaining Wi-Fi modules of the valid Wi-Fi module; wherein the remaining Wi-Fi modules are valid Wi-Fi modules excluding the existing Wi-Fi signal basic data. Then, the second Wi-Fi signal data and the third Wi-Fi signal data are summarized to obtain the corresponding Wi-Fi signal data. By first checking the list of Wi-Fi modules that have been scanned and stored by the Bluetooth module, repeated scanning of known and qualified valid Wi-Fi modules can be avoided. This significantly reduces the scanning time and improves the efficiency of data acquisition. Repeated scanning of known and qualified valid Wi-Fi modules can be avoided. This significantly reduces the scanning time and improves the efficiency of data acquisition. When acquiring Wi-Fi signal data, the first Wi-Fi signal data is filtered by the task condition restriction information to ensure that only data that meets specific conditions is retained. This filtering mechanism improves the accuracy and relevance of the data. In addition to using the existing basic Wi-Fi signal data, the remaining Wi-Fi modules within the preset range of the Bluetooth module are scanned to obtain new qualified Wi-Fi signal data to ensure full coverage and integrity of the data, so that users can obtain as comprehensive Wi-Fi environment information as possible. By flexibly adjusting the scanning strategy and data processing process according to different task condition restriction information, it adapts to different application scenarios and needs, and has high scalability and flexibility.

[0084] S105: Acquire a data frame after the Wi-Fi signal data is encapsulated by the Bluetooth module, and parse the data frame based on the current iOS device to obtain the Wi-Fi signal data corresponding to the current task information.

[0085] After obtaining Wi-Fi signal data with the help of the Bluetooth module based on the above steps, the embodiment of this specification will obtain the data frame after the Wi-Fi signal data is encapsulated according to the Bluetooth module, so as to parse the data frame based on the current iOS device to obtain the Wi-Fi signal data corresponding to the current task information. That is, in a certain scenario, the Bluetooth module will parse the Wi-Fi information field, and obtain different Wi-Fi data according to different fields, such as Wi-Fi name (SSID), IP address, signal strength, Wi-Fi protocol, Wi-Fi frequency band, encryption method, negotiation rate, etc., and then transmit it to the current iOS device. The current iOS device distinguishes and displays the signal strength to different degrees, such as different colors or icons to distinguish the signal strength, so that users can easily identify the signal strength, greater than -40dBm: extremely strong signal, less than or equal to -40dBm and greater than -60dBm: strong signal, less than or equal to -60dBm and greater than -80dBm: weak signal, less than or equal to -80dBm: extremely weak signal.

[0086] Specifically, in one or more embodiments of the present specification, obtaining a data frame after encapsulating Wi-Fi signal data according to a Bluetooth module, and parsing the data frame based on a current iOS device to obtain Wi-Fi signal data corresponding to current task information specifically includes the following process:

[0087] First, based on the preset encapsulation tool, the Wi-Fi signal data obtained by the Bluetooth module is converted into a preset data format for encapsulation to obtain an encapsulated data frame. It should be noted that the preset data format is in JSON format. Then, according to the preset Bluetooth standard protocol, the encapsulated data frame is sent to the current iOS device. Then, the initial Wi-Fi signal data after the current iOS device parses the data frame is obtained, and the initial Wi-Fi signal data is secondary screened according to the current task information to obtain the Wi-Fi signal data corresponding to the current task information. After the Bluetooth module receives the Wi-Fi signal data, it encapsulates the data into a string form. The data is converted into JSON format or other string formats for easy transmission and parsing. Then the Bluetooth module sends the encapsulated data to the connected iOS device through the Bluetooth protocol. Bluetooth standard protocols such as Bluetooth Low Energy (BLE) are used for data transmission. The iOS device receives the data transmitted by the Bluetooth module. The received string data is processed and parsed to extract the relevant information of the Wi-Fi signal. The parsing process includes parsing the instruction type to ensure that it is Wi-Fi list data. Check the data length to ensure data integrity. Perform CRC check to ensure the correctness of the data.

[0088] like Figure 2As shown, the embodiment of this specification provides a schematic diagram of the internal structure of a device in which a Bluetooth module and a Wi-Fi module work together. Figure 2 It can be seen that in one or more embodiments of this specification, a device for collaborative working of a Bluetooth module and a Wi-Fi module includes:

[0089] at least one processor; and,

[0090] a memory communicatively connected to the at least one processor; wherein,

[0091] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: execute any of the above-mentioned methods.

[0092] like Figure 3 As shown, the present specification provides a schematic diagram of the structure of a non-volatile storage medium. Figure 3 It can be seen that in one or more embodiments of the present specification, a non-volatile storage medium stores computer-executable instructions, and the computer-executable instructions can: execute any of the methods described above.

[0093] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0094] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0095] The above description is only one or more embodiments of this specification and is not intended to limit this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included in the scope of the claims of this specification.

Claims

1. A method for collaborative working of a Bluetooth module and a Wi-Fi module, It is characterized in that The method comprises: Determine a Bluetooth module and at least one Wi-Fi module corresponding to the current iOS device, and establish a communication connection between the Bluetooth module and the at least one Wi-Fi module based on a preset physical serial port; Obtaining the performance test results of the Wi-Fi module and the Bluetooth module, and the connection status of the communication connection, to update the communication connection according to the performance test results and the connection status, so as to obtain the effective communication connection between the effective Bluetooth module and the effective Wi-Fi module corresponding to the current iOS device; Determine current task information corresponding to the current iOS device, and generate a corresponding data request command based on the data demand corresponding to the current task information; Controlling the Bluetooth module to scan the valid Wi-Fi module based on the data request command to obtain corresponding Wi-Fi signal data; A data frame is obtained after the Wi-Fi signal data is encapsulated according to the Bluetooth module, so as to parse the data frame based on the current iOS device to obtain the Wi-Fi signal data corresponding to the current task information.

2. The method for collaborative working of a Bluetooth module and a Wi-Fi module according to claim 1, It is characterized in that The determining of the Bluetooth module and at least one Wi-Fi module corresponding to the current iOS device to establish a communication connection between the Bluetooth module and the at least one Wi-Fi module based on a preset physical serial port specifically includes: Obtain the configuration interface corresponding to the initial Bluetooth module and the initial Wi-Fi module of the current iOS device, and verify whether the physical connection and logic level of the initial Bluetooth module and the initial Wi-Fi module match according to the pin connection corresponding to the configuration interface; If yes, the communication parameters of the initial Bluetooth module and the initial Wi-Fi module are initialized and configured according to the preset configuration information; wherein the preset configuration information includes: bit rate parameters, data format, hardware control flow information and software control flow information; Sending the preset test data to the initialized Wi-Fi module based on the Bluetooth module after the initialization configuration, so as to determine the Bluetooth module and the Wi-Fi module of the current iOS device that pass the test according to the preset test data received by the Wi-Fi module after the initialization configuration; According to the physical connection corresponding to the Bluetooth module and the Wi-Fi module of the current iOS device and the communication parameters, a communication connection between the Bluetooth module and the Wi-Fi module is established.

3. The method for collaborative working of a Bluetooth module and a Wi-Fi module according to claim 1, It is characterized in that Obtaining the performance test results of the Wi-Fi module and the Bluetooth module, specifically including: Obtaining basic information of the current iOS device, the Wi-Fi module, and the Bluetooth module, extracting key data from the basic information according to historical performance test items of the Wi-Fi module and the Bluetooth module, and obtaining performance test keywords; Determine the test performance parameters and test subjects corresponding to each of the performance test keywords based on the historical performance test items, group the performance test keywords according to the test subjects and the test performance parameters, and obtain performance test keyword classification groups corresponding to each test performance parameter of each test subject; Based on the preset prompt word framework corresponding to the matching of the test subject and the test performance parameter, the performance test keyword classification group is filled into the preset prompt word framework according to the labels corresponding to each position in the preset prompt word framework to obtain the performance test prompt word; Input the performance test prompt word into a preset universal large model to obtain a Wi-Fi test code corresponding to the Wi-Fi module and a Bluetooth test code corresponding to the Bluetooth module; Execute the Wi-Fi test code and the Bluetooth test code to collect first performance data of the Wi-Fi module and second performance data of the Bluetooth module; wherein the first performance data includes: signal strength and transmission speed; the second performance data includes: power consumption data, transmission rate, transmission distance and receiving sensitivity; The first performance data is compared with a preset first performance data range to determine a first performance test result corresponding to the Wi-Fi module, and the second performance data is compared with a preset second performance data range to determine a second performance test result corresponding to the Bluetooth module.

4. The method for collaborative working of a Bluetooth module and a Wi-Fi module according to claim 3, It is characterized in that The communication connection is updated according to the performance test result and the connection state to obtain a valid communication connection between a valid Bluetooth module and a valid Wi-Fi module corresponding to the current iOS device, specifically including: According to the first performance test result and the second performance test result, the Bluetooth module and the Wi-Fi module are screened respectively to determine a valid Wi-Fi module within the preset first performance data range and a valid Bluetooth module within the preset second performance data range; Determine an initial valid communication connection corresponding to the valid Bluetooth module and the valid Wi-Fi module within the communication connection; According to the connection status corresponding to each of the initial valid communication connections, the initial valid communication connections are screened to determine the valid communication connections between the valid Bluetooth module and the valid Wi-Fi module corresponding to the current iOS device; wherein the connection status includes: connected state, unconnected state, and disconnected state.

5. The method for collaborative working of a Bluetooth module and a Wi-Fi module according to claim 1, It is characterized in that Determining the current task information corresponding to the current iOS device to generate a corresponding data request command based on the data demand corresponding to the current task information specifically includes: Determine the current task information corresponding to the current iOS device based on the user interaction information of the current iOS device and the running information of the application; Determine the task condition restriction information in the current task information and the data source corresponding to each of the task condition restriction information; wherein the task condition restriction information includes: data type, data format, and data range; Reconstructing the current task information according to the corresponding relationship between the task condition restriction information and the data source corresponding to each task condition restriction information to obtain the data requirement corresponding to the current task information; A matching request method is determined based on the data demand, so as to combine the data demand according to the request method to obtain a corresponding data request command.

6. The method for collaborative working of a Bluetooth module and a Wi-Fi module according to claim 1, It is characterized in that Controlling the Bluetooth module to scan the valid Wi-Fi module based on the data request command to obtain corresponding Wi-Fi signal data specifically includes: Parsing the data request command to determine the data source and task condition restriction information corresponding to the data request command; Determine a list of scanned Wi-Fi modules located in the Bluetooth module according to the data source, and basic data of existing Wi-Fi signals belonging to the valid Wi-Fi modules; Determine, based on the existing Wi-Fi signal basic data, that the existing Wi-Fi module returns first Wi-Fi signal data to the Bluetooth module, and filter the first Wi-Fi signal data based on the task condition restriction information to obtain second Wi-Fi signal data; Scan the Wi-Fi modules within the preset range of the Bluetooth module according to the data source and the task condition restriction information to determine the third Wi-Fi signal data that meets the requirements among the remaining Wi-Fi modules of the valid Wi-Fi modules; wherein the remaining Wi-Fi modules are valid Wi-Fi modules without the existing Wi-Fi signal basic data; The second Wi-Fi signal data and the third Wi-Fi signal data are aggregated to obtain corresponding Wi-Fi signal data.

7. The method for collaborative working of a Bluetooth module and a Wi-Fi module according to claim 1, It is characterized in that The acquiring of the data frame after the Wi-Fi signal data is encapsulated by the Bluetooth module, so as to parse the data frame based on the current iOS device to obtain the Wi-Fi signal data corresponding to the current task information, specifically includes: Based on a preset encapsulation tool, the Wi-Fi signal data acquired by the Bluetooth module is converted into a preset data format for encapsulation to obtain an encapsulated data frame; wherein the preset data format is a JSON format; According to a preset Bluetooth standard protocol, the encapsulated data frame is sent to the current iOS device; Initial Wi-Fi signal data after the current iOS device parses the data frame is obtained, and the initial Wi-Fi signal data is secondary screened according to the current task information to obtain Wi-Fi signal data corresponding to the current task information.

8. The method for collaborative working of a Bluetooth module and a Wi-Fi module according to claim 2, It is characterized in that The establishing of a communication connection between the Bluetooth module and the Wi-Fi module according to the physical connection corresponding to the Bluetooth module and the Wi-Fi module of the current iOS device and the communication parameters specifically includes: Generate a communication connection command based on the network identifier and connection password of the Wi-Fi module; Sending the communication connection command to the Wi-Fi module based on the Bluetooth module according to the physical connection and the communication parameters, and determining confirmation information returned by the Wi-Fi module; According to the confirmation information, a communication connection is determined that the Bluetooth module is successfully connected to the Wi-Fi module.

9. A device that cooperates with a Bluetooth module and a Wi-Fi module. It is characterized in that The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can: execute any of the methods described in claims 1-8.

10. A non-volatile storage medium storing computer executable instructions, It is characterized in that The computer executable instructions are capable of executing the method described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Bluetooth-based WI-FI connection and communication method and system

    CN105592409A

  • Wireless fidelity (Wi-Fi) connection method and electronic equipment

    CN118474712A

  • Internet intelligent house control system based on bluetooth and WIFI communication

    CN206057843U

  • Systems, Methods, and Devices for Handling Wi-Fi and Bluetooth Audio

    US20160359766A1