Connection method based on multi-device signal strength, terminal device and storage medium
By continuously detecting the signal strength information of peripheral devices in the conference room and making comprehensive judgments, the equipment connection error caused by signal strength judgment in the prior art is solved, and a more accurate automatic connection between peripheral devices and terminal devices is achieved.
Patent Information
- Application Number
- CN202311324730.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-12
- Publication Date
- 2025-04-15
AI Technical Summary
Automatic connection methods based on signal strength in existing conference rooms may lead to device connection errors, especially when the layout of electronic devices changes, the change in signal strength is complex, resulting in peripheral devices connecting with incorrect terminal devices.
By continuously detecting the equipment information of surrounding peripheral devices, including peripheral identification information and signal strength information, using multi-device signal strength for comprehensive judgment, confirming that the peripheral device with the strongest signal has established a connection with the terminal device to ensure the accuracy of the connection.
It realizes accurate judgment of the relationship between peripheral devices and conference rooms, improves the accuracy of the automatic connection of terminal devices to new peripheral devices, and avoids device connection errors.
Smart Images

Figure CN119835797A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communication technology, and in particular to a connection method based on multi-device signal strength, a terminal device, and a storage medium. Background Art
[0002] With the continuous development and popularization of information technology, various types of electronic devices continue to emerge, and the connection methods between electronic devices are also rich and varied. For example, in a conference room built based on information technology, terminal devices, microphones, speakers, mice, keyboards and other electronic devices are usually configured. The terminal devices are the core of the various electronic devices, and other electronic devices are connected to each other as peripheral devices to achieve information collection, transmission and presentation during the meeting communication process.
[0003] When the inventor used the existing conference room, he found that in the connection mode of the peripheral devices in the relevant conference room, the terminal device and the peripheral devices that appeared can be automatically connected according to the signal strength. However, the signal strength is not only related to the distance. The layout changes of various electronic devices in the conference room may cause the signal strength between the peripheral device in conference room A and the terminal device in conference room B to be greater than the signal strength between the device and the terminal in conference room A, which ultimately leads to the wrong connection between the peripheral device and the terminal device. Summary of the invention
[0004] The present invention provides a connection method based on multi-device signal strength, a terminal device and a storage medium to solve the technical problem that judgment based on signal strength in the existing conference room may cause device connection errors.
[0005] In a first aspect, an embodiment of the present application provides a connection method based on multi-device signal strength, which is used for an interactive tablet. The connection method based on multi-device signal strength includes:
[0006] Continuously detect device information of surrounding peripheral devices, including peripheral identification information and signal strength information;
[0007] In the case where the change in the device information satisfies a preset change condition, confirming the first identification information in the changed device information, and confirming a second peripheral device with the same signal type as the first identification information among the currently connected peripheral devices;
[0008] Sending a signal detection instruction carrying the first identification information to the second peripheral device, so that the second peripheral device detects and feeds back second strength information between the first peripheral device and corresponding to the first identification information;
[0009] receiving second strength information fed back by the second peripheral device, and confirming the comprehensive strength information corresponding to the first identification information according to the signal strength information and the second strength information;
[0010] When confirming that the first comprehensive strength information is the largest in a preset strength set, a connection is established with the first peripheral device; the preset strength set includes comprehensive strength information detected by the first terminal device and the second terminal device, and the first comprehensive strength information is comprehensive strength information detected by the first terminal device.
[0011] In a second aspect, an embodiment of the present application further provides a terminal device, the terminal device comprising:
[0012] one or more processors;
[0013] a memory for storing one or more computer programs;
[0014] When one or more computer programs are executed by one or more processors, the terminal device implements the multi-device signal strength-based connection method as described in the first aspect.
[0015] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the connection method based on multi-device signal strength as in the first aspect.
[0016] The above-mentioned connection method based on multi-device signal strength, terminal device and storage medium, in which the device information of surrounding peripheral devices is continuously detected, and the device information includes peripheral identification information and signal strength information; when the change of the device information meets the preset change condition, the first identification information in the changed device information is confirmed, and the second peripheral device with the same signal type as the first identification information in the currently connected peripheral device is confirmed; a signal detection instruction carrying the first identification information is sent to the second peripheral device, so that the second peripheral device detects and feeds back the second strength information between the first peripheral device corresponding to the first identification information; the second strength information fed back by the second peripheral device is received, and the comprehensive strength information corresponding to the first identification information is confirmed based on the signal strength information and the second strength information; when it is confirmed that the first comprehensive strength information is the largest in the preset strength set, a connection is established with the first peripheral device; the preset strength set includes the comprehensive strength information detected by the first terminal device and the second terminal device, and the first comprehensive strength information is the comprehensive strength information detected by the first terminal device. According to the overall system association between the terminal devices and peripheral devices in the conference room, when the terminal device detects a new peripheral device, the peripheral devices that have been connected through the same signal type are instructed to detect the signal strength between the new peripheral device and the new peripheral device, thereby comprehensively determining the relationship between the new peripheral device and the conference room through multiple electronic devices in the overall system, achieving accurate judgment of the relationship between the peripheral device and the conference room, and improving the accuracy of automatic connection of the terminal device to the new peripheral device. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A method flow chart of a connection method based on multi-device signal strength provided in an embodiment of the present application.
[0018] Figure 2 A schematic diagram of the distribution of peripheral devices in a first state of a conference room provided in an embodiment of the present application.
[0019] Figure 3 A schematic diagram of the distribution of peripheral devices in a second state of a conference room provided in an embodiment of the present application.
[0020] Figure 4 A schematic diagram of the structure of a connection device based on multi-device signal strength provided in an embodiment of the present application.
[0021] Figure 5 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only the parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0023] It should be noted that due to space limitations, this application description does not list all optional implementation methods. After reading this application description, those skilled in the art should be able to understand that as long as the technical features do not contradict each other, any combination of technical features can constitute an optional implementation method.
[0024] The following is a detailed description of the various embodiments of the present invention.
[0025] In the connection mode of peripheral devices in the relevant conference room, the terminal device and the peripheral device can be automatically connected according to the signal strength. However, the signal strength is not only related to the distance. For example, the presence of obstacles may also affect the signal strength. The layout of various electronic devices in the conference room changes, and the signal strength is also affected by more phonemes. As a result, the signal strength between the peripheral device in conference room A and the terminal device in conference room B may be greater than the signal strength between the device and the terminal in conference room A, which eventually leads to the wrong connection between the peripheral device and the terminal device.
[0026] In response to the above technical problems, an embodiment of the present application proposes a connection method based on the signal strength of multiple devices. According to the overall system correlation between the terminal device and the peripheral devices in the conference room, when the terminal device detects a new peripheral device, the peripheral device that has been connected by the same signal type is instructed to detect the signal strength between the new peripheral device and the new peripheral device, thereby comprehensively determining the relationship between the new peripheral device and the conference room through multiple electronic devices in the overall system, achieving accurate judgment of the relationship between the peripheral device and the conference room, and improving the accuracy of automatic connection of the terminal device to the new peripheral device.
[0027] Figure 1 A method flow chart of a connection method based on multi-device signal strength provided in an embodiment of the present application, the connection method based on multi-device signal strength is applied to a first terminal device. The first terminal device in the embodiment of the present application refers to a device arranged in a conference room, having a relatively comprehensive comprehensive data processing capability, and being used to comprehensively realize various functions required in the conference room, such as interactive input, voice output, video output, etc. An interactive tablet is an exemplary specific form of a first terminal device, which can be an integrated device for controlling the content displayed on the display screen and realizing human-computer interaction through touch technology, which integrates one or more functions such as a projector, an electronic whiteboard, a curtain, an audio system, a television, and a video conferencing terminal, and is usually set near the wall on one side of the conference room. The interactive tablet is installed with at least one operating system, and realizes various functions required in the conference room on the basis of the support of the operating system, controls and coordinates the interactive tablet and peripheral devices, so that various independent hardware in the interactive tablet can work as a stable whole, and coordinate with other peripheral devices as a whole system. Among them, the operating system includes but is not limited to Android system, Linux system, Windows system and Huawei Hongmeng system. Of course, the interactive tablet is just a name for the same type of product, and others may also be defined as conference tablets, teaching tablets, etc., which themselves still belong to the same type of electronic devices. In the embodiments of the present application, an interactive tablet is used as an example. In addition, the first terminal device may also be a personal computer, and the display of the interactive interface is realized through an external display device. A conference room is a physical space for multi-person communication. For example, classrooms, multi-functional rooms and other places for multi-person communication can be regarded as a type of conference room. In addition, it should be understood that the first terminal device and the second terminal device are terminal devices that can implement the present solution. In the specific description, the first terminal device is described as the main body. Only for the purpose of more clearly describing the present solution, any one of the terminal devices is taken as the main body, which is the first terminal device, and the others are the second terminal devices. All terminal devices cooperate to realize the final connection in the embodiments of the present application.
[0028] like Figure 1 As shown, the connection method based on multi-device signal strength includes steps S110 to S140:
[0029] Step S110: Continuously detect device information of surrounding peripheral devices, where the device information includes peripheral identification information and signal strength information.
[0030] During the operation of the interactive tablet, the existence and status changes of peripheral devices can be detected through regular device scanning, real-time device scanning or other mechanisms that can continuously detect surrounding peripheral devices. When a new peripheral device is added or the status of a peripheral device changes, the peripheral device list and related information can be updated in time so that a response related to the connection of the peripheral device can be made in time. In order to realize the identification of each peripheral device and the confirmation of the status of the identified peripheral device, the detected device information includes at least peripheral identification information and signal strength information. The peripheral identification information is the built-in device name of the peripheral device, or the physical address of the peripheral device. The peripheral identification information can not overlap within a certain range, so as to distinguish each peripheral device. Signal strength information, such as RSSI (Received Signal Strength Indication, received signal strength indication), is usually expressed in dBm.
[0031] Step S120: when the change of the device information satisfies the preset change condition, confirm the first identification information in the changed device information, and confirm a second peripheral device in the currently connected peripheral devices having the same signal type as the first identification information.
[0032] When the detected device information has not changed, it means that the peripheral devices in the vicinity have not changed, and there is no possibility of connecting the peripheral devices, and accordingly, there is no need for the connected peripheral devices to perform auxiliary detection. In the specific implementation process, the change condition includes detecting at least one of the changes in the newly added peripheral identification information and the signal strength information within the preset range. For example, if a peripheral device is taken from the entire office area to the conference room, if the peripheral device has been powered on during the movement, then during the movement to the conference room, the interactive tablet in the conference room (including the interactive tablet in the conference room near the moving path) may detect the newly added peripheral identification information, and continue (at least for a period of time) to detect the changed signal strength information after the newly added peripheral identification information. If a peripheral device moves from one conference room to another, then during the movement, multiple conference rooms within the communication connection range of the peripheral device can always detect the peripheral device, no new peripheral identification information, but the signal strength information changes. If the peripheral device is not powered on during the movement, but powered on when it reaches the target conference room and is ready to use, only the target conference room and the adjacent conference room within the communication connection distance range of the peripheral device can detect the newly added peripheral identification information and the relatively stable signal strength information. Based on the changes in device information caused by the above possible modes of peripheral devices, and considering that many peripheral devices will automatically power off after not being used for a period of time, in the embodiment of the present application, the change condition is defined as detecting at least one change in the newly added peripheral identification information and signal strength information within a preset range.
[0033] In the embodiment of the present application, the preset range of the change can only set the lower limit value, that is, when the lower limit value is reached, auxiliary judgment is performed through other connected peripheral devices, and below the lower limit value, it indicates that the signal is weak and no connection is required; the lower limit value and the upper limit value can also be set at the same time, that is, only when there is a possibility of connection, but it is not certain that the connection must be made, auxiliary judgment is performed through other connected peripheral devices. Correspondingly, when the upper limit value is set at the same time, after continuously detecting the device information of the surrounding peripheral devices, when the signal strength information reaches the preset connection trigger value, the peripheral device corresponding to the peripheral identification information is connected. In the specific implementation process, the upper limit value is equal to the connection trigger value, which is equivalent to the distance between the peripheral device and the interactive tablet being close enough. In the layout mode of multiple conference rooms, it is basically impossible to connect the peripheral device with the interactive tablet in another conference room. It can be understood that after taking a peripheral device to a position 1 meter away from the interactive tablet in a conference room and powering it on, the absolute value of the signal strength information detected by the interactive tablet 1 meter away from the peripheral device may have been close to the theoretical maximum value. At this time, there is no need to consider the connection between the peripheral device and other interactive tablets, and the interactive tablet can be directly connected. Of course, even if the signal strength information is large enough, it can still be assisted by other connected peripheral devices, but it will not change the connection result. From the perspective of developing software related to the connection, it can reduce the development cost to a certain extent.
[0034] After confirming that the signal change that meets the change condition occurs, confirm the first identification information in the changed device information, and confirm the second peripheral device with the same signal type as the first identification information in the currently connected peripheral devices. For the interactive tablet, it is possible to establish a connection with multiple peripheral devices through different communication methods, such as WiFi, Bluetooth, near field communication, wired connection, etc. For a peripheral device, it is usually connected to an interactive tablet through a communication method, for example, it can only be one of WiFi, Bluetooth, near field communication, wired connection or other wireless communication methods. The wired peripheral device usually communicates directly with the interactive tablet with a wired connection, and there is no need to consider this type of peripheral device. For multiple wireless communication methods, peripheral devices using different wireless communication methods cannot communicate with each other. Therefore, in order to achieve auxiliary judgment, it is necessary to confirm the second peripheral device with the same signal type as the first identification information from the currently connected peripheral device. For example, if the signal type of the first identification information is Bluetooth, then the Bluetooth device currently connected to the first terminal device is the second peripheral device. The second peripheral device may not have, may have one, or may have multiple according to the specific connection status. If not, the detection result of the interactive tablet itself is directly used as the final detection result.
[0035] Step S130: sending a signal detection instruction carrying the first identification information to the second peripheral device, so that the second peripheral device detects and feeds back second strength information between the first peripheral device corresponding to the first identification information.
[0036] After the interactive tablet confirms the second peripheral device with the same signal type as the first identification information from the currently connected peripheral devices, it generates a corresponding signal detection instruction according to the signal type corresponding to the first identification information, and encodes it according to the corresponding communication protocol to obtain an instruction data frame for sending the signal detection instruction, and sends the instruction data frame to each second peripheral device. After receiving the instruction data frame, each second peripheral device parses it and can obtain the instruction content of the specific signal detection instruction. It can enter the active scanning mode accordingly, detect the signal strength between the specified peripheral device, obtain the second strength information and feedback it to the interactive tablet. For the second peripheral device, it may only be in one of the active scanning mode and the passive connection mode at the same time. In this case, when detecting the signal strength, it is necessary to switch to the active scanning mode. After completing the signal strength detection, switch to the active scanning mode and send the second strength information in the active scanning mode.
[0037] Step S140: receiving second strength information fed back by the second peripheral device, and confirming the comprehensive strength information corresponding to the first identification information according to the signal strength information and the second strength information.
[0038] Based on the second strength information fed back by the second peripheral device and the signal strength information detected by the interactive tablet itself, the signal strength state of the first peripheral device corresponding to the first identification information is comprehensively judged to obtain the comprehensive strength information. In the conference room scenario, the interactive tablet used to connect to the peripheral device is set at the edge of the conference room space. This setting method may cause the setting position of the peripheral device to be closer to the interactive tablet in other conference rooms. The interactive tablet that the peripheral device itself needs to be connected is not the interactive tablet with the largest signal strength among the interactive tablets that detect the peripheral device. In the embodiment of the present application, the signal strength information detected by the interactive tablet is no longer used as a reference alone, but the signal strength detected by the interactive tablet in the conference room and other peripheral devices is used as a comprehensive reference, which is equivalent to confirming the signal strength in units of conference rooms. Inside the conference room, peripheral devices are more often placed at positions deviating from the edge of the conference room space. For example, the mouse, keyboard, microphone, etc. are placed on the main podium before the meeting starts. The newly added peripheral devices are usually placed near the already added peripheral devices. When the already added peripheral devices are clearly in the conference room and connected to the interactive tablet in the conference room, the comprehensive confirmation of the signal strength has important reference significance.
[0039] In an embodiment of the present application, the comprehensive strength information corresponding to the first identification information can be confirmed in a weighted summation manner according to the signal strength information and the second strength information. In the specific weighted processing process, at least one weight dimension of the device weight and the level weight can be weighted. The device weight is used to characterize the weight value corresponding to the strength information detected by the device type of the first terminal device and the second peripheral device. As mentioned above, the second peripheral device is closer to the center of the conference room and can have a higher device weight than the first terminal device represented by the interactive tablet. The second peripheral device can also be further differentiated by weight, for example, the mouse and keyboard may have a higher device weight than the speaker. The level weight is used to characterize the weight value corresponding to the strength level corresponding to different strength information. When setting the weight specifically, the strength level with high signal strength is greater than the level weight of the strength level with low signal strength. In the process of confirming the comprehensive strength information once, the sum of all device weights is equal to 1. For example, when confirming the comprehensive strength information once, the device weight of the screen transmitter is 0.5, the device weight of the interactive tablet is 0.3, and the device weight of the Bluetooth speaker is 0.2. The sum of all level weights is equal to 1. For example, above -40dBm is the first level, and the level weight of the first level is 0.6. Above -70dBm and less than 40dBm is the second level, and the level weight of the second level is 0.3. Above -127dBm and less than -70dBm is the third level, and the level weight of the third level is 0.1.
[0040] If processing is performed only based on device weight, after receiving the second strength information fed back by the second peripheral device, the signal strength information and the second strength information are weighted and summed according to the device weights of the first terminal device and each second peripheral device to obtain comprehensive strength information corresponding to the first identification information.
[0041] If processing is performed only based on level weight, after receiving the second strength information fed back by the second peripheral device, the corresponding strength level is confirmed based on the signal strength information and each second strength information, and then the signal strength information and the second strength information are weighted and summed according to the level weight corresponding to each strength level to obtain the comprehensive strength information corresponding to the first identification information.
[0042] If processing is performed based on both device weight and level weight at the same time, after receiving the second strength information fed back by the second peripheral device, the corresponding strength level is confirmed based on the signal strength information and each second strength information, and then the signal strength information and the second strength information are comprehensively weighted and summed based on the device weights of the first terminal device and each second peripheral device, and the level weight corresponding to each strength level, to obtain the comprehensive strength information corresponding to the first identification information.
[0043] The weighted summation based on a single weight dimension can adopt the conventional weighted processing process, which will not be elaborated here. The comprehensive weighted summation based on the dual dimensions can directly add the first summation result of the level weight dimension and the second summation result of the equipment weight dimension as the final comprehensive strength information; or further set weight values for the first summation result and the second summation result, and weight the first summation result and the second summation result again as the final comprehensive strength information.
[0044] The comprehensive calculation process of weighted summation is shown in the following formula:
[0045]
[0046] Among them, R represents the comprehensive signal strength, R n Indicates the nth signal strength, P n Indicates the level weight of the nth signal strength, D n The device weight representing the nth signal strength, k 1 Indicates the weight value of the level weight, k 2 Indicates the weight value of the device weight. This is equivalent to the first summation result mentioned above, Equivalent to the second summation result.
[0047] Please refer to Figure 2 and Figure 3 , Figure 2 A schematic diagram of the distribution of peripheral devices in a conference room in a first state provided by an embodiment of the present application; Figure 3 A schematic diagram of the distribution of peripheral devices in the second state of the conference room provided in the embodiment of the present application. In the first state, the conference room has an interactive tablet 11, and two other peripheral devices, a Bluetooth mouse 21 and a Bluetooth keyboard 22. In the second state, a Bluetooth speaker 23 is added in addition to the Bluetooth mouse 21 and the Bluetooth keyboard 22.
[0048] The following is based on Figure 2 and Figure 3 The implementation process of this application is described as follows, with reference to the state change and the confirmation process of the comprehensive strength information of the Bluetooth speaker 23. In the first state, the device information detected by the interactive tablet 11 remains unchanged, and the connection relationship between the Bluetooth mouse 21 and the Bluetooth keyboard 22 is maintained. When the user brings the Bluetooth speaker 23 into the conference room where the interactive tablet 11 is located and turns on the Bluetooth speaker 23, the communication environment is entered. Figure 3In the second state shown, the interactive tablet 11 can detect the newly added Bluetooth speaker 23 in addition to the Bluetooth mouse 21 and the Bluetooth keyboard 22, and the corresponding peripheral identification information and signal strength information of the Bluetooth speaker 23. Of course, other interactive tablets in other conference rooms may also detect the device information corresponding to the newly added Bluetooth speaker 23. For the interactive tablet that detects the newly added Bluetooth speaker 23, when it is confirmed that the device information of the Bluetooth speaker 23 meets the preset change conditions, the peripheral identification information of the Bluetooth speaker 23 is confirmed as the first identification information, and the Bluetooth peripheral device in the currently connected peripheral device is confirmed as the second peripheral device. Specifically for the interactive tablet 11, the confirmed second peripheral device includes the Bluetooth mouse 21 and the Bluetooth keyboard 22. The interactive tablet 11 sends a signal detection instruction to the Bluetooth mouse 21 and the Bluetooth keyboard 22, and the signal detection instruction carries the peripheral identification information of the Bluetooth speaker 23. After receiving the signal detection instruction, the Bluetooth mouse 21 and the Bluetooth keyboard 22 enter the active scanning mode, and detect the signal strength between them and the Bluetooth speaker 23 according to the peripheral identification information carried in the signal detection instruction, and obtain the corresponding second strength information, and send it to the interactive tablet 11. After receiving the second strength information, the interactive tablet 11 may adopt any of the weighted sum processing methods mentioned above to obtain comprehensive strength information.
[0049] Step S150: When confirming that the first comprehensive strength information is the largest in a preset strength set, establishing a connection with the first peripheral device; the preset strength set includes comprehensive strength information detected by the first terminal device and the second terminal device, and the first comprehensive strength information is the comprehensive strength information detected by the first terminal device.
[0050] The comprehensive strength information is generated by the interactive tablet from the perspective of the generating device, but it actually represents the signal strength status between the newly added peripheral device and the entire conference room, or the overall system composed of various devices in the conference room. This comprehensive signal strength evaluation method can more accurately present the actually associated conference room when the peripheral device changes, and then can quickly and accurately connect based on the relationship between the conference room and the interactive tablet.
[0051] In the above-mentioned connection method based on multi-device signal strength, the device information of the surrounding peripheral devices is continuously detected, and the device information includes peripheral identification information and signal strength information; when the change of the device information meets the preset change condition, the first identification information in the changed device information is confirmed, and the second peripheral device with the same signal type as the first identification information in the currently connected peripheral device is confirmed; a signal detection instruction carrying the first identification information is sent to the second peripheral device, so that the second peripheral device detects and feeds back the second strength information between the first peripheral device corresponding to the first identification information; the second strength information fed back by the second peripheral device is received, and the comprehensive strength information corresponding to the first identification information is confirmed based on the signal strength information and the second strength information; when it is confirmed that the first comprehensive strength information is the largest in the preset strength set, a connection is established with the first peripheral device; the preset strength set includes the comprehensive strength information detected by the first terminal device and the second terminal device, and the first comprehensive strength information is the comprehensive strength information detected by the first terminal device. According to the overall system association between the terminal devices and peripheral devices in the conference room, when the terminal device detects a new peripheral device, the peripheral devices that have been connected through the same signal type are instructed to detect the signal strength between the new peripheral device and the new peripheral device, thereby comprehensively determining the relationship between the new peripheral device and the conference room through multiple electronic devices in the overall system, achieving accurate judgment of the relationship between the peripheral device and the conference room, and improving the accuracy of automatic connection of the terminal device to the new peripheral device.
[0052] Figure 4 This is a schematic diagram of a structure of a connection device based on multi-device signal strength provided in an embodiment of the present application. Figure 4 As shown, the connection device based on multi-device signal strength includes an information detection unit 210, a target information confirmation unit 220, a detection instruction sending unit 230, a comprehensive strength confirmation unit 240 and a device connection unit 250.
[0053] Among them, the information detection unit 210 is used to continuously detect the device information of the surrounding peripheral devices, and the device information includes the peripheral identification information and the signal strength information; the target information confirmation unit 220 is used to confirm the first identification information in the changed device information when the change of the device information meets the preset change condition, and confirm the second peripheral device with the same signal type as the first identification information in the currently connected peripheral device; the detection instruction sending unit 230 is used to send a signal detection instruction carrying the first identification information to the second peripheral device, so that the second peripheral device detects and feeds back the second strength information between the first peripheral device corresponding to the first identification information; the comprehensive strength confirmation unit 240 is used to receive the second strength information fed back by the second peripheral device, and confirm the comprehensive strength information corresponding to the first identification information according to the signal strength information and the second strength information; the device connection unit 250 is used to establish a connection with the first peripheral device when it is confirmed that the first comprehensive strength information is the largest in the preset strength set; the preset strength set includes the comprehensive strength information detected by the first terminal device and the second terminal device, and the first comprehensive strength information is the comprehensive strength information detected by the first terminal device.
[0054] Based on the above embodiment, the comprehensive strength confirmation unit 240 includes:
[0055] The strength information receiving module is used to receive the second strength information fed back by the second peripheral device;
[0056] The first weighted processing module is used to perform weighted summation on the signal strength information and the second strength information according to the device weights of the first terminal device and each second peripheral device to obtain the comprehensive strength information corresponding to the first identification information.
[0057] Based on the above embodiment, the comprehensive strength confirmation unit 240 includes:
[0058] The strength information receiving module is used to receive the second strength information fed back by the second peripheral device;
[0059] A strength level confirmation module, used to confirm the corresponding strength level according to the signal strength information and each second strength information;
[0060] The second weighted processing module is used to perform weighted summation on the signal strength information and the second strength information according to the level weight corresponding to each strength level, so as to obtain the comprehensive strength information corresponding to the first identification information.
[0061] Based on the above embodiment, the comprehensive strength confirmation unit 240 includes:
[0062] The strength information receiving module is used to receive the second strength information fed back by the second peripheral device;
[0063] A strength level confirmation module, used to confirm the corresponding strength level according to the signal strength information and each second strength information;
[0064] The third weighted processing module is used to perform comprehensive weighted summation of the signal strength information and the second strength information according to the device weights of the first terminal device and each second peripheral device, and the level weight corresponding to each strength level, to obtain the comprehensive strength information corresponding to the first identification information.
[0065] Based on the above embodiment, the device weight of the second peripheral device is greater than the device weight of the first terminal device.
[0066] Based on the above embodiment, the strength level of a high signal strength has a greater level weight than the strength level of a low signal strength.
[0067] Based on the above embodiment, the change condition includes detecting at least one of changes in the newly added peripheral identification information and the signal strength information within a preset range.
[0068] On the basis of the above embodiment, after continuously detecting the device information of the surrounding peripheral devices, the method further includes:
[0069] The device connection unit is used to establish a connection with the peripheral device corresponding to the peripheral device identification information when the signal strength information reaches a preset connection trigger value.
[0070] The connection device based on multi-device signal strength provided in the embodiment of the present application is included in the first terminal device, and can be used to execute the corresponding connection method based on multi-device signal strength provided in the above embodiment, and has corresponding functions and beneficial effects.
[0071] It is worth noting that in the above-mentioned embodiment of the connection device based on multi-device signal strength, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific name of each functional unit is only for the convenience of distinguishing each other, and is not used to limit the scope of protection of the present invention.
[0072] Figure 5 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. Figure 5 As shown, the terminal device includes a processor 310 and a memory 320, and may also include an input device 330, an output device 340 and a communication device 350; the number of processors 310 in the terminal device may be one or more, Figure 5 A processor 310 is taken as an example; the processor 310, the memory 320, the input device 330, the output device 340 and the communication device 350 in the terminal device can be connected via a bus or other means. Figure 5The example of connecting through bus is taken in the following.
[0073] The memory 320, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the connection method based on the signal strength of multiple devices in the embodiment of the present application. The processor 310 executes various functional applications and data processing of the terminal device by running the software programs, instructions and modules stored in the memory 320, that is, realizing the above-mentioned connection method based on the signal strength of multiple devices.
[0074] The memory 320 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 320 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 320 may further include a memory remotely arranged relative to the processor 310, and these remote memories may be connected to the terminal device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0075] The input device 330 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the terminal device. The output device 340 may include a display device such as a display screen.
[0076] The above-mentioned terminal device includes a connection device based on the signal strength of multiple devices, which can be used to execute any connection method based on the signal strength of multiple devices, and has corresponding functions and beneficial effects.
[0077] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it is used to perform relevant operations in the connection method based on multi-device signal strength provided in any embodiment of the present application, and has corresponding functions and beneficial effects.
[0078] Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products.
[0079] Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the functions in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0080] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory. The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0081] Computer readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0082] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0083] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A connection method based on multi-device signal strength, for a first terminal device, wherein the first terminal device is connected to at least one second terminal device, characterized in that: include: Continuously detect device information of surrounding peripheral devices, wherein the device information includes peripheral identification information and signal strength information; In the case where the change of the device information satisfies a preset change condition, confirming the first identification information in the changed device information, and confirming a second peripheral device with the same signal type as the first identification information among the currently connected peripheral devices; Sending a signal detection instruction carrying the first identification information to the second peripheral device, so that the second peripheral device detects and feeds back second strength information between the first peripheral device and the first peripheral device corresponding to the first identification information; receiving second strength information fed back by the second peripheral device, and confirming comprehensive strength information corresponding to the first identification information according to the signal strength information and the second strength information; When confirming that the first comprehensive strength information is the largest in a preset strength set, establishing a connection with the first peripheral device; the preset strength set includes the comprehensive strength information detected by the first terminal device and the second terminal device, and the first comprehensive strength information is the comprehensive strength information detected by the first terminal device.
2. The connection method based on multi-device signal strength according to claim 1, characterized in that: Receiving second strength information fed back by the second peripheral device, and confirming comprehensive strength information corresponding to the first identification information according to the signal strength information and the second strength information, including: receiving second strength information fed back by the second peripheral device; The signal strength information and the second strength information are weightedly summed according to the device weights of the first terminal device and each of the second peripheral devices to obtain comprehensive strength information corresponding to the first identification information.
3. The connection method based on multi-device signal strength according to claim 1, characterized in that: Receiving second strength information fed back by the second peripheral device, and confirming comprehensive strength information corresponding to the first identification information according to the signal strength information and the second strength information, including: receiving second strength information fed back by the second peripheral device; determining a corresponding strength level according to the signal strength information and each of the second strength information; According to the level weight corresponding to each of the strength levels, the signal strength information and the second strength information are weightedly summed to obtain the comprehensive strength information corresponding to the first identification information.
4. The connection method based on multi-device signal strength according to claim 1, characterized in that: Receiving second strength information fed back by the second peripheral device, and confirming comprehensive strength information corresponding to the first identification information according to the signal strength information and the second strength information, including: receiving second strength information fed back by the second peripheral device; determining a corresponding strength level according to the signal strength information and each of the second strength information; According to the device weights of the first terminal device and each of the second peripheral devices, and the level weight corresponding to each of the strength levels, the signal strength information and the second strength information are comprehensively weighted and summed to obtain the comprehensive strength information corresponding to the first identification information.
5. The connection method based on multi-device signal strength according to claim 2 or 4, characterized in that: The device weight of the second peripheral device is greater than the device weight of the first terminal device.
6. The connection method based on multi-device signal strength according to claim 3 or 4, characterized in that: A strength level with a high signal strength has a greater level weight than a strength level with a low signal strength.
7. The connection method based on multi-device signal strength according to any one of claims 1 to 4, characterized in that: The change condition includes detecting at least one of changes in the newly added peripheral identification information and the signal strength information within a preset range.
8. The connection method based on multi-device signal strength according to claim 7, characterized in that: After the device information of the surrounding peripheral devices is continuously detected, the method further includes: When the signal strength information reaches a preset connection trigger value, a connection is established with the peripheral device corresponding to the peripheral identification information.
9. A terminal device, characterized in that: include: one or more processors; a memory for storing one or more computer programs; When the one or more computer programs are executed by the one or more processors, the terminal device implements the connection method based on multi-device signal strength as described in any one of claims 1-8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the connection method based on multi-device signal strength as described in any one of claims 1-8 is implemented.