Device control method and apparatus, electronic device, and computer-readable storage medium

By using a UWB module to locate the target device and assess its signal strength, and selecting the preferred or alternative communication link, the stability problem of electronic devices when connecting across regions is solved, ensuring the stability of the communication link and the user experience.

CN115915018BActive Publication Date: 2026-02-17GEER TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211702696.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-28
Publication Date
2026-02-17
Estimated Expiration
2042-12-28

AI Technical Summary

Technical Problem

When electronic devices connect across regions, they are prone to randomly switching communication links, resulting in low stability of wireless communication capabilities. For example, Bluetooth devices may randomly switch between multiple devices, causing call interruptions, and Wi-Fi networks may randomly switch between multiple base stations, causing signal instability.

Method used

The UWB module tracks and locates the target device to determine whether it is within a preset geofence area. If it is within the area, the communication link between it and the electronic device is selected as the preferred link; otherwise, the alternative link with the strongest signal is selected for communication based on RSSI information.

Benefits of technology

This avoids electronic devices randomly switching communication links when crossing regions, ensuring stable communication quality and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115915018B_ABST
    Figure CN115915018B_ABST
Patent Text Reader

Abstract

This application discloses a device control method, apparatus, electronic device, and computer-readable storage medium. The device control method includes: tracking and locating a target device using a UWB module to obtain the target device's location information, wherein the target device is an external device with which a communication link has been established; determining whether the target device is located within a preset geofence area based on the target device's location information; if so, selecting the communication link established between the electronic device and the target device as the preferred communication link, and controlling the electronic device to perform data communication through the preferred communication link. This application can improve the stability of the wireless communication capability of electronic devices in cross-regional connections.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a device control method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] With the development of electronic devices, wearable devices such as headphones, smartwatches, smart bracelets, VR / AR glasses, and VR / AR helmets are becoming increasingly common, as are the application scenarios and internet access methods for these devices.

[0003] Since electronic devices often have service requirements such as data transmission, sharing, and access, they often need to establish communication links to access the network or to establish communication links with other electronic devices for data interconnection. Common ways to build communication links include Wireless Local Area Network (WLAN) (such as Wi-Fi networks), Bluetooth (BT), Bluetooth Low Energy (BLE), and Mobile Hotspot.

[0004] However, when electronic devices are used after establishing communication links, problems such as slow data communication rates and unstable communication often occur due to random switching of communication links across regions. Taking Bluetooth communication as an example, when multiple Bluetooth devices are connected to a mobile phone simultaneously, the phone sometimes randomly switches between these devices, causing sudden silences during calls because the Bluetooth signal is being switched away. Similarly, with Wi-Fi communication, when switching between multiple Wi-Fi base stations, such as in an office environment, the network sometimes suddenly switches to a Wi-Fi network with a weaker signal. This is because the current switching logic is based on RSSI strength, and the large error margin in RSSI data leads to random switching between multiple base stations.

[0005] Therefore, current electronic devices tend to randomly switch communication links when crossing regions, resulting in a technical problem where the wireless communication capabilities of electronic devices are not very stable when connecting across regions. Summary of the Invention

[0006] The main objective of this application is to provide a device control method, apparatus, electronic device, and computer-readable storage medium, which aims to solve the technical problem of low stability of wireless communication capabilities of electronic devices in cross-regional connections.

[0007] To achieve the above objectives, this application provides a device control method applied to an electronic device, the electronic device including a UWB module, the method comprising:

[0008] The target device is tracked and located using a UWB module to obtain its location information. The target device is an external device with which a communication link has been established.

[0009] Based on the location information of the target device, determine whether the target device is located within a preset geofence area, wherein the geofence area is the fence area corresponding to the location of the electronic device;

[0010] If so, the communication link established between the electronic device and the target device is taken as the preferred communication link, and the electronic device is controlled to perform data communication through the preferred communication link.

[0011] Optionally, after the step of determining whether the target device is located within a preset geofence area based on the location information of the target device, the method further includes:

[0012] If not, the signal request packet will be broadcast to all external devices;

[0013] Receive signal response packets returned by each of the external devices based on the signal request packet;

[0014] Based on the RSSI information in the signal response packets returned by each of the external devices, the signal strength of the alternative communication links between each of the external devices and the electronic device is determined;

[0015] The candidate communication link with the strongest signal strength is selected as the preferred communication link, and the step of controlling the electronic device to perform data communication through the preferred communication link is executed.

[0016] Optionally, prior to the step of establishing a communication link between the electronic device and the target device as a preferred communication link, the method further includes:

[0017] Based on the preset electronic fence mapping relationship, determine the range of candidate devices for the preset geofence area mapping;

[0018] Obtain the device identification information of the target device, and determine whether the target device belongs to the range of candidate devices based on the device identification information;

[0019] If it falls within the range of candidate devices, then the step of selecting the communication link established between the electronic device and the target device as the preferred communication link is performed.

[0020] Optionally, after the step of determining whether the target device belongs to the range of candidate devices, the method further includes:

[0021] If it is not within the range of candidate devices, then select one candidate device from the range of candidate devices as the new target device;

[0022] Execution: The step of establishing a communication link between the electronic device and the target device as the preferred communication link.

[0023] Optionally, the step of selecting a candidate device from the range of candidate devices as the new target device includes:

[0024] The location information of each candidate device is obtained by tracking and locating each candidate device within the candidate device range using the UWB module.

[0025] Based on the location information of each candidate device, determine the positional distance between the electronic device and each candidate device;

[0026] The candidate device with the smallest location distance is selected as the new target device.

[0027] Optionally, the step of selecting a candidate device from the range of candidate devices as the new target device includes:

[0028] The signal request packet is broadcast to each candidate device in the candidate device range;

[0029] Receive signal response packets returned by each of the candidate devices based on the signal request packet;

[0030] Based on the RSSI information in the signal response packets returned by each candidate device, the signal strength of the candidate communication link between each candidate device and the electronic device is determined;

[0031] The candidate device corresponding to the candidate communication link with the strongest signal strength is selected as the new target device.

[0032] Optionally, the method further includes:

[0033] The movement parameter information of the electronic device is detected in real time, including movement speed, movement acceleration and movement trajectory. Based on the movement parameter information of the electronic device, the target time for the electronic device to leave the current fenced area and enter a new fenced area is dynamically predicted.

[0034] At the target time, the new fenced area is set as the preset geofence area, and the process returns to execute the step of determining whether the target device is located within the preset geofence area based on the location information of the target device.

[0035] Furthermore, this application also provides a device control apparatus applied to an electronic device, the electronic device including a UWB module, the device control apparatus comprising:

[0036] The tracking and positioning module is used to track and locate the target device through the UWB module to obtain the location information of the target device, wherein the target device is an external device with which a communication link has been established with the electronic device;

[0037] The region identification module is used to determine whether the target device is located within a preset geofence area based on the location information of the target device, wherein the geofence area is the fence area corresponding to the location of the electronic device;

[0038] The link selection module is used to, if so, select the communication link established between the electronic device and the target device as the preferred communication link, and control the electronic device to perform data communication through the preferred communication link.

[0039] This application also provides an electronic device, which is a physical device, comprising: a memory, a processor, and a program of the device control method stored in the memory and executable on the processor. When the program of the device control method is executed by the processor, it can implement the steps of the device control method as described above.

[0040] This application also provides a computer-readable storage medium storing a program implementing a device control method, the program implementing the device control method being executed by a processor to implement the steps of the device control method as described above.

[0041] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the device control method described above.

[0042] The technical solution of this application uses a UWB module to track and locate a target device, obtaining the target device's location information. The target device is an external device with which a communication link has been established with the electronic device. Based on the target device's location information, it is determined whether the target device is located within a preset geofence area. This geofence area is the fenced area corresponding to the location of the electronic device. If so, the communication link established between the electronic device and the target device is selected as the preferred communication link, and the electronic device is controlled to communicate via this preferred link (since the target device is located within the preset geofence area, it indicates that the communication quality of the communication link between the electronic device and the target device is high). This avoids the technical problem of unstable wireless communication capabilities when the electronic device randomly switches communication links across regions. For example, taking Bluetooth communication as an example, when multiple Bluetooth devices are connected to a mobile phone simultaneously, the solution of this application will prevent the mobile phone from randomly switching between multiple Bluetooth devices, thus ensuring that the Bluetooth signal is not switched away during a call, preventing sudden silence. Taking Wi-Fi communication as an example, when switching between multiple Wi-Fi base stations, such as in an office environment, the solution proposed in this application will not encounter a sudden switch to a Wi-Fi network with a weak signal. This is because the switching logic of the technical solution proposed in this application is based on a user-defined virtual geofence. If the target device with an established communication link is within the geofence area, the communication link will not switch (provided it remains within the geofence area). This allows the solution to achieve positioning via UWB (Ultra Wide Band) ranging.

[0043] To construct a local area positioning network for the network system, realize automatic communication link selection and network switching, and ensure network stability when connecting across regions.

[0044] In other words, this application utilizes the high positioning accuracy of UWB to locate the position of the target device, enabling electronic devices with wireless communication capabilities to connect to the corresponding target device according to the user's requirements within a defined area, thereby avoiding the automatic and random switching of electronic devices to establish communication links with external devices.

[0045] To avoid inconvenience for users due to the presence of external devices, the UWB module in this application primarily implements distance measurement and positioning functions. Users can configure their ideal electronic boundaries (geofencing areas) through software.

[0046] This ensures that a designated electronic device has the first priority for signal connection within a specified electronic boundary, thereby avoiding random switching and solving the technical problem of low stability of wireless communication capabilities of electronic devices in cross-regional connections. Attached Figure Description

[0047] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0048] To more clearly illustrate the technical solutions in this embodiment or the prior art, the embodiments will be described below.

[0049] The accompanying drawings used in the description of the prior art are briefly introduced. Obviously, for those skilled in the art, other drawings can be obtained from these drawings without any creative effort.

[0050] Figure 1 This is a flowchart illustrating the first embodiment of the device control method of this application;

[0051] Figure 2 This is a flowchart illustrating the second embodiment of the device control method of this application;

[0052] Figure 3 This is a flowchart of a device control strategy according to a specific embodiment of this application;

[0053] Figure 4 This is a schematic diagram of the module structure of the device control device according to an embodiment of this application;

[0054] Figure 5 This is a schematic diagram of the hardware operating environment of the electronic device in this embodiment.

[0055] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0056] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0057] Currently, when electronic devices are used after establishing communication links, they often experience slow data communication rates and unstable communication due to random switching of communication links across regions. Taking Bluetooth communication as an example, when multiple Bluetooth devices connect to a single phone simultaneously, the phone sometimes randomly switches between these devices, causing sudden silences during calls because the Bluetooth signal is being switched away. Similarly, with Wi-Fi communication, when switching between multiple Wi-Fi base stations, such as in an office environment, the network sometimes suddenly switches to a weaker Wi-Fi network. This is because the current switching logic is based on RSSI strength, which has a large error margin, leading to random switching between multiple base stations.

[0058] Therefore, current electronic devices tend to randomly switch communication links when crossing regions, resulting in a technical problem where the wireless communication capabilities of electronic devices are not very stable when connecting across regions.

[0059] Example 1

[0060] Based on this, please refer to Figure 1 This embodiment provides a device control method applied to an electronic device, the electronic device including a UWB module, the method comprising:

[0061] Step S10: Track and locate the target device using the UWB module to obtain the target device's location information;

[0062] The electronic devices used in the device control method of this embodiment can be wearable devices such as headphones, smartwatches, smart bracelets, VR / AR glasses, or VR / AR helmets.

[0063] In this embodiment, the target device is an external device that has established a communication link with the electronic device.

[0064] As those skilled in the art will recognize, UWB (Ultra Wideband) is a novel communication technology that differs significantly from traditional communication technologies. It does not require the carrier wave found in traditional communication systems; instead, it transmits data by sending and receiving extremely narrow pulses with durations of nanoseconds or less, thus achieving bandwidth on the order of GHz. UWB technology is a novel positioning and ranging technology. Due to its high carrier frequency, UWB achieves positioning accuracy up to the millimeter level, while maintaining angular accuracy within ±10°, making it highly suitable for integration with other functions to realize electronic boundary functions. Therefore, this embodiment can use a UWB (Ultra Wideband) module to track and locate a target device, obtaining its location information.

[0065] It should be noted that the methods for establishing a communication link between the target device and the electronic device include, but are not limited to, Wireless Local Area Network (WLAN) (such as Wi-Fi network), Bluetooth (BT), Bluetooth Low Energy (BLE), and Mobile Hotspot, etc. This embodiment does not make specific limitations on these methods.

[0066] Step S20: Determine whether the target device is located within a preset geofence area based on the location information of the target device;

[0067] The geofence area refers to the fenced area corresponding to the location of the electronic device.

[0068] In this embodiment, the geofence area is a fence area that the user has set in advance.

[0069] It should be noted that the geofence area can be a geofence area constructed based on the current location of the electronic device. That is, based on the current location of the electronic device, a preset coverage area near that current location constitutes a geofence area. This geofence area moves with the current location of the electronic device. For example, this geofence area is used to indicate the preset coverage area near the location of the electronic device. This preset coverage area can be customized by the user. The shape of the geofence for this customized preset coverage area can be, but is not limited to, a circle with a radius of 5km, an equilateral triangle with a distance of 6km from the center, etc. Of course, the geofence area can also be a geofence area constructed based on the actual geographical environment. This geofence area does not move with the current location of the electronic device. For example, this geofence area is used to indicate the boundary area of ​​a building, park, or community where the electronic device is located.

[0070] Step S30: If yes, then the communication link established between the electronic device and the target device is taken as the preferred communication link, and the electronic device is controlled to perform data communication through the preferred communication link.

[0071] In this embodiment, the preferred communication link refers to the communication link with the highest priority, and the electronic device and the target device preferably communicate data through the preferred communication link.

[0072] It is understandable that when the target device is located within a preset geofence area, it indicates that the communication quality of the communication link established between the electronic device and the target device is relatively high. Therefore, by using the communication link established between the electronic device and the target device as the preferred communication link, the electronic device is controlled to conduct data communication through this preferred communication link. This avoids the technical problem that the electronic device may randomly switch communication links when crossing regions, resulting in low stability of wireless communication capabilities in cross-regional connections.

[0073] The technical solution of this embodiment is to track and locate the target device using a UWB module to obtain the target device's location information. The target device is an external device with which a communication link has been established (5 channels) with the electronic device. Based on the target device's location information, it is determined whether the target device is in a certain position.

[0074] Within a preset geofence area, where the geofence area corresponds to the location of the electronic device, if so, the communication link established between the electronic device and the target device is selected as the preferred communication link, and the electronic device is controlled to perform data communication through the preferred communication link (since the target device is located within a geofence area).

[0075] When the device is within a pre-defined geofence area, it indicates that the communication quality of the communication link 0 established between the electronic device and the target device is relatively high, thus preventing the electronic device from randomly switching communication links when crossing areas.

[0076] This leads to technical issues with the stability of wireless communication capabilities in electronic devices across regions. For example, taking Bluetooth communication as an example, when multiple Bluetooth devices connect to a mobile phone simultaneously, the solution in this embodiment will prevent the mobile phone from randomly switching between multiple Bluetooth devices, thereby ensuring stable communication during calls.

[0077] In this case, the Bluetooth signal will not be switched away, and there will be no sudden silence. Taking Wi-Fi communication as an example, when switching between multiple Wi-Fi base stations, such as in an office environment, the solution in this embodiment will not encounter network interruptions.

[0078] However, it switches to a Wi-Fi network with a weaker signal because the switching logic of the technical solution in this embodiment is as follows:

[0079] Based on user-defined virtual geofences, if a target device with an established communication link is within the geofence area, the communication link will not switch (as long as it remains within the geofence area).

[0080] In the case of internal conditions, this embodiment uses UWB (Ultra Wide Band) ranging and positioning functions to construct a local positioning network for the network system, realize automatic communication link selection and network switching, and ensure network stability when connecting across regions.

[0081] In other words, this embodiment utilizes the high positioning accuracy of UWB to locate the position of the target device, enabling electronic devices with wireless communication capabilities to connect according to user requirements within a defined area.

[0082] By connecting to the corresponding target device, the electronic device is prevented from automatically and randomly switching to the external device (i.e., external device) with which it establishes a communication link, thus avoiding inconvenience to the user. The UWB module in this embodiment mainly implements...

[0083] The ranging and positioning functions allow users to configure their ideal electronic boundaries (geofence areas) through software, thereby ensuring that designated electronic devices have the first priority for signal connection within the designated electronic boundaries, thus avoiding random switching problems and solving the technical problem of low stability of wireless communication capabilities of electronic devices in cross-regional connections.

[0084] This embodiment utilizes the high-precision ranging and positioning capabilities of UWB, combined with a reasonable control strategy, to avoid the problem of random and frequent switching between multiple wireless devices, reducing the probability of user pain points and greatly improving the user experience. It should be noted that this embodiment is applicable to almost all consumer electronics products, as long as there is a wireless connection scenario, such as BT, BLE, and WIFI communication links.

[0085] In one implementable embodiment, after the step of determining whether the target device is located within a preset geofence area based on the location information of the target device, the method further includes:

[0086] Step A10: If not, broadcast the signal request packet to each external device;

[0087] Step A20: Receive signal response packets returned by each of the external devices based on the signal request packet;

[0088] Step A30: Determine the signal strength of the alternative communication links between each external device and the electronic device based on the RSSI information in the signal response packets returned by each external device.

[0089] Step A40: Select the candidate communication link with the strongest signal strength as the preferred communication link, and execute the step of controlling the electronic device to perform data communication through the preferred communication link.

[0090] In this embodiment, those skilled in the art will understand that both the signal request packet and the signal response packet are in the form of heartbeat packets.

[0091] It should be noted that since the signal response packet may contain RSSI (Received Signal Strength Indication) information, the signal strength value between each external device and the electronic device can be determined based on the RSSI information. Therefore, the candidate communication link with the strongest signal strength can be identified based on the RSSI information returned by each external device in its signal response packet.

[0092] In this embodiment, when it is determined that the target device is not located within the preset geofence area, the electronic device can detect the signal strength of each alternative communication link in real time or periodically, and determine in real time or periodically whether the currently constructed communication link is the communication link with the strongest signal strength that the electronic device can receive. If it is not the communication link with the strongest signal strength that the electronic device can receive, the currently constructed communication link is switched to the alternative communication link with the strongest signal strength.

[0093] This embodiment broadcasts a signal request packet to each external device when the target device is not located within a preset geofence area. It then receives signal response packets from each external device based on the signal request packet. According to the RSSI information in the signal response packets, it determines the signal strength of the alternative communication links between each external device and the electronic device. The alternative communication link with the strongest signal strength is selected as the priority communication link, and the following steps are executed: controlling the electronic device to communicate via the preferred communication link. This ensures that when the target device is not located within the preset geofence area, the signal strength of the existing communication link with the external device is the strongest, allowing for better allocation of signal resources to the electronic device and enabling it to obtain higher-quality signal resources. The electronic device selects the communication link with the best communication quality for data communication. This embodiment uses UWB (Ultra Wide Band) ranging and positioning to construct a local area positioning network for the network system, achieving automatic communication link selection and network switching, thus ensuring network stability during cross-regional connections.

[0094] In one possible implementation, please refer to Figure 2 Prior to the step of establishing the communication link between the electronic device and the target device as the preferred communication link, the method further includes:

[0095] Step S40: Determine the range of candidate devices for the preset geofence area mapping based on the preset electronic fence mapping relationship;

[0096] In this embodiment, the geofence mapping relationship can be pre-defined by the user. That is, at least one candidate device (i.e., the range of candidate devices) is set in the selected geofence area to prioritize the establishment of communication links.

[0097] Step S50: Obtain the device identification information of the target device, and determine whether the target device belongs to the range of candidate devices based on the device identification information;

[0098] As those skilled in the art will know, each external device has unique device identification information, which is used to characterize the device's identity. Therefore, this embodiment can determine the target device's identity information by obtaining the target device's device identification information, thereby facilitating the identification of whether the target device belongs to the range of candidate devices based on the target device's identity information.

[0099] Step S60: If it falls within the range of candidate devices, then execute the step of selecting the communication link established between the electronic device and the target device as the preferred communication link.

[0100] For example, after the step of determining whether the target device belongs to the range of candidate devices, the method further includes:

[0101] Step B10: If the device is not within the range of candidate devices, then select a candidate device from the range of candidate devices as the new target device.

[0102] Step B20: Perform the step of selecting the communication link established between the electronic device and the target device as the preferred communication link.

[0103] In this embodiment, if the target device is not within the range of candidate devices, it means that the target device is not among the candidate devices for which a communication link is preferentially established with the electronic device. Therefore, this embodiment selects a candidate device from the range of candidate devices as a new target device when it is determined that the target device is not within the range of candidate devices, and performs the step of selecting the communication link established between the electronic device and the target device as the preferred communication link. This allows for better allocation of signal resources to the electronic device, enabling it to obtain higher quality signal resources. The electronic device is determined to conduct data communication by selecting the communication link with the best communication quality. After switching to establish a communication link with the candidate device, it does not switch again (while remaining within the geofence area). This allows this embodiment to construct a local positioning network of the network system through UWB (Ultra-Wide Band) ranging and positioning function, realizing automatic communication link selection and network switching, thus ensuring network stability during cross-regional connections.

[0104] In one possible implementation, the step of selecting a candidate device from the range of candidate devices as the new target device includes:

[0105] Step C10: Track and locate each candidate device in the candidate device range using the UWB module to obtain the location information of each candidate device;

[0106] Step C20: Determine the positional distance between the electronic device and each of the candidate devices based on the position information of each candidate device;

[0107] Step C30: Select the candidate device with the smallest location distance as the new target device.

[0108] In this embodiment, those skilled in the art will know that the smaller the distance between the electronic device and the candidate device, the better the communication quality of the communication link between the electronic device and the candidate device tends to be.

[0109] Therefore, this embodiment uses a UWB module to track and locate each candidate device within the candidate device range, obtaining the location information of each candidate device. Based on the location information of each candidate device, the distance between the electronic device and each candidate device is determined. The candidate device with the smallest distance is selected as the new target device, which facilitates the subsequent construction of a communication link between the electronic device and the new target device. This link is then used as the preferred communication link for data communication, thereby enabling better allocation of signal resources for the electronic device and allowing it to obtain higher quality signal resources. The electronic device selects the communication link with the best communication quality for data communication, and once the preferred communication link is selected, it does not switch (while remaining within the geofence area). This further improves the stability of the electronic device's wireless communication capability in cross-regional connections.

[0110] In another possible implementation, the step of selecting a candidate device from the range of candidate devices as the new target device includes:

[0111] Step D10: Broadcast the signal request packet to each candidate device in the candidate device range;

[0112] Step D20: Receive signal response packets returned by each of the candidate devices based on the signal request packet;

[0113] Step D30: Determine the signal strength of the candidate communication link between each candidate device and the electronic device based on the RSSI information in the signal response packet returned by each candidate device.

[0114] Step D40: Select the candidate device corresponding to the candidate communication link with the strongest signal strength as the new target device.

[0115] This embodiment broadcasts a signal request packet to each candidate device within the candidate device range, receives signal response packets from each candidate device based on the signal request packet, and determines the signal strength of the candidate communication link between each candidate device and the electronic device based on the RSSI information in the signal response packets returned by each candidate device. Then, the candidate device corresponding to the candidate communication link with the strongest signal strength is selected as the new target device. This facilitates the subsequent construction of a communication link between the electronic device and the new target device, and uses it as the preferred communication link for data communication. This allows for better allocation of signal resources to the electronic device, enabling it to obtain higher-quality signal resources. The electronic device selects the communication link with the best communication quality for data communication, and once the preferred communication link is selected, it does not switch back (while remaining within the geofence area). This further improves the stability of the electronic device's wireless communication capability in cross-regional connections.

[0116] To aid in understanding the technical concept of this application, a specific embodiment is provided; please refer to [reference needed]. Figure 3 , Figure 3 Here is a flowchart of a device control strategy according to a specific embodiment of this application:

[0117] In this specific embodiment, the electronic device includes a System-on-Chip (SOC) module and a UWB module. The user can actively set the electronic boundary range (i.e., a preset geofence area) by inputting information on the electronic device's human-machine interface. The SOC module receives this actively set electronic boundary range, and then the UWB module tracks and locates the target peripheral with the established communication link (including determining the orientation and distance of the external device) to determine whether the target peripheral is within the electronic boundary range. If the target peripheral is within the electronic boundary range, it is determined to have the highest priority, and switching peripherals is prohibited. If the target peripheral is not within the electronic boundary range, the switching logic for establishing the communication link is performed by detecting the RSSI signals of each peripheral and selecting the peripheral with the strongest RSSI signal. The scenarios for establishing communication links with peripherals include, but are not limited to, BT, BLE, and WIFI communication link scenarios.

[0118] It should be noted that the many details described in this specific embodiment are only helpful for understanding the technical concept of this application and do not constitute a limitation of this application. Any simple modifications based on the technical concept of this application should be within the protection scope of this application.

[0119] Example 2

[0120] Based on the first embodiment of this application, in another embodiment of this application, the same or similar content as in Embodiment 1 above can be referred to the above description and will not be repeated hereafter. In addition, the method further includes:

[0121] Step E10: Real-time detection of the movement parameter information of the electronic device, wherein the movement parameter information includes movement speed, movement acceleration and movement trajectory; based on the movement parameter information of the electronic device, dynamically predict the target time when the electronic device leaves the current fence area and enters a new fence area.

[0122] In this embodiment, as those skilled in the art will know, the moving speed of the electronic device can be detected by a speed sensor integrated in the electronic device, the moving acceleration of the electronic device can be detected by an accelerometer integrated in the electronic device, and the moving trajectory of the electronic device can be detected by an IMU (Inertial Measurement Unit) sensor integrated in the electronic device. Alternatively, environmental image information can be dynamically acquired by a camera integrated in the electronic device, and the moving trajectory of the electronic device can be identified based on the dynamically acquired environmental image information.

[0123] Step E20: At the target time, the new fenced area is set as the preset geofence area, and the process returns to execute the step of determining whether the target device is located within the preset geofence area based on the location information of the target device.

[0124] In this embodiment, it should be noted that as the electronic device enters different geofence areas, the preset geofence area also needs to be updated accordingly.

[0125] Therefore, this embodiment detects the movement parameter information of the electronic device in real time, including movement speed, movement acceleration, and movement trajectory. Based on the movement parameter information of the electronic device, it dynamically predicts the target time when the electronic device leaves the current geofence area and enters a new geofence area. At the target time, the new geofence area is set as the preset geofence area, and the process returns to execute the step of determining whether the target device is located within the preset geofence area based on the target device's location information. This ensures in real time that the communication link established between the electronic device and the external device is the preferred communication link with the highest communication quality, and controls the electronic device to conduct data communication through this communication link. This allows for better allocation of signal resources to the electronic device, enabling it to obtain higher-quality signal resources. Furthermore, by not switching back after switching to the preferred communication link (while remaining within the new geofence area), the stability of the electronic device's wireless communication capability in cross-regional connections is further improved.

[0126] Example 3

[0127] This invention also provides a device control apparatus, please refer to... Figure 4 The device control unit is applied to an electronic device, the electronic device including a UWB module (not shown), and the device control unit includes:

[0128] The tracking and positioning module 10 is used to track and locate the target device through the UWB module to obtain the location information of the target device, wherein the target device is an external device with which a communication link has been established with the electronic device;

[0129] The region identification module 20 is used to determine whether the target device is located within a preset geofence area based on the location information of the target device, wherein the geofence area is the fence area corresponding to the location of the electronic device;

[0130] The link selection module 30 is used to, if so, select the communication link established between the electronic device and the target device as the preferred communication link, and control the electronic device to perform data communication through the preferred communication link.

[0131] Optionally, the region identification module 20 is also used for:

[0132] If not, the signal request packet will be broadcast to all external devices;

[0133] Receive signal response packets returned by each of the external devices based on the signal request packet;

[0134] Based on the RSSI information in the signal response packets returned by each of the external devices, the signal strength of the alternative communication links between each of the external devices and the electronic device is determined;

[0135] The candidate communication link with the strongest signal strength is selected as the preferred communication link, and the step of controlling the electronic device to perform data communication through the preferred communication link is executed.

[0136] Optionally, the link selection module 30 is also used for:

[0137] Based on the preset electronic fence mapping relationship, determine the range of candidate devices for the preset geofence area mapping;

[0138] Obtain the device identification information of the target device, and determine whether the target device belongs to the range of candidate devices based on the device identification information;

[0139] If it falls within the range of candidate devices, then the step of selecting the communication link established between the electronic device and the target device as the preferred communication link is performed.

[0140] Optionally, the link selection module 30 is also used for:

[0141] If it is not within the range of candidate devices, then select one candidate device from the range of candidate devices as the new target device;

[0142] Execution: The step of establishing a communication link between the electronic device and the target device as the preferred communication link.

[0143] Optionally, the link selection module 30 is also used for:

[0144] The location information of each candidate device is obtained by tracking and locating each candidate device within the candidate device range using the UWB module.

[0145] Based on the location information of each candidate device, determine the positional distance between the electronic device and each candidate device;

[0146] The candidate device with the smallest location distance is selected as the new target device.

[0147] Optionally, the link selection module 30 is also used for:

[0148] The signal request packet is broadcast to each candidate device in the candidate device range;

[0149] Receive signal response packets returned by each of the candidate devices based on the signal request packet;

[0150] Based on the RSSI information in the signal response packets returned by each candidate device, the signal strength of the candidate communication link between each candidate device and the electronic device is determined;

[0151] The candidate device corresponding to the candidate communication link with the strongest signal strength is selected as the new target device.

[0152] Optionally, the region identification module 20 is also used for:

[0153] The movement parameter information of the electronic device is detected in real time, including movement speed, movement acceleration and movement trajectory. Based on the movement parameter information of the electronic device, the target time for the electronic device to leave the current fenced area and enter a new fenced area is dynamically predicted.

[0154] At the target time, the new fenced area is set as the preset geofence area, and the process returns to execute the step of determining whether the target device is located within the preset geofence area based on the location information of the target device.

[0155] The device control apparatus provided in this invention, employing the device control method described in Embodiment 1 or Embodiment 2, can solve the technical problem of low stability of wireless communication capabilities of electronic devices in cross-regional connections. Compared with the prior art, the beneficial effects of the device control apparatus provided in this invention are the same as those of the device control method provided in the above embodiments, and other technical features in the device control apparatus are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0156] Example 4

[0157] This invention provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the device control method described in Embodiment 1 above.

[0158] The following is for reference. Figure 5 The diagram illustrates a structural schematic suitable for implementing embodiments of the present disclosure. The electronic devices in these embodiments can be wearable devices such as headphones, smartwatches, smart bracelets, VR / AR glasses, and VR / AR helmets. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0159] like Figure 5 As shown, the electronic device may include a processing unit 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM 1002) or a program loaded from a storage device into a random access memory (RAM 1004). The RAM 1004 also stores various programs and data required for the operation of the electronic device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. Input / output (I / O) interfaces are also connected to the bus 1005.

[0160] Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the electronic device to communicate wirelessly or wiredly with other devices to exchange data. Although electronic devices with various systems are shown in the figures, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems may be implemented alternatively.

[0161] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of embodiments of this disclosure.

[0162] The electronic device provided by this invention, employing the device control method described in the above embodiments, can solve the technical problem of low stability in cross-regional wireless communication capabilities of electronic devices. Compared with the prior art, the beneficial effects of the electronic device provided by the embodiments of this invention are the same as those of the device control method described in the above embodiments, and other technical features of this electronic device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.

[0163] It should be understood that various parts of this disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples.

[0164] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

[0165] Example 5

[0166] This invention provides a computer-readable storage medium having computer-readable program instructions stored thereon, which are used to execute the device control method described in the above embodiments.

[0167] The computer-readable storage medium provided in this embodiment of the invention may be, for example, a USB flash drive, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0168] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.

[0169] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by an electronic device, the electronic device causes the electronic device to: track and locate a target device via a UWB module to obtain the location information of the target device, wherein the target device is an external device with which a communication link has been established; determine, based on the location information of the target device, whether the target device is located within a preset geofence area, wherein the geofence area is the fence area corresponding to the location of the electronic device; if so, use the communication link established between the electronic device and the target device as the preferred communication link, and control the electronic device to perform data communication through the preferred communication link.

[0170] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0171] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0172] The modules described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0173] The computer-readable storage medium provided by this invention stores computer-readable program instructions for executing the above-described device control method, which can solve the technical problem of low stability of wireless communication capabilities of electronic devices in cross-regional connections. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the embodiments of this invention are the same as the beneficial effects of the device control method provided in Embodiment 1 or Embodiment 2, and will not be repeated here.

[0174] Example 6

[0175] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the device control method described above.

[0176] The computer program product provided in this application can solve the technical problem of low stability of wireless communication capabilities of electronic devices in cross-regional connections. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiments of the present invention are the same as the beneficial effects of the device control method provided in Embodiment 1 or Embodiment 2 above, and will not be repeated here.

[0177] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent scope of this application.

Claims

1. A device control method characterized by, The device control method is applied to an electronic device including a UWB module, and the method includes: tracking and positioning a target device through the UWB module to obtain position information of the target device, wherein the target device is an external device that has established a communication link with the electronic device; determining whether the target device is located in a preset geofence region according to the position information of the target device, wherein the geofence region is a fence region corresponding to a location of the electronic device, and the geofence region is a fence region established based on an actual geographical environment; if yes, establishing a communication link between the electronic device and the target device as a preferred communication link, and controlling the electronic device to perform data communication through the preferred communication link; wherein, before the step of establishing the communication link between the electronic device and the target device as the preferred communication link, the method further includes: determining a range of candidate devices mapped by the preset geofence region according to a preset electronic fence mapping relationship; obtaining device identification information of the target device, and determining whether the target device belongs to the range of candidate devices according to the device identification information; if yes, performing the step of establishing the communication link between the electronic device and the target device as the preferred communication link.

2. The device control method according to Claim 1, wherein after the step of determining whether the target device is located in the preset geofence region according to the position information of the target device, the method further includes: if no, broadcasting a signal request packet to each external device; receiving a signal response packet returned by each external device based on the signal request packet; determining signal strengths of candidate communication links between each external device and the electronic device according to RSSI information in the signal response packet returned by each external device; selecting a candidate communication link with the strongest signal strength as a preferred communication link, and performing the step of controlling the electronic device to perform data communication through the preferred communication link.

3. The device control method according to Claim 1, wherein after the step of determining whether the target device belongs to the range of candidate devices, the method further includes: if no, selecting one candidate device from the range of candidate devices as a new target device; performing the step of establishing the communication link between the electronic device and the target device as the preferred communication link.

4. The device control method according to Claim 3, wherein the step of selecting one candidate device from the range of candidate devices as a new target device includes: tracking and positioning each candidate device in the range of candidate devices through the UWB module to obtain position information of each candidate device; determining a position distance between the electronic device and each candidate device according to the position information of each candidate device; selecting a candidate device with the smallest position distance as a new target device.

5. The device control method according to Claim 3, wherein the step of selecting one candidate device from the range of candidate devices as a new target device includes: broadcasting a signal request packet to each candidate device in the range of candidate devices; receiving a signal response packet returned by each of the candidate devices based on the signal request packet; determining signal strength of a candidate communication link between each of the candidate devices and the electronic device according to RSSI information in the signal response packet returned by each of the candidate devices; selecting a candidate device corresponding to a candidate communication link with the strongest signal strength as a new target device.

6. The device control method according to any one of claims 1 to 5, wherein, The method further comprises: detecting, in real time, movement parameter information of the electronic device, wherein the movement parameter information comprises movement speed, movement acceleration, and movement trajectory, and dynamically predicting a target time when the electronic device leaves a current fence region and enters a new fence region according to the movement parameter information of the electronic device; at the target time, taking the new fence region as a preset geographical fence region, and returning to perform the step of determining whether the target device is located in the preset geographical fence region according to the position information of the target device.

7. An apparatus control device characterized by comprising: The device control apparatus is applied to an electronic device, and the electronic device comprises a UWB module. The device control apparatus comprises: a tracking and positioning module configured to track and position a target device through the UWB module to obtain position information of the target device, wherein the target device is an external device that has established a communication link with the electronic device; a region identification module configured to determine whether the target device is located in a preset geographical fence region according to the position information of the target device, wherein the geographical fence region is a fence region corresponding to a location of the electronic device, and the geographical fence region is a fence region established based on an actual geographical environment; a link selection module configured to, if the target device is located in the preset geographical fence region, establish a communication link between the electronic device and the target device as a preferred communication link, and control the electronic device to perform data communication through the preferred communication link. The link selection module is further configured to: determine a range of candidate devices mapped by the preset geographical fence region according to a preset electronic fence mapping relationship; obtain device identification information of the target device, and determine whether the target device belongs to the range of candidate devices according to the device identification information; if the target device belongs to the range of candidate devices, perform the step of establishing the communication link between the electronic device and the target device as the preferred communication link.

8. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the device control method in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a program for implementing a device control method, and the program for implementing the device control method is executed by a processor to implement the steps of the device control method in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data processing method and system, electronic equipment, Bluetooth peripheral and storage medium

    CN115499818A