Distance determination method and apparatus between bluetooth devices, electronic device, and medium

By obtaining the model information and signal strength of the Bluetooth device, and using the signal attenuation model and correction model or formula to correct the distance, the problem of inaccurate distance determination of Bluetooth devices is solved, thereby improving the accuracy and efficiency of control.

CN117269946BActive Publication Date: 2026-11-27SHENZHEN KAICONN INNOVATIVE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311149882.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-06
Publication Date
2026-11-27
Estimated Expiration
2043-09-06

AI Technical Summary

Technical Problem

Users may find it difficult to accurately determine the distance between Bluetooth devices, which affects control accuracy.

Method used

By obtaining the model information and signal strength of the Bluetooth device, distance correction information is determined using a signal attenuation model and a correction model or formula, and the distance to be measured is corrected to obtain an accurate distance.

Benefits of technology

It improves the accuracy of distance determination between Bluetooth devices, thereby enhancing the accuracy and efficiency of control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117269946B_ABST
    Figure CN117269946B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a method and device for determining the distance between Bluetooth devices, an electronic device and a medium. The method comprises: obtaining first device model information corresponding to a first device, and a preset signal transmission strength in the first device; obtaining second device model information corresponding to a second device, and a signal reception strength when the second device communicates with the first device via Bluetooth; determining a to-be-corrected distance between the first device and the second device according to the signal transmission strength and the signal reception strength; determining distance correction information corresponding to a target communication device group composed of the first device and the second device according to the first device model information and the second device model information; and correcting the to-be-corrected distance according to the distance correction information to obtain a target distance between the first device and the second device. The to-be-corrected distance is calculated according to the signal strength and corrected, which is conducive to obtaining an accurate distance between Bluetooth devices and improving the control accuracy of the Bluetooth devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of wireless communication technology, specifically to methods, apparatus, electronic devices, and media for determining the distance between Bluetooth devices. Background Technology

[0002] With the development of science and technology, Bluetooth devices are being used more and more widely. For example, when using Bluetooth locks, mobile phones and other Bluetooth devices can be used as control devices to control the unlocking of the Bluetooth lock based on Bluetooth communication. In this process, the distance between Bluetooth devices has a significant impact on unlocking time and other factors.

[0003] Currently, when using Bluetooth devices, users can only rely on their own senses to determine the distance between Bluetooth devices. For example, relying on experience and intuition to determine the distance between a mobile phone and a Bluetooth lock is not conducive to obtaining accurate distances between Bluetooth devices, and thus is not conducive to the accuracy of controlling Bluetooth devices. Summary of the Invention

[0004] This application provides a method, apparatus, electronic device, and medium for determining the distance between Bluetooth devices. It can determine the distance to be corrected based on the signal transmission strength and signal reception strength, determine distance correction information based on the first device model information and the second device model information, and correct the distance to be corrected based on the distance correction information. This is beneficial for obtaining the accurate distance between Bluetooth devices, thereby improving the accuracy of controlling Bluetooth devices.

[0005] A first aspect of this application provides a method for determining the distance between Bluetooth devices, the method comprising:

[0006] Obtain the first device model information corresponding to the first device, as well as the preset signal transmission strength in the first device;

[0007] Obtain the second device model information corresponding to the second device, and the signal reception strength when the second device communicates with the first device via Bluetooth;

[0008] The distance to be corrected between the first device and the second device is determined based on the aforementioned signal transmission strength and the aforementioned signal reception strength.

[0009] Based on the first device model information and the second device model information, the distance correction information corresponding to the target communication device group composed of the first device and the second device is determined;

[0010] Based on the aforementioned distance correction information, the distance to be corrected is corrected to obtain the target distance between the first device and the second device.

[0011] A second aspect of this application provides a distance determination device between Bluetooth devices, the device comprising:

[0012] The first data acquisition module is used to acquire the first device model information corresponding to the first device, as well as the preset signal transmission strength in the first device.

[0013] The second data acquisition module is used to acquire the second device model information corresponding to the second device, as well as the signal reception strength when the second device communicates with the first device via Bluetooth.

[0014] The distance calculation module is used to determine the distance to be corrected between the first device and the second device based on the signal transmission strength and the signal reception strength.

[0015] The correction information acquisition module is used to determine the distance correction information corresponding to the target communication device group composed of the first device and the second device based on the first device model information and the second device model information.

[0016] The distance correction module is used to correct the distance to be corrected based on the distance correction information to obtain the target distance between the first device and the second device.

[0017] In some optional embodiments, the distance calculation module described above is specifically used for:

[0018] Obtain a signal attenuation impact model to indicate the degree of signal strength attenuation in the area where the first device is located;

[0019] Based on the aforementioned signal transmission strength and signal reception strength, the distance to be corrected between the first device and the second device is determined using the aforementioned signal attenuation influence model.

[0020] In some optional embodiments, the above-mentioned correction information acquisition module is specifically used for:

[0021] Based on the first device model information and the second device model information, the target distance correction model corresponding to the target communication device group is determined from the preset correction model database. The correction model database includes multiple distance correction models corresponding to multiple communication device groups. A distance correction model corresponding to a communication device group is trained based on the historical distance information group of the communication device group under different historical signal reception strengths. The historical distance information group includes at least one historical distance to be corrected between communication devices in the communication device group and the actual distance associated with the historical distance to be corrected.

[0022] Based on the above signal reception strength and the above target distance correction model, the distance correction information corresponding to the above target communication equipment group is determined.

[0023] In some optional embodiments, the above-mentioned correction information acquisition module is specifically used for:

[0024] Based on the first device model information and the second device model information, the target distance correction formula corresponding to the target communication device group is determined from the preset correction formula database. The correction formula database includes multiple distance correction formulas corresponding to multiple communication device groups. A distance correction formula corresponding to a communication device group is obtained by fitting a set of historical distance information of the communication device group under different historical signal reception strengths. The set of historical distance information includes at least one historical distance to be corrected between communication devices in the communication device group and the actual distance associated with the historical distance to be corrected.

[0025] The distance correction information corresponding to the target communication equipment group is determined based on the above signal reception strength and the above target distance correction formula.

[0026] In some optional embodiments, the above-described apparatus further includes:

[0027] The historical transmission distance acquisition module is used to acquire the historical transmission distance between the first device and the second device when the distance retention time exceeds a preset time threshold during historical data transmission.

[0028] The target transmission distance determination module is used to determine the target transmission distance based on the aforementioned historical transmission distances, wherein the target transmission distance is the average of the aforementioned historical transmission distances or the maximum value among the aforementioned historical transmission distances;

[0029] The proximity indication module is used to output device proximity indication information through the first device and / or the second device if the target distance exceeds the target transmission distance.

[0030] In some optional embodiments, the target transmission distance determination module described above is specifically used for:

[0031] Based on the aforementioned data instruction type and the aforementioned first device model information, a first preset control distance for the transmission of data by the aforementioned first device for the aforementioned data instruction type is determined;

[0032] Based on the aforementioned data instruction type and the aforementioned second device model information, a second preset control distance for the transmission of data by the aforementioned second device for the aforementioned data instruction type is determined;

[0033] The effective control distance matching the data command type is determined based on the smaller of the first preset control distance and the second preset control distance.

[0034] A third aspect of this application provides an electronic device, including a memory and a processor, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute steps in the distance determination method between Bluetooth devices provided in the first aspect of this application.

[0035] A fourth aspect of this application provides a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute steps in the distance determination method between Bluetooth devices provided in the first aspect of this application.

[0036] Using the scheme of this application embodiment, the following steps can be taken: obtaining the first device model information corresponding to the first device, and the preset signal transmission strength of the first device; obtaining the second device model information corresponding to the second device, and the signal reception strength of the second device when communicating with the first device via Bluetooth; determining the distance to be corrected between the first device and the second device based on the signal transmission strength and the signal reception strength; determining the distance correction information corresponding to the target communication device group composed of the first device and the second device based on the first device model information and the second device model information; and correcting the distance to be corrected based on the distance correction information to obtain the target distance between the first device and the second device.

[0037] In this way, during the distance determination process between Bluetooth devices, the distance to be corrected can be determined based on the signal transmission strength and signal reception strength, the distance correction information can be determined based on the first device model information and the second device model information, and the distance to be corrected can be corrected based on the distance correction information. This helps to obtain the accurate distance between Bluetooth devices, thereby improving the accuracy of controlling Bluetooth devices. Attached Figure Description

[0038] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0039] Figure 1 This is a flowchart illustrating a method for determining the distance between Bluetooth devices according to an embodiment of this application;

[0040] Figure 2 This is a schematic diagram illustrating a specific process for determining the distance to be corrected, provided in an embodiment of this application.

[0041] Figure 3This is a structural block diagram of a distance determination device between Bluetooth devices provided in an embodiment of this application;

[0042] Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0043] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0044] This application provides a method, apparatus, electronic device, and medium for determining the distance between Bluetooth devices. Specifically, the method for determining the distance between Bluetooth devices in this application can be executed by a computer device, which can be a terminal or a server. The terminal can be a smartphone, tablet, laptop, touchscreen, personal computer (PC), personal digital assistant (PDA), or other terminal device. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0045] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.

[0046] The first aspect of this application provides a method for determining the distance between Bluetooth devices. Please refer to [link to relevant documentation]. Figure 1 , Figure 1 This is a flowchart illustrating a method for determining the distance between Bluetooth devices according to an embodiment of this application. The specific flow of this method for determining the distance between Bluetooth devices can be as follows:

[0047] 101. Obtain the first device model information corresponding to the first device, and the preset signal transmission strength in the first device.

[0048] 102. Obtain the second device model information corresponding to the second device, and the signal reception strength when the second device communicates with the first device via Bluetooth.

[0049] In this setup, both the first and second devices are Bluetooth devices. They communicate via Bluetooth to transmit data and control each other. For example, the first device could be an electronic lock with Bluetooth communication capabilities, and the second device could be a control terminal such as a mobile phone. The first and second devices transmit data via Bluetooth, and the second device can send unlocking control commands to the first device to unlock it. Since different locks have different effective control distances, Bluetooth ranging is generally required when communicating between the two devices to determine their precise distance. This ensures efficient and accurate data transmission, leading to better control between the devices.

[0050] It should be noted that the distance determination method between Bluetooth devices provided in this embodiment can be applied to a first device, a second device, or a distance measuring device additionally provided besides the first and second devices, to determine the device distance between the first and second devices. In this embodiment, the application of the above-mentioned distance determination method between Bluetooth devices to a second device (e.g., a mobile phone) is used as an example for specific explanation.

[0051] It should be noted that the first device and / or the second device can be pre-configured to transmit signals according to a preset signal transmission strength. In this embodiment, the first device transmitting signals is used as an example for illustration, but this is not intended to limit the scope of the application.

[0052] Specifically, taking a lock with Bluetooth communication as an example, the lock can be pre-set with the Bluetooth signal strength corresponding to its effective working distance. For example, if the effective working distance of the lock is 5 meters, the corresponding Bluetooth signal transmission strength is 70dBm. The lock will then transmit a Bluetooth signal with a strength of 70dBm. When the mobile phone communicates with the lock, the received Bluetooth signal strength can be measured to determine the device distance between the two.

[0053] The aforementioned signal reception strength refers to the signal reception strength during Bluetooth communication between the second device and the first device. Specifically, the Received Signal Strength Indicator (RSSI) value of the second device can be obtained as the signal reception strength.

[0054] 103. Determine the distance to be corrected between the first device and the second device based on the above-mentioned signal transmission strength and signal reception strength.

[0055] Figure 2 This is a schematic diagram illustrating a specific process for determining the distance to be corrected, provided in an embodiment of this application. Figure 2As shown in the embodiments of this application, the determination of the distance to be corrected between the first device and the second device based on the signal transmission strength and the signal reception strength includes the following specific steps:

[0056] 201. Obtain a signal attenuation influence model to indicate the attenuation effect of distance on signal strength in the area where the first device is located;

[0057] 202. Based on the above signal transmission strength and the above signal reception strength, the distance to be corrected between the above first device and the above second device is determined by the above signal attenuation influence model.

[0058] Specifically, the aforementioned signal attenuation impact model is a model used to indicate the degree of attenuation of Bluetooth signal strength by the ambient distance in the area where the first device is located. It can be obtained by conducting a signal strength attenuation test in the area in advance, and is not specifically limited here.

[0059] Based on the principle that signal power attenuates with propagation distance when radio or sound waves travel through a medium, the distance between two locations can be calculated using a signal attenuation model that considers the known transmitted signal power at one location and the received signal power at another location.

[0060] However, signal attenuation during propagation is affected by multiple factors, thus the accuracy of the distance calculated using the signal attenuation model is limited by various factors. In this embodiment, the distance to be corrected can be further modified to improve the accuracy of the obtained distance.

[0061] 104. Based on the first device model information and the second device model information, determine the distance correction information corresponding to the target communication device group composed of the first device and the second device.

[0062] The first device model information indicates the device model of the first device, and the second device model information indicates the device model of the second device. When using different devices for Bluetooth communication, factors such as the device model and structure can affect the actual signal strength received or transmitted, thus affecting the distance measurement results.

[0063] Therefore, in this embodiment, distance correction information is determined based on the device model to achieve distance correction. In one application scenario, the aforementioned distance correction information is the difference between the actual distance between the devices and the distance calculated using a signal attenuation influence model. This can be determined through multiple historical measurements, and is not specifically limited here.

[0064] In one application scenario, determining the distance correction information corresponding to the target communication device group composed of the first device and the second device based on the first device model information and the second device model information includes:

[0065] Based on the first device model information and the second device model information, the target distance correction model corresponding to the target communication device group is determined from the preset correction model database. The correction model database includes multiple distance correction models corresponding to multiple communication device groups. A distance correction model corresponding to a communication device group is trained based on the historical distance information group of the communication device group under different historical signal reception strengths. The historical distance information group includes at least one historical distance to be corrected between communication devices in the communication device group and the actual distance associated with the historical distance to be corrected.

[0066] Based on the above signal reception strength and the above target distance correction model, the distance correction information corresponding to the above target communication equipment group is determined.

[0067] The aforementioned correction model database is a pre-set database used to store distance correction models corresponding to different communication device groups. Based on the target distance correction model corresponding to the target communication device group in the correction model database, distance correction information under the current signal reception strength can be determined, and distance correction can then be performed based on this information.

[0068] In another application scenario, the determination of distance correction information corresponding to the target communication device group composed of the first device and the second device based on the first device model information and the second device model information includes:

[0069] Based on the first device model information and the second device model information, the target distance correction formula corresponding to the target communication device group is determined from the preset correction formula database. The correction formula database includes multiple distance correction formulas corresponding to multiple communication device groups. A distance correction formula corresponding to a communication device group is obtained by fitting a set of historical distance information of the communication device group under different historical signal reception strengths. The set of historical distance information includes at least one historical distance to be corrected between communication devices in the communication device group and the actual distance associated with the historical distance to be corrected.

[0070] The distance correction information corresponding to the target communication equipment group is determined based on the above signal reception strength and the above target distance correction formula.

[0071] The aforementioned correction formula database is a pre-set database used to store distance correction formulas corresponding to different communication device groups, with one distance correction formula corresponding to each communication device group. Based on the target distance correction formula corresponding to the target communication device group in the correction formula database, the distance correction information under the current signal reception strength can be determined, and distance correction can then be performed based on this information.

[0072] It should be noted that the aforementioned correction model database and / or correction formula database can be set up in a cloud platform, and the second device communicates with the cloud platform to obtain the corresponding target distance correction model and / or target distance correction formula.

[0073] 105. Correct the distance to be corrected according to the distance correction information to obtain the target distance between the first device and the second device.

[0074] In one application scenario, the aforementioned distance correction information includes the offset distance, and the sum of the offset distance and the distance to be corrected is used as the target distance.

[0075] It should be noted that other correction methods are also possible. For example, a preset distance correction coefficient can be obtained, the product of the distance correction coefficient and the offset distance can be calculated, and then added to the distance to be corrected to obtain the target distance. The value of the aforementioned distance correction coefficient can be preset and adjusted according to actual needs. Other distance correction methods are also possible, but are not specifically limited here.

[0076] In some embodiments of this application, after correcting the distance to be corrected based on the distance correction information to obtain the target distance between the first device and the second device, the method further includes:

[0077] The historical transmission distance between the first device and the second device where the distance retention time exceeded a preset time threshold during historical data transmission is obtained.

[0078] The target transmission distance is determined based on the aforementioned historical transmission distances, wherein the aforementioned target transmission distance is the average of the aforementioned historical transmission distances or the maximum value among the aforementioned historical transmission distances.

[0079] If the target distance exceeds the target transmission distance, then the device proximity indication information is output through the first device and / or the second device.

[0080] Specifically, if the distance between devices is too large, it will affect the efficiency and accuracy of data transmission between them, thereby affecting the control effect of the devices (such as affecting the Bluetooth unlocking effect). Therefore, by statistically analyzing the historical transmission distance between the first and second devices during data transmission, it can be determined whether the target transmission distance is too large. If it is too large, a device proximity indication message is output to prompt the user to control the devices to move closer to each other for better control.

[0081] In some embodiments of this application, after correcting the distance to be corrected based on the distance correction information to obtain the target distance between the first device and the second device, the method further includes:

[0082] Obtain the data instruction type corresponding to the data transmitted between the first device and the second device;

[0083] Based on the above data command type, the above first device model information and the above second device model signal, determine the effective control distance that matches the above data command type;

[0084] If the target distance exceeds the effective control distance, the device proximity indication information will be output through the first device and / or the second device.

[0085] Specifically, different effective control distances can be preset for different data command types. For example, for unlocking commands, which transmit less data and are convenient for users, a longer effective control distance (e.g., 5 meters) can be set. For password change commands, which transmit more data and are designed to improve security, a shorter effective control distance (e.g., 3 meters) can be set. Other types of devices may also involve image data transmission commands, for which corresponding effective control distances can also be set, but these will not be elaborated upon here.

[0086] In some embodiments of this application, determining the effective control distance matching the data command type based on the data command type, the first device model information, and the second device model signal includes:

[0087] Based on the aforementioned data instruction type and the aforementioned first device model information, a first preset control distance for the transmission of data by the aforementioned first device for the aforementioned data instruction type is determined;

[0088] Based on the aforementioned data instruction type and the aforementioned second device model information, a second preset control distance for the transmission of data by the aforementioned second device for the aforementioned data instruction type is determined;

[0089] The effective control distance matching the data command type is determined based on the smaller of the first preset control distance and the second preset control distance.

[0090] Specifically, different models of devices may have different effective control distances even for the same data command type. Therefore, in this embodiment, the smaller of the preset control distances corresponding to the first device and the second device can be used as the effective control distance to meet the control distance requirements of different devices and improve control accuracy.

[0091] This application embodiment further describes the distance determination method between Bluetooth devices provided in this application embodiment in conjunction with a specific application scenario. Specifically, distance correction models corresponding to different models of mobile phones and Bluetooth locks can be collected in advance and stored in a cloud platform for managing locks. When using a mobile phone to control a Bluetooth lock, the unlocking APP on the mobile phone obtains the corresponding target distance correction model from the cloud platform, thereby performing distance correction to obtain the actual target distance. When the target distance does not reach the effective control distance, the user is prompted to move closer to the Bluetooth lock via the mobile phone. It should be noted that the effective control distance can also be set on the cloud platform for different mobile phones to download and use.

[0092] Using the scheme of this application embodiment, the following steps can be taken: obtaining the first device model information corresponding to the first device, and the preset signal transmission strength of the first device; obtaining the second device model information corresponding to the second device, and the signal reception strength of the second device when communicating with the first device via Bluetooth; determining the distance to be corrected between the first device and the second device based on the signal transmission strength and the signal reception strength; determining the distance correction information corresponding to the target communication device group composed of the first device and the second device based on the first device model information and the second device model information; and correcting the distance to be corrected based on the distance correction information to obtain the target distance between the first device and the second device.

[0093] In this way, during the distance determination process between Bluetooth devices, the distance to be corrected can be determined based on the signal transmission strength and signal reception strength, the distance correction information can be determined based on the first device model information and the second device model information, and the distance to be corrected can be corrected based on the distance correction information. This helps to obtain the accurate distance between Bluetooth devices, thereby improving the accuracy of controlling Bluetooth devices.

[0094] Please see Figure 3 , Figure 3 This is a structural block diagram of a distance determination device between Bluetooth devices provided in an embodiment of this application. The device includes:

[0095] The first data acquisition module 301 is used to acquire the first device model information corresponding to the first device, as well as the preset signal transmission strength in the first device.

[0096] The second data acquisition module 302 is used to acquire the second device model information corresponding to the second device, as well as the signal reception strength when the second device communicates with the first device via Bluetooth.

[0097] The distance calculation module 303 is used to determine the distance to be corrected between the first device and the second device based on the signal transmission strength and the signal reception strength.

[0098] The correction information acquisition module 304 is used to determine the distance correction information corresponding to the target communication device group composed of the first device and the second device based on the first device model information and the second device model information.

[0099] The distance correction module 305 is used to correct the distance to be corrected according to the distance correction information to obtain the target distance between the first device and the second device.

[0100] In some optional embodiments, the distance calculation module 303 described above is specifically used for:

[0101] Obtain a signal attenuation impact model to indicate the degree of signal strength attenuation in the area where the first device is located;

[0102] Based on the aforementioned signal transmission strength and signal reception strength, the distance to be corrected between the first device and the second device is determined using the aforementioned signal attenuation influence model.

[0103] In some optional embodiments, the above-mentioned correction information acquisition module 304 is specifically used for:

[0104] Based on the first device model information and the second device model information, the target distance correction model corresponding to the target communication device group is determined from the preset correction model database. The correction model database includes multiple distance correction models corresponding to multiple communication device groups. A distance correction model corresponding to a communication device group is trained based on the historical distance information group of the communication device group under different historical signal reception strengths. The historical distance information group includes at least one historical distance to be corrected between communication devices in the communication device group and the actual distance associated with the historical distance to be corrected.

[0105] Based on the above signal reception strength and the above target distance correction model, the distance correction information corresponding to the above target communication equipment group is determined.

[0106] In some optional embodiments, the above-mentioned correction information acquisition module 304 is specifically used for:

[0107] Based on the first device model information and the second device model information, the target distance correction formula corresponding to the target communication device group is determined from the preset correction formula database. The correction formula database includes multiple distance correction formulas corresponding to multiple communication device groups. A distance correction formula corresponding to a communication device group is obtained by fitting a set of historical distance information of the communication device group under different historical signal reception strengths. The set of historical distance information includes at least one historical distance to be corrected between communication devices in the communication device group and the actual distance associated with the historical distance to be corrected.

[0108] The distance correction information corresponding to the target communication equipment group is determined based on the above signal reception strength and the above target distance correction formula.

[0109] In some optional embodiments, the above-described apparatus further includes:

[0110] The historical transmission distance acquisition module is used to acquire the historical transmission distance between the first device and the second device when the distance retention time exceeds a preset time threshold during historical data transmission.

[0111] The target transmission distance determination module is used to determine the target transmission distance based on the aforementioned historical transmission distances, wherein the target transmission distance is the average of the aforementioned historical transmission distances or the maximum value among the aforementioned historical transmission distances;

[0112] The proximity indication module is used to output device proximity indication information through the first device and / or the second device if the target distance exceeds the target transmission distance.

[0113] In some optional embodiments, the target transmission distance determination module described above is specifically used for:

[0114] Based on the aforementioned data instruction type and the aforementioned first device model information, a first preset control distance for the transmission of data by the aforementioned first device for the aforementioned data instruction type is determined;

[0115] Based on the aforementioned data instruction type and the aforementioned second device model information, a second preset control distance for the transmission of data by the aforementioned second device for the aforementioned data instruction type is determined;

[0116] The effective control distance matching the data command type is determined based on the smaller of the first preset control distance and the second preset control distance.

[0117] Using the solution of this application embodiment, the first data acquisition module 301 can acquire the first device model information corresponding to the first device and the preset signal transmission strength of the first device; the second data acquisition module 302 can acquire the second device model information corresponding to the second device and the signal reception strength when the second device communicates with the first device via Bluetooth; the distance calculation module 303 can determine the distance to be corrected between the first device and the second device based on the signal transmission strength and the signal reception strength; the correction information acquisition module 304 can determine the distance correction information corresponding to the target communication device group composed of the first device and the second device based on the first device model information and the second device model information; and the distance correction module 305 can correct the distance to be corrected based on the distance correction information to obtain the target distance between the first device and the second device.

[0118] In this way, during the distance determination process between Bluetooth devices, the distance to be corrected can be determined based on the signal transmission strength and signal reception strength, the distance correction information can be determined based on the first device model information and the second device model information, and the distance to be corrected can be corrected based on the distance correction information. This helps to obtain the accurate distance between Bluetooth devices, thereby improving the accuracy of controlling Bluetooth devices.

[0119] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0120] Accordingly, this application also provides an electronic device, which can be a terminal, such as a smartphone, tablet computer, laptop computer, touch screen, game console, personal computer (PC), personal digital assistant (PDA), etc. Figure 4 As shown, Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 400 includes a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, and a computer program stored in the memory 402 and executable on the processor. The processor 401 and the memory 402 are electrically connected. Those skilled in the art will understand that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0121] The processor 401 is the control center of the electronic device 400. It connects various parts of the electronic device 400 via various interfaces and lines. By running or loading software programs and / or modules stored in the memory 402, and by calling data stored in the memory 402, it executes various functions and processes data of the electronic device 400, thereby providing overall monitoring of the electronic device 400. The processor 401 can be a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc., and can implement or execute the methods, steps, and logic diagrams disclosed in the embodiments of this application.

[0122] In this embodiment, the processor 401 in the electronic device 400 loads the instructions corresponding to the processes of one or more applications into the memory 402 according to the following steps, and the processor 401 runs the applications stored in the memory 402 to realize various functions, such as:

[0123] Obtain the first device model information corresponding to the first device, as well as the preset signal transmission strength in the first device;

[0124] Obtain the second device model information corresponding to the second device, and the signal reception strength when the second device communicates with the first device via Bluetooth;

[0125] The distance to be corrected between the first device and the second device is determined based on the aforementioned signal transmission strength and the aforementioned signal reception strength.

[0126] Based on the first device model information and the second device model information, the distance correction information corresponding to the target communication device group composed of the first device and the second device is determined;

[0127] Based on the aforementioned distance correction information, the distance to be corrected is corrected to obtain the target distance between the first device and the second device.

[0128] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0129] Optional, such as Figure 4 As shown, the electronic device 400 also includes: a touch display screen 403, a radio frequency circuit 404, an audio circuit 405, an input unit 406, and a power supply 407. The processor 401 is electrically connected to the touch display screen 403, the radio frequency circuit 404, the audio circuit 405, the input unit 406, and the power supply 407. Those skilled in the art will understand that... Figure 4 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0130] The touch display screen 403 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The touch display screen 403 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Optionally, the display panel can be configured using a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar technologies. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program according to the operation commands. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, transmitting the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 401. It can also receive and execute commands from the processor 401. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 401 to determine the type of touch event. Subsequently, the processor 401 provides corresponding visual output on the display panel based on the type of touch event. In this embodiment, the touch panel and display panel can be integrated into the touch display screen 403 to achieve input and output functions. However, in some embodiments, the touch panel and display panel can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 403 can also be used as part of the input unit 406 to achieve input functions.

[0131] The radio frequency circuit 404 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other electronic devices, and to transmit and receive signals with network devices or other electronic devices.

[0132] Audio circuit 405 can be used to provide an audio interface between a user and an electronic device via a speaker and a microphone. Audio circuit 405 can convert received audio data into electrical signals and transmit them to the speaker, where the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuit 405, converted back into audio data, and then processed by processor 401 before being transmitted via radio frequency circuit 404 to, for example, another electronic device, or output to memory 402 for further processing. Audio circuit 405 may also include an earphone jack to provide communication between peripheral headphones and electronic devices.

[0133] The input unit 406 can be used to receive input numbers, characters, or user characteristic information (such as fingerprints, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.

[0134] Power supply 407 is used to supply power to various components of electronic device 400. Optionally, power supply 407 can be logically connected to processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 407 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0135] although Figure 4 As not shown in the diagram, the electronic device 400 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.

[0136] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0137] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0138] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of computer programs that can be loaded by a processor to execute steps in any of the Bluetooth device distance determination methods provided in embodiments of this application. For example, the computer program can execute the following steps:

[0139] Obtain the first device model information corresponding to the first device, as well as the preset signal transmission strength in the first device;

[0140] Obtain the second device model information corresponding to the second device, and the signal reception strength when the second device communicates with the first device via Bluetooth;

[0141] The distance to be corrected between the first device and the second device is determined based on the aforementioned signal transmission strength and the aforementioned signal reception strength.

[0142] Based on the first device model information and the second device model information, the distance correction information corresponding to the target communication device group composed of the first device and the second device is determined;

[0143] Based on the aforementioned distance correction information, the distance to be corrected is corrected to obtain the target distance between the first device and the second device.

[0144] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0145] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0146] Since the computer program stored in the storage medium can execute the steps in any of the Bluetooth device distance determination methods provided in the embodiments of this application, the beneficial effects that any of the Bluetooth device distance determination methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.

[0147] According to one aspect of this application, a computer program product or computer program is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations of the above embodiments.

[0148] The distance determination method, apparatus, electronic device, and medium between Bluetooth devices provided in the embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for determining the distance between Bluetooth devices, characterized in that, The method includes: Obtain the first device model information corresponding to the first device, and the preset signal transmission strength in the first device; Obtain the second device model information corresponding to the second device, and the signal reception strength of the second device when communicating with the first device via Bluetooth; The distance to be corrected between the first device and the second device is determined based on the signal transmission strength and the signal reception strength. Based on the first device model information and the second device model information, determine the distance correction information corresponding to the target communication device group composed of the first device and the second device; The distance to be corrected is corrected according to the distance correction information to obtain the target distance between the first device and the second device; The step of determining the distance correction information corresponding to the target communication device group composed of the first device and the second device based on the first device model information and the second device model information includes: Based on the first device model information and the second device model information, a target distance correction model corresponding to the target communication device group is determined from a preset correction model database. The correction model database includes multiple distance correction models corresponding to different communication device groups. Each distance correction model for a communication device group is trained based on historical distance information sets of that communication device group under different historical signal reception strengths. The historical distance information sets include at least one historical distance to be corrected between communication devices in the communication device group and the actual distance associated with that historical distance. Distance correction information corresponding to the target communication device group is determined based on the signal reception strength and the target distance correction model; and / or, Based on the first device model information and the second device model information, a target distance correction formula corresponding to the target communication device group is determined from a preset correction formula database. The correction formula database includes multiple distance correction formulas corresponding to different communication device groups. A distance correction formula for a communication device group is obtained by fitting a set of historical distance information for that communication device group under different historical signal reception strengths. The historical distance information set includes at least one historical distance to be corrected between communication devices in the communication device group and the actual distance associated with that historical distance. Distance correction information corresponding to the target communication device group is determined based on the signal reception strength and the target distance correction formula.

2. The method for determining the distance between Bluetooth devices according to claim 1, characterized in that, Determining the distance to be corrected between the first device and the second device based on the signal transmission strength and the signal reception strength includes: Obtain a signal attenuation impact model to indicate the degree of signal strength attenuation in the area where the first device is located; Based on the signal transmission strength and the signal reception strength, the distance to be corrected between the first device and the second device is determined by the signal attenuation influence model.

3. The method for determining the distance between Bluetooth devices according to claim 1 or 2, characterized in that, After correcting the distance to be corrected based on the distance correction information to obtain the target distance between the first device and the second device, the method further includes: Obtain the historical transmission distance between the first device and the second device when the distance retention time exceeds a preset time threshold during historical data transmission; The target transmission distance is determined based on the historical transmission distance, wherein the target transmission distance is the average of the historical transmission distances or the maximum value among the historical transmission distances; If the target distance exceeds the target transmission distance, then the device proximity indication information is output through the first device and / or the second device.

4. The method for determining the distance between Bluetooth devices according to claim 1 or 2, characterized in that, After correcting the distance to be corrected based on the distance correction information to obtain the target distance between the first device and the second device, the method further includes: Obtain the data instruction type corresponding to the data transmitted between the first device and the second device; The effective control distance matching the data command type is determined based on the data command type, the first device model information, and the second device model signal. If the target distance exceeds the effective control distance, then the device proximity indication information is output through the first device and / or the second device.

5. The method for determining the distance between Bluetooth devices according to claim 4, characterized in that, The step of determining the effective control distance matching the data command type based on the data command type, the first device model information, and the second device model signal includes: Based on the data instruction type and the first device model information, a first preset control distance for the first device to transmit data for the data instruction type is determined; Based on the data instruction type and the second device model information, a second preset control distance for the second device to transmit data for the data instruction type is determined; The effective control distance matching the data command type is determined based on the smaller of the first preset control distance and the second preset control distance.

6. A distance determination device between Bluetooth devices, characterized in that, The device includes: The first data acquisition module is used to acquire the first device model information corresponding to the first device, as well as the preset signal transmission strength in the first device; The second data acquisition module is used to acquire the second device model information corresponding to the second device, and the signal reception strength of the second device when communicating with the first device via Bluetooth. A distance calculation module is used to determine the distance to be corrected between the first device and the second device based on the signal transmission strength and the signal reception strength; The correction information acquisition module is used to determine the distance correction information corresponding to the target communication device group composed of the first device and the second device based on the first device model information and the second device model information; The distance correction module is used to correct the distance to be corrected based on the distance correction information to obtain the target distance between the first device and the second device.

7. An electronic device, characterized in that, It includes a memory and a processor; the memory stores an application program, and the processor runs the application program within the memory to perform the steps in the distance determination method between Bluetooth devices as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps of the distance determination method between Bluetooth devices according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Distance measurement method and device, electronic equipment and storage medium

    CN113466841A