Bluetooth communication method, wearable device and system
By detecting and configuring Bluetooth communication parameters, the problem of insufficient flexibility of Bluetooth communication connections in different environments is solved, and environmental adaptation and communication efficiency are improved.
Patent Information
- Application Number
- CN202310802171.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2043-06-30
AI Technical Summary
The existing Bluetooth communication connection is relatively single and lacks flexibility, making it difficult to effectively configure and optimize communication parameters under different environmental conditions, affecting communication efficiency and quality.
By determining the target environmental parameters between the electronic device and the wearable device, detecting whether the preset conditions are met, and configuring Bluetooth communication parameters according to the environmental parameters, establishing an adapted connection to improve communication efficiency and flexibility.
When specific environmental conditions are met, appropriate Bluetooth communication parameters are configured to improve the flexibility and efficiency of Bluetooth communication and ensure communication quality and security.
Smart Images

Figure CN116782191B
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a Bluetooth communication method, wearable device and system. Background Art
[0002] With the rapid development of science and technology, Bluetooth technology is becoming more and more popular. It is a wireless technology standard that enables short-distance data exchange between fixed devices, mobile devices and building personal area networks (using UHF radio waves in the ISM band of 2.4 to 2.485 GHz). Bluetooth technology greatly facilitates the interaction between wearable devices and other electronic devices. At present, Bluetooth communication connections are relatively simple and not flexible enough. Therefore, the problem of how to improve the flexibility of Bluetooth communication needs to be solved urgently. Summary of the invention
[0003] The embodiments of the present application provide a Bluetooth communication method, a wearable device, and a system, which help to improve the flexibility of Bluetooth communication.
[0004] In a first aspect, an embodiment of the present application provides a Bluetooth communication method, which is applied to a wearable device, and the method includes:
[0005] Determining target environment parameters of the electronic device and the wearable device;
[0006] Detecting whether the target environmental parameters meet preset conditions;
[0007] When the target environment parameter satisfies the preset condition, determining a target Bluetooth configuration parameter between the electronic device and the wearable device according to the target environment parameter;
[0008] A Bluetooth communication connection is established between the electronic device and the wearable device according to the target Bluetooth configuration parameters.
[0009] In a second aspect, an embodiment of the present application provides a Bluetooth communication device, wherein the wearable device comprises: a first determination unit, a detection unit, a second determination unit and a connection unit, wherein:
[0010] The first determining unit is used to determine target environment parameters of the electronic device and the wearable device;
[0011] The detection unit is used to detect whether the target environmental parameters meet the preset conditions;
[0012] The second determining unit is used to determine the target Bluetooth configuration parameters between the electronic device and the wearable device according to the target environment parameters when the target environment parameters meet the preset conditions;
[0013] The connection unit is used to establish a Bluetooth communication connection between the electronic device and the wearable device according to the target Bluetooth configuration parameters.
[0014] In a third aspect, an embodiment of the present application provides a wearable device, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps in the first aspect of the embodiment of the present application.
[0015] In a fourth aspect, an embodiment of the present application provides a Bluetooth communication system, which may include a wearable device and an electronic device as described in the third aspect.
[0016] The implementation of the embodiments of the present application has the following beneficial effects:
[0017] It can be seen that the Bluetooth communication method, wearable device and system described in the embodiments of the present application are applied to wearable devices to determine the target environmental parameters of the electronic device and the wearable device, detect whether the target environmental parameters meet the preset conditions, and when the target environmental parameters meet the preset conditions, determine the target Bluetooth configuration parameters between the electronic device and the wearable device according to the target environmental parameters, and establish a Bluetooth communication connection between the electronic device and the wearable device according to the target Bluetooth configuration parameters. Furthermore, when the environment between the electronic device and the wearable device meets certain conditions, Bluetooth configuration parameters adapted to the environment can be configured, and further, Bluetooth communication efficiency suitable for the environment can be obtained, which helps to improve the flexibility of Bluetooth communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 It is a flowchart of a Bluetooth communication method provided by an embodiment of the present application;
[0020] Figure 2 It is a flowchart of another Bluetooth communication method provided in an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of the structure of a wearable device provided in an embodiment of the present application;
[0022] Figure 4 is a schematic diagram of the structure of another wearable device provided in an embodiment of the present application;
[0023] Figure 5 It is a block diagram of the functional units of a Bluetooth communication system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0025] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0026] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0027] In the embodiment of the present application, the wearable device may include at least one of the following: a smart watch, a smart bracelet, smart glasses, etc., which are not limited here. The electronic device may be any device with a Bluetooth communication function, and the electronic device may include at least one of the following: a smart phone, a tablet computer, a driving recorder, a navigator, a notebook, etc., which are not limited here.
[0028] The following is a detailed description of the embodiments of the present application.
[0029] See also Figure 1 , Figure 1 This is a flowchart of a Bluetooth communication method provided in an embodiment of the present application, which is applied to a wearable device and may include the following steps:
[0030] 101. Determine target environment parameters of the electronic device and the wearable device.
[0031] In the embodiments of the present application, the environment between the electronic device and the wearable device directly affects the security, communication quality, and communication efficiency of the Bluetooth connection.
[0032] In an embodiment of the present application, the target environment parameters may include at least one of the following: a target distance between the electronic device and the wearable device, a target magnetic field interference parameter between the electronic device and the wearable device, a target environment safety parameter between the electronic device and the wearable device, etc., which are not limited here. Among them, the target magnetic field interference parameter can be determined by the magnetic field interference parameter of at least one of the wearable device and the electronic device, and the target environment safety parameter can be determined by the environment safety parameter of at least one of the wearable device and the electronic device.
[0033] Optionally, when the target environment parameter includes the target environment safety parameter, the above step 101, determining the target environment parameters of the electronic device and the wearable device, may include the following steps:
[0034] 11. Obtain a first geographic location and a first environmental noise parameter of the wearable device;
[0035] 12. Acquire a second geographical location and a second environmental noise parameter of the electronic device;
[0036] 13. Determine a first environmental safety parameter corresponding to the first geographical location;
[0037] 14. Determine a second environmental safety parameter corresponding to the second geographical location;
[0038] 15. Determine a first weight corresponding to the first environmental safety parameter;
[0039] 16. Determine a second weight corresponding to the second environmental safety parameter;
[0040] 17. Perform a weighted operation on the first environmental security parameter, the second environmental security parameter, the first weight, and the second weight to obtain the target environmental security parameter.
[0041] In the embodiment of the present application, since the wearable device and the electronic device are usually very close to each other, in order to distinguish the positions of the two, indoor positioning technology can be used to achieve positioning. In addition, since the positions of the two are different, the environmental noise parameters are also different. In a specific implementation, the first geographic location and the first environmental noise parameter of the wearable device can be obtained, and the second geographic location and the second environmental noise parameter of the electronic device can also be obtained. The mapping relationship between the geographic location and the environmental safety parameter can be pre-set, and then, based on the mapping relationship, the first environmental safety parameter corresponding to the first geographic location can be determined, and the second environmental safety parameter corresponding to the second geographic location can be determined.
[0042] In a specific implementation, the first weight can be bound to the wearable device, the second weight can be bound to the electronic device, and both the first weight and the second weight can be preset. Both the first weight and the second weight are between 0 and 1.
[0043] Furthermore, the first weight corresponding to the first environment security parameter can be determined, the second weight corresponding to the second environment security parameter can be determined, and then the first environment security parameter, the second environment security parameter, the first weight and the second weight are weighted to obtain the target environment security parameter. Specifically, the target environment security parameter = first environment security parameter * first weight + second environment security parameter * second weight.
[0044] 102. Detect whether the target environmental parameters meet preset conditions.
[0045] Among them, the preset conditions can be pre-set or system default.
[0046] Optionally, the target environment parameter includes a target distance between the electronic device and the wearable device; the above step 102, detecting whether the target environment parameter meets a preset condition, may include the following steps:
[0047] 21. Detect whether the target distance is within a preset distance range;
[0048] 22. When the target distance is within the preset distance range, confirming that the target environment parameter meets the preset condition;
[0049] 23. When the target distance is not within the preset distance range, confirm that the target environment parameter does not meet the preset condition.
[0050] The preset distance range may be preset or set by system default. The target environment parameter may include a target distance between the electronic device and the wearable device.
[0051] In a specific implementation, it is possible to detect whether the target distance is within a preset distance range. If the target distance is within the preset distance range, it is possible to confirm that the target environmental parameters meet the preset conditions. If the target distance is not within the preset distance range, it is confirmed that the target environmental parameters do not meet the preset conditions. That is, only when the distance between the two devices is within a certain distance range, a Bluetooth connection is allowed. In this way, the quality of the Bluetooth connection can be guaranteed, which helps to improve communication efficiency.
[0052] 103. When the target environment parameter meets the preset condition, determine the target Bluetooth configuration parameter between the electronic device and the wearable device according to the target environment parameter.
[0053] In a specific implementation, the target Bluetooth configuration parameters may include at least one of the following: Bluetooth communication protocol, communication frequency band, communication bandwidth, network rate, etc., which are not limited here.
[0054] In a specific implementation, when the target environment parameters meet the preset conditions, it means that the Bluetooth connection between the wearable device and the electronic device is allowed.
[0055] In an embodiment of the present application, a mapping relationship between preset environmental parameters and Bluetooth configuration parameters can be pre-set, and then, based on the mapping relationship, the target Bluetooth configuration parameters between the electronic device corresponding to the target environmental parameters and the wearable device can be determined.
[0056] Optionally, the target environment parameters further include target magnetic field interference parameters and target environment safety parameters; the above step 103, determining the target Bluetooth configuration parameters between the electronic device and the wearable device according to the target environment parameters, may include the following steps:
[0057] 31. Determine a target Bluetooth protocol configuration parameter corresponding to the target environment security parameter;
[0058] 32. Determine a reference Bluetooth communication control parameter corresponding to the target distance;
[0059] 33. Determine a target adjustment parameter corresponding to the target magnetic field interference parameter;
[0060] 34. Adjust the reference Bluetooth communication control parameter according to the target adjustment parameter to obtain a target Bluetooth communication control parameter;
[0061] 35. Determine the target Bluetooth configuration parameters according to the target Bluetooth protocol configuration parameters and the target Bluetooth communication control parameters.
[0062] In a specific implementation, the Bluetooth communication control parameters may include at least one of the following: communication power, communication frequency band, communication bandwidth, network rate, etc., which are not limited here.
[0063] In an embodiment of the present application, a mapping relationship between preset environmental safety parameters and Bluetooth protocol configuration parameters can be pre-set, and then, based on the mapping relationship, the target Bluetooth protocol configuration parameters corresponding to the target environmental safety parameters can be determined. In addition, a mapping relationship between a preset distance and Bluetooth communication control parameters can be pre-set, and the reference Bluetooth communication control parameters corresponding to the target distance can be determined based on the mapping relationship.
[0064] In addition, a mapping relationship between preset magnetic field interference parameters and adjustment parameters can be pre-set, and then, the target adjustment parameters corresponding to the target magnetic field interference parameters can be determined based on the mapping relationship. Then, the reference Bluetooth communication control parameters can be adjusted according to the target adjustment parameters to obtain the target Bluetooth communication control parameters. In this way, Bluetooth communication control parameters that can achieve anti-interference effects can be obtained, and then the target Bluetooth configuration parameters can be determined based on the target Bluetooth protocol configuration parameters and the target Bluetooth communication control parameters. In this way, on the basis of ensuring security, a Bluetooth communication effect with anti-interference effects can be achieved, which helps to improve the flexibility of Bluetooth communication.
[0065] 104. Establish a Bluetooth communication connection between the electronic device and the wearable device according to the target Bluetooth configuration parameters.
[0066] In the embodiment of the present application, a Bluetooth communication connection can be established between the electronic device and the wearable device according to the target Bluetooth configuration parameters. As a result, on the basis of ensuring security, an anti-interference Bluetooth communication effect can be achieved, which helps to improve the flexibility of Bluetooth communication.
[0067] Optionally, the following steps may also be included:
[0068] S1, obtaining content to be transmitted between the electronic device and the wearable device;
[0069] S2. Obtain target attribute information of the content to be transmitted;
[0070] S3, determining a first transmission control parameter corresponding to the target attribute information;
[0071] S4, determining a target distance change parameter between the electronic device and the wearable device;
[0072] S5, optimizing the first transmission control parameter according to the target distance change parameter to obtain a second transmission control parameter;
[0073] S6. Transmit the content to be transmitted using the second transmission control parameter.
[0074] In an embodiment of the present application, the target attribute information may include at least one of the following: keywords, the format of the content to be transmitted, the memory size of the content to be transmitted, the source of the content to be transmitted, the security level of the content to be transmitted, etc., which are not limited here.
[0075] In a specific implementation, the content to be transmitted between the electronic device and the wearable device can be obtained, and the target attribute information of the content to be transmitted can also be obtained. The mapping relationship between the attribute information and the transmission control parameters can be pre-set. The transmission control parameters may include at least one of the following: transmission rate, transmission protocol, packaging protocol, etc., which are not limited here. Furthermore, the first transmission control parameter corresponding to the target attribute information can be determined based on the mapping relationship.
[0076] Furthermore, the target distance change parameter between the electronic device and the wearable device can also be determined. For example, multiple distance values between the electronic device and the wearable device in a preset time period can be obtained, and the target mean square error of the multiple distance values can be determined. The target mean square error is used as the target distance change parameter. The preset time period can be pre-set or system default.
[0077] Furthermore, according to the mapping relationship between the preset distance change parameter and the optimization factor, the target optimization factor corresponding to the target distance change parameter can be determined based on the mapping relationship, and the first transmission control parameter can be optimized based on the target optimization factor to obtain the second transmission control parameter, and the content to be transmitted can be transmitted through the second transmission control parameter. Furthermore, based on the distance change between the electronic device and the wearable device, the transmission control parameters of the electronic device and the wearable device can be optimized, so that the optimized transmission control parameters can adapt to the distance change between the electronic device and the wearable device. In this way, during the distance change between the electronic device and the wearable device, data transmission can be ensured not to be affected, thereby improving data transmission efficiency.
[0078] It can be seen that the Bluetooth communication method described in the embodiment of the present application is applied to a wearable device to determine the target environmental parameters of the electronic device and the wearable device, detect whether the target environmental parameters meet the preset conditions, and when the target environmental parameters meet the preset conditions, determine the target Bluetooth configuration parameters between the electronic device and the wearable device according to the target environmental parameters, and establish a Bluetooth communication connection between the electronic device and the wearable device according to the target Bluetooth configuration parameters. Furthermore, when the environment between the electronic device and the wearable device meets certain conditions, Bluetooth configuration parameters adapted to the environment can be configured, and thereby, a Bluetooth communication efficiency suitable for the environment can be obtained, which helps to improve the flexibility of Bluetooth communication. On the other hand, based on the change in the distance between the electronic device and the wearable device, the transmission control parameters of the electronic device and the wearable device can be optimized, so that the optimized transmission control parameters can adapt to the change in the distance between the electronic device and the wearable device. In this way, data transmission can be ensured to be unaffected during the change in the distance between the electronic device and the wearable device, thereby improving data transmission efficiency.
[0079] See also Figure 2 , Figure 2It is a flowchart of another Bluetooth communication method provided in an embodiment of the present application, which is applied to a wearable device and may include the following steps:
[0080] 201 determines target environment parameters of the electronic device and the wearable device.
[0081] 202. Detect whether the target environmental parameters meet preset conditions.
[0082] 203. When the target environment parameter meets the preset condition, determine the target Bluetooth configuration parameter between the electronic device and the wearable device according to the target environment parameter.
[0083] 204. Establish a Bluetooth communication connection between the electronic device and the wearable device according to the target Bluetooth configuration parameters.
[0084] 205. Obtain content to be transmitted between the electronic device and the wearable device.
[0085] 206. Obtain target attribute information of the content to be transmitted.
[0086] 207. Determine a first transmission control parameter corresponding to the target attribute information.
[0087] 208. Determine a target distance change parameter between the electronic device and the wearable device.
[0088] 209. Optimize the first transmission control parameter according to the target distance change parameter to obtain a second transmission control parameter.
[0089] 210. Transmit the content to be transmitted using the second transmission control parameter.
[0090] The specific description of the above steps 201 to 210 can refer to Figure 1 The relevant description of the Bluetooth communication method is not limited here.
[0091] It can be seen that the Bluetooth communication method described in the embodiment of the present application is applied to a wearable device, determines the target environmental parameters of the electronic device and the wearable device, detects whether the target environmental parameters meet the preset conditions, and when the target environmental parameters meet the preset conditions, determines the target Bluetooth configuration parameters between the electronic device and the wearable device according to the target environmental parameters, establishes a Bluetooth communication connection between the electronic device and the wearable device according to the target Bluetooth configuration parameters, obtains the content to be transmitted between the electronic device and the wearable device, obtains the target attribute information of the content to be transmitted, determines the first transmission control parameter corresponding to the target attribute information, determines the target distance change parameter between the electronic device and the wearable device, optimizes the first transmission control parameter according to the target distance change parameter, obtains the second transmission control parameter, and transmits the content to be transmitted through the second transmission control parameter. Furthermore, on the one hand, when the environment between the electronic device and the wearable device meets certain conditions, the Bluetooth configuration parameters adapted to the environment can be configured, and then, the Bluetooth communication efficiency suitable for the environment can be obtained, which helps to improve the flexibility of Bluetooth communication.
[0092] In accordance with the above embodiment, please refer to Figure 3 , Figure 3 : is a structural diagram of a wearable device provided in an embodiment of the present application. As shown in the figure, the wearable device includes a processor, a memory, a communication interface, and one or more programs. The one or more programs are stored in the memory and configured to be executed by the processor. In the embodiment of the present application, the program includes instructions for executing the following steps:
[0093] Determining target environment parameters of the electronic device and the wearable device;
[0094] Detecting whether the target environmental parameters meet preset conditions;
[0095] When the target environment parameter satisfies the preset condition, determining a target Bluetooth configuration parameter between the electronic device and the wearable device according to the target environment parameter;
[0096] A Bluetooth communication connection is established between the electronic device and the wearable device according to the target Bluetooth configuration parameters.
[0097] Optionally, the target environmental parameter includes a target distance between the electronic device and the wearable device; in terms of detecting whether the target environmental parameter satisfies a preset condition, the program includes instructions for executing the following steps:
[0098] Detecting whether the target distance is within a preset distance range;
[0099] When the target distance is within the preset distance range, confirming that the target environment parameter satisfies the preset condition;
[0100] When the target distance is not within the preset distance range, it is confirmed that the target environment parameter does not satisfy the preset condition.
[0101] Optionally, the target environment parameters also include target magnetic field interference parameters and target environment safety parameters;
[0102] In terms of determining the target Bluetooth configuration parameters between the electronic device and the wearable device according to the target environment parameters, the program includes instructions for performing the following steps:
[0103] Determining target Bluetooth protocol configuration parameters corresponding to the target environment security parameters;
[0104] determining a reference Bluetooth communication control parameter corresponding to the target distance;
[0105] Determining a target adjustment parameter corresponding to the target magnetic field interference parameter;
[0106] Adjusting the reference Bluetooth communication control parameter according to the target adjustment parameter to obtain a target Bluetooth communication control parameter;
[0107] The target Bluetooth configuration parameters are determined according to the target Bluetooth protocol configuration parameters and the target Bluetooth communication control parameters.
[0108] Optionally, when the target environment parameter includes the target environment safety parameter, in determining the target environment parameters of the electronic device and the wearable device, the program includes instructions for performing the following steps:
[0109] Acquire a first geographic location and a first environmental noise parameter of the wearable device;
[0110] Acquire a second geographical location and a second environmental noise parameter of the electronic device;
[0111] Determining a first environmental safety parameter corresponding to the first geographical location;
[0112] determining a second environmental safety parameter corresponding to the second geographical location;
[0113] Determining a first weight corresponding to the first environmental safety parameter;
[0114] Determining a second weight corresponding to the second environmental safety parameter;
[0115] The first environmental security parameter, the second environmental security parameter, the first weight, and the second weight are weighted to obtain the target environmental security parameter.
[0116] Optionally, the program further includes instructions for executing the following steps:
[0117] Acquire content to be transmitted between the electronic device and the wearable device;
[0118] Acquire target attribute information of the content to be transmitted;
[0119] Determining a first transmission control parameter corresponding to the target attribute information;
[0120] Determining a target distance change parameter between the electronic device and the wearable device;
[0121] Optimizing the first transmission control parameter according to the target distance variation parameter to obtain a second transmission control parameter;
[0122] The content to be transmitted is transmitted using the second transmission control parameter.
[0123] It can be seen that the wearable device described in the embodiment of the present application determines the target environment parameters of the electronic device and the wearable device, detects whether the target environment parameters meet the preset conditions, and when the target environment parameters meet the preset conditions, determines the target Bluetooth configuration parameters between the electronic device and the wearable device according to the target environment parameters, and establishes a Bluetooth communication connection between the electronic device and the wearable device according to the target Bluetooth configuration parameters. Furthermore, when the environment between the electronic device and the wearable device meets certain conditions, Bluetooth configuration parameters adapted to the environment can be configured, and further, Bluetooth communication efficiency suitable for the environment can be obtained, which helps to improve the flexibility of Bluetooth communication.
[0124] Figure 4 4 is a functional unit block diagram of another wearable device 400 involved in an embodiment of the present application. The wearable device 400 includes: a first determination unit 401, a detection unit 402, a second determination unit 403 and a connection unit 404, wherein:
[0125] The first determining unit 401 is used to determine target environment parameters of the electronic device and the wearable device;
[0126] The detection unit 402 is used to detect whether the target environmental parameters meet the preset conditions;
[0127] The second determining unit 403 is used to determine the target Bluetooth configuration parameters between the electronic device and the wearable device according to the target environment parameters when the target environment parameters meet the preset conditions;
[0128] The connection unit 404 is used to establish a Bluetooth communication connection between the electronic device and the wearable device according to the target Bluetooth configuration parameters.
[0129] Optionally, the target environment parameter includes a target distance between the electronic device and the wearable device; in terms of detecting whether the target environment parameter satisfies a preset condition, the detection unit 401 is specifically used to:
[0130] Detecting whether the target distance is within a preset distance range;
[0131] When the target distance is within the preset distance range, confirming that the target environment parameter satisfies the preset condition;
[0132] When the target distance is not within the preset distance range, it is confirmed that the target environment parameter does not satisfy the preset condition.
[0133] Optionally, the target environment parameters also include target magnetic field interference parameters and target environment safety parameters;
[0134] In determining the target Bluetooth configuration parameters between the electronic device and the wearable device according to the target environment parameters, the second determining unit 403 is specifically used to:
[0135] Determining target Bluetooth protocol configuration parameters corresponding to the target environment security parameters;
[0136] determining a reference Bluetooth communication control parameter corresponding to the target distance;
[0137] Determining a target adjustment parameter corresponding to the target magnetic field interference parameter;
[0138] Adjusting the reference Bluetooth communication control parameter according to the target adjustment parameter to obtain a target Bluetooth communication control parameter;
[0139] The target Bluetooth configuration parameters are determined according to the target Bluetooth protocol configuration parameters and the target Bluetooth communication control parameters.
[0140] Optionally, when the target environment parameter includes the target environment safety parameter, in determining the target environment parameters of the electronic device and the wearable device, the first determining unit 401 is specifically used to:
[0141] Acquire a first geographic location and a first environmental noise parameter of the wearable device;
[0142] Acquire a second geographical location and a second environmental noise parameter of the electronic device;
[0143] Determining a first environmental safety parameter corresponding to the first geographical location;
[0144] determining a second environmental safety parameter corresponding to the second geographical location;
[0145] Determining a first weight corresponding to the first environmental safety parameter;
[0146] Determining a second weight corresponding to the second environmental safety parameter;
[0147] The first environmental security parameter, the second environmental security parameter, the first weight, and the second weight are weighted to obtain the target environmental security parameter.
[0148] Optionally, the wearable device 400 is further specifically used for:
[0149] Acquire content to be transmitted between the electronic device and the wearable device;
[0150] Acquire target attribute information of the content to be transmitted;
[0151] Determining a first transmission control parameter corresponding to the target attribute information;
[0152] Determining a target distance change parameter between the electronic device and the wearable device;
[0153] Optimizing the first transmission control parameter according to the target distance variation parameter to obtain a second transmission control parameter;
[0154] The content to be transmitted is transmitted using the second transmission control parameter.
[0155] It can be seen that the wearable device described in the embodiment of the present application determines the target environment parameters of the electronic device and the wearable device, detects whether the target environment parameters meet the preset conditions, and when the target environment parameters meet the preset conditions, determines the target Bluetooth configuration parameters between the electronic device and the wearable device according to the target environment parameters, and establishes a Bluetooth communication connection between the electronic device and the wearable device according to the target Bluetooth configuration parameters. Furthermore, when the environment between the electronic device and the wearable device meets certain conditions, Bluetooth configuration parameters adapted to the environment can be configured, and further, Bluetooth communication efficiency suitable for the environment can be obtained, which helps to improve the flexibility of Bluetooth communication.
[0156] It can be understood that the functions of each program module of the wearable device of this embodiment can be specifically implemented according to the method in the above method embodiment, and its specific implementation process can refer to the relevant description of the above method embodiment, which will not be repeated here.
[0157] Figure 5is a Bluetooth communication system involved in the embodiments of the present application, the Bluetooth communication system includes Figure 3 or Figure 4 The wearable device and the electronic device described can be used to implement the following based on the Bluetooth communication system: Figure 1 Or Figure 2 The described Bluetooth communication method.
[0158] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any method recorded in the above method embodiments.
[0159] The present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps of any method described in the above method embodiment. The computer program product may be a software installation package.
[0160] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0161] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0162] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0163] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0164] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0165] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.
[0166] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a magnetic disk or an optical disk, etc.
[0167] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A Bluetooth communication method, characterized in that: Applied to a wearable device, the method comprises: Determine target environmental parameters of the electronic device and the wearable device; the target environmental parameters include at least: target environmental safety parameters between the electronic device and the wearable device and target magnetic field interference parameters between the electronic device and the wearable device; the target magnetic field interference parameters are determined by magnetic field interference parameters of one of the wearable device and the electronic device; the target environmental safety parameters are determined by environmental safety parameters of at least one of the wearable device and the electronic device; Detecting whether the target environmental parameters meet preset conditions; When the target environment parameter meets the preset condition, determining the target Bluetooth configuration parameter between the electronic device and the wearable device according to the target environment parameter; the target Bluetooth configuration parameter at least includes: a Bluetooth communication protocol; Establishing a Bluetooth communication connection between the electronic device and the wearable device according to the target Bluetooth configuration parameters; Wherein, the target environment parameter also includes a target distance between the electronic device and the wearable device; and the detecting whether the target environment parameter meets a preset condition includes: Detecting whether the target distance is within a preset distance range; When the target distance is within the preset distance range, confirming that the target environment parameter satisfies the preset condition; When the target distance is not within the preset distance range, confirming that the target environment parameter does not meet the preset condition; Wherein, determining the target Bluetooth configuration parameters between the electronic device and the wearable device according to the target environment parameters includes: Determining target Bluetooth protocol configuration parameters corresponding to the target environment security parameters; determining a reference Bluetooth communication control parameter corresponding to the target distance; Determining a target adjustment parameter corresponding to the target magnetic field interference parameter; Adjusting the reference Bluetooth communication control parameter according to the target adjustment parameter to obtain a target Bluetooth communication control parameter; Determine the target Bluetooth configuration parameters according to the target Bluetooth protocol configuration parameters and the target Bluetooth communication control parameters; Wherein, when the target environment parameter includes the target environment safety parameter, determining the target environment parameters of the electronic device and the wearable device includes: Acquire a first geographic location and a first environmental noise parameter of the wearable device; Acquire a second geographical location and a second environmental noise parameter of the electronic device; Determining a first environmental safety parameter corresponding to the first geographical location; determining a second environmental safety parameter corresponding to the second geographical location; Determining a first weight corresponding to the first environmental safety parameter; Determining a second weight corresponding to the second environmental safety parameter; The first environmental security parameter, the second environmental security parameter, the first weight, and the second weight are weighted to obtain the target environmental security parameter.
2. The method according to claim 1, characterized in that The method further comprises: Acquire content to be transmitted between the electronic device and the wearable device; Acquire target attribute information of the content to be transmitted; Determining a first transmission control parameter corresponding to the target attribute information; Determining a target distance change parameter between the electronic device and the wearable device; Optimizing the first transmission control parameter according to the target distance variation parameter to obtain a second transmission control parameter; The content to be transmitted is transmitted using the second transmission control parameter.
3. A wearable device, characterized in that: The wearable device comprises: a first determining unit, a detecting unit, a second determining unit and a connecting unit, wherein: The first determining unit is used to determine target environment parameters of the electronic device and the wearable device; The detection unit is used to detect whether the target environment parameters meet preset conditions; the target environment parameters at least include: target environment safety parameters between the electronic device and the wearable device and target magnetic field interference parameters between the electronic device and the wearable device; the target magnetic field interference parameters are determined by the magnetic field interference parameters of one of the wearable device and the electronic device; the target environment safety parameters are determined by the environment safety parameters of at least one of the wearable device and the electronic device; The second determining unit is used to determine the target Bluetooth configuration parameters between the electronic device and the wearable device according to the target environment parameters when the target environment parameters meet the preset conditions; the target Bluetooth configuration parameters at least include: Bluetooth communication protocol; The connection unit is used to establish a Bluetooth communication connection between the electronic device and the wearable device according to the target Bluetooth configuration parameters; Wherein, the target environment parameter includes a target distance between the electronic device and the wearable device; in terms of detecting whether the target environment parameter meets a preset condition, the detection unit is specifically used to: Detecting whether the target distance is within a preset distance range; When the target distance is within the preset distance range, confirming that the target environment parameter satisfies the preset condition; When the target distance is not within the preset distance range, confirming that the target environment parameter does not meet the preset condition; Wherein, the target environment parameters also include target magnetic field interference parameters and target environment safety parameters; In the aspect of determining the target Bluetooth configuration parameter between the electronic device and the wearable device according to the target environment parameter, the second determining unit is specifically used to: Determining target Bluetooth protocol configuration parameters corresponding to the target environment security parameters; determining a reference Bluetooth communication control parameter corresponding to the target distance; Determining a target adjustment parameter corresponding to the target magnetic field interference parameter; Adjusting the reference Bluetooth communication control parameter according to the target adjustment parameter to obtain a target Bluetooth communication control parameter; Determine the target Bluetooth configuration parameters according to the target Bluetooth protocol configuration parameters and the target Bluetooth communication control parameters; Wherein, when the target environment parameter includes the target environment safety parameter, determining the target environment parameters of the electronic device and the wearable device includes: Acquire a first geographic location and a first environmental noise parameter of the wearable device; Acquire a second geographical location and a second environmental noise parameter of the electronic device; Determining a first environmental safety parameter corresponding to the first geographical location; determining a second environmental safety parameter corresponding to the second geographical location; Determining a first weight corresponding to the first environmental safety parameter; Determining a second weight corresponding to the second environmental safety parameter; The first environmental security parameter, the second environmental security parameter, the first weight, and the second weight are weighted to obtain the target environmental security parameter.
4. A wearable device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store one or more programs and is configured to be executed by the processor, wherein the programs include instructions for executing the steps in the method according to claim 1 or 2.
5. A Bluetooth communication system, characterized in that: The Bluetooth communication system comprises the wearable device and the electronic device as claimed in claim 4.
