Electronic device and distributed implementation method and medium thereof

By performing cluster analysis based on the differences in characteristic signal strength between electronic devices, the high cost problem of beacons and high-precision inertial sensors in the existing technology is solved, and low-cost position relationship determination and distributed functions between electronic devices are achieved.

CN115515068BActive Publication Date: 2025-09-12HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110700057.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-23
Publication Date
2025-09-12
Estimated Expiration
2041-06-23

AI Technical Summary

Technical Problem

Existing technologies require the deployment of additional beacons or location fingerprints when determining the indoor location of electronic devices, which increases development and maintenance costs. At the same time, the cost of using high-precision inertial sensors is high and is not suitable for home electronic devices.

Method used

Cluster analysis is performed based on the differences in characteristic signal strength between multiple electronic devices to determine the relative positional relationships between electronic devices and realize distributed functions.

Benefits of technology

There is no need to add beacons or location fingerprints, which reduces the cost of implementing distributed functions and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115515068B_ABST
    Figure CN115515068B_ABST
Patent Text Reader

Abstract

The present application relates to the field of electronic technology, and discloses an electronic device and its distributed implementation method and medium. The method includes: a first electronic device obtains multiple characteristic signals received by each of the first electronic device and multiple second electronic devices, wherein the strength of the characteristic signal changes with the distance between the receiving device and the signal source transmitting the characteristic signal; the first electronic device calculates the difference in the characteristic signal strength between the first electronic device and the multiple second electronic devices based on the obtained multiple characteristic signals, and clusters the first electronic device and the multiple second electronic devices based on the calculated difference; the first electronic device selects at least one of the multiple second electronic devices to implement a distributed function based on the clustering result. In this way, the implementation cost of the distributed function is reduced and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology, and in particular to an electronic device and a distributed implementation method and medium thereof. Background Art

[0002] With the development of smart devices, more and more electronic devices are entering people's homes, such as smartphones, smart TVs, smart speakers, smart lights, etc. As the number and types of electronic devices in smart home application scenarios continue to increase, the way users interact with electronic devices has also evolved from traditional mouse / keyboard and touch screen interaction to natural human-computer interaction, such as voice interaction and body language interaction. At the same time, users' demand for distributed functions, such as screen projection, music playback, smart home control, and multi-device collaboration, is also increasing. In some application scenarios, it is necessary to determine the devices that implement distributed functions based on the positional relationship between electronic devices. For example, the mobile phone held by a user can collect the location of the mobile phone and transfer the music played on the mobile phone to another electronic device that is closest to the location of the user's mobile phone. At this time, it is necessary to determine the positional relationship between other electronic devices near the user and the mobile phone held by the user.

[0003] To determine the location of an electronic device indoors, one solution is to set up multiple beacons, such as Bluetooth beacons, indoors and determine the location of the electronic device based on the positional relationship information between the electronic device and each beacon. Another solution is to deploy multiple location fingerprint points indoors, such as the signal strength of multiple fixed location points relative to a wireless access point (AP) as a location fingerprint. The strength of the wireless signal received by the electronic device is compared with the signal strength received by each location fingerprint point in the location fingerprint library, and the location of the electronic device is determined based on the location information of the location fingerprint point with the signal strength match. The above-mentioned solutions using beacons or location fingerprints require the deployment of additional beacons or location fingerprints, which increases development costs. At the same time, when the indoor layout changes or the location of the wireless AP changes, the beacon location information needs to be recalibrated or the location fingerprint information needs to be updated, which also increases maintenance costs. In addition, the location of the electronic device indoors can also be determined by setting an inertial measurement unit (IMU) in the electronic device to obtain the acceleration and angular velocity of the electronic device. Then, the distance moved by the electronic device is obtained through an integration algorithm, and the indoor location of the electronic device is determined based on the user's location as the starting point. However, high-precision IMUs are expensive to use and are not suitable for widespread deployment in home electronic devices. Summary of the Invention

[0004] In view of this, embodiments of the present application provide a distributed implementation method and medium for electronic devices, which determines the relative positions of the electronic devices using multiple characteristic signals that vary with distance between the electronic devices, and implements distributed functions based on the determined relative positions.

[0005] In the first aspect, the present application provides a distributed implementation method of an electronic device, the method comprising: a first electronic device obtains multiple characteristic signals received by each of the first electronic device and multiple second electronic devices, wherein the strength of the characteristic signal changes with the distance between the first electronic device or the second electronic device and the signal source transmitting the characteristic signal; the first electronic device calculates the difference in the characteristic signal strength between each of the first electronic device and the multiple second electronic devices based on the obtained multiple characteristic signals, and clusters the first electronic device and the multiple second electronic devices based on the calculated difference; the first electronic device selects at least one of the multiple second electronic devices based on the clustering result to implement a distributed function.

[0006] In this way, the relative positions of electronic devices can be determined without adding additional beacons or location fingerprints, and one or more electronic devices can be selected based on the determined relative positions to implement distributed functions, thereby reducing the cost of implementing distributed functions and improving user experience.

[0007] In a possible implementation of the first aspect, the characteristic signal includes at least two of the following signals: a Wi-Fi received signal strength indicator, a Bluetooth received signal strength indicator, sound pickup strength, a Hall sensor signal strength, and an ultrasonic signal strength.

[0008] In a possible implementation of the first aspect, the signal source is at least one of the first electronic device and the plurality of second electronic devices; or an electronic device other than the first electronic device and the plurality of second electronic devices that can transmit a characteristic signal.

[0009] In a possible implementation of the first aspect, the first electronic device clusters the first electronic device and the plurality of second electronic devices using a K-means clustering algorithm.

[0010] In a possible implementation of the first aspect, the first electronic device clusters each of the first electronic device and the plurality of second electronic devices using a spectral clustering algorithm.

[0011] In a possible implementation of the first aspect, the first electronic device calculates the difference in characteristic signal strength between each of the first electronic device and the plurality of second electronic devices based on the acquired multiple characteristic signals, and clusters the first electronic device and the plurality of second electronic devices based on the calculated difference by using a spectral clustering algorithm.

[0012] In a possible implementation of the first aspect, the distributed function is screen projection, and the first electronic device selects at least one second electronic device from second electronic devices belonging to the same category as the first electronic device for screen projection based on the clustering result.

[0013] In a possible implementation of the first aspect, the distributed function is music playing, and the first electronic device selects at least one second electronic device from second electronic devices belonging to the same category as the first electronic device to play music based on the clustering result.

[0014] In a possible implementation of the above-mentioned first aspect, the above-mentioned distributed function is to turn off the first function of the electronic device, and the first electronic device turns off the first function of at least one second electronic device that is clustered into the same category as the first electronic device or turns off the first function of at least one second electronic device that is clustered into a different category than the first electronic device based on the clustering result.

[0015] In a possible implementation of the above-mentioned first aspect, the above-mentioned distributed function is to turn on the second function of the electronic device, and the first electronic device turns on the second function of at least one second electronic device that is clustered into the same category as the first electronic device or turns on the second function of at least one second electronic device that is clustered into a different category than the first electronic device based on the clustering result.

[0016] In a possible implementation of the first aspect, the distributed function is installing an application, and the first electronic device selects at least one second electronic device that is clustered into the same group as the first electronic device to install the application based on the clustering result.

[0017] In a possible implementation of the first aspect, the distributed function is file sharing, and the first electronic device selects at least one second electronic device that is clustered into the same group as the first electronic device to share the file based on the clustering result.

[0018] In a second aspect, an embodiment of the present application provides a method for selecting a wireless access device, which is applied to an electronic device, the method comprising: the electronic device obtains multiple characteristic signals between the electronic device and multiple wireless access devices, the strength of the characteristic signals varying with the quality of the network connection between the electronic device and the multiple wireless access devices; the electronic device calculates the difference between the characteristic signals between the electronic device and the multiple wireless access devices based on the obtained multiple characteristic signals, and clusters the electronic device and the multiple wireless access devices based on the difference; the electronic device selects a wireless access device that is clustered into the same category as the electronic device as the wireless access device to be accessed based on the clustering result.

[0019] In this way, the network connection quality of the connected wireless access device can be ensured, and the user can be switched to a wireless access device with better network connection quality according to the user's location change, thereby improving the user experience.

[0020] In a possible implementation of the second aspect above, the above-mentioned characteristic signals are at least two of the following signals: signal reception strength indications of multiple wireless access devices received by the electronic device, network delays between the electronic device and the multiple wireless access devices, network rates between the electronic device and the multiple wireless access devices, and available bandwidths of multiple wireless access devices.

[0021] In a possible implementation of the second aspect, the electronic device clusters the electronic device and the multiple wireless access devices using a K-means clustering algorithm.

[0022] In a possible implementation of the second aspect, the electronic device clusters the electronic device and the multiple wireless access devices by using a spectral clustering algorithm.

[0023] In a possible implementation of the second aspect, when there is only one wireless access device that is grouped into the same category as the electronic device, the wireless access device that is grouped into the same category as the electronic device is selected as the access wireless access device.

[0024] In a possible implementation of the second aspect above, when there are multiple wireless access devices that are clustered into the same category as the electronic device, the electronic device selects one as the wireless access device to be accessed from the multiple wireless access devices that are clustered into the same category as the electronic device according to at least one of the following methods: selecting a wireless access device with the fastest network transmission speed with the electronic device as the wireless access device to be accessed; selecting a wireless access device with the lowest network delay with the electronic device as the wireless access device to be accessed; selecting a wireless access device with the largest available bandwidth as the wireless access device to be accessed; selecting a wireless access device with the largest signal reception strength indication of the electronic device as the wireless access device to be accessed.

[0025] In a third aspect, an embodiment of the present application provides a readable medium having instructions stored thereon. When the instructions are executed on an electronic device, the electronic device implements any one of the methods described in the first or second aspect above.

[0026] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a memory for storing instructions executed by one or more processors of the electronic device; and a processor, which is one of the processors of the electronic device, for executing the instructions stored in the memory to implement any method of the first or second aspect of the above-mentioned rights. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1AAccording to some embodiments of the present application, a schematic diagram showing a change in wireless signal strength as a function of the distance between a receiving position and a signal source is shown;

[0028] Figure 1B According to some embodiments of the present application, it is shown Figure 1A Schematic diagram of the relationship between wireless signal reception strength and the distance between the receiving location and the signal source in the scenario shown;

[0029] Figure 2 According to some embodiments of the present application, a diagram illustrating an application scenario of a method for determining a positional relationship between electronic devices is shown;

[0030] Figure 3 According to some embodiments of the present application, a schematic structural diagram of an electronic device is shown;

[0031] Figure 4A According to some embodiments of the present application, a schematic diagram of a software structure of an electronic device is shown;

[0032] Figure 4B According to some embodiments of the present application, a schematic diagram of a structure of coupling electronic devices via a distributed soft bus is shown;

[0033] Figure 5 According to some embodiments of the present application, a schematic flow chart of a distributed implementation method of an electronic device is shown;

[0034] Figure 6 According to some embodiments of the present application, an application scenario diagram of a distributed implementation method of an electronic device is shown;

[0035] Figure 7 According to some embodiments of the present application, a schematic flow chart of a K-means clustering method is shown;

[0036] Figure 8 According to some embodiments of the present application, an application scenario diagram of a distributed implementation method of an electronic device is shown;

[0037] Figure 9 According to some embodiments of the present application, a schematic flow chart of a spectral clustering method is shown;

[0038] Figure 10A According to some embodiments of the present application, a schematic diagram of an interface for enabling distributed functions related to positional relationships is shown;

[0039] Figure 10B According to some embodiments of the present application, a schematic diagram of an interface for an application to discover available devices is shown;

[0040] Figure 11According to some embodiments of the present application, an application scenario diagram of a distributed implementation method of an electronic device is shown;

[0041] Figure 12 According to some embodiments of the present application, an application scenario diagram of a distributed implementation method of an electronic device is shown;

[0042] Figure 13 According to some embodiments of the present application, a diagram of an application scenario of a wireless access device selection method is shown;

[0043] Figure 14 According to some embodiments of the present application, a flow chart of a method for selecting a wireless access device is shown;

[0044] Figure 15 According to some embodiments of the present application, a flow chart of a K-means clustering method is shown. DETAILED DESCRIPTION

[0045] Illustrative embodiments of the present application include, but are not limited to, electronic devices and distributed implementation methods and media.

[0046] The technical solutions of the embodiments of the present application are described below with reference to the accompanying drawings.

[0047] The technical solution of the present application is based on at least two characteristic signals to determine the positional relationship between electronic devices. Therefore, we first take the wireless signal received strength indication (RSSI) as an example to introduce the characteristics of the characteristic signals used in the technical solution of the present application and the problems existing in using only one characteristic signal to determine the positional relationship between electronic devices.

[0048] Figure 1A According to some embodiments of the present application, a schematic diagram is shown showing how the wireless signal reception strength varies with the distance between the receiving position and the signal source. Figure 1A As shown, as the distance between the receiving position and the signal source increases, the wireless signal reception strength gradually decreases from 0dB to -100dB (calculated by log (received signal strength / transmitted signal strength)). The color change from black to white in the reference diagram is indicated, and the signal reception strength is similar in areas with similar spatial positions. However, since the wireless signal is radiated from the RF antenna to the surroundings, and there may be obstacles such as walls during the radiation process that weaken the wireless signal, the areas with similar signal reception strength are not necessarily in areas with similar spatial positions. For example, Figure 1B According to some embodiments of the present application, it is shown Figure 1A Schematic diagram of the relationship between wireless signal reception strength and the distance between the receiving location and the signal source in the scenario shown. Figure 1B As shown in the figure, it can be seen that the signal strengths received at multiple receiving locations with the same distance from the signal source vary greatly (refer to Figure 1B The change in Y coordinate at the same X coordinate) and the distance between multiple locations with the same receiving signal strength and the signal source also vary greatly (reference Figure 1B The change in X coordinate at the same Y coordinate in FIG. 1 is shown in FIG. 1 . It can be seen that the accuracy of determining the positional relationship between electronic devices using only one wireless signal is low.

[0049] It can be understood that the trends in which the intensities of different characteristic signals change with the distance between the electronic device and the signal source may be opposite. To facilitate processing, in some embodiments, the characteristic signals with opposite changing trends can be preprocessed, for example, by multiplying the characteristic signals with opposite changing trends by a negative number, so that the trends in which the intensities of the characteristic signals change with the distance between the electronic device and the signal source are the same, for example, the intensity of the characteristic signal decreases as the distance from the electronic device increases.

[0050] In view of this, the embodiments of the present application use at least two characteristic signals to determine the positional relationship between electronic devices. Figure 2 According to some embodiments of the present application, an application scenario diagram of a distributed implementation method of an electronic device is shown.

[0051] like Figure 2As shown, in smart home scenario 01, room A is equipped with a smart speaker 20, room B is equipped with a smart speaker 30, room C is equipped with a smart speaker 40 and a router 50, and rooms D and E are not equipped with any smart electronic devices. When a user plays music on mobile phone 10, the "Music Follows You" distributed function is enabled. This means that when the user moves with mobile phone 10, mobile phone 10 automatically selects an electronic device that is spatially close to mobile phone 10 to play music. As the user moves electronic device 10 around the room, mobile phone 10 can perform cluster analysis on mobile phone 10, smart speaker 20, smart speaker 30, and smart speaker 40 based on the RSSI received from router 50 by mobile phone 10, smart speaker 20, smart speaker 30, and smart speaker 40, as well as the difference in Bluetooth RSSI between any two of these devices. The cluster analysis results can then be used to determine the positional relationship between mobile phone 10, smart speaker 20, smart speaker 30, and smart speaker 40. It's understandable that in the aforementioned cluster analysis, spatially close electronic devices are grouped together. If a smart speaker and phone 10 are grouped together, the music will be played through that smart speaker. For example, if the user is holding phone 10 in room C and the Bluetooth RSSI between phone 10 and smart speaker 40 is the strongest, and the RSSIs of phone 10 and smart speaker 40 to router 50 are similar, phone 10 and smart speaker 40 can be grouped together, and phone 10 will play music through smart speaker 40.

[0052] It can be understood that when the user is in room D and room E, smart speakers 20, smart speakers 30, and smart speakers 40 will not be clustered into the same category as mobile phone 10. At this time, mobile phone 10 still plays music locally.

[0053] In this way, the method for determining the position relationship between electronic devices provided in this application can determine the position relationship between each electronic device without adding additional beacons or location fingerprints, and can realize distributed functions between multiple devices based on the above-determined position relationship. The implementation cost of the solution is low and it is conducive to improving user experience.

[0054] Figure 3 According to some embodiments of the present application, a schematic diagram of the structure of a mobile phone 10 is shown. Figure 3 As shown, the mobile phone 10 may include a processor 110, a power module 120, a memory 130, a display screen 140, a communication module 150, an interface module 160, an audio module 170, a camera module 180, and a sensor module 190, etc.

[0055] The processor 110 may include one or more processing units, for example, a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), a micro-programmed control unit (MCU), an AI (artificial intelligence) processor, or a processing module or processing circuit such as a programmable logic device (FPGA). The different processing units may be independent devices or integrated into one or more processors. For example, the processor 110 may be used to execute an algorithm for cluster analysis of mobile phones and other electronic devices.

[0056] The power module 120 may include a power supply, a power management component, and the like. The power supply may be a battery. The power management component manages the charging of the power supply and supplies power to the processor 110, memory 130, display 140, communication module 150, interface module 160, audio module 170, camera module 180, and sensor module 190. The charging management module receives charging input from a charger; the power management module connects the power supply to the charging management module and the processor 110.

[0057] The memory 130 can be used to store data, software programs, and modules, and can be a volatile memory (Volatile Memory), such as a random-access memory (Random-Access Memory, RAM); or a non-volatile memory (Non-Volatile Memory), such as a read-only memory (Read-Only Memory, ROM), a flash memory (Flash Memory), a hard disk drive (HDD), or a solid-state drive (SSD); or a combination of the above types of memory, or it can also be a removable storage medium, such as a secure digital (SD) memory card. Specifically, in some embodiments of the present application, the memory can be used to store a program for performing cluster analysis on mobile phones and electronic devices.

[0058] The display screen 140 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 (AMOLED), a flexible light-emitting diode (FLED), a mini LED, a micro LED, a micro OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments of the present application, the display screen 140 can be used to display an application interface, for example, in some embodiments, it can be used to display the interface of a cluster analysis application.

[0059] The communication module 150 may include a mobile communication unit, a wireless communication unit, a wired communication unit, and the like.

[0060] The mobile communication unit includes, but is not limited to, an antenna, a power amplifier, a filter, a low-noise amplifier (LNA), and the like. The mobile communication unit can provide wireless communication solutions for mobile phone 10, including 2G / 3G / 4G / 5G. The mobile communication unit can receive electromagnetic waves through the antenna, filter, amplify, and process the received electromagnetic waves, and transmit them to the modem processor for demodulation. The mobile communication unit can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via the antenna.

[0061] The wireless communication unit may include an antenna, and realize the transmission and reception of electromagnetic waves via the antenna. The wireless communication unit may provide wireless communication solutions including Wireless Local Area Networks (WLAN) (such as Wireless Fidelity (Wi-Fi) network), Bluetooth (BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), etc., which are applied to the mobile phone 10. In some embodiments of the present application, the mobile phone 10 can obtain the distance characteristic signal (i.e., the signal that can characterize the distance information, hereinafter referred to as the characteristic signal) in the wireless signal through the wireless communication unit, such as Bluetooth RSSI, Wi-Fi RSSI, etc., and can also communicate with other electronic devices through the wireless communication unit to realize multi-device collaboration.

[0062] The interface module 160 may include an external memory interface, a universal serial bus (USB) interface, and the like. The external memory interface may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 10. The external memory card communicates with the processor 110 via the external memory interface to implement data storage. In some embodiments of the present application, for example, the universal serial bus interface may be used to communicate between the mobile phone 10 and other electronic devices.

[0063] The audio module 170 can convert digital audio information into analog audio signal output, or convert analog audio input into digital audio signal. The audio module 170 can also be used for encoding and decoding 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. The audio module 170 can also include a speaker, an earpiece, a microphone and an earphone interface. The audio module can realize the playback and pickup of audio. For example, in some examples of the present application, the audio module can be used to pick up the intensity of the audio signal sent by the electronic device.

[0064] The camera 180 is used to capture still images or video. The optical image of the scene is projected onto the photosensitive element through the lens. The photosensitive element converts the optical signal into an electrical signal, which is then passed to the image signal processor (ISP) for conversion into a digital image signal. The mobile phone 10 implements the camera function through the ISP, camera 170, video codec, GPU (Graphics Processing Unit), display 140, and processor.

[0065] The sensor module 190 may include a proximity light sensor, a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, a Hall sensor, etc. In some embodiments of the present application, in combination with specific application scenarios, the mobile phone 10 can realize human-computer interaction with the user and realize distributed functions between the mobile phone 10 and other electronic devices through the sensor module. The mobile phone 10 can also obtain characteristic signals through sensors, such as obtaining the magnetic induction strength between the mobile phone 10 and other electronic devices through a magnetic sensor and a Hall sensor, or obtaining the distance between the mobile phone 10 and other electronic devices through a distance sensor.

[0066] It should be understood that the structure of the mobile phone 10 shown in the embodiment of the present application does not constitute a specific limitation on the mobile phone 10. In other embodiments of the present application, the mobile phone 10 may include more or fewer components than shown, or some components may be combined or separated, or the components may be arranged differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0067] It can be understood that the use of mobile phone 10 to introduce the embodiment of the present application is only an example. The technical solution of the embodiment of the present application is also applicable to other electronic devices, including but not limited to laptop computers, smart TVs, smart speakers, tablet computers, servers, wearable devices, head-mounted displays, mobile email devices, portable game consoles, portable music players, reading devices, etc., and the embodiment of the present application does not limit this.

[0068] It is understood that the operating system used by the above-mentioned mobile phone 10 and other electronic devices may be Android TM 、IOS TM The following describes the software architecture of the mobile phone 10, taking the Harmony OS as an example.

[0069] Figure 4AAccording to some embodiments of the present application, a schematic diagram of the software architecture of a mobile phone 10 is shown.

[0070] like Figure 4A As shown, the software architecture of the mobile phone 10 mainly includes:

[0071] Application layer 401: may include system applications 4011 and extended applications 4012 (or third-party applications). Among them, system applications 4011 may include desktop, settings, camera, navigation, etc.; extended applications 4012 may include software applications such as smart home control applications and music players. The method for determining the position relationship between electronic devices provided in this application can provide the position relationship between the mobile phone 10 and other electronic devices for each application in the application layer 401 (including system applications 4011 and extended applications 4022). Each application in the application layer 401 can realize the function of collaborating with the corresponding applications on other electronic devices based on the position relationship between electronic devices provided by the method of this application.

[0072] The framework layer 402 provides a multi-language framework for the application layer, including a user interface (UI) framework 4021, a user program framework 4022, and a capability framework 4023. The UI framework 4021 includes a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like, which are not described in detail here. The user program framework 4022 and the capability framework 4023 can provide the application with the capabilities of various capability components required by the application, such as computing power (which may include CPU computing power, graphics processing unit (GPU) computing power, image signal processor (ISP) computing power, etc.), sound pickup capabilities (which may include microphone sound pickup capabilities, voice recognition capabilities, etc.), device security capabilities (which may include trusted operating environment security levels, etc.), display capabilities (which may include screen resolution and screen size, etc.), playback capabilities (including sound amplification capabilities, stereo sound effects capabilities, etc.), and storage capabilities (which may include device memory capacity, random access memory (RAM) capacity, etc.), etc., without limitation here.

[0073] The system service layer 403 is the core of the mobile phone 10 software system and can provide services to the application programs of the application layer 401 through the framework layer 402. The system service layer 403 includes a distributed soft bus 4031, a distributed data management module 4032, a distributed task scheduling module 4033, a distributed soft bus 4034, and a subsystem set 4034. Among them:

[0074] The distributed soft bus 4031 is used to couple the mobile phone 10 with other electronic devices to form a distributed system. Figure 4B According to some embodiments of the present application, a schematic diagram of coupling a mobile phone 10 with other electronic devices via a distributed soft bus 4031 is shown. Figure 4B As shown, the mobile phone 10, smart speaker 20, smart speaker 30, and smart speaker 40 are coupled via a distributed bus 4031. The distributed soft bus 4031 includes a bus hub 40311, a task and data bus 40312, device information 40313, and basic communication 40314.

[0075] The bus hub 40311 is used to parse the commands issued by the application layer 401 of the mobile phone 10, discover and connect devices, etc., including the data and computing center, decision center, interconnection management center, etc. Figure 2 In the smart home scene 01 shown, after the user turns on the "Music Follows You" function of the mobile phone 10, the bus hub 40311 can publish and obtain device information of other electronic devices according to the instructions of the music playing application;

[0076] The task and data bus 40312 is used to transmit tasks and data between the mobile phone 10 and other electronic devices. For example, in some embodiments, the task and data bus 40312 can be used to transmit music data to be played, and in other embodiments, the task and data bus 40312 can be used to transmit tasks to turn off / on smart lamps;

[0077] Device information 40313 is used to obtain and manage information about the mobile phone 10 and other electronic devices. For example, in some implementations, the device information module 40313 may include Bluetooth RSSI data received by other electronic devices;

[0078] Basic communication 40314 is used to establish communication connections between the mobile phone 10 and other electronic devices through wired and / or wireless methods such as WLAN, Bluetooth, NFC, etc., and to shield the differences in protocols between electronic devices through protocol stacks and software and hardware collaboration.

[0079] The distributed data management module 4032 implements distributed management of application data and user data based on a distributed soft bus. For example, in some embodiments, the mobile phone 10 can use the distributed data management module to transmit the music data being played to a smart speaker that is grouped with the mobile phone 10 via the task and data bus 40312.

[0080] The distributed task scheduling module 4033 builds a unified distributed service management (discovery, synchronization, registration, and call) mechanism based on the technical characteristics of distributed soft bus and distributed data management, supports remote startup, remote call, remote connection, and migration of cross-device applications, and can select appropriate devices to run tasks based on the capabilities, locations, business operation status, resource usage, and user habits and intentions of different devices. For example, in the above Figure 2 In the smart home scene 01 shown, when it is determined that a smart speaker and a mobile phone 10 are clustered into the same category, the distributed task scheduling module 4033 schedules the music playing task to the smart speaker 10 for execution, and plays the music through the smart speaker 10.

[0081] The subsystem set 4034 can provide corresponding services to the application layer through the framework layer, including but not limited to system basic capability services, basic software services, enhanced software services, hardware services, etc. For example, in some embodiments, the subsystem set 4034 can include a multi-device positioning service 40341, which is used to provide the multi-device positioning service 40341 ​​to the application layer 401 through the framework layer 402 according to the method for determining the position relationship between electronic devices in the embodiments of the present application.

[0082] Kernel layer 404 includes kernel subsystem 4041 and driver subsystem 4042. Kernel subsystem 4041 provides basic kernel capabilities to upper layers by shielding multi-kernel differences, including process / thread management, memory management, file system, network management, and peripheral management. Driver subsystem 4042 includes a hardware driver framework that provides unified peripheral access capabilities and a management framework for mobile phone 10.

[0083] I understand. Figure 4A The software architecture of the mobile phone 10 shown and Figure 4B The connection method between the mobile phone 10 and other electronic devices shown is only an example. In other embodiments, the mobile phone 10 may also adopt a method different from the above. Figure 4A Other software architectures, or through different Figure 4B The other connection methods shown are for connection with other electronic devices and are not limited in the embodiments of the present application.

[0084] Based on the above Figure 3 The hardware structure shown, Figure 4A The software structure shown and Figure 4B The connection method between electronic devices shown in the figure introduces the technical solution of this application in detail.

[0085] further, Figure 5 According to some embodiments of the present application, a flow chart of a distributed implementation method of an electronic device is shown, including the following steps:

[0086] Step 501: The multi-device positioning service 40341 ​​of the mobile phone 10 obtains at least two characteristic signals between electronic devices in the smart home scene.

[0087] It is understood that when a user activates a function related to the location relationship of multiple devices on mobile phone 10, such as the "Music Follows You" function of a music player application, multi-device positioning service 40341 ​​of mobile phone 10 obtains at least one characteristic signal between electronic devices in the smart home scenario. In some embodiments, the electronic devices in the smart home may be coupled via a distributed soft bus 4031, and the multi-device positioning service of mobile phone 10 obtains at least one characteristic signal between other electronic devices via distributed soft bus 4031.

[0088] For example, in Figure 2 In the application scenario shown, after the mobile phone 10 turns on the "Sound Follows You" function, the multi-device positioning service 40341 ​​of the mobile phone 10 obtains the Bluetooth RSSI between any two devices of the mobile phone 10, smart speaker 20, smart speaker 30, and smart speaker 40 through the distributed soft bus 4031, as well as the Wi-Fi RSSI of the mobile phone 10, smart speaker 20, smart speaker 30, and smart speaker 40 relative to the router 50.

[0089] It is understood that in the embodiments of the present application, the characteristic signal may be Wi-Fi RSSI data of the electronic device relative to the router, Bluetooth RSSI data between any two electronic devices, sound intensity data picked up by the sound pickup module of the electronic device, ultrasonic ranging data between electronic devices, data from the Hall effect sensor of the electronic device, etc. It should be understood that in other embodiments, other characteristic signals may be used depending on the type of sensor included in the electronic device, and the embodiments of the present application are not limited thereto.

[0090] In some embodiments, R ijn Represents the nth type of characteristic signal between the i-th electronic device and the j-th electronic device. If the number of electronic devices is M, then the characteristic signal is an M×M×n multidimensional matrix. It should be noted that those skilled in the art should understand that other methods can also be used to represent the characteristic signals between electronic devices, and the embodiments of this application are not limited thereto.

[0091] Step 502: The multi-device positioning service 40341 ​​of the mobile phone 10 performs cluster analysis on the electronic devices based on the differences in characteristic signals.

[0092] It is understood that different clustering algorithms may implement different methods for clustering electronic devices based on the differences in characteristic signals. As previously mentioned, in the embodiments of the present application, electronic devices may be clustered using an unsupervised learning clustering algorithm. The aforementioned clustering algorithms include, but are not limited to, K-means clustering, mean shift clustering, density-based spatial clustering, and spectral clustering. Specific clustering methods are described in detail below and will not be elaborated on here.

[0093] It is understandable that electronic devices that are close in space will be clustered into the same category, for example Figure 2 In the smart home scene 01 shown, when the user holds a mobile phone 10 in room C, the mobile phone 10 and the smart speaker 40 are spatially close and are clustered into the same category.

[0094] Step 503: The multi-device positioning service 40341 ​​of the mobile phone 10 determines the positional relationship between the electronic devices based on the cluster analysis results.

[0095] It can be understood that the cluster analysis results represent the positional relationship between electronic devices. For example, in some embodiments, electronic devices clustered into the same category are electronic devices that are spatially close to each other. In other embodiments, electronic devices clustered into the same category are electronic devices in the same room.

[0096] Step 504 : The application program in the application layer 401 of the mobile phone 10 selects at least one electronic device to implement the distributed function based on the positional relationship between the electronic devices determined by the multi-device positioning service 40341 ​​.

[0097] It can be understood that the application program in the application layer 401 of the mobile phone 10 selects the electronic device that implements the distributed function according to the actual application scenario by determining the position relationship between the electronic devices. Figure 2 In the smart home scene 01 shown, when the user is in room C, the mobile phone 10 and the smart speaker 40 are clustered into the same category, which means that the position relationship between the smart speaker 40 and the mobile phone 10 is close, and the mobile phone 10 is selected to implement the distributed function, that is, the music player in the mobile phone 10 selects the smart speaker 40 to play music.

[0098] It can be understood that the mobile phone 10 can adopt different methods according to different application scenarios to select electronic devices to implement distributed functions based on the clustering results or the positional relationship between electronic devices. For example, electronic devices that are clustered into different categories with the mobile phone 10 can be selected to implement distributed functions. This embodiment of the present application does not limit this.

[0099] In this way, the method for determining the position relationship between electronic devices provided in this application does not require the addition of additional beacons or location fingerprints to determine the position relationship between multiple devices, and can realize multiple distributed functions based on the determined position relationship, thereby reducing the implementation cost of distributed functions and helping to improve user experience.

[0100] It can be understood that the above process in which the mobile phone 10 determines the positional relationship between the mobile phone 10 and other electronic devices through the multi-device positioning service 40341 ​​in the embodiment of the present application is only an example. In other embodiments, the above process can also be implemented by other modules of the mobile phone 10, and the embodiment of the present application is not limited thereto.

[0101] It is understood that distributed functions include but are not limited to file sharing, application installation, screen projection, device control, music playback, etc.

[0102] Furthermore, the multi-device positioning service 40341 ​​of the mobile phone 10 mentioned in step 502 performs cluster analysis on electronic devices based on characteristic signals. The following describes an example of the multi-device positioning service 40341 ​​of electronic devices performing cluster analysis on electronic devices using the K-means clustering algorithm and the spectral clustering algorithm.

[0103] First, Figure 6 The application scenario shown uses the K-means clustering algorithm to perform cluster analysis as an example. Figure 6 As shown, router 41, electronic devices 42, 43, 47, and 48 are located in room A, while electronic devices 44, 45, and 46 are located outside room A. Electronic device 42 must install an application on an electronic device in the same room as electronic device 42. Multi-device positioning service 40341 ​​for electronic device 42 obtains the RSSI of router 41 received by electronic devices 42 to 48 according to the method shown in step 501. Electronic device 42 plays an audio clip, and multi-device positioning service 40341 ​​obtains the sound pickup intensity data of the audio modules of electronic devices 42 to 48. That is, the characteristic signals are the Wi-Fi RSSI data of electronic devices 42 to 48 relative to router 41 and the sound pickup intensity data of electronic devices 42 to 48.

[0104] Figure 7 According to some embodiments of the present application, a schematic diagram of a process for performing cluster analysis on electronic devices using a K-means clustering algorithm is shown for a multi-device positioning service 40341 ​​of an electronic device 42 based on Wi-Fi RSSI data received by electronic devices 42 to 48 from a router 41 and sound pickup intensity data of electronic device 42 by electronic devices 42 to 48. The process of performing cluster analysis on electronic devices using the K-means clustering algorithm includes the following steps:

[0105] Step 701: Set the number of cluster categories K. For example, Figure 6 In the application scenario shown, the number of clustering categories can be set to 2.

[0106] It can be understood that the number of cluster categories represents the number of categories into which electronic devices are classified. The number of cluster categories can be set by the user on the electronic device according to the application scenario, or it can be pre-set in the electronic device, or it can be set by the application in the electronic device according to the specific application scenario. The embodiments of this application do not limit this.

[0107] Step 702: Randomly select K characteristic signals of electronic devices as the centers of clusters. Figure 6 In the application scenario shown, two electronic devices that receive Wi-Fi RSSI data from router 41 and sound pickup strength data relative to electronic device 42 can be randomly selected from electronic devices 42 to electronic devices 48 as the center of the cluster. For example, the characteristic signals of electronic devices 42 and 43 are selected as the center of the cluster.

[0108] Step 703: Calculate the distance between the characteristic signals of other electronic devices and the cluster center, and group the electronic devices and the cluster center closest to them into one category. Figure 6 In the application scenario shown, the Euclidean distances between the characteristic signals of electronic devices 44 to 48 and the characteristic signals of electronic devices 42 and 43 can be calculated respectively, and electronic devices 44 to 48 can be clustered into a category with the smallest distance from the cluster center.

[0109] It can be understood that the distance between the aforementioned electronic device and the cluster center can be Euclidean distance, Manhattan distance, Chebyshev distance, Minkowski distance, etc. Ordinary technicians in this field should understand that other distance calculation methods can also be used, such as Mahalanobis distance, Hamming distance, etc., which are not limited in the embodiments of this application.

[0110] It can be understood that clustering based on the distance between the characteristic signal of an electronic device and the cluster center is clustering based on the difference in characteristic signal strength between electronic devices, and the distance between the characteristic signal strength of an electronic device and the cluster center represents the difference in characteristic signal strength of the electronic device.

[0111] It can be understood that for feature signals of different dimensions, distance calculation methods of different dimensions can be used. For example, Figure 2 In the smart home scene 01 shown, Wi-Fi RSSI and Bluetooth RSSI are used at the same time, that is, the dimension of the characteristic signal is 2-dimensional. In this case, a 2-dimensional distance calculation method should be used when calculating the distance. For example, the characteristic signal of electronic device 42 (cluster center) is [w 11 w 12 ], the characteristic signal of the electronic device 44 is [w21 w 22 ], then the 2-dimensional Euclidean distance is

[0112] Step 704: Recalculate the cluster centers of the K categories and determine whether the change in the cluster centers exceeds the threshold. If it exceeds the threshold, go to step 703 for iteration; otherwise, go to step 706. For example, Figure 6 In the application scenario shown, the average value of the characteristic signals of the electronic devices that are clustered into the same category as the electronic device 42 can be calculated as the new cluster center. For example, the electronic device 42 and the electronic device 43 are clustered into the same category, and the characteristic signal of the electronic device 42 is [w 11 w 12 ], the characteristic signal of the electronic device 44 is [w 21 w 22 ], then the new cluster center is [(w 11 +w 21 ) / 2(w 12 +w 22 ) / 2], and determine whether the distance between the new cluster center and the characteristic signal of the electronic device 42 exceeds the threshold. When it exceeds the threshold, return to step 703 for iteration; otherwise, go to step 705.

[0113] It should be noted that the aforementioned determination of new cluster centers by average value is only an example. In other implementations, ordinary technicians in this field can also use other methods to determine new cluster centers in the same category, and the embodiments of this application are not limited to this.

[0114] Step 705: Output the cluster analysis results.

[0115] For example, in some embodiments, the output result can be a one-dimensional array, and the value of the i-th element in the array represents the category of the i-th electronic device cluster. For example, the cluster analysis result is [2,3,1,1,1], which means that the first electronic device is clustered into the second category, the second electronic device is clustered into the third category, and the third to fifth electronic devices are clustered into the first category. In some embodiments, the cluster analysis results can also be displayed, refer to Figure 6 In the scenario shown, electronic devices 42 , 43 , 47 , and 48 are grouped into the first category, and electronic devices 44 to 46 are grouped into the second category.

[0116] In other embodiments, a spectral clustering algorithm may also be used to perform cluster analysis on characteristic signals. Figure 8 The application scenario shown uses the spectral clustering algorithm to perform cluster analysis as an example to illustrate.

[0117] like Figure 8As shown, router 41, electronic devices 42, 43, 47, and 48 are located in room A, while electronic devices 44, 45, and 46 are located outside room A. Electronic device 42 wants to share a file with electronic devices that are spatially close to it. Multi-device positioning service 40341 ​​for electronic device 42 obtains the Bluetooth RSSI data between any two of electronic devices 42 through 48 and the Wi-Fi RSSI data of electronic devices 42 through 48 relative to router 41 according to the method shown in step 501. That is, the characteristic signal is the Bluetooth RSSI data between any two of electronic devices 42 through 48 and the Wi-Fi RSSI data of electronic devices 42 through 48 relative to router 41.

[0118] Figure 9 According to some embodiments of the present application, a schematic diagram of a process for performing cluster analysis on electronic devices using a spectral clustering algorithm based on Bluetooth RSSI data between any two devices from electronic devices 42 to 48 is shown in a multi-device positioning service 40341 ​​of electronic device 42, including the following steps:

[0119] Step 901: Set the number of cluster categories K. For example, Figure 7 In the application scenario shown, the number of cluster categories can be 3, which is similar to step 701 and will not be repeated here.

[0120] Step 902: Construct a similarity matrix W based on the characteristic signals between electronic devices. The similarity matrix W is a weight matrix of the characteristic signals between electronic devices, which can represent the difference in the strength of the characteristic signals between electronic devices. For example, in some embodiments, the weight matrix W can be determined by weighting the characteristic signals between electronic devices. Figure 7 In the application scenario shown, the characteristic signal between the i-th electronic device and the j-th electronic device is [W ij1 W ij2 ], then the value in the i-th row and j-th column of the similarity matrix W is W ij =a×W ij1 +b×W ij2 , where a and b are weight coefficients. It can be understood that the size of the similarity matrix W is determined by the number of electronic devices. When the total number of clustered electronic devices is N, the size of W is N×N. For example, in Figure 7 In the application scenario shown, the number of electronic devices to be clustered is 8, and the size of the similarity matrix W is 8×8.

[0121] It should be noted that since the transmission power of the Bluetooth modules of different electronic devices may be different, the distance represented by the same RSSI value will be different. For example, the Bluetooth RSSI 1 emitted by the jth electronic device and received by the i-th electronic device and the Bluetooth RSSI 2 emitted by the i-th electronic device and received by the j-th electronic device will be different due to the different transmission power of the Bluetooth modules of the i-th electronic device and the j-th electronic device. However, the distance information represented by RSSI 1 and RSSI 2 is the distance between the i-th electronic device and the j-th electronic device. At this time, RSSI 1 and RSSI 2 can be normalized, for example, the RSSI value can be converted into a ratio of the RSSI value to the transmission power, or the RSSI 1 and RSSI 2 can be averaged. This is not limited in the embodiments of the present application.

[0122] It should be noted that, in other embodiments, the similarity matrix W may be constructed in other ways, such as by the ∈-neighbor method, the K-neighbor method, and the full connection method, which is not limited in the embodiments of the present application.

[0123] Step 903: Calculate the degree matrix D based on the similarity matrix W. The degree matrix D represents the weighted sum of the characteristic signals related to the electronic device and is a diagonal matrix with the same size as the similarity matrix, and the diagonal elements D of D are ii =W i1 +W i2 +…+W iN .

[0124] Step 904: Calculate the Laplace matrix L = DW and determine the eigenvalue k of L i and the eigenvalue k i The corresponding eigenvector n i .

[0125] It should be noted that, in some embodiments, L may be normalized first, that is, L=D -0.5 LD -0.5 , and then determine the characteristic k of the normalized Laplace matrix i and the eigenvalue k i The corresponding eigenvector n i .

[0126] Step 905: Determine the first m eigenvalues ​​and corresponding eigenvectors of the Laplace matrix L, and cluster the electronic devices according to the m eigenvectors. Specifically, the m eigenvectors can be used to construct a matrix f of size N×m, and f can be normalized row by row to obtain the matrix F. Each row of the matrix F is then used as a data vector, for a total of N data vectors. Finally, the N data vectors are clustered into K categories through a clustering algorithm (for example, through a K-means clustering algorithm). The result of clustering N data vectors is the clustering analysis result of the electronic devices. It can be understood that m can be a preset value, such as m=3, or it can be calculated by the multi-device positioning service 40341 ​​according to the number of electronic devices for cluster analysis, which is not limited in the embodiments of the present application. For example, in Figure 8 In the application scenario shown, the 7 data vectors can be Figure 7 The K-means clustering algorithm shown in Figure 1 clusters into 3 categories. Figure 8 As shown, electronic devices 42 and 43 belong to the first category, electronic devices 47 and 48 belong to the second category, and electronic devices 44, 45 and 46 belong to the third category, that is, electronic device 42 and electronic device 43 belong to the same category.

[0127] The following is an introduction based on specific application scenarios.

[0128] Example 1

[0129] See above Figure 2 In the smart home scene 01 shown in FIG, a user holds a mobile phone 10 and plays music. When the user turns on the location-related function of the mobile phone 10, Figure 10A In the interface shown, a user can enable the "Music Follows You" distributed function by clicking the "Music Follows You" control 1001 of the music player on mobile phone 10. After enabling the "Music Follows You" function on mobile phone 10, multi-device positioning service 40341 ​​of mobile phone 10 obtains the RSSI of mobile phone 10, smart speaker 20, smart speaker 30, and smart speaker 40 relative to router 50 and / or the Bluetooth RSSI between any two devices among mobile phone 10, smart speaker 20, smart speaker 30, and smart speaker 40; performs cluster analysis on mobile phone 10, smart speaker 20, smart speaker 30, and smart speaker 40 based on the obtained data; and then determines the positional relationship between mobile phone 10, smart speaker 20, smart speaker 30, and smart speaker 40 based on the cluster analysis results.

[0130] When the mobile phone 10 determines that there is a smart speaker nearby, it prompts the user to find an available device and switches to the corresponding device to play music after a certain period of time. Figure 10BAs shown, the mobile phone 10 pops up a dialog box 1002, prompting the user "Available device X has been found. Will it automatically connect to X in 3 seconds?" The user can click the "Connect" control 10021 to immediately connect to device X, or click the "Cancel" control 10022 to choose not to connect to device X. It is understood that in some embodiments, other methods may be used to prompt the user, such as through voice prompting, and the user may also choose whether to connect to device X through voice commands, which is not limited in this embodiment of the present application.

[0131] Specifically, when a user enters room A, mobile phone 10 and smart speaker 20 are grouped together, meaning that smart speaker 20 is near mobile phone 10, and mobile phone 10 plays music through smart speaker 20. When a user enters room B, mobile phone 10 and smart speaker 30 are grouped together, meaning that smart speaker 30 is near mobile phone 10, and mobile phone 10 plays music through smart speaker 30. When a user enters room C, mobile phone 10 and smart speaker 40 are grouped together, meaning that smart speaker 40 is near mobile phone 10, and mobile phone 10 plays music through smart speaker 40. When a user enters room D or room E, mobile phone 10 is grouped together, meaning that no smart speaker is near mobile phone 10, and music is played through mobile phone 10. In this way, the positional relationship of electronic devices in smart home application scenarios can be realized without the need for additional deployment of beacons or location fingerprints, and electronic devices can be selected based on the positional relationship to implement distributed functions, reducing user usage costs and improving user experience.

[0132] Example 2

[0133] Figure 11 According to some embodiments of the present application, a schematic diagram of an application scenario of a method for determining a positional relationship between electronic devices is shown.

[0134] like Figure 11As shown, smart lamps 20 are set in room A, smart lamps 30 are set in room B, smart lamps 40 are set in room C, smart lamps 50 are set in room D, and smart lamps 60 are set in room E. The user wears a smart watch 10. When the user turns on the function of the smart watch 10 related to the position relationship, for example, when the "lights follow people" distributed function of the smart home application is turned on, the smart lamps in the same room with the user are automatically turned on, and the smart lamps in the room not with the user are automatically turned off. The smart watch 10 obtains the Bluetooth RSSI value between any two devices of the smart watch 10, smart lamps 20, smart lamps 30, smart lamps 40, smart lamps 50, and smart lamps 60, and the Hall sensor strength data of the smart lamps 10 to 60 for cluster analysis, and determines the position relationship between the smart lamps and the smart watch 10 according to the cluster analysis results, turns on the smart lamps in the same room with the smart watch 10, and turns off the smart lamps in the room not with the smart watch 10. For example, when the user is in room A, the smartwatch and smart lamp 20 are grouped into the same category, but not into the same category as other smart lamps. That is, if smart lamp 20 and smartwatch 10 are in the same room, then smart lamp 20 is turned on, while smart lamps 30, 40, 50, and 60 are turned off. Thus, the distributed function implementation method provided by this application can determine the positional relationships between multiple electronic devices in smart home application scenarios without the need for additional beacons or location fingerprints, and select electronic devices based on the determined positional relationships to implement distributed functions, thereby reducing the cost of implementing distributed functions and improving user experience.

[0135] Example 3

[0136] Figure 12 According to some embodiments of the present application, a schematic diagram of an application scenario of a method for determining the position relationship between electronic devices is shown. Figure 12As shown, a smart TV 20 is set up in room A and a smart TV 30 is set up in room B. The user is in room A and casts the video of mobile phone 10 to smart TV 20 for playback. When the user turns on the location-related function of mobile phone 10, such as the distributed function of "Cast as you like" of the video playback application, mobile phone 10 automatically selects the function of casting the screen to the smart TV in the same room as the user. The multi-device positioning service 40341 ​​of mobile phone 10 performs cluster analysis by obtaining the Bluetooth RSSI value between mobile phone 10 and any two devices of smart TV 20 or smart TV 30, and the wireless RSSI value of mobile phone 10 and smart TV 20 or smart TV 30 relative to the router, and determines the location relationship between mobile phone 10 and smart TV based on the cluster analysis results, and casts the video in the mobile phone to the smart TV in the same room as mobile phone 10. For example, when the user is in room A, mobile phone 10 and smart TV 20 are clustered into the same category, that is, smart TV 20 and mobile phone 10 are in the same room. At this time, mobile phone 10 will cast the video to smart TV 20 for playback; when the user moves to room B, mobile phone 10 and smart TV 30 are clustered into the same category, that is, smart TV 30 and mobile phone 10 are in the same room. At this time, mobile phone 10 will cast the video to smart TV 30 for playback. In this way, the distributed implementation method of electronic devices provided in this application can realize the determination of the positional relationship between multiple electronic devices in smart home application scenarios without the need for additional beacons or location fingerprints, and select electronic devices to implement distributed functions based on the determined positional relationship, thereby reducing the implementation cost of distributed functions and improving user experience.

[0137] An embodiment of the present application also provides a method for selecting a wireless access device, which performs cluster analysis on electronic devices based on parameters related to the network connection quality between electronic devices, such as signal reception strength indication, network transmission rate, network end-to-end delay, bandwidth of wireless access devices, etc., and determines the accessed wireless device based on the cluster analysis results.

[0138] Specifically, Figure 13 According to some embodiments of the present application, a schematic diagram of an application scenario of a wireless access device selection method is shown. Figure 13 As shown, the user holds a mobile phone 10, a wireless AP 20 is set in room A, a wireless AP 30 is set in room B, and a wireless AP 40 is set in room C. The mobile phone 10 determines the wireless AP to be connected based on the characteristic signals related to the network connection quality between the mobile phone 10 and the wireless AP and the difference in the characteristic signals to ensure good wireless communication quality.

[0139] The following is combined Figure 13 The application scenario shown details the technical solution of the embodiment of the present application.

[0140] Figure 14 According to some embodiments of the present application, a flow chart of a method for selecting a wireless access device is shown, including the following steps:

[0141] Step 1401: The electronic device obtains a characteristic signal related to the network connection quality between the electronic device and the wireless access device. It is understood that the characteristic signal related to the network connection quality indicates the quality of the network connection between the electronic devices, including but not limited to a signal reception strength indicator, network transmission rate, network end-to-end delay, and the bandwidth of the wireless access device.

[0142] For example, in Figure 14 In the application scenario shown, the mobile phone 10 can obtain the signal reception strength indication, network transmission speed, and network end-to-end delay between the mobile phone 10, wireless AP 20, wireless AP 30, and wireless AP 40.

[0143] It is understood that in some embodiments, further processing of the characteristic signal is required. For example, the greater the network end-to-end delay, the worse the network quality, while the lower the network transmission speed, the worse the network quality. In this case, it is necessary to unify the trend of the characteristic signal strength change. For example, the network end-to-end delay can be given a negative sign, so that the network quality improves as the characteristic data strength increases, facilitating cluster analysis.

[0144] Step 1402: The electronic device performs cluster analysis on the electronic device and the wireless access device based on the characteristic signals related to the network connection quality between the electronic device and the wireless access device. The electronic device performs cluster analysis on the electronic device and the wireless access device using the unsupervised learning clustering algorithm based on the characteristic signals related to the network connection quality, and generates a cluster analysis result. For example, Figure 7 The K-means clustering algorithm shown or Figure 9 The spectral clustering algorithm shown performs cluster analysis on electronic devices and wireless access devices. It is understood that in other embodiments, other clustering algorithms may be used, such as the mean shift clustering algorithm, the density-based spatial clustering algorithm, etc., which are not limited in the present embodiment.

[0145] The following is combined Figure 14 Application scenarios and Figure 7 The K-means clustering algorithm shown in Figure 1 is introduced. Figure 15 According to some embodiments of the present application, a schematic diagram of a process for clustering mobile phone 10, wireless AP 20, wireless AP 30, and wireless AP 40 using a K-means clustering algorithm is shown. The method includes the following steps:

[0146] Step 1402a: The mobile phone 10 obtains the number of cluster categories K. It is understood that the number of cluster categories may be a value preset in the mobile phone 10, for example, K may be 2. In other embodiments, K may also be calculated in real time based on the number of wireless access devices accessible to the mobile phone 10.

[0147] Step 1402b: The mobile phone 10 selects K devices from the mobile phone 10 and the wireless access devices that can be accessed as cluster centers. For example, the mobile phone 10 and the wireless AP 40 can be selected as cluster centers.

[0148] It can be understood that in some embodiments, K devices can be randomly selected. In other embodiments, the mobile phone 10 can be designated as the cluster center and K-1 cluster centers can be randomly selected from the accessible wireless access devices. This embodiment of the present application does not limit this.

[0149] Step 1402c: The mobile phone 10 calculates the distance between the characteristic signals of the mobile phone 10 and the wireless access device and the cluster center. For example, the mobile phone 10 can calculate the Euclidean distance between the characteristic signals of the mobile phone 10 and the wireless access device and the cluster center. For example, the characteristic signal of the wireless AP 20 is [w 21 w 22 w 23 ], the characteristic signal of mobile phone 10 is [w 11 w 12 w 13 ], then the Euclidean distance from the characteristic signal of wireless AP20 to the cluster center (mobile phone 10) is then the 2D Euclidean distance is

[0150] It can be understood that the aforementioned distance can be Euclidean distance, Manhattan distance, Chebyshev distance, Minkowski distance, etc. Ordinary technicians in this field should understand that other distance calculation methods can also be used, such as Mahalanobis distance, Hamming distance, etc., which are not limited in the embodiments of this application.

[0151] Step 1402d: The mobile phone 10 recalculates the cluster center of each category and determines whether the change in the cluster center exceeds a preset threshold. If so, the process returns to step 1402c. If not, the process proceeds to step 1402e. In some embodiments, the cluster center can be recalculated by calculating the average value of the characteristic signals of devices that are clustered into the same category. For example, the characteristic signal of the mobile phone 10 is [w 11 w 12 w 13 ]、The characteristic signal of wireless AP20 is [w 21 w 22 w 23 ], when mobile phone 10 and wireless AP 20 are clustered into the same cluster, the new cluster center is [(w11 +w 21 ) / 2(w 12 +w 22 ) / 2(w 13 +w 23 ) / 2].

[0152] Step 1402e: The mobile phone 10 outputs the clustering result. It is understood that in some embodiments, the mobile phone 10 outputs the clustering result to a module for managing wireless device access, for example, to the bus hub 40311 of the mobile phone 10.

[0153] It is understandable that in other embodiments, other methods may be used to recalculate the cluster center, which is not limited in the embodiments of the present application.

[0154] Step 1403: The electronic device determines the wireless access device to which the electronic device is to connect based on the cluster analysis results. It is understood that the wireless access device with the best network connection quality with the electronic device is clustered with the electronic device. For example, wireless access points with higher signal strength indicators, higher network transmission rates, lower network end-to-end delays, and more remaining bandwidth for wireless access devices are clustered with the electronic device. In this case, the wireless access device clustered with the electronic device can be determined as the wireless access device to which the electronic device is to connect.

[0155] It is understood that if there is only one wireless access device that is clustered into the same category as the electronic device, the electronic device will determine that device as the wireless access device to be accessed. If there are multiple wireless access devices that are clustered into the same category as the electronic device, one wireless access device can be selected from the multiple wireless access devices that are clustered into the same category as the electronic device to be accessed based on the strength of the characteristic signal. For example, the wireless access device with the fastest network transmission speed to the electronic device is selected as the wireless access device to be accessed, the wireless access device with the lowest network latency to the electronic device is selected as the wireless access device to be accessed, the wireless access device with the largest available bandwidth is selected as the wireless access device to be accessed, or the wireless access device with the highest signal reception strength indicator to the electronic device is selected as the wireless access device to be accessed. In other embodiments, selection can also be made based on multiple characteristic signals. For example, if there are two wireless access devices with the fastest network transmission speed among the multiple wireless access devices that are clustered into the same category as the electronic device, the one with the lowest network latency to the electronic device can be selected from these two wireless access devices. Those skilled in the art should understand that, depending on different scenarios, other methods may be used to select one wireless access device from multiple wireless access devices that are grouped into the same category as the electronic device as the wireless access device for access by the electronic device, and this embodiment of the present application does not limit this.

[0156] For example, in Figure 13In the illustrated application scenario, when a user is in room B with mobile phone 10, mobile phone 10 and wireless AP 40 are grouped together. Mobile phone 10 then selects wireless AP 40 for access. When the user is in room D, mobile phone 10, wireless APs 20, and 30 are grouped together. However, wireless AP 20 has more devices connected to it and has less available bandwidth. Therefore, mobile phone 10 selects wireless AP 30 for access.

[0157] In this way, when the user moves around the room with the mobile phone 10, the mobile phone 10 can use the wireless access device selection method provided in the embodiment of the present application to perform cluster analysis on the mobile phone 10 and the wireless AP through the characteristic signals related to the network connection quality between the mobile phone 10 and the wireless AP, and select and access the wireless AP that is clustered in the same category as the mobile phone 10, thereby ensuring the network quality of wireless communication and improving the user experience.

[0158] The various embodiments of the mechanisms disclosed in this application can be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0159] Program code can be applied to input instructions to perform the functions described herein and generate output information. The output information can be applied to one or more output devices in a known manner. For purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0160] Program code can be implemented with a high-level programming language or an object-oriented programming language to communicate with the processing system. Where necessary, program code can also be implemented in assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any particular programming language. In either case, the language can be a compiled language or an interpreted language.

[0161] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed over a network or through other computer-readable media. Therefore, a machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including but not limited to floppy disks, optical disks, optical discs, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Therefore, a machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).

[0162] In the accompanying drawings, some structural or method features may be shown in a particular arrangement and / or order. However, it should be understood that such a particular arrangement and / or order may not be required. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of a structural or method feature in a particular figure does not imply that such feature is required in all embodiments, and in some embodiments, such features may not be included or may be combined with other features.

[0163] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems raised by this application. In addition, in order to highlight the innovative part of this application, the above-mentioned device embodiments of this application do not introduce units / modules that are not closely related to solving the technical problems raised by this application. This does not mean that other units / modules do not exist in the above-mentioned device embodiments.

[0164] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "including a" does not exclude the presence of other identical elements in the process, method, article or device that includes the element.

[0165] Although the present application has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the application.

Claims

1. A distributed implementation method of an electronic device, characterized in that: include: The first electronic device acquires a plurality of characteristic signals received by each of the first electronic device and a plurality of second electronic devices, wherein the strength of the characteristic signals varies with the distance between the first electronic device or the second electronic device and a signal source transmitting the characteristic signals; The first electronic device calculates, based on the acquired multiple characteristic signals, differences in characteristic signal strength between the first electronic device and any two of the second electronic devices, and clusters the first electronic device and the second electronic devices based on the calculated differences. The first electronic device selects at least one of the plurality of second electronic devices to implement a distributed function according to a clustering result.

2. The distributed implementation method of electronic equipment according to claim 1, characterized in that: The characteristic signal includes at least two of the following signals: Wi-Fi received signal strength indication, Bluetooth received signal strength indication, sound pickup strength, Hall sensor signal strength, and ultrasonic signal strength.

3. The distributed implementation method of electronic equipment according to claim 1, characterized in that: The signal source is at least one of the first electronic device and the plurality of second electronic devices; or An electronic device other than the first electronic device and the plurality of second electronic devices that can transmit the characteristic signal.

4. The distributed implementation method of electronic equipment according to claim 1, characterized in that: The first electronic device clusters the first electronic device and the plurality of second electronic devices by using a K-means clustering algorithm.

5. The distributed implementation method of electronic equipment according to claim 1, characterized in that: The first electronic device clusters the first electronic device and the plurality of second electronic devices by using a spectral clustering algorithm.

6. The distributed implementation method of an electronic device according to any one of claims 1 to 5, characterized in that: The distributed function is screen projection, and the first electronic device selects at least one second electronic device from second electronic devices belonging to the same category as the first electronic device for screen projection based on the clustering result.

7. The distributed implementation method of an electronic device according to any one of claims 1 to 5, characterized in that: The distributed function is music playing, and the first electronic device selects at least one second electronic device from second electronic devices belonging to the same category as the first electronic device to play music based on the clustering result.

8. The distributed implementation method of an electronic device according to any one of claims 1 to 5, characterized in that: The distributed function is to shut down a first function of an electronic device, and the first electronic device shuts down the first function of at least one second electronic device that is clustered into the same group as the first electronic device according to the clustering result, or The first function of at least one second electronic device that is grouped into a different category from the first electronic device is turned off.

9. The distributed implementation method of an electronic device according to any one of claims 1 to 5, characterized in that: The distributed function is to turn on the second function of the electronic device, and the first electronic device turns on the second function of at least one second electronic device that is clustered into the same category as the first electronic device or turns on the second function of at least one second electronic device that is clustered into a different category than the first electronic device based on the clustering result.

10. The distributed implementation method of an electronic device according to any one of claims 1 to 5, characterized in that: The distributed function is installing an application, and the first electronic device selects at least one second electronic device that is clustered into the same group as the first electronic device to install the application based on the clustering result.

11. The distributed implementation method of an electronic device according to any one of claims 1 to 5, characterized in that: The distributed function is file sharing, and the first electronic device selects at least one of the second electronic devices that is clustered into the same group as the first electronic device to share files based on the clustering result.

12. A method for selecting a wireless access device, applied to an electronic device, characterized in that: The method comprises: The electronic device acquires a plurality of characteristic signals between the electronic device and a plurality of wireless access devices, wherein the strength of the characteristic signals varies with the quality of the network connection between the electronic device and the plurality of wireless access devices; The electronic device calculates, based on the acquired multiple characteristic signals, differences between the characteristic signals of the electronic device and the multiple wireless access devices, and clusters the electronic device and the multiple wireless access devices according to the differences; The electronic device selects, according to the clustering result, a wireless access device that is clustered into the same category as the electronic device as the wireless access device to be accessed.

13. The method for selecting a wireless access device according to claim 12, wherein: The characteristic signal is at least two of the following signals: signal reception strength indications of the multiple wireless access devices received by the electronic device, network delays between the electronic device and the multiple wireless access devices, network rates between the electronic device and the multiple wireless access devices, and available bandwidths of the multiple wireless access devices.

14. The method for selecting a wireless access device according to claim 12, wherein: The electronic device clusters the electronic device and the multiple wireless access devices by using a K-means clustering algorithm.

15. The method for selecting a wireless access device according to claim 12, wherein: The electronic device clusters the electronic device and the multiple wireless access devices by using a spectral clustering algorithm.

16. The method for selecting a wireless access device according to claim 12, wherein: In a case where there is only one wireless access device that is grouped into the same category as the electronic device, the wireless access device that is grouped into the same category as the electronic device is selected as the accessed wireless access device.

17. The method for selecting a wireless access device according to claim 12, wherein: In the case where there are multiple wireless access devices that are grouped into the same category as the electronic device, the electronic device selects one as the wireless access device for access from the multiple wireless access devices that are grouped into the same category as the electronic device according to at least one of the following methods: Selecting a wireless access device with the fastest network transmission speed with the electronic device as the wireless access device for access; Selecting a wireless access device with the lowest network delay with the electronic device as the wireless access device for access; Selecting a wireless access device with the largest available bandwidth as the wireless access device for access; The wireless access device having the largest electronic device signal reception strength indicator is selected as the accessed wireless access device.

18. A readable medium, characterized in that The readable medium stores instructions, which, when executed on an electronic device, enable the electronic device to implement the method according to any one of claims 1 to 17.

19. An electronic device, characterized in that: include: a memory for storing instructions to be executed by one or more processors of the electronic device; and a processor, which is one of the processors of the electronic device, configured to execute instructions stored in the memory to implement the method according to any one of claims 1 to 17.

Citation Information

Patent Citations

  • Soft access point backend data connection speed within a wi-fi beacon

    US20170006614A1