Equipment connection method and device, equipment and medium
By turning on multiple hotspots on the device to be managed and automatically switch hotspot information according to the Bluetooth signal strength and duration, the cumbersome operation problem of administrators when managing multiple devices is solved, and efficient configuration without user operations is achieved.
Patent Information
- Application Number
- CN202510704031.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-07-18
AI Technical Summary
In the prior art, administrators need to remember and input multiple passwords when managing multiple devices, which is complicated to operate, resulting in low configuration efficiency and poor user experience.
The device to be managed turns on multiple hot spots, and automatically switches hot spot information by detecting the terminal's Bluetooth signal strength and duration to achieve multiple connections without user operation.
Simplified operation steps, improved device configuration efficiency, and improved user experience.
Smart Images

Figure CN120343754A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of wireless communication and network interaction, and particularly to a device connection method, device, equipment, and medium. Background Art
[0002] In order to manage devices such as turnstiles and routers, an administrator can access the management interface of the device through a terminal carried by himself / herself, so as to configure the corresponding device on the management interface. Generally, it is necessary to use the administrator password to log in to the management page. When the same administrator needs to manage multiple devices, the administrator needs to record and distinguish multiple administrator passwords, which is very likely to cause the problem that the management interface cannot be logged in smoothly at one time due to incorrect administrator passwords. And even if the administrator can accurately remember the administrator password of each device, the administrator still needs to go through cumbersome operations to log in to the management interface, resulting in low efficiency.
[0003] In the related art, in order to optimize the process of an administrator managing devices, access to the management interface is realized by the method of "touch and touch". The administrator can use the terminal carried by himself / herself to "touch and touch" with the device to be managed to connect to the currently enabled hotspot of the device to be managed, and then directly access the management interface through background information interaction without the administrator inputting any information. However, if the administrator accidentally exits the management interface during the configuration process, the management interface needs to be accessed again by the method of re-"touching and touching". However, since a hotspot connection is currently in progress between the terminal and the device to be managed, re-"touching and touching" will not reconnect to this hotspot, and thus the management interface cannot be accessed again. Therefore, before re-"touching and touching", the administrator needs to manually disconnect the connection with the current hotspot, and then re-access the management interface by the method of re-"touching and touching". This process is relatively cumbersome and there is no operation guide, which is likely to cause user annoyance and poor user experience in use.
[0004] Therefore, how to simplify the operation steps in the "touch and touch" process, and then improve the configuration efficiency and user experience has become an urgent problem to be solved. Summary of the Invention
[0005] The embodiments of this application provide a device connection method, device, equipment, and medium, which are used to solve the problems of cumbersome operations and low efficiency when an administrator configures a device to be managed in the prior art.
[0006] In a first aspect, this application provides a device connection method, which is applied to a device to be managed, and multiple hotspots are enabled on the device to be managed. The method includes:
[0007] If the intensity of the Bluetooth signal of any terminal is detected to be greater than the first preset signal intensity and the duration is greater than the duration threshold, the hotspot information of the target hotspot stored in the Bluetooth transmission buffer is transmitted to the terminal, so that the terminal establishes a hotspot connection with the device to be managed according to the hotspot information;
[0008] Obtain other hotspots that have been enabled by itself, and use the hotspot information of any other hotspot to update the hotspot information of the target hotspot stored in the Bluetooth transmission buffer.
[0009] In a second aspect, the present application provides a device connection device. The device has multiple hotspots enabled. The device includes:
[0010] A sending module, configured to, if the intensity of the Bluetooth signal of any terminal is detected to be greater than the first preset signal intensity and the duration is greater than the duration threshold, transmit the hotspot information of the target hotspot stored in the Bluetooth transmission buffer to the terminal, so that the terminal establishes a hotspot connection with the device to be managed according to the hotspot information;
[0011] An updating module, configured to obtain other hotspots that have been enabled by itself, and use the hotspot information of any other hotspot to update the hotspot information of the target hotspot stored in the Bluetooth transmission buffer.
[0012] In a third aspect, an embodiment of the present application further provides an electronic device. The electronic device includes a processor, and the processor is configured to implement the steps of the device connection method as described in any one of the above when executing a computer program stored in a memory.
[0013] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and the computer program, when executed by a processor, implements the steps of the device connection method as described in any one of the above.
[0014] Since in the embodiment of the present application, the device to be managed has multiple hotspots enabled, if the intensity of the Bluetooth signal of any terminal is detected to be greater than the first preset signal intensity and the duration is greater than the duration threshold, the hotspot information of the target hotspot stored in the Bluetooth transmission buffer is transmitted to the terminal, so that the terminal establishes a hotspot connection with the device to be managed according to the hotspot information. In order to make the hotspot to which the terminal connects next time not be the target hotspot, the device to be managed obtains other hotspots that have been enabled by itself, and uses the hotspot information of any other hotspot to update the hotspot information of the target hotspot stored in the Bluetooth transmission buffer, so that the user automatically switches to connect to different device hotspots every time they "touch", realizing that the user can connect to different hotspots of the device to be managed again or multiple times without other operations, thereby simplifying the operation steps and improving the efficiency of configuring the device to be managed. Description of the Drawings
[0015] To more clearly illustrate the technical solutions of this application, the following will briefly introduce the drawings required for description in the embodiments. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0016] Figure 1 It is a schematic flowchart of a device connection process provided by an embodiment of this application;
[0017] Figure 2 It is a schematic diagram of a device connection process provided by an embodiment of this application;
[0018] Figure 3 It is a schematic structural diagram of a device connection device provided by an embodiment of this application;
[0019] Figure 4 It is a schematic structural diagram of an electronic device provided by an embodiment of this application. Specific Embodiments
[0020] To make the objectives, technical solutions, and advantages of this application clearer, the following will clearly and completely describe the technical solutions of the embodiments of this application in conjunction with the drawings. Obviously, the described embodiments are only some embodiments of this application, rather than all embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art belong to the scope protected by this application.
[0021] In the related art, when a terminal connects to the hotspot of a device to be managed, the terminal will initiate a network request to the device to be managed, thus redirecting to the management interface of the device to be managed, that is, redirecting to the network (web) of the device to be managed. And when the terminal "touches and connects" again, it will still connect to the same hotspot of the device to be managed. At this time, no secondary network request will be initiated, and thus it is impossible to redirect to the web of the device to be managed. Based on this, the embodiments of this application provide a device connection method, device, device, and medium. This method is applied to the device to be managed, and multiple hotspots are enabled on the device to be managed. In this method, if it is detected that the intensity of the Bluetooth signal of any terminal is greater than a first preset signal intensity and the duration is greater than a duration threshold, the hotspot information of the target hotspot stored in the Bluetooth transmission buffer is transmitted to the terminal, so that the terminal establishes a hotspot connection with the device to be managed according to the hotspot information; other hotspots that are already enabled on itself are obtained, and the hotspot information of any other hotspot is used to update the hotspot information of the target hotspot stored in the Bluetooth transmission buffer.
[0022] Embodiment 1:
[0023] Figure 1A schematic flowchart of a device connection process provided by an embodiment of the present application is as follows Figure 1 As shown, this process includes the following steps:
[0024] S101: If it is detected that the intensity of the Bluetooth signal of any terminal is greater than a first preset signal intensity and the duration is greater than a duration threshold, then transmit the hotspot information of the target hotspot stored in the Bluetooth transmission buffer to the terminal, so that the terminal establishes a hotspot connection with the device to be managed according to the hotspot information.
[0025] The device connection method provided by the present application is applied to the device to be managed. Since most current terminals have Bluetooth communication functions, in order to ensure that any terminal can establish a network connection with the device to be managed, in the embodiment of the present application, the device to be managed can be any electronic device with Bluetooth function, and this electronic device can be a mobile terminal, a turnstile, a router, an access control device, etc.
[0026] Currently, during the process of an administrator managing a device to be managed, the administrator can hold a terminal close to the device to be managed and perform a "touch and touch" operation with the device to be managed, so as to access the management interface in the "touch and touch" manner. Among them, the "touch and touch" operation can be understood as a direct touch between the terminal and the device to be managed, or it can be understood as the terminal continuously approaching the device to be managed but not touching the device to be managed. In the related art, after the "touch and touch" operation, the terminal can access the management interface of the device to be managed. If the administrator accidentally exits the management interface during the operation of this management interface, it is necessary to re-access the management interface by re-"touching and touching". However, since a hotspot connection is currently being established between the terminal and the device to be managed, re-"touching and touching" will not reconnect to this hotspot, and thus the management interface cannot be re-accessed. Therefore, in order to ensure that after the terminal "touches and touches" with the device to be managed, the administrator (hereinafter referred to as the "user") can still access the management interface of the device to be managed again or multiple times by the "touch and touch" method without other operations. In the embodiment of the present application, the device to be managed pre-opens multiple hotspots, and during the device connection process, the terminal can establish a hotspot connection with the device to be managed based on any of these multiple hotspots.
[0027] In order for the terminal to establish a Bluetooth connection with the device to be managed, so that the device to be managed can transmit hotspot information to the terminal through Bluetooth transmission, when the user first connects the terminal to the device to be managed, the user can click the Bluetooth enable function and enter the corresponding matching code to establish a Bluetooth connection with the device to be managed. After establishing a connection once, the terminal will automatically establish a Bluetooth connection when it approaches the device to be managed subsequently.
[0028] The device to be managed can detect the strength of Bluetooth signals sent by all terminals, where the Bluetooth address of the corresponding terminal can be carried in the Bluetooth signals. The device to be managed can distinguish different terminals based on the Bluetooth addresses carried in the Bluetooth signals, and then detect the strength of the Bluetooth signals of each terminal respectively. During the "touch and touch" operation between the user's handheld terminal and the device to be managed, the user holds the terminal and continuously approaches the device to be managed. And to ensure successful network connection, when the terminal approaches the device to be managed to a certain extent, the user will maintain this action for a period of time. Moreover, the closer the terminal is to the device to be managed, the greater the strength of the Bluetooth signal of this terminal. Therefore, in the embodiments of the present application, a first preset signal strength and a duration threshold can be pre-configured. Exemplarily, the duration threshold can be any value such as 1 second, 2 seconds, 5 seconds, 8 seconds, etc., and can be set based on the good user experience.
[0029] Exemplarily, the first preset signal strength can be any value such as -12 decibels milliwatt (dBm), -10 dBm, etc. It should be noted that since the signal strengths of Bluetooth chips of different models for transmitting and receiving Bluetooth signals are different, in the embodiments of the present application, when configuring the first preset signal strength, a large number of experiments can be conducted to determine a reasonable signal strength as the first preset signal strength. In order to improve the success rate of subsequent device connections, the first preset signal strength needs to be accurately configured. Therefore, in the embodiments of the present application, when determining the first preset signal strength configured in the device A to be managed, different models of terminals on the market can be collected in advance, and there are various Bluetooth chips of different models among the multiple terminals. In the embodiments of the present application, the signal strength of the Bluetooth signal detected by the device A to be managed can be statistically analyzed when each terminal is at a preset distance from the device A to be managed. After a large number of experiments, it is appropriate to send hotspot information when the device to be managed and the terminal are about 10 centimeters apart. Therefore, the preset distance can be set to 10 centimeters. Of course, those skilled in the art can also configure the preset distance according to needs, such as any distance like 20 centimeters, 5 centimeters, etc. After obtaining the signal strength of the Bluetooth signal detected by the device A to be managed when each terminal is at the preset distance, in order to ensure that each model of terminal can be normally connected to the device to be managed during subsequent use, in the embodiments of the present application, the minimum signal strength among the signal strengths of the multiple terminals detected by the device A to be managed can be determined as the first preset signal strength. It should be noted that if it is currently necessary to determine the first preset signal strength configured in the device B to be managed, it can first be determined whether the models of the Bluetooth chips configured in the device B to be managed and the device A to be managed are the same. If they are the same, the first preset signal strength configured in the device A to be managed can be used as the first preset signal strength configured in the device B to be managed; if they are different, different models of terminals need to be collected again, and the first preset signal strength configured in the device B to be managed needs to be determined again. The determination process is the same as the process of determining the first preset signal strength of the device A to be managed, and will not be elaborated here. The terminals collected when determining the first preset signal strength configured in the device B to be managed can be the same as or different from the terminals collected when determining the first preset signal strength configured in the device A to be managed.
[0030] If the strength of the Bluetooth signal of any terminal detected by the device to be managed is greater than the first preset signal strength and the duration is greater than the duration threshold, it can be considered that the terminal is continuously approaching the device to be managed. The device to be managed can transmit the hotspot information of the target hotspot stored in its Bluetooth transmission cache to the terminal, so that the terminal can establish a hotspot connection with the device to be managed according to the hotspot information. Among them, the hotspot information at least includes the account and password of the hotspot. That is to say, in the embodiment of the present application, the distance between the terminal and the device to be managed is reflected by the strength of the Bluetooth signal emitted by the terminal. The closer the terminal is to the device to be managed, the greater the strength of the Bluetooth signal detected by the device to be managed. On the contrary, the smaller the strength of the Bluetooth signal.
[0031] S102: Obtain other hotspots that have been enabled by itself, and use the hotspot information of any other hotspot to update the hotspot information of the target hotspot stored in the Bluetooth transmission cache.
[0032] In order for the terminal to still be able to access the management interface during the next "touch and touch" process, after the device to be managed sends the hotspot information of the target hotspot stored in the Bluetooth transmission cache, it can obtain other hotspots that have been enabled by itself, and use the hotspot information of any other hotspot to update the hotspot information of the target hotspot stored in the Bluetooth transmission cache. That is to say, use the hotspot information of any other hotspot to update the hotspot information of the target hotspot that is currently stored in the Bluetooth transmission cache. That is to say, only the hotspot information of one of the multiple hotspots currently enabled by the device to be managed is stored in the Bluetooth transmission cache. For the convenience of description, the hotspot information of the hotspot stored in the Bluetooth transmission cache can be called the hotspot information of the target hotspot.
[0033] The hotspot information stored in the Bluetooth transmission cache is used to be sent to the corresponding terminal when it is detected that the strength of the Bluetooth signal of a certain terminal is greater than the first preset signal strength and the duration is greater than the duration threshold next time. In the embodiment of the present application, as long as the device to be managed sends the hotspot information stored in the Bluetooth transmission cache to the terminal, regardless of whether it is still the connection between the terminal and the device to be managed afterwards, the device to be managed uses the hotspot information of any other hotspot to update the hotspot information of the target hotspot stored in the Bluetooth transmission cache to ensure that the hotspot information obtained by the terminal during the next "touch and touch" operation is not the hotspot information that has been received currently.
[0034] Since in the embodiments of the present application, multiple hotspots are enabled on the device to be managed, if it is detected that the intensity of the Bluetooth signal of any terminal is greater than the first preset signal intensity and the duration is greater than the duration threshold, the hotspot information of the target hotspot stored in the Bluetooth transmission cache is transmitted to the terminal, so that the terminal establishes a hotspot connection with the device to be managed according to the hotspot information. In order to ensure that the hotspot to which the terminal connects next time is not the target hotspot, the device to be managed obtains other hotspots that it has enabled and updates the hotspot information of the target hotspot stored in the Bluetooth transmission cache with the hotspot information of any other hotspot. Thus, each time the user "touches and goes", the connection automatically switches to a different device hotspot, enabling the user to connect to different hotspots of the device to be managed again or multiple times without any other operations, thereby simplifying the operation steps and improving the efficiency of configuring the device to be managed.
[0035] Embodiment 2:
[0036] In order to further improve the accuracy of device connection, based on the above embodiments, in the embodiments of the present application, after it is detected that the Bluetooth signal of any terminal is greater than the first preset signal intensity and the duration is greater than the duration threshold, and before the hotspot information of the target hotspot stored in the Bluetooth transmission cache is transmitted to the terminal, the method further includes:
[0037] If the hotspot information of any hotspot has been sent to the terminal, obtain the historical time when the hotspot information was last sent to the terminal;
[0038] If the intensity of the Bluetooth signal of the terminal has not been continuously greater than the second preset signal intensity during the period from the current time to the historical time, continue to execute the subsequent step of transmitting the hotspot information of the target hotspot stored in the Bluetooth transmission cache to the terminal.
[0039] After the user successfully establishes a hotspot connection between the handheld terminal and the device to be managed, during the process of the user configuring the device to be managed based on the terminal, the user may still maintain a relatively close distance from the device to be managed, and may even directly place the terminal on the body of the device to be managed for operation. The terminal and the device to be managed have been maintaining a relatively close distance and will continue for a certain period of time. At this time, the device to be managed may mistakenly think that the terminal is relatively close to itself, and the user may hope to obtain the corresponding hotspot information, and repeatedly send the hotspot information to the terminal, resulting in a waste of resources. Therefore, in the embodiments of the present application, a second preset signal strength is pre-configured, and the second preset signal strength may be the same as the first preset signal strength or different from the first preset signal strength. Exemplarily, since the user's hand will shake when holding the terminal and will not always maintain the same action, in the embodiments of the present application, the configured second preset signal strength may be less than the first preset signal strength. The process of determining the second preset signal strength is the same as the process of determining the first preset signal strength, and will not be described in detail here.
[0040] In the embodiments of the present application, after detecting that the Bluetooth signal of any terminal is greater than the first preset signal strength and the continuous duration is greater than the duration threshold, before transmitting the hotspot information of the target hotspot stored in the Bluetooth transmission cache to the terminal, it is possible to determine whether hotspot information has been sent to the terminal before. If so, it is also necessary to determine whether the terminal has moved away from the device to be managed during the period from the current time to the last time hotspot information was sent to the terminal. If the terminal has moved away from the device to be managed during this period, and the device to be managed currently detects that the terminal is relatively close to itself, it can be considered that the user is holding the terminal and hopes to obtain hotspot information again, and the hotspot information of the target hotspot stored in the Bluetooth transmission cache can be repeatedly sent to the terminal. Specifically, if the device to be managed detects that the Bluetooth signal of any terminal is greater than the first preset signal strength and the continuous duration is greater than the duration threshold, it can continue to determine whether hotspot information of any kind has been sent to the terminal. If so, the historical time of the last time hotspot information was sent to the terminal can be obtained. If the strength of the Bluetooth signal of the terminal has not continuously been greater than the second preset signal strength during the period from the current time to the historical time, it means that the user is holding the terminal and has moved away from the device to be managed, and it can be considered that the user is holding the terminal and hopes to re-obtain hotspot information, and the subsequent step of transmitting the hotspot information of the target hotspot stored in the Bluetooth transmission cache to the terminal can be continued.
[0041] In order to further improve the accuracy of device connection, on the basis of the above embodiments, in the embodiments of the present application, the method further includes:
[0042] If the intensity of the Bluetooth signal of the terminal remains greater than the second preset signal intensity during the period from the current time to the historical time, no hotspot information is sent to the terminal, and the detection of the intensity of the Bluetooth signals of all terminals continues.
[0043] If hotspot information has been sent to the terminal before, and the intensity of the Bluetooth signal of the terminal remains greater than the second preset signal intensity during the period from the current time to the historical time when the hotspot information was last sent to the terminal, it indicates that the terminal has not moved far away from the device to be managed during the period from the current time to the last time the hotspot information was sent to the terminal. To avoid wasting resources, hotspot information may not be sent to the terminal, and the detection of the intensity of the Bluetooth signals of all terminals continues.
[0044] Specifically, it is stipulated in advance that when the distance between the terminal and the device to be managed is less than 10 cm, it is considered that hotspot information needs to be sent to the terminal. If the distance between the terminal and the device to be managed does not exceed 20 cm during the period from the current time to the last time the hotspot information was sent to the terminal, it indicates that the terminal and the device to be managed have always been in a relatively close distance, and no hotspot information is sent to the terminal. If the distance between the terminal and the device to be managed exceeded 20 cm during the period from the current time to the last time the hotspot information was sent to the terminal, and the current distance between the two is less than 10 cm, it can be considered that the user holds the terminal and expects to obtain hotspot information, and hotspot information can be sent to the terminal. Assume that the first preset signal intensity corresponding to 10 cm is A, and the second preset signal intensity corresponding to 20 cm is B, where A is greater than B. The device to be managed sends hotspot information according to the following logic:
[0045] If it is detected that the Bluetooth signal of terminal 1 is greater than the first preset signal intensity A and lasts for 2 seconds, it is further determined whether hotspot information has been sent to terminal 1. If so, the historical time T1 when the hotspot information was last sent to terminal 1 is obtained. If the intensity of the Bluetooth signal of terminal 1 does not remain greater than the second preset signal intensity B during the period from the current time T2 to the historical time T1, it indicates that the distance between terminal 1 and the device to be managed has exceeded 20 cm, and it can be considered that the user holds terminal 1 and expects to obtain hotspot information, and the hotspot information of the target hotspot stored in the Bluetooth transmission cache can be sent to terminal 1.
[0046] If it is detected that the Bluetooth signal of terminal 1 is greater than the first preset signal intensity A and lasts for 2 seconds, it is further determined whether hotspot information has been sent to terminal 1. If not, the hotspot information of the target hotspot stored in the Bluetooth transmission cache is directly sent to terminal 1.
[0047] If it is detected that the Bluetooth signal of the terminal 1 is greater than the first preset signal strength A and lasts for 2 seconds, it is further determined whether hotspot information has been sent to the terminal 1. If so, the historical time T1 when the hotspot information was last sent to the terminal 1 is obtained. If the strength of the Bluetooth signal of the terminal 1 continuously remains greater than the second preset signal strength B during the period from the current time T2 to the historical time T1, it indicates that the distance between the terminal 1 and the device to be managed does not exceed 20 centimeters, which means that the terminal 1 and the device to be managed have always maintained a short distance, and thus hotspot information is not sent to the terminal 1.
[0048] Embodiment 3:
[0049] In order to further improve the success rate of device connection, based on the above embodiment, in the embodiment of the present application, the obtaining of other hotspots that have been enabled by itself and using the hotspot information of any other hotspot to update the hotspot information of the target hotspot stored in the Bluetooth transmission cache includes:
[0050] Determine the next hotspot corresponding to the target hotspot according to the preset hotspot order;
[0051] Use the hotspot information of the next hotspot to update the hotspot information of the target hotspot stored in the Bluetooth transmission cache.
[0052] Suppose that the device to be managed currently enables three hotspots, namely hotspot A, hotspot B, and hotspot C. The hotspot information of hotspot A is currently stored in the Bluetooth transmission cache. At this time, the terminal 1 obtains the hotspot information of hotspot A stored in the Bluetooth transmission cache through the "touch and touch" method. After the device to be managed sends the hotspot information of hotspot A to the terminal 1, it randomly selects a hotspot from hotspot B and hotspot C. For example, it selects hotspot C and uses the hotspot information of hotspot C to update the hotspot information of hotspot A stored in the Bluetooth transmission cache. If the terminal 2 then obtains the hotspot information of hotspot C currently stored in the Bluetooth transmission cache through the "touch and touch" method. After the device to be managed sends the hotspot information of hotspot C to the terminal 2, it randomly selects a hotspot from hotspot A and hotspot B. For example, it selects hotspot A and uses the hotspot information of hotspot A to update the hotspot information of hotspot C stored in the Bluetooth transmission cache. If the terminal 1 then obtains the hotspot information of hotspot A currently stored in the Bluetooth transmission cache again through the "touch and touch" method. Since the terminal 1 has already established a hotspot connection with hotspot A, when the terminal A obtains the hotspot information of hotspot A again, it will not establish a connection again, and thus it is unable to access the management interface again. That is to say, updating the hotspot information currently stored in the Bluetooth transmission cache based on the hotspot information of the randomly selected hotspot has a large degree of randomness.
[0053] Since the number and information of the pre - enabled hotspots of the device to be managed are known, in order to further improve the success rate of device connection, in the embodiments of the present application, a preset hotspot order can be pre - configured. When it is necessary to update the hotspot information of the target hotspot stored in the Bluetooth transmission buffer using the hotspot information, the next hotspot corresponding to the target hotspot is determined according to this preset hotspot order. Since the name of each hotspot is generally fixed, this preset hotspot order can be configured according to the name of the hotspot. For example, it can be sorted according to the first letter of the name of the hotspot, or according to the number of strokes of the name of the hotspot, etc. Of course, this preset hotspot order can also be arbitrarily configured by technicians according to needs.
[0054] Specifically, assume that the enabled hotspots are Hotspot A, Hotspot B, and Hotspot C respectively. After sorting according to the preset hotspot order, the obtained hotspot sequence can be: Hotspot A, Hotspot B, Hotspot C. If the hotspot information of the target hotspot stored in the current Bluetooth transmission buffer is the hotspot information of Hotspot B, then it can be determined that the next hotspot corresponding to this target hotspot is Hotspot C. If the hotspot information of the target hotspot stored in the current Bluetooth transmission buffer is the hotspot information of Hotspot C, then it can be determined that the next hotspot corresponding to this target hotspot is the hotspot information of Hotspot A.
[0055] After determining the next hotspot corresponding to the target hotspot, the hotspot information of the next hotspot can be used to update the hotspot information of the target hotspot stored in the Bluetooth transmission buffer.
[0056] Embodiment 4:
[0057] In order to further improve the success rate of device connection, on the basis of the above - mentioned embodiments, in the embodiments of the present application, before it is detected that the strength of the Bluetooth signal of any terminal is greater than the first preset signal strength, the method further includes:
[0058] When the initialization condition is met, a preset number of hotspots are enabled.
[0059] In order to facilitate subsequent timely update of the hotspot information stored in the Bluetooth transmission buffer, in the embodiments of the present application, a preset number of hotspots can be enabled when the device to be managed is in the initialization state. Among them, this preset number can be configured by the user according to needs, such as any integer like 3, 5, 10, 15, etc. The user can adjust the preset number according to needs at any time during the use process. Exemplarily, if User A connects to Hotspot A of the device to be managed after "touch - to - connect", User B connects to Hotspot B, and User C connects to Hotspot C, and then User A "touch - to - connect" again and still cannot directly enter the web of the device to be managed, to reduce this probability, the number of hotspots simultaneously enabled on the device to be managed can be increased by multiple, such as simultaneously enabling 5 or even 10 device hotspots.
[0060] In order to facilitate determining when the device to be managed is in the initialization state, in the embodiments of the present application, initialization conditions can be pre-configured. When the initialization conditions are met, a preset number of hotspots can be enabled. Exemplarily, the initialization condition can be that the device to be managed is powered on; it can also be that a Bluetooth enable instruction is received, and the Bluetooth enable instruction can be triggered by the administrator through software. For example, the administrator clicks the "Enable Bluetooth" button on the display screen. The Bluetooth enable instruction can also be triggered by the administrator through hardware. For example, the administrator toggles a certain button on the body to the on state; it can also be that the current time meets the preset initialization time. It should be noted that those skilled in the art can configure the initialization conditions as needed.
[0061] Embodiment 5:
[0062] To prevent misoperation, based on the above embodiments, in the embodiments of the present application, the method further includes:
[0063] When the hotspot closing condition is met, the information of the hotspot stored in the Bluetooth transmission cache is cleared.
[0064] If the device to be managed keeps the hotspot on for a long time, it will cause waste of resources, and there may also be a possibility of misoperation if other electronic devices perform Bluetooth connection during the hotspot activation process. Therefore, in the embodiments of the present application, hotspot closing conditions are pre-configured. Among them, the hotspot closing condition can be that a hotspot close instruction is received, or a Bluetooth close instruction is received, or the intensity of the Bluetooth signal of any terminal is not detected to be greater than the preset signal intensity within a preset time length. Those skilled in the art can configure the hotspot closing condition as needed.
[0065] In the embodiments of the present application, when the hotspot closing condition is met, the information of the hotspot stored in the Bluetooth transmission cache is cleared. That is to say, the "touch and connect" function depends on the activation of the hotspot of the device to be managed. When the hotspot of the device to be managed is closed, the hotspot information stored in the Bluetooth transmission cache can be cleared, and the hotspot information is not sent to the terminal through Bluetooth, so as to achieve the purpose of closing the use of the "touch and connect" function.
[0066] Embodiment 6:
[0067] To quickly access the management interface, based on the above embodiments, in the embodiments of the present application, the method further includes:
[0068] If a request for obtaining the jump path information of the management interface sent by the terminal is received, a redirect response message is fed back to the terminal, so that the terminal can access the management interface according to the jump path information of the management interface carried in the redirect response message.
[0069] After the terminal establishes a hotspot connection with the device to be managed, the terminal can initiate a network request to the device to be managed, and this network request can be a request for obtaining the jump path information of the management interface. If the device to be managed receives the request from the terminal for obtaining the jump path information of the management interface, it can feedback redirection response information to the terminal. The redirection response information may include the jump path information of the management interface. After the terminal receives this redirection response information, it can access the management interface according to the jump path information of the management interface carried in the redirection response information.
[0070] In a possible implementation manner, since Bluetooth communication can be performed only when Bluetooth pairing is successful, in the embodiments of the present application, as long as the Bluetooth matching codes of the device to be managed and the terminal are paired normally, it can be considered that the terminal is a terminal with management authority. Subsequently, in order for this terminal to directly access the management interface without inputting any administrator account and password, the redirection response information may also carry the administrator account and password. After the terminal receives the redirection response information, it can jump to the login page of the management interface according to the jump path of the management interface carried in the redirection response information, and input the administrator account and password carried in the redirection response information to the corresponding positions. After the administrator account and password are verified to be passed, the administrator can access the management interface. In the embodiments of the present application, the administrator accounts and passwords corresponding to different administrators may be the same or different. Exemplarily, the device to be managed may be pre-configured with an administrator account and password, and when receiving a network request sent by any terminal, the administrator account and password are carried in the redirection response information and sent. In the embodiments of the present application, the administrator accounts and passwords corresponding to different terminals with management authority may also be pre-configured in the device to be managed. After receiving the network request sent by the terminal, the terminal identifier carried in the network request can be obtained, and the corresponding administrator account and password can be found in the pre-configured corresponding relationship according to the terminal identifier, and then the found administrator account and password are carried in the redirection response information and sent to the terminal. Of course, the administrator account and password may also be pre-saved in the terminal. When the terminal sends a request for obtaining the jump path information of the management interface to the device to be managed, the administrator account and password can be sent to the device to be managed together. After the device to be managed verifies that the administrator account and password are accurate, it can feedback redirection response information to the terminal so that the terminal can access the management interface according to the jump path information of the management interface carried in the redirection response information.
[0071] Embodiment 7:
[0072] The following combines Figure 2 to illustrate the device connection process. Figure 2A schematic diagram of the device connection process provided by the embodiments of the present application. In the embodiments of the present application, the terminal can be a mobile phone. Before the user uses the "touch and connect" function, when the device to be managed is in the initialization state, the device to be managed can simultaneously turn on three hotspots, namely hotspot A, hotspot B, and hotspot C, and the device to be managed reads the hotspot information of hotspot A and stores the hotspot information of hotspot A in the Bluetooth transmission buffer. At the same time, the Bluetooth function is turned on for the mobile phone to connect. When the user uses the "touch and connect" function for the first time, the user can click the Bluetooth button on the mobile phone to turn on the Bluetooth function and establish a Bluetooth connection between the device to be managed and the terminal. Subsequently, when the mobile phone approaches the device to be managed, it will automatically connect.
[0073] When the user performs the "touch and connect" operation, the device to be managed detects that the Bluetooth signal of the mobile phone is continuously increasing. For example, when the signal strength of the Bluetooth signal is greater than -12 dBm and lasts for more than 2 seconds, the device to be managed sends the hotspot information of hotspot A in the Bluetooth transmission buffer to the mobile phone, and the mobile phone performs a hotspot connection with hotspot A of the device to be managed according to the hotspot information. That is to say, by detecting the gradually increasing trend of the Bluetooth signal by the device to be managed, and after reaching a certain threshold and lasting for a certain time, it is judged whether the user's mobile phone is approaching the device to be managed.
[0074] After the device to be managed senses that a mobile phone is connected to hotspot A, the device to be managed stores the hotspot information of hotspot B in the Bluetooth transmission buffer of the device to be managed, and the hotspot information of hotspot C will be stored for the next "touch and connect", and so on.
[0075] After the mobile phone connects to hotspot A of the device to be managed, it can initiate a network request to the device to be managed. After receiving the network request, the device to be managed will return a redirect response message. After receiving the redirect response message, the mobile phone will initiate a new network request according to the jump path information of the management interface carried in the redirect response message, so as to enter the management interface of the device to be managed.
[0076] When the user's mobile phone performs "touch and connect" again, it will connect to hotspot B of the device to be managed at this time, and repeat the above steps of initiating a network request. Continuing "touch and connect" will connect to hotspot C, and so on.
[0077] In the embodiments of the present application, obtaining hotspot information through Bluetooth communication can be applicable to the vast majority of terminals.
[0078] In the related art, after "touch and touch", it is necessary to switch or disconnect the device hotspot and then touch and touch again to enter the management interface of the device to be managed. In the embodiments of the present application, the user can continuously touch and touch multiple times, and can enter the management interface of the device to be managed without other operations. In the embodiments of the present application, after each "touch and touch", the device to be managed automatically switches and stores different hotspot information of the current device in the Bluetooth transmission buffer, so that the user automatically switches to connect to different device hotspots after each "touch and touch", prompting the user's terminal to initiate a network request and redirect to the device web after each "touch and touch", realizing the network configuration of the screenless Internet of Things device, expanding its application scenarios, and greatly improving the user experience.
[0079] Embodiment 8:
[0080] Based on the same inventive concept, an embodiment of the present application provides a device connection device, Figure 3 For a schematic structural diagram of a device connection device provided by an embodiment of the present application, please refer to Figure 3 ., the device has multiple hotspots enabled, and the device includes:
[0081] A sending module 301, configured to, if it is detected that the intensity of the Bluetooth signal of any terminal is greater than a first preset signal intensity and the duration is greater than a duration threshold, transmit the hotspot information of the target hotspot stored in the Bluetooth transmission buffer to the terminal, so that the terminal establishes a hotspot connection with the device to be managed according to the hotspot information;
[0082] An updating module 302, configured to obtain other hotspots enabled by itself, and update the hotspot information of the target hotspot stored in the Bluetooth transmission buffer with the hotspot information of any other hotspot.
[0083] In a possible implementation manner, the device further includes:
[0084] A verification module 303, configured to, if the hotspot information of any hotspot has been sent to the terminal, obtain the historical time of the last sending of the hotspot information to the terminal; if the intensity of the Bluetooth signal of the terminal has not continuously been greater than a second preset signal intensity during the period from the current time to the historical time, continue to execute the subsequent step of transmitting the hotspot information of the target hotspot stored in the Bluetooth transmission buffer to the terminal.
[0085] In a possible implementation manner, the verification module 303 is further configured to, if the intensity of the Bluetooth signal of the terminal has continuously been greater than the second preset signal intensity during the period from the current time to the historical time, not send the hotspot information to the terminal, and continue to detect the intensity of the Bluetooth signals of all terminals.
[0086] In a possible implementation, the update module 302 is specifically configured to determine the next hotspot corresponding to the target hotspot according to a preset hotspot order; and update the hotspot information of the target hotspot stored in the Bluetooth transmission buffer with the hotspot information of the next hotspot.
[0087] In a possible implementation, the device further includes:
[0088] An initialization module 304, which turns on a preset number of hotspots when an initialization condition is met.
[0089] In a possible implementation, the device further includes:
[0090] A clearing module 305, which is used to clear the information of the hotspots stored in the Bluetooth transmission buffer when a hotspot closing condition is met.
[0091] In a possible implementation, the sending module 301 is further configured to, if a request for obtaining the jump path information of the management interface sent by the terminal is received, feedback a redirection response message to the terminal, so that the terminal accesses the management interface according to the jump path information of the management interface carried in the redirection response message.
[0092] Embodiment 9:
[0093] Based on the same inventive concept, an embodiment of the present application provides an electronic device, which can implement the steps of the device connection method described above. Figure 4 The following is a schematic structural diagram of an electronic device provided by an embodiment of the present application. As Figure 4 shown, it includes: a processor 401, a communication interface 402, a memory 403, and a communication bus 404. Among them, the processor 401, the communication interface 402, and the memory 403 complete mutual communication through the communication bus 404;
[0094] A computer program is stored in the memory 403. When the program is executed by the processor 401, the processor 401 is caused to execute the following steps:
[0095] If it is detected that the strength of the Bluetooth signal of any terminal is greater than a first preset signal strength and the duration is greater than a duration threshold, then transmit the hotspot information of the target hotspot stored in the Bluetooth transmission buffer to the terminal, so that the terminal establishes a hotspot connection with the device to be managed according to the hotspot information;
[0096] Obtain other hotspots that have been turned on by itself, and update the hotspot information of the target hotspot stored in the Bluetooth transmission buffer with the hotspot information of any other hotspot.
[0097] In a possible implementation, before transmitting the hotspot information of the target hotspot stored in the Bluetooth transmission buffer to the terminal after detecting that the Bluetooth signal of any terminal is greater than a first preset signal strength and the duration is greater than a duration threshold, the method further includes:
[0098] If the hotspot information of any hotspot has been sent to the terminal, obtain the historical time when the hotspot information was last sent to the terminal;
[0099] If the strength of the Bluetooth signal of the terminal has not continuously been greater than a second preset signal strength during the period from the current time to the historical time, continue to execute the subsequent step of transmitting the hotspot information of the target hotspot stored in the Bluetooth transmission buffer to the terminal.
[0100] In a possible implementation, the method further includes:
[0101] If the strength of the Bluetooth signal of the terminal has continuously been greater than the second preset signal strength during the period from the current time to the historical time, do not send the hotspot information to the terminal, and continue to detect the strength of the Bluetooth signals of all terminals.
[0102] In a possible implementation, the obtaining of other hotspots that have been enabled by itself and using the hotspot information of any other hotspot to update the hotspot information of the target hotspot stored in the Bluetooth transmission buffer includes:
[0103] Determine the next hotspot corresponding to the target hotspot according to a preset hotspot order;
[0104] Use the hotspot information of the next hotspot to update the hotspot information of the target hotspot stored in the Bluetooth transmission buffer.
[0105] In a possible implementation, before detecting that the strength of the Bluetooth signal of any terminal is greater than a first preset signal strength, the method further includes:
[0106] When initialization conditions are met, turn on a preset number of hotspots.
[0107] In a possible implementation, the method further includes:
[0108] When hotspot closing conditions are met, clear the information of the hotspots stored in the Bluetooth transmission buffer.
[0109] In a possible implementation, the method further includes:
[0110] If a request for obtaining the jump path information of the management interface sent by the terminal is received, a redirection response message is fed back to the terminal, so that the terminal accesses the management interface according to the jump path information of the management interface carried in the redirection response message.
[0111] Since the principle of the above electronic device for solving problems is similar to that of the device connection method, the implementation of the above electronic device can refer to the embodiments of the method, and the repeated parts will not be described again.
[0112] The communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface 402 is used for communication between the above electronic device and other devices. The memory may include a Random Access Memory (RAM), and may also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.
[0113] The above processor may be a general-purpose processor, including a central processing unit, a Network Processor (NP), etc.; it may also be a Digital Signal Processing (DSP), an application specific integrated circuit, a field programmable gate array or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0114] Embodiment 10:
[0115] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, in which a computer program executable by a processor is stored. When the program runs on the processor, the following steps are implemented when the processor executes:
[0116] If it is detected that the intensity of the Bluetooth signal of any terminal is greater than a first preset signal intensity and the duration is greater than a duration threshold, the hotspot information of the target hotspot stored in the Bluetooth transmission buffer is transmitted to the terminal, so that the terminal establishes a hotspot connection with the device to be managed according to the hotspot information;
[0117] Obtain other hotspots that are already enabled on itself, and use the hotspot information of any other hotspot to update the hotspot information of the target hotspot stored in the Bluetooth transmission cache.
[0118] In a possible implementation manner, before the step of transmitting the hotspot information of the target hotspot stored in the Bluetooth transmission cache to the terminal after detecting that the Bluetooth signal of any terminal is greater than the first preset signal strength and the duration is greater than the duration threshold, the method further includes:
[0119] If the hotspot information of any hotspot has been sent to the terminal, obtain the historical time when the hotspot information was last sent to the terminal;
[0120] If the strength of the Bluetooth signal of the terminal has not continuously been greater than the second preset signal strength during the period from the current time to the historical time, continue to execute the subsequent step of transmitting the hotspot information of the target hotspot stored in the Bluetooth transmission cache to the terminal.
[0121] In a possible implementation manner, the method further includes:
[0122] If the strength of the Bluetooth signal of the terminal has continuously been greater than the second preset signal strength during the period from the current time to the historical time, do not send the hotspot information to the terminal, and continue to detect the strength of the Bluetooth signals of all terminals.
[0123] In a possible implementation manner, the step of obtaining other hotspots that are already enabled on itself and using the hotspot information of any other hotspot to update the hotspot information of the target hotspot stored in the Bluetooth transmission cache includes:
[0124] Determine the next hotspot corresponding to the target hotspot according to the preset hotspot order;
[0125] Use the hotspot information of the next hotspot to update the hotspot information of the target hotspot stored in the Bluetooth transmission cache.
[0126] In a possible implementation manner, before detecting that the strength of the Bluetooth signal of any terminal is greater than the first preset signal strength, the method further includes:
[0127] When the initialization conditions are met, turn on a preset number of hotspots.
[0128] In a possible implementation manner, the method further includes:
[0129] When the hotspot closing conditions are met, clear the information of the hotspots stored in the Bluetooth transmission cache.
[0130] In a possible implementation manner, the method further includes:
[0131] If a request for obtaining the jump path information of the management interface sent by the terminal is received, a redirection response message is fed back to the terminal, so that the terminal accesses the management interface according to the jump path information of the management interface carried in the redirection response message.
[0132] Since the principle of the above computer-readable storage medium for solving problems is similar to that of the device connection method, the implementation of the above computer-readable storage medium can refer to the implementation of the method, and the repeated parts will not be described again.
[0133] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can 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.
[0134] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate for implementing in the process Figure 1 one process or multiple processes and / or blocks Figure 1 a device for the functions specified in one block or multiple blocks.
[0135] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured product including an instruction device, and the instruction device implements in the process Figure 1 one process or multiple processes and / or blocks Figure 1 a device for the functions specified in one block or multiple blocks.
[0136] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of user operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide for implementing in the process Figure 1 one process or multiple processes and / or blocks Figure 1Steps of functions specified in one or more boxes. Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application also intends to include these modifications and variations.
Claims
1. A device connection method, characterized in that Applied to a device to be managed, where the device to be managed has multiple hotspots enabled, the method includes: If it is detected that the intensity of the Bluetooth signal of any terminal is greater than a first preset signal intensity and the duration is greater than a duration threshold, then transmit the hotspot information of the target hotspot stored in the Bluetooth transmission cache to the terminal, so that the terminal establishes a hotspot connection with the device to be managed according to the hotspot information; Obtain other hotspots that are already enabled by itself, and update the hotspot information of the target hotspot stored in the Bluetooth transmission cache with the hotspot information of any other hotspot.
2. The method according to claim 1, wherein After it is detected that the Bluetooth signal of any terminal is greater than the first preset signal intensity and the duration is greater than the duration threshold, and before transmitting the hotspot information of the target hotspot stored in the Bluetooth transmission cache to the terminal, the method further includes: If the hotspot information of any hotspot has been sent to the terminal, obtain the historical time of the last sending of hotspot information to the terminal; If the intensity of the Bluetooth signal of the terminal has not continuously been greater than a second preset signal intensity during the period from the current time to the historical time, then continue to execute the subsequent step of transmitting the hotspot information of the target hotspot stored in the Bluetooth transmission cache to the terminal.
3. The method according to claim 2, wherein The method further includes: If the intensity of the Bluetooth signal of the terminal has continuously been greater than the second preset signal intensity during the period from the current time to the historical time, then do not send hotspot information to the terminal, and continue to detect the intensity of the Bluetooth signals of all terminals.
4. The method according to claim 1, wherein The obtaining other hotspots that are already enabled by itself and updating the hotspot information of the target hotspot stored in the Bluetooth transmission cache with the hotspot information of any other hotspot includes: Determine the next hotspot corresponding to the target hotspot according to a preset hotspot order; Update the hotspot information of the target hotspot stored in the Bluetooth transmission cache with the hotspot information of the next hotspot.
5. The method according to claim 1, wherein Before it is detected that the intensity of the Bluetooth signal of any terminal is greater than the first preset signal intensity, the method further includes: When the initialization condition is met, enable a preset number of hotspots.
6. The method according to claim 1, wherein The method further includes: When the hotspot closing condition is met, clear the information of the hotspots stored in the Bluetooth transmission cache.
7. The method according to claim 1, characterized in that, The method further includes: If a request for obtaining the jump path information of the management interface is received from the terminal, feedback a redirection response message to the terminal, so that the terminal accesses the management interface according to the jump path information of the management interface carried in the redirection response message.
8. A device connection device, characterized in that, The device has multiple hotspots enabled, and the device includes: A sending module, configured to, if it is detected that the intensity of the Bluetooth signal of any terminal is greater than a first preset signal intensity and the duration is greater than a duration threshold, then transmit the hotspot information of the target hotspot stored in the Bluetooth transmission cache to the terminal, so that the terminal establishes a hotspot connection with the device to be managed according to the hotspot information; An updating module, configured to obtain other hotspots that are already enabled by itself, and update the hotspot information of the target hotspot stored in the Bluetooth transmission cache with the hotspot information of any other hotspot.
9. An electronic device, characterized in that, The electronic device includes a processor, and the processor is configured to implement the steps of the device connection method according to any one of claims 1-7 when executing a computer program stored in a memory.
10. A computer-readable storage medium, characterized in that, It stores a computer program, and when the computer program is executed by a processor, the steps of the device connection method according to any one of claims 1-7 are implemented.