Method for outputting pairing notification and related equipment

By judging the first distance between the terminal device and the Bluetooth peripheral in the Bluetooth attack scenario, and outputting pairing notifications only on the terminal device with the smallest distance, the problem of overflowing pairing notifications caused by Bluetooth attacks is solved, and data security is improved .

CN119277306APending Publication Date: 2025-01-07HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310842172.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-07
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

During Bluetooth attacks, malicious attackers can forge close discovery messages, causing terminal devices to output pairing notifications within a large range, affecting the user experience, and how to avoid terminal devices within a large range of output pairing notifications within a large range.

Method used

By determining whether the first distance between each terminal device and the Bluetooth peripheral is smaller than the first distance between other terminal devices and the Bluetooth peripheral, and outputting pairing notifications on the terminal device with the smallest first distance, avoiding large-scale areas The terminal device within outputs a pairing notification.

Benefits of technology

It effectively avoids the pairing notifications output by all terminal devices on a large scale, reduces the probability of data leakage in Bluetooth connections and improves data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119277306A_ABST
    Figure CN119277306A_ABST
Patent Text Reader

Abstract

The invention provides a method for outputting a pairing notification and related equipment, and the method can output the pairing notification based on a first distance between terminal equipment and a Bluetooth peripheral, and a first distance between other terminal equipment and the Bluetooth peripheral. Judging whether the first distance between the first terminal equipment and the Bluetooth peripheral is smaller than the first distance between the other terminal equipment and the Bluetooth peripheral or not; and if yes, outputting a pairing notification on the first terminal equipment. According to the embodiment of the invention, the pairing notification can be output on the first terminal device with the minimum first distance from the Bluetooth peripheral, and the pairing notification is not output on other terminal devices, so that the situation that the terminal devices in a large range output the pairing notification can be effectively avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a method for outputting a pairing notification and related equipment. Background Art

[0002] In order to facilitate pairing and connection, pairing and connection can be completed based on proximity discovery technology. Specifically, the Bluetooth peripheral can send a proximity discovery message. When the terminal device scans the proximity discovery message sent by the Bluetooth peripheral, the physical distance between the Bluetooth peripheral and the terminal device can be determined based on the proximity discovery message. When the terminal device determines that the physical distance between the Bluetooth peripheral and the terminal device is within the first range, the terminal device finds that the Bluetooth peripheral is nearby and can output a pairing notification to pair with the Bluetooth peripheral and establish a Bluetooth connection.

[0003] However, with the continuous expansion of Bluetooth communication application scenarios, Bluetooth attacks are becoming more and more common. For example, after knowing the format of the proximity discovery message, a malicious attacker can send a forged proximity discovery message at maximum power, causing terminal devices in a large range to output pairing notifications. These pairing notifications will cause harassment to users and affect their experience. Therefore, how to prevent terminal devices in a large range from outputting pairing notifications is an urgent problem to be solved. Summary of the invention

[0004] The embodiments of the present application provide a method for outputting a pairing notification and related devices, which can output a pairing notification on a first terminal device with the shortest first distance from a Bluetooth peripheral, and not output the pairing notification on other terminal devices, thereby effectively avoiding that terminal devices within a large range all output the pairing notification.

[0005] In a first aspect, an embodiment of the present application provides a method for outputting a pairing notification, the method comprising:

[0006] Determine the first distance between the first terminal device and the Bluetooth peripheral device and the first distance between other terminal devices and the Bluetooth peripheral device, and based on the first distances between the terminal device and the other terminal devices and the Bluetooth peripheral device, determine whether the first distance between the first terminal device and the Bluetooth peripheral device is smaller than the first distance between the other terminal devices and the Bluetooth peripheral device. If so, output a pairing notification on the first terminal device; wherein the pairing notification is used to notify that the first terminal device is allowed to establish a Bluetooth pairing with the Bluetooth peripheral device. The other terminal devices are terminal devices other than the first terminal device whose physical distance to the Bluetooth peripheral device is within the first range; the first distance between each terminal device and the Bluetooth peripheral device is related to the physical distance between the terminal device and the Bluetooth peripheral device.

[0007] It can be seen that for the first terminal device and other terminal devices whose physical distance to the Bluetooth peripheral is within the first range, unlike the technical solution of outputting pairing notifications on both the first terminal device and the other terminal devices, the embodiment of the present application only outputs pairing notifications on the first terminal device whose first distance to the Bluetooth peripheral is the smallest, and does not output pairing notifications on other terminal devices, which can effectively avoid outputting pairing notifications on terminal devices within a large range.

[0008] In addition, since the pairing notification is only output on the first terminal device with the shortest first distance between it and the Bluetooth peripheral, the probability of the terminal device establishing a Bluetooth connection with the Bluetooth peripheral is reduced, thereby reducing the probability of data leakage via the Bluetooth connection (such as reducing the probability of leakage of personal privacy data such as user call records and text message records), which can effectively ensure data security.

[0009] In combination with the first aspect, in an optional implementation, the first distance between each terminal device and the Bluetooth peripheral is equal to the product of the physical distance between the terminal device and the Bluetooth peripheral and the penalty factor of the terminal device; the penalty factor of each terminal device is related to at least one parameter of the terminal device's screen status, running applications, AR status, RSSI of proximity discovery messages, or transmission power of proximity discovery messages.

[0010] It can be seen that in this embodiment, the first distance between the terminal device and the Bluetooth peripheral is not only related to the physical distance between the terminal device and the Bluetooth peripheral, but also to at least one parameter of the terminal device's screen state, running application, AR state, RSSI of the proximity discovery message, or the transmission power of the proximity discovery message. Since at least one parameter of the terminal device characterizes the scene in which the user currently uses the terminal device, the penalty factor of the terminal device determined based on at least one parameter of the terminal device can characterize the degree of pairing demand between the user and the Bluetooth peripheral (such as when the penalty factor is large, the degree of pairing demand between the user and the Bluetooth peripheral is low; when the penalty factor is small, the degree of pairing demand between the user and the Bluetooth peripheral is high), then the first distance determined based on the penalty factor of the terminal device also characterizes the degree of pairing demand between the user and the Bluetooth peripheral. When the pairing notification is output on the terminal device with the smallest first distance to the Bluetooth peripheral, it is beneficial for the Bluetooth peripheral to establish a connection with the terminal device of the user with a high degree of pairing demand.

[0011] In conjunction with the first aspect, in an optional implementation, the first distance between each terminal device and the Bluetooth peripheral is equal to the physical distance between the terminal device and the Bluetooth peripheral. It can be seen that in this implementation, the calculation method of the first distance between the terminal device and the Bluetooth peripheral is relatively simple, which can effectively save computing resources.

[0012] In combination with the first aspect, in an optional implementation manner, the method further includes:

[0013] Receiving first information from other terminal devices;

[0014] The first information of each terminal device in other terminal devices includes the physical distance between the terminal device and the Bluetooth peripheral device; or,

[0015] The first information of each terminal device in the other terminal devices includes at least one parameter of the screen state, running application, AR state, RSSI of the proximity discovery message, and transmission power of the proximity discovery message of the terminal device, and the physical distance between the terminal device and the Bluetooth peripheral device. It can be seen that in this embodiment, the first information of the other terminal devices can be received, which is conducive to determining the first distance between the other terminal devices and the Bluetooth peripheral device based on the first information of the other terminal devices.

[0016] In combination with the first aspect, in an optional implementation manner, the method further includes:

[0017] For each parameter of each terminal device, determine whether the parameter of the terminal device meets the condition corresponding to the parameter; if so, determine the penalty factor of the parameter of the terminal device;

[0018] For each terminal device, the penalty factor of each parameter of the terminal device is added together to obtain the penalty factor of the terminal device.

[0019] In combination with the first aspect, in an optional implementation, the method further includes: broadcasting first information of the first terminal device.

[0020] Optionally, this implementation can be performed by the first terminal device. It can be seen that in this implementation, the first terminal device can broadcast its own first information, so as to facilitate the management device or other terminal devices to receive the first information of the first terminal device and determine the first distance between the first terminal device and the Bluetooth peripheral device based on the first information.

[0021] In combination with the first aspect, in an optional implementation, if the first distance between the first terminal device and the Bluetooth peripheral is smaller than the first distance between other terminal devices and the Bluetooth peripheral, the method further includes: determining whether the first distance between the first terminal device and the Bluetooth peripheral is within the second range; if so, executing the step of outputting a pairing notification on the first terminal device. It can be seen that in this implementation, the first distance between the first terminal device and the Bluetooth peripheral can be further compared with the second range, which is conducive to outputting a pairing notification only when the first distance is within the second range, and not outputting a pairing notification when the first distance is outside the second range, further reducing the probability of the terminal device and the Bluetooth peripheral establishing a Bluetooth connection, thereby further reducing the probability of data leakage via the Bluetooth connection, and further ensuring the security of the data.

[0022] In combination with the first aspect, in an optional implementation manner, the method further includes:

[0023] receiving proximity discovery messages;

[0024] In response to the proximity discovery message, a step of determining a first distance between the first terminal device and the Bluetooth peripheral device and a first distance between other terminal devices and the Bluetooth peripheral device is performed.

[0025] In conjunction with the first aspect, in an optional implementation manner, the method further includes:

[0026] If there are other terminal devices whose first distance to the Bluetooth peripheral is smaller than the first distance between the first terminal device and the Bluetooth peripheral, or the first distance between the first terminal device and the Bluetooth peripheral is outside the second range, the first terminal device is triggered to discard the proximity discovery message.

[0027] In a second aspect, an embodiment of the present application provides an electronic device, including a touch screen, a memory, one or more processors, and one or more programs; wherein the one or more programs are stored in the memory, and characterized in that when the one or more processors execute the one or more programs, the electronic device implements: determining the first distance between the first terminal device and the Bluetooth peripheral device and the first distance between other terminal devices and the Bluetooth peripheral device, and based on the first distance between the terminal device and the other terminal devices and the Bluetooth peripheral device, determining whether the first distance between the first terminal device and the Bluetooth peripheral device is smaller than the first distance between the other terminal devices and the Bluetooth peripheral device, if so, outputting a pairing notification on the first terminal device; wherein the pairing notification is used to notify that the first terminal device is allowed to establish a Bluetooth pairing with the Bluetooth peripheral device. The other terminal devices are terminal devices other than the first terminal device whose physical distance with the Bluetooth peripheral device is within the first range; the first distance between each terminal device and the Bluetooth peripheral device is related to the physical distance between the terminal device and the Bluetooth peripheral device.

[0028] In combination with the second aspect, in an optional implementation, the first distance between each terminal device and the Bluetooth peripheral is equal to the product of the physical distance between the terminal device and the Bluetooth peripheral and the penalty factor of the terminal device; the penalty factor of each terminal device is related to at least one parameter of the terminal device's screen status, running applications, AR status, RSSI of proximity discovery messages, or transmission power of proximity discovery messages.

[0029] In combination with the second aspect, in an optional implementation, the first distance between each terminal device and the Bluetooth peripheral device is equal to the physical distance between the terminal device and the Bluetooth peripheral device.

[0030] In conjunction with the second aspect, in an optional implementation manner, the electronic device is further used for:

[0031] Receiving first information from other terminal devices;

[0032] The first information of each terminal device in other terminal devices includes the physical distance between the terminal device and the Bluetooth peripheral device; or,

[0033] The first information of each terminal device among the other terminal devices includes at least one parameter of the screen status, running applications, AR status, RSSI of the proximity discovery message, transmission power of the proximity discovery message, and the physical distance between the terminal device and the Bluetooth peripheral.

[0034] In conjunction with the second aspect, in an optional implementation manner, the electronic device is further used for:

[0035] For each parameter of each terminal device, determine whether the parameter of the terminal device meets the condition corresponding to the parameter; if so, determine the penalty factor of the parameter of the terminal device;

[0036] For each terminal device, the penalty factor of each parameter of the terminal device is added together to obtain the penalty factor of the terminal device.

[0037] In combination with the second aspect, in an optional implementation, the electronic device is also used to: broadcast the first information of the first terminal device.

[0038] In conjunction with the second aspect, in an optional implementation, if the first distance between the first terminal device and the Bluetooth peripheral device is smaller than the first distance between other terminal devices and the Bluetooth peripheral device, the electronic device is further used to: determine whether the first distance between the first terminal device and the Bluetooth peripheral device is within a second range;

[0039] If yes, the step of outputting a pairing notification on the first terminal device is performed.

[0040] In conjunction with the second aspect, in an optional implementation manner, the electronic device is further used to: receive a proximity discovery message;

[0041] In response to the proximity discovery message, a step of determining a first distance between the first terminal device and the Bluetooth peripheral device and a first distance between other terminal devices and the Bluetooth peripheral device is performed.

[0042] In combination with the second aspect, in an optional implementation, the electronic device is also used to: trigger the first terminal device to discard the proximity discovery message if there are other terminal devices whose first distance to the Bluetooth peripheral is smaller than the first distance between the first terminal device and the Bluetooth peripheral, or the first distance between the first terminal device and the Bluetooth peripheral is outside the second range.

[0043] In this aspect, the beneficial effects of the above-mentioned various optional implementations can refer to the beneficial effects of the first aspect and related implementations, and will not be repeated here.

[0044] In a third aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the method of the first aspect or any one of the implementations of the first aspect.

[0045] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method of the first aspect or any one of the implementation methods of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments of the present application will be described below.

[0047] Figure 1 It is a schematic diagram of the process of establishing a pairing connection;

[0048] Figure 2 It is an interface diagram of a terminal device;

[0049] Figure 3A It is a scene schematic diagram provided by the prior art;

[0050] Figure 3B It is a scenario diagram provided by the implementation of this application;

[0051] Figure 4 It is a flowchart of a method for outputting a pairing notification provided by an embodiment of the present application;

[0052] Figure 5 is a flowchart of another method for outputting a pairing notification provided by an embodiment of the present application;

[0053] Figure 6 It is a schematic diagram of a flow chart of calculating a penalty factor of a terminal device provided in an embodiment of the present application;

[0054] Figure 7 is a flowchart of another method for outputting a pairing notification provided in an embodiment of the present application;

[0055] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0056] Fig. 9 A schematic diagram of a software architecture provided for an embodiment of the present application. DETAILED DESCRIPTION

[0057] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0058] In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "at least one" means one or more items.

[0059] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0060] It should be pointed out that the "equal to" involved in the embodiments of the present application can be used in conjunction with "greater than", and is applicable to the technical solution adopted when "greater than" is used, and can also be used in conjunction with "less than", and is applicable to the technical solution adopted when "less than" is used. It should be noted that when "equal to" is used in conjunction with "greater than", it cannot be used in conjunction with "less than"; when "equal to" is used in conjunction with "less than", it cannot be used in conjunction with "greater than".

[0061] In order to solve the problem of pairing and connecting Bluetooth peripherals with terminal devices, the prior art proposes a method for pairing and connecting based on proximity discovery messages (which can be BLE broadcast messages). Optionally, the physical distance between the terminal device and the Bluetooth peripheral can be achieved through RSSI ranging. The physical distance between the terminal device and the Bluetooth peripheral is inversely proportional to the RSSI. The larger the RSSI, the smaller the physical distance between the terminal device and the Bluetooth peripheral; the smaller the RSSI, the larger the physical distance between the terminal device and the Bluetooth peripheral. For example, the correspondence between the physical distance between the terminal device and the Bluetooth peripheral and the RSSI can be expressed as:

[0062]

[0063] Wherein, r is the physical distance between the terminal device and the Bluetooth peripheral device, A is the preset signal strength when the Bluetooth peripheral device is 1 meter away from the terminal device, and n is the preset environmental attenuation factor.

[0064] like Figure 1 As shown, a schematic diagram of a process for establishing a pairing connection is shown. The Bluetooth peripheral can send a proximity discovery message. When the terminal device scans (receives) the proximity discovery message, the terminal device performs a received signal strength indication (RSSI) ranging based on the proximity discovery message, and determines the physical distance between the terminal device itself and the Bluetooth peripheral based on the RSSI ranging result. The terminal device can determine whether the physical distance between itself and the Bluetooth peripheral is within the first range. If so, a pairing notification is output so that the terminal device can be paired with the Bluetooth peripheral and establish a Bluetooth connection.

[0065] For example, Figure 2 This is a schematic diagram of an interface of a terminal device. Figure 2 As shown, the Bluetooth peripheral 201 can send a proximity discovery message. When the terminal device 202 scans (or receives) the proximity discovery message sent by the Bluetooth peripheral 201, it can determine the physical distance between the Bluetooth peripheral 201 and the terminal device 202 based on the proximity discovery message. When the terminal device 202 determines that the physical distance between the Bluetooth peripheral 201 and the terminal device 202 is within the first range, the pairing notification 202-1 can be displayed on the interface. The pairing notification 202-1 is used to notify that the Bluetooth peripheral 201 is allowed to establish a Bluetooth pairing with the terminal device 202. For example, the pairing notification 202-1 displays the Bluetooth peripheral logo 202-2 ( Figure 2Taking the icon of a Bluetooth peripheral as an example, the identifier 202-2 may also be the model of the Bluetooth peripheral), as well as an "Allow" control 202-3 and a "Reject" control 202-4. A user clicking the "Allow" control 202-3 may trigger the Bluetooth peripheral 201 to pair with the terminal device 202 and establish a Bluetooth connection. A user clicking the "Reject" control 202-4 may trigger the terminal device to delete the pairing notification. It should be noted that the pairing notification shown in the embodiment of the present application is only for illustrative purposes, and the pairing notification may also be in other forms, for example, the pairing notification may also be a voice notification, without limitation.

[0066] With the continuous expansion of Bluetooth communication application scenarios, Bluetooth attack incidents are becoming more and more common. For example, after knowing the format of the proximity discovery message, a malicious attacker can send a forged proximity discovery message at the maximum transmission power, causing terminal devices within a large range to output pairing notifications. These pairing notifications will cause harassment to users and affect the user experience. It should be noted that a forged proximity discovery message may refer to a proximity discovery message whose actual transmission power is greater than the reported transmission power. Optionally, the proximity discovery message may carry a "tx power" field, and the "tx power" field is used to report the transmission power of the proximity discovery message. Therefore, how to prevent terminal devices within a large range from outputting pairing notifications is an urgent problem to be solved.

[0067] The embodiment of the present application proposes a method for outputting a pairing notification and related devices. In this method, based on the first distances between the first terminal device and the other terminal devices and the Bluetooth peripheral respectively, it can be determined whether the first distance between the first terminal device and the Bluetooth peripheral is less than the first distance between the other terminal devices and the Bluetooth peripheral; if so, a pairing notification is output on the first terminal device. Among them, the other terminal devices are terminal devices other than the first terminal device whose physical distances to the Bluetooth peripheral are within the first range; the first distance between each terminal device and the Bluetooth peripheral is related to the physical distance between the terminal device and the Bluetooth peripheral. Different from the technical solution of outputting pairing notifications on both the first terminal device and the other terminal devices, the technical solution of the embodiment of the present application only outputs pairing notifications on the first terminal device whose first distance to the Bluetooth peripheral is the smallest, which can effectively avoid outputting pairing notifications on terminal devices within a large range.

[0068] Combine the following Figure 3A The scene diagram and Figure 3B The scenario diagrams described above elaborate on the differences between the embodiments of the present application and the existing solutions. Figure 3A A schematic diagram of a scenario provided by the prior art is shown. Figure 3B A schematic diagram of a scenario provided by an embodiment of the present application is shown. Figure 3A and Figure 3BThe communication system in the scenario shown may include a Bluetooth peripheral 301 and multiple terminal devices (such as multiple terminal devices including a first terminal device 302 and other terminal devices 303). Among them, the physical distance between the first terminal device 302 and the Bluetooth peripheral 301 is within the first range, and the physical distance between the other terminal devices 303 and the Bluetooth peripheral 301 is also within the first range. It should be noted that the first terminal device and the other terminal devices are only used to represent different terminal devices. In other scenarios, the other terminal devices 303 can also be replaced by "second terminal device", "third terminal device", etc., without limitation. It should be noted that in other implementations, the other terminal devices may also include two, three or more terminal devices, without limitation.

[0069] like Figure 3A As shown, when the physical distance between the first terminal device 302 and the Bluetooth peripheral device 301 is within the first range, and the physical distance between the other terminal devices 303 and the Bluetooth peripheral device 301 is also within the first range, if the existing technical solution is implemented, the pairing notification 300 can be output on the first terminal device 302 and the other terminal devices 303. That is to say, when the Bluetooth peripheral device 301 as a malicious attacker sends a proximity discovery message at the maximum transmission power, the physical distances between multiple terminal devices and the Bluetooth peripheral device 301 are all within the first range, and multiple terminal devices all output pairing notifications. When the number of other terminal devices is large, the terminal devices within a large range all output pairing notifications.

[0070] like Figure 3B As shown, when the physical distance between the first terminal device 302 and the Bluetooth peripheral device 301 is within the first range, and the physical distance between the other terminal devices 303 and the Bluetooth peripheral device 301 is also within the first range, if the embodiment of the present application is implemented, the first distance between the first terminal device 302 and the Bluetooth peripheral device 301 can be determined based on the physical distance between the first terminal device 302 and the Bluetooth peripheral device 301, and the first distance between the other terminal devices 303 and the Bluetooth peripheral device 301 can be determined based on the physical distance between the other terminal devices 303 and the Bluetooth peripheral device 301. Then, it is determined whether the first distance between the first terminal device 302 and the Bluetooth peripheral device 301 is less than the first distance between the other terminal devices 303 and the Bluetooth peripheral device 301; if so, a pairing notification is output on the first terminal device 302. That is to say, when the Bluetooth peripheral 301 acting as a malicious attacker sends a proximity discovery message at the maximum transmission power, when the physical distances between multiple terminal devices and the Bluetooth peripheral 301 are all within the first range, the pairing notification is only output on the first terminal device 302 which has the shortest first distance to the Bluetooth peripheral 301, which can effectively avoid the output of pairing notifications by terminal devices within a large range.

[0071] Optionally, the embodiment of the present application may be executed by a device in the communication system (such as a first terminal device or other terminal devices, etc.), or by a management device outside the communication system. The management device is used to manage the communication system. It should be noted that when the embodiment of the present application is executed by a management device, the management device and the devices in the communication system can communicate with each other. For ease of explanation, "devices in the communication system" and "management devices" may be collectively referred to as "electronic devices".

[0072] Optionally, the Bluetooth peripherals described in the embodiments of the present application are not limited to Bluetooth headsets, mobile phones, Bluetooth mice, tablet computers, laptop computers, desktop computers, display screens, Bluetooth keyboards, Bluetooth printers, Bluetooth fax machines, Internet of Vehicles devices, etc.

[0073] Optionally, the terminal device described in the embodiment of the present application may include but is not limited to portable electronic devices such as mobile phones, tablet computers, personal digital assistants (PDAs), wearable devices, etc. Exemplary embodiments of portable electronic devices include but are not limited to portable electronic devices equipped with iOS, Android, Microsoft or other operating systems. The above-mentioned portable electronic devices may also be other portable electronic devices, such as laptop computers (laptops) with touch-sensitive surfaces (e.g., touch panels). It should also be understood that in some other embodiments of the present application, the terminal device may not be a portable electronic device, but a desktop computer with a touch-sensitive surface (e.g., a touch panel). The terminal device may include a first terminal device or other terminal devices.

[0074] Optionally, the management device described in the embodiment of the present application may be a terminal device or a server. The server may be a single server or a combination of multiple servers. The server may be an independent physical server or a server cluster or distributed system composed of multiple physical servers. It may also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, content delivery networks (CDN), middleware services, domain name services, security services, and big data and artificial intelligence platforms, etc.

[0075] The method for outputting pairing notification provided by an embodiment of the present application is described below with reference to the accompanying drawings.

[0076] See also Figure 4 , Figure 4 1 is a flow chart of a method for outputting a pairing notification provided by an embodiment of the present application. The method may be executed by a first terminal device or a management device. Figure 4As shown, the method of outputting the pairing notification includes but is not limited to S401-S403:

[0077] S401: Determine a first distance between a first terminal device and a Bluetooth peripheral device and a first distance between other terminal devices and the Bluetooth peripheral device.

[0078] It should be noted that for the sake of convenience, the "first terminal device" and the "other terminal devices" may be collectively referred to as terminal devices.

[0079] Among them, the physical distance between each terminal device and the Bluetooth peripheral device is within the first range. That is to say, the first terminal device is a terminal device whose physical distance with the Bluetooth peripheral device is within the first range, and other terminal devices are terminal devices other than the first terminal device whose physical distance with the Bluetooth peripheral device is within the first range. It should be noted that the first range can be any distance interval, for example, the first range is a distance interval of 0 cm to 20 cm, a distance interval of 20 cm to 50 cm, etc., without limitation.

[0080] The first distance between each terminal device and the Bluetooth peripheral device is related to the physical distance between the terminal device and the Bluetooth peripheral device. This will be described in detail in conjunction with Implementation 1.1 and Implementation 1.2.

[0081] Implementation 1.1: The first distance between each terminal device and the Bluetooth peripheral device is equal to the physical distance between the terminal device and the Bluetooth peripheral device. In other words, determining the first distance between each terminal device and the Bluetooth peripheral device includes: using the physical distance between each terminal device and the Bluetooth peripheral device as the first distance between each terminal device and the Bluetooth peripheral device.

[0082] Implementation 1.2: The first distance between each terminal device and the Bluetooth peripheral is equal to the product of the physical distance between the terminal device and the Bluetooth peripheral and the penalty factor of the terminal device. The penalty factor of each terminal device is related to at least one parameter of the screen state, running application, AR state, RSSI of the proximity discovery message, or the transmission power of the proximity discovery message of the terminal device. That is to say, determining the first distance between each terminal device and the Bluetooth peripheral includes: s11, determining the penalty factor of each terminal device based on at least one parameter of the screen state, running application, AR state, RSSI of the proximity discovery message, or the transmission power of the proximity discovery message of each terminal device; s12, multiplying the physical distance between each terminal device and the Bluetooth peripheral by the penalty factor of each terminal device to obtain the first distance between each terminal device and the Bluetooth peripheral.

[0083] S402: Based on the first distances between the first terminal device and the other terminal devices and the Bluetooth peripheral device respectively, determine whether the first distance between the first terminal device and the Bluetooth peripheral device is smaller than the first distances between the other terminal devices and the Bluetooth peripheral device.

[0084] In an optional implementation, step S402 specifically includes: comparing the first distance between the first terminal device and the Bluetooth peripheral device with the first distances between other terminal devices and the Bluetooth peripheral device, and determining whether the first distance between the first terminal device and the Bluetooth peripheral device is smaller than the first distances between the other terminal devices and the Bluetooth peripheral device. Figure 3B Taking the communication system shown as an example, the first distance between the first terminal device 302 and the Bluetooth peripheral device 301 can be compared with the first distance between the other terminal devices 303 and the Bluetooth peripheral device 301 to determine whether the first distance between the first terminal device 302 and the Bluetooth peripheral device 301 is smaller than the first distance between the other terminal devices 303 and the Bluetooth peripheral device 301. For another example, if there are multiple other terminal devices 303 (for example, the other terminal devices 303 specifically include other terminal devices 303-1 and other terminal devices 303-2), the first distance between the first terminal device 302 and the Bluetooth peripheral device 301 can be compared with the first distance between the other terminal device 303-1 and the Bluetooth peripheral device 301, and the first distance between the other terminal device 303-2 and the Bluetooth peripheral device 301 to determine whether the first distance between the first terminal device 302 and the Bluetooth peripheral device 301 is smaller than the first distance between the other terminal device 303-1 and the Bluetooth peripheral device 301, and smaller than the first distance between the other terminal device 303-2 and the Bluetooth peripheral device 301.

[0085] S403: If yes, a pairing notification is output on the first terminal device; the pairing notification is used to notify that the first terminal device is allowed to establish a Bluetooth pairing with the Bluetooth peripheral device.

[0086] In an optional implementation manner, if the solution of the present application is executed by a first terminal device, a pairing notification is output on the first terminal device, including: the first terminal device directly outputs the pairing notification.

[0087] In another optional implementation, if the solution of the present application is executed by a management device, outputting a pairing notification on the first terminal device includes: the management device sends a first instruction to the first terminal device, the first instruction is used to instruct the first terminal device to output a pairing notification. When the first terminal device receives the first instruction, the first terminal device outputs a pairing notification.

[0088] Optionally, the first terminal device outputs a pairing notification, including: the first terminal device calls a specific module (such as a nearby module and / or an iconnect module) to output a pairing notification.

[0089] Optionally, the first terminal device may output a pairing notification once within a screen-on / off cycle, so as to avoid the first terminal device repeatedly outputting the same or different pairing notifications within a screen-on / off cycle, thereby avoiding harassment to the user and improving the user experience.

[0090] In the embodiment of the present application, for the first terminal device and other terminal devices whose physical distances to the Bluetooth peripheral are within the first range, the electronic device can determine the first distance between the first terminal device and the Bluetooth peripheral, and the first distance between the other terminal devices and the Bluetooth peripheral, and when the first distance between the first terminal device and the Bluetooth peripheral is less than the first distance between the other terminal devices and the Bluetooth peripheral, a pairing notification can be output on the first terminal device. It can be seen that, unlike the technical solution of outputting pairing notifications on both the first terminal device and the other terminal devices, the embodiment of the present application only outputs pairing notifications on the first terminal device whose first distance to the Bluetooth peripheral is the smallest, which can effectively avoid outputting pairing notifications on terminal devices within a large range.

[0091] In addition, since the pairing notification is only output on the first terminal device with the shortest first distance between it and the Bluetooth peripheral, the probability of the terminal device establishing a Bluetooth connection with the Bluetooth peripheral is reduced, thereby reducing the probability of data leakage via the Bluetooth connection (such as reducing the probability of leakage of personal privacy data such as user call records and text message records), which can effectively ensure data security.

[0092] See also Figure 5 , Figure 5 It is a flowchart of another method for outputting pairing notification provided in an embodiment of the present application. Figure 5 The method described Figure 4 Compared with the method described above, Figure 5 The method described is described by taking the first terminal device executing the solution of the embodiment of the present application as an example. Figure 5 As shown, the method includes but is not limited to:

[0093] S501: The first terminal device determines a first distance between the first terminal device and the Bluetooth peripheral device.

[0094] Based on implementation 1.1, step S501 specifically includes: taking the physical distance between the first terminal device and the Bluetooth peripheral device as the first distance between the first terminal device and the Bluetooth peripheral device. It can be seen that in this implementation, the calculation method of the first distance between the terminal device and the Bluetooth peripheral device is relatively simple, which can effectively save computing resources.

[0095] Based on implementation 1.2, step S501 specifically includes: the first terminal device determines the penalty factor of the first terminal device based on at least one parameter of the screen status, running application, AR status, RSSI of the proximity discovery message, or transmission power of the proximity discovery message of the first terminal device; and multiplies the physical distance between the first terminal device and the Bluetooth peripheral device by the penalty factor of the first terminal device to obtain the first distance between the first terminal device and the Bluetooth peripheral.

[0096] In an optional implementation, the first terminal device determines the penalty factor of the first terminal device based on at least one parameter of the first terminal device's screen state, running applications, AR state, RSSI of proximity discovery messages, or transmission power of proximity discovery messages, including: for each parameter of the first terminal device, determining whether the parameter of the first terminal device meets the condition corresponding to the parameter; if so, determining the penalty factor of the parameter of the first terminal device, and adding the penalty factors of each parameter of the first terminal device to obtain the penalty factor of the first terminal device.

[0097] The following is a detailed description of the conditions corresponding to each parameter in conjunction with Table 1, as well as the penalty factor corresponding to the parameter when the condition is met. As shown in Table 1, when the parameter of the first terminal device is "screen status", the condition corresponding to the "screen status" is "whether it is in the screen off state", and the penalty factor corresponding to the "screen status" is "1"; when the parameter of the first terminal device is "running application", the condition corresponding to the "running application" is "whether it is a first type of application (such as a game application, a live broadcast application, etc.)", and the penalty factor corresponding to the "running application" is "1"; when the parameter of the first terminal device is "AR status", the condition corresponding to the "AR status" is "whether it is a non-stationary state or a non-micro-motion state (such as cycling, running) , driving, etc.)", the penalty factor corresponding to the AR state is "1"; when the parameter of the first terminal device is "RSSI of proximity discovery message", the condition corresponding to the "RSSI of proximity discovery message" is "whether it is a non-normal distribution", and the penalty factor corresponding to the RSSI of proximity discovery message is "1"; when the parameter of the first terminal device is "transmit power of proximity discovery message", the condition corresponding to the "transmit power of proximity discovery message" is "whether it is greater than the first value (such as 20 decibels)", and the penalty factor corresponding to the "transmit power of proximity discovery message" is "1". It should be noted that the parameters shown in the embodiments of the present application are only for exemplary purposes. In other embodiments, the parameters of the terminal device may also be other parameters, such as paired devices of the terminal device, etc., without limitation.

[0098] Table 1

[0099]

[0100] For example, taking the case where the screen state of the first terminal device is "screen off state", the running application is "music playback application", and the AR state is "non-static state", the penalty factor of the first terminal device may be "2".

[0101] For another example, taking the case where the screen state of the first terminal device is "on screen state", the running application is "game application", the AR state is "stationary state", the RSSI of the proximity discovery message is non-normally distributed, and the sending power of the proximity discovery message is greater than the first value, the penalty factor of the first terminal device may be "3".

[0102] The following example takes at least one parameter including the screen status of the terminal device, the running application, the AR status, the RSSI of the proximity discovery message, and the transmission power of the proximity discovery message as an example. Figure 6 Detailed description of the relevant embodiments for calculating the penalty factor of the terminal device, Figure 6 1 is a flow chart of calculating a penalty factor of a terminal device provided in an embodiment of the present application. Figure 6 The following may include but are not limited to:

[0103] S61: Set the initial value P of the penalty factor of the terminal device to 0.

[0104] S62: Obtain the screen status, running applications, AR status, RSSI of the proximity discovery message, and the transmission power of the proximity discovery message of the terminal device.

[0105] S63: Determine whether the screen status of the terminal device is off. If so, update the penalty factor of the terminal device, that is, P=P+1; otherwise, keep the penalty factor of the terminal device unchanged, that is, P=P.

[0106] S64: Determine whether the running application of the terminal device is a first type application. If so, update the penalty factor of the terminal device, that is, P=P+1; otherwise, keep the penalty factor of the terminal device unchanged, that is, P=P.

[0107] S65: Determine whether the AR state of the terminal device is a non-static state or a non-micro-motion state. If so, update the penalty factor of the terminal device, that is, P=P+1; otherwise, keep the penalty factor of the terminal device unchanged, that is, P=P.

[0108] S66: Determine whether the RSSI of the proximity discovery message of the terminal device is non-normally distributed. If so, update the penalty factor of the terminal device, that is, P=P+1; otherwise, keep the penalty factor of the terminal device unchanged, that is, P=P.

[0109] S67: Determine whether the transmission power of the proximity discovery message of the terminal device is greater than the first value. If so, update the penalty factor of the terminal device, that is, P=P+1; otherwise, keep the penalty factor of the terminal device unchanged, that is, P=P.

[0110] S68: Output the penalty factor P of the terminal device.

[0111] It should be noted that the embodiment of the present application does not limit the execution order of steps S63 to S67.

[0112] It should be noted that the penalty factors corresponding to the above parameters can be equal or different. For example, the parameter "RSSI of proximity discovery message" is more important, and the penalty factor corresponding to "RSSI of proximity discovery message" can be set larger (such as the penalty factor is 2).

[0113] It can be seen that in this embodiment, the first distance between the terminal device and the Bluetooth peripheral is not only related to the physical distance between the terminal device and the Bluetooth peripheral, but also to at least one parameter of the terminal device's screen state, running application, AR state, RSSI of the proximity discovery message, or the transmission power of the proximity discovery message. Since at least one parameter of the terminal device characterizes the scenario in which the user currently uses the terminal device, the penalty factor of the terminal device determined based on at least one parameter of the terminal device can characterize the user's current need to connect to the Bluetooth peripheral (such as when the penalty factor is large, the user's current need to connect to the Bluetooth peripheral is low; when the penalty factor is small, the user's current need to connect to the Bluetooth peripheral is high), then the first distance determined based on the penalty factor of the terminal device also characterizes the user's current need to connect to the Bluetooth peripheral. When the pairing notification is output on the terminal device with the shortest first distance, it is beneficial for the terminal device of the user who currently has a high need to connect to the Bluetooth peripheral to establish a connection with the Bluetooth peripheral.

[0114] S502: Each of the other terminal devices sends the first information of the terminal device to the first terminal device. Correspondingly, the first terminal device receives the first information of the terminal device from each of the other terminal devices.

[0115] Among them, the first information of each terminal device among the other terminal devices includes the physical distance between the terminal device and the Bluetooth peripheral device; or, the first information of each terminal device among the other terminal devices includes at least one parameter of the terminal device's screen status, running applications, AR status, RSSI of proximity discovery messages, and transmission power of proximity discovery messages, as well as the physical distance between the terminal device and the Bluetooth peripheral device.

[0116] Optionally, the first information of each terminal device may also include other data, such as an identifier of the terminal device, an identifier of a Bluetooth peripheral, etc., without limitation. Optionally, the identifier may be a Media Access Control (MAC) address or other identifiers.

[0117] In an optional implementation, the first information of each terminal device is sent in the form of a broadcast message. Optionally, the broadcast message can be sent using a corresponding broadcast starting point, broadcast interval, and broadcast duration. For example, the broadcast message of each terminal device is sent with a broadcast starting point when the physical distance between the terminal device and the Bluetooth peripheral is detected to be within the first range, a broadcast interval of 20 seconds, and a broadcast duration of 30 seconds.

[0118] In an optional implementation manner, the first terminal device may also use the corresponding receiving start point, receiving interval, and receiving duration to receive the broadcast message, which will not be described in detail.

[0119] An optional implementation manner, in which the first terminal device receives the first information of the terminal device from each of the other terminal devices, includes: the first terminal device needs to filter out useless information from all information to obtain the first information of each of the other terminal devices. For example, the broadcast message may also carry data transmission information. In this case, the first terminal device needs to filter out the data transmission information from the broadcast message to obtain the first information of each of the other terminal devices. For another example, the broadcast message may also carry the first information related to other Bluetooth peripherals (such as the first information including the physical distance between the terminal device and other Bluetooth peripherals in other terminal devices). In this case, the first terminal device needs to filter out the first information related to other Bluetooth peripherals from the broadcast message to obtain the first information of each of the other terminal devices.

[0120] S503: The first terminal device determines the first distance between the first terminal device and the Bluetooth peripheral device based on the first information of each terminal device in other terminal devices.

[0121] Based on implementation 1.1, step S503 specifically includes: based on the first information, taking the physical distance between each terminal device in other terminal devices and the Bluetooth peripheral device as the first distance between the terminal device and the Bluetooth peripheral device. The first information includes the physical distance between the terminal device in other terminal devices and other Bluetooth peripheral devices.

[0122] Based on implementation 1.2, step S501 specifically includes: the first terminal device determines the penalty factor of the terminal device based on at least one parameter of the screen state, running application, AR state, RSSI of the proximity discovery message, or the transmission power of the proximity discovery message of each terminal device in the other terminal devices in the first information; and multiplies the physical distance between the terminal device and the Bluetooth peripheral in the first information by the penalty factor of the terminal device to obtain the first distance between the terminal device and the Bluetooth peripheral. Among them, the first information includes the first information of each terminal device in the other terminal devices, including at least one parameter of the screen state, running application, AR state, RSSI of the proximity discovery message, and the transmission power of the proximity discovery message of the terminal device, and the physical distance between the terminal device and the Bluetooth peripheral.

[0123] It should be noted that for the specific related description, please refer to step S501 and will not be repeated here.

[0124] S504: The first terminal device determines whether the first distance between the first terminal device and the Bluetooth peripheral device is smaller than the first distance between the other terminal devices and the Bluetooth peripheral device based on the first distances between the first terminal device and the other terminal devices and the Bluetooth peripheral device respectively.

[0125] S505: If yes, the first terminal device outputs a pairing notification; the pairing notification is used to notify that the first terminal device is allowed to establish a Bluetooth pairing with the Bluetooth peripheral device.

[0126] In an optional implementation, if the first distance between the first terminal device and the Bluetooth peripheral is smaller than the first distance between other terminal devices and the Bluetooth peripheral, a pairing notification is output on the first terminal device; if there are other terminal devices whose first distance to the Bluetooth peripheral is smaller than the first distance between the first terminal device and the Bluetooth peripheral, the first terminal device discards the proximity discovery message. It should be noted that the proximity discovery message may be received by the first terminal device before determining the physical distance between itself and the Bluetooth peripheral. In other words, the Bluetooth peripheral sends a proximity discovery message, and accordingly, the first terminal device can receive the proximity discovery message, and execute steps S501 to S505 in response to the proximity discovery message. In addition, when there are other terminal devices whose first distance to the Bluetooth peripheral is smaller than the first distance between the first terminal device and the Bluetooth peripheral, the first terminal device discards the received proximity discovery message.

[0127] Optionally, the Bluetooth peripheral may send a proximity discovery message when the pairing mode is turned on. For example, when the Bluetooth peripheral is used for the first time and turned on, the Bluetooth peripheral enters the pairing mode and sends a proximity discovery message. Taking a Bluetooth headset as an example, when the Bluetooth headset is used for the first time and the headset box is opened, the Bluetooth headset is turned on for the first time, the Bluetooth headset enters the pairing mode and sends a proximity discovery message.

[0128] In an optional implementation, if the first distance between the first terminal device and the Bluetooth peripheral is smaller than the first distance between the other terminal devices and the Bluetooth peripheral, the method further includes: determining whether the first distance between the first terminal device and the Bluetooth peripheral is within the second range; if the first distance between the first terminal device and the Bluetooth peripheral is within the second range, outputting a pairing notification on the first terminal device; if the first distance between the first terminal device and the Bluetooth peripheral is outside the second range, the first terminal device discards the proximity discovery message. Wherein, the second range can also be any distance interval, for example, the second range is a distance interval of 20 cm to 50 cm, a distance interval of 1 m to 3 m, etc., without limitation. It can be seen that in this implementation, the first distance between the first terminal device and the Bluetooth peripheral can be further compared with the second range, and the pairing notification is output only when the first distance between the first terminal device and the Bluetooth peripheral is within the second range, and the pairing notification is not output when the first distance between the first terminal device and the Bluetooth peripheral is outside the second range, further reducing the probability of the terminal device and the Bluetooth peripheral establishing a Bluetooth connection, thereby further reducing the probability of data leakage via the Bluetooth connection, and further ensuring the security of the data.

[0129] It should be noted that the embodiment of the present application does not limit the execution order of step S501 and step S502 to step S503. For example, step S501 may be executed first, and then step S502 to step S503; for another example, step S502 to step S503 may be executed first, and then step S501; for another example, step S501 and step S502 to step S503 may be executed simultaneously.

[0130] It can be seen that in the embodiment of the present application, the first terminal device can receive the first information of its terminal device, and determine the first distance between other terminal devices and the Bluetooth peripheral device based on the first information of other terminal devices, so that the first terminal device can judge whether the first terminal device itself is the terminal device with the shortest first distance between the Bluetooth peripheral device and the first distance between other terminal devices and the Bluetooth peripheral device based on the first distance between itself and the Bluetooth peripheral device and the first distance between other terminal devices and the Bluetooth peripheral device. When the first terminal device determines that it is the terminal device with the shortest first distance between itself and the Bluetooth peripheral device, the first terminal device outputs a pairing notification; when the first terminal device determines that it is not the terminal device with the shortest first distance between itself and the Bluetooth peripheral device, the first terminal device does not output a pairing notification (i.e., discards the proximity discovery message). In addition, since the present application scheme is executed by the first terminal device, the first terminal device can directly determine the first distance between itself and the Bluetooth peripheral device, which is conducive to the first terminal device to more timely judge whether it is the terminal device with the shortest first distance between itself and the Bluetooth peripheral device, and the user experience is better.

[0131] Need to explain, Figure 5 The method described is described by taking the first terminal device executing the embodiment of the present application as an example. For the description of other terminal devices executing the embodiment of the present application, please refer to Figure 5 The related embodiments are not described in detail.

[0132] See also Figure 7 , Figure 7 This is a flowchart of another method for outputting a pairing notification provided in an embodiment of the present application. Figure 7 The method described Figure 4 Compared with the method described above, Figure 7 The method described is described by taking the example of a management device executing the solution of the embodiment of the present application. Figure 7 As shown, the method includes but is not limited to:

[0133] S701: The first terminal device sends first information of the first terminal device to the management device. Correspondingly, the management device receives the first information of the first terminal device from the first terminal device.

[0134] Among them, the first information of the first terminal device includes the physical distance between the first terminal device and the Bluetooth peripheral device; or, the first information of the first terminal device includes at least one parameter of the screen status, running applications, AR status, RSSI of the proximity discovery message, and transmission power of the proximity discovery message of the first terminal device, and the physical distance between the first terminal device and the Bluetooth peripheral device.

[0135] It should be noted that other descriptions about the first information of the first terminal device can be found in step S502 and will not be repeated here.

[0136] S702: The management device determines a first distance between the first terminal device and the Bluetooth peripheral device based on the first information of the first terminal device.

[0137] It should be noted that for the related description, please refer to step S501 and no further description will be given.

[0138] S703: Each of the other terminal devices sends the first information of the terminal device to the management device. Correspondingly, the management device receives the first information of the terminal device from each of the other terminal devices.

[0139] It should be noted that for the related description, please refer to step S502 and no further description will be given.

[0140] S704: The management device determines the first distance between each terminal device and the Bluetooth peripheral device based on the first information of each terminal device in other terminal devices.

[0141] It should be noted that for the related description, please refer to step S503 and no further description will be given.

[0142] S705: The management device determines whether the first distance between the first terminal device and the Bluetooth peripheral device is smaller than the first distance between the other terminal devices and the Bluetooth peripheral device based on the first distances between the first terminal device and the other terminal devices and the Bluetooth peripheral device respectively.

[0143] S706: If yes, a pairing notification is output on the first terminal device; the pairing notification is used to notify that the first terminal device is allowed to establish a Bluetooth pairing with the Bluetooth peripheral device.

[0144] In an optional implementation, outputting a pairing notification on the first terminal device includes: the management device sends a first instruction to the first terminal device, where the first instruction is used to instruct the first terminal device to output a pairing notification.

[0145] It should be noted that for other related descriptions of step S705 and step S706, please refer to Figure 4 The related embodiments are not described in detail.

[0146] In an optional implementation, step S705 and step S706 may be replaced as follows: the management device determines the terminal device with the shortest first distance between the first terminal device and the other terminal devices and the Bluetooth peripheral based on the first distances between the first terminal device and the other terminal devices and the Bluetooth peripheral respectively, and outputs a pairing notification on the terminal device with the shortest first distance between the first terminal device and the Bluetooth peripheral.

[0147] It should be noted that the embodiment of the present application does not limit the execution order of steps S701 to S702 and steps S703 to S704. For example, steps S701 to S702 may be executed first, and then steps S703 to S704; for another example, steps S703 to S704 may be executed first, and then steps S701 to S702; for another example, steps S701 to S702 and steps S703 to S704 may be executed simultaneously.

[0148] It can be seen that in the embodiment of the present application, the management device can receive the first information of the first terminal device, and determine the first distance between the first terminal device and the Bluetooth peripheral device based on the first information of the first terminal device, and receive the first information of other terminal devices, and determine the first distance between other terminal devices and the Bluetooth peripheral device based on the first information of other terminal devices, and determine the terminal device with the shortest first distance between the first terminal device and the other terminal devices and the Bluetooth peripheral device based on the first distance between the first terminal device and the other terminal devices, and output a pairing notification on the terminal device. For example, when it is determined that the first terminal device is the terminal device with the shortest first distance between the first terminal device and the Bluetooth peripheral device, a pairing notification is output on the first terminal device. In addition, since the scheme of the present application is executed by the management device, the management device can directly determine the terminal device with the shortest first distance between the first terminal device and the Bluetooth peripheral device from multiple terminal devices, without each terminal device having to determine whether it is the terminal device with the shortest first distance between the Bluetooth peripheral device, which can reduce the data processing steps, reduce the data processing flow, and save data processing resources.

[0149] See also Figure 8 , Figure 8 The structure diagram of the electronic device 100 provided in the embodiment of the present application is shown. The embodiment is specifically described below by taking the electronic device 100 as the first terminal device as an example. It should be understood that: Figure 8 The electronic device 100 shown is only an example, and the electronic device 100 may have more Figure 8 More or fewer components may be shown, two or more components may be combined, or there may be a different configuration of components. Figure 8 The various components shown in the EMBODIMENTS 2000 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.

[0150] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0151] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0152] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0153] In some embodiments, the processor 110 may be used to determine whether the first distances between the electronic device 100 and the Bluetooth peripheral device are smaller than the first distances between other terminal devices and the Bluetooth peripheral device.

[0154] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0155] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0156] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuits sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0157] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.

[0158] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.

[0159] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0160] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.

[0161] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.

[0162] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0163] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

[0164] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0165] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0166] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0167] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0168] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0169] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0170] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0171] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2. In some embodiments of the present application, the electronic device can obtain the current location information through the wireless communication module 160.

[0172] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0173] Optionally, the electronic device 100 may communicate with other devices via wireless communication technology. For example, the electronic device 100 may receive first information from other terminal devices via wireless communication technology, or broadcast the first information of the electronic device 100 itself.

[0174] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0175] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0176] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0177] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0178] In some embodiments, the display screen 194 may be used to display a user interface involved in the embodiments of the present application, the user interface including a pairing notification, and the description of the user interface may refer to the above Figure 2 The content described.

[0179] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0180] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0181] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0182] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0183] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0184] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0185] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0186] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.

[0187] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0188] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0189] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0190] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.

[0191] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.

[0192] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0193] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed. In some other embodiments of the present application, the pressure sensor 180A may also be disposed on the frame of the electronic device 100. The electronic device 100 may calculate the touch point where the user and the electronic device 100 are in contact through the pressure detected by the pressure sensor 180A.

[0194] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the shaking of the electronic device 100, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes. In some embodiments of the present application, the electronic device 100 can determine whether the electronic device is flipped back and forth by the user, whether it is in a vertical posture, etc. through the gyro sensor 180B.

[0195] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.

[0196] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.

[0197] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device, and is applied to applications such as horizontal and vertical screen switching and pedometers. In some embodiments of the present application, the electronic device 100 can determine whether the electronic device is flipped forward and backward by the user, whether it is in a vertical posture, etc. through the acceleration sensor 180E.

[0198] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.

[0199] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.

[0200] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.

[0201] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0202] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of a processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

[0203] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0204] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.

[0205] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0206] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0207] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0208] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0209] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.

[0210] Fig. 9 It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.

[0211] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.

[0212] The application layer can include a series of application packages.

[0213] like Fig. 9 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, short message, file browser, etc.

[0214] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0215] like Fig. 9 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0216] The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc. In the embodiment of the present application, the window manager can obtain the sizes of the two display screens provided by the electronic device 100 and uniformly manage the contents displayed on the two display screens.

[0217] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0218] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0219] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).

[0220] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0221] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window (such as the pairing notification involved in the embodiment of the present application). For example, a text message is prompted in the status bar, a prompt sound is emitted, the electronic device vibrates, the indicator light flashes, etc.

[0222] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0223] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0224] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0225] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0226] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0227] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0228] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0229] A 2D graphics engine is a drawing engine for 2D drawings.

[0230] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0231] The following is an illustrative description of the workflow of the software and hardware of the electronic device 100 in conjunction with a Bluetooth pairing scenario.

[0232] When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into raw input events (including touch coordinates, timestamp of the touch operation, and other information). The raw input events are stored in the kernel layer. The application framework layer obtains the raw input events from the kernel layer and identifies the control corresponding to the input event. For example, if the touch operation is a touch single-click operation and the control corresponding to the single-click operation is an allowed control for pairing notification, the Bluetooth application calls the interface of the application framework layer, and then starts iconnect by calling the kernel layer, and establishes a Bluetooth connection through iconnect.

[0233] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for outputting a pairing notification, characterized in that: The method comprises: Determine a first distance between a first terminal device and a Bluetooth peripheral device and a first distance between other terminal devices and the Bluetooth peripheral device; the other terminal devices are terminal devices other than the first terminal device whose physical distance to the Bluetooth peripheral device is within a first range; the first distance between each terminal device and the Bluetooth peripheral device is related to the physical distance between the terminal device and the Bluetooth peripheral device; Based on the first distances between the terminal device and the other terminal devices and the Bluetooth peripheral device respectively, determining whether the first distance between the first terminal device and the Bluetooth peripheral device is smaller than the first distance between the other terminal devices and the Bluetooth peripheral device; If so, a pairing notification is output on the first terminal device; the pairing notification is used to notify that the first terminal device is allowed to establish Bluetooth pairing with the Bluetooth peripheral device.

2. The method according to claim 1, characterized in that The first distance between each terminal device and the Bluetooth peripheral device is equal to the product of the physical distance between the terminal device and the Bluetooth peripheral device and the penalty factor of the terminal device; the penalty factor of each terminal device is related to at least one parameter of the terminal device's screen status, running applications, augmented reality AR status, received signal strength indication RSSI of proximity discovery messages, or transmission power of proximity discovery messages.

3. The method according to claim 1, characterized in that The first distance between each terminal device and the Bluetooth peripheral device is equal to the physical distance between the terminal device and the Bluetooth peripheral device.

4. The method according to claim 2 or 3, characterized in that The method further comprises: Receiving first information of the other terminal device; The first information of each terminal device in the other terminal devices includes the physical distance between the terminal device and the Bluetooth peripheral device; or, The first information of each terminal device among the other terminal devices includes at least one parameter of the screen status, running applications, AR status, RSSI of the proximity discovery message, transmission power of the proximity discovery message, and the physical distance between the terminal device and the Bluetooth peripheral.

5. The method according to claim 2, characterized in that The method further comprises: For each parameter of each terminal device, determine whether the parameter of the terminal device meets the condition corresponding to the parameter; if so, determine the penalty factor of the parameter of the terminal device; For each terminal device, the penalty factor of each parameter of the terminal device is added together to obtain the penalty factor of the terminal device.

6. The method according to claim 4, characterized in that The method further comprises: Broadcast the first information of the first terminal device.

7. The method according to any one of claims 1 to 5, characterized in that: If the first distance between the first terminal device and the Bluetooth peripheral device is smaller than the first distance between the other terminal devices and the Bluetooth peripheral device, the method further includes: Determine whether a first distance between the first terminal device and the Bluetooth peripheral device is within a second range; If so, execute the step of outputting a pairing notification on the first terminal device.

8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: receiving proximity discovery messages; The step of determining the first distance between the first terminal device and the Bluetooth peripheral device and the first distance between other terminal devices and the Bluetooth peripheral device is performed in response to the proximity discovery message.

9. The method according to claim 8, characterized in that The method further comprises: If there are other terminal devices whose first distance to the Bluetooth peripheral is smaller than the first distance between the first terminal device and the Bluetooth peripheral, or the first distance between the first terminal device and the Bluetooth peripheral is outside the second range, the first terminal device is triggered to discard the proximity discovery message.

10. An electronic device comprising a touch screen, a memory, one or more processors, and one or more programs; wherein: The one or more programs are stored in the memory, and it is characterized in that when the one or more processors execute the one or more programs, the electronic device implements the method according to any one of claims 1 to 9.

11. A computer program product, characterized in that When the computer program product is executed on an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.