A network-based Bluetooth control method, system, terminal and storage medium
By judging and switching network addresses, the timeliness and error rate issues when network Bluetooth devices control different local area network devices are resolved, achieving efficient and accurate device control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-03
- Publication Date
- 2026-03-27
AI Technical Summary
In existing technologies, controlling smart devices on different local area networks via network Bluetooth devices requires multiple devices to operate, resulting in low timeliness and a high risk of errors.
By acquiring Bluetooth control information, it can determine whether the network address of the controlled device is the same. If they are different, it can acquire an address switching command to switch the actual network address to the current network address so that the corresponding device can be controlled through the network Bluetooth device.
It enables efficient control of intelligent devices on different local area networks, reduces the error rate of incorrect selection, and improves the timeliness and accuracy of device control.
Smart Images

Figure CN116013053B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of Bluetooth control, and in particular to a network-based Bluetooth control method and system, a terminal and a storage medium. BACKGROUND
[0002] At present, with the continuous improvement of intelligent level, the types of intelligent devices are also increasing, and connecting and controlling intelligent devices through network Bluetooth devices and local area networks is a common control method. This method is simple and convenient to connect, and is welcomed by the majority of people.
[0003] However, although the above method can control intelligent devices, it is limited to controlling devices in the same local area network. Controlling devices in different local area networks requires multiple network Bluetooth devices for control. In this process, the staff needs to find the corresponding network Bluetooth device for control, which may result in low timeliness of device control and errors. SUMMARY
[0004] In order to facilitate the control of intelligent devices in different local area networks, improve the timeliness of device control as much as possible, and reduce the error rate, the present application provides a network-based Bluetooth control method, system, terminal and storage medium.
[0005] In a first aspect, the present application provides a network-based Bluetooth control method, which adopts the following technical solution:
[0006] A network-based Bluetooth control method comprises:
[0007] Obtaining Bluetooth control information, the Bluetooth control information comprising a controlled device name;
[0008] Obtaining a network address corresponding to the controlled device name based on a preset device network table as a current network address, the device network table comprising the network address and the controlled device name corresponding to the network address;
[0009] Obtaining the network address currently connected by a network Bluetooth device as an actual network address;
[0010] Judging whether the actual network address and the current network address are the same;
[0011] If not, obtaining an address switching instruction;
[0012] Switching the actual network address to the current network address based on the address switching instruction so as to control the corresponding controlled device through the network Bluetooth device.
[0013] By adopting the technical scheme, the device name of the controlled device is acquired according to the Bluetooth control information, then the current network address is acquired according to the device name of the controlled device, and then it is judged whether the current network address is same as the actual network address, so that it can be judged whether the network Bluetooth device and the controlled device are in the same local area network, if not, the address switching instruction is acquired to switch the actual network address to the current network address, so as to facilitate controlling the corresponding controlled device through the network Bluetooth device. The intelligent devices of different local area networks can be controlled conveniently, and the network Bluetooth devices do not need to be controlled through multiple network Bluetooth devices, the timeliness of controlling the devices can be improved as much as possible, and the selection error rate can be reduced without manual selection of the network Bluetooth device.
[0014] Preferably, the judging whether the actual network address is same as the current network address comprises:
[0015] Acquiring the actual number of the current network addresses;
[0016] When the actual number is one, it is judged whether the actual network address is same as the current network address;
[0017] When the actual number is at least two, it is judged whether the current network addresses are same;
[0018] If the current network addresses are same, it is judged whether the actual network address is same as the current network address;
[0019] If the current network addresses are different, the different current network address is acquired as an independent network address;
[0020] It is judged whether the actual network address is same as the independent network address.
[0021] By adopting the technical scheme, according to the actual number of the current network addresses, it is judged whether to directly execute the judgment of whether the actual network address is same as the current network address, when the current network addresses are different, the independent network address is acquired and it is judged whether the actual network address is same as the independent network address, so that the judgment of whether the actual network address is same as the current network address can be better performed.
[0022] Preferably, the judging whether the actual network address is same as the independent network address comprises:
[0023] It is judged whether there is the independent network address same as the actual network address;
[0024] If there is, the actual network address is same as the independent network address;
[0025] If not, the actual network address is different from the independent network address.
[0026] and,
[0027] When the actual network address is the same as the independent network address, the controlled device corresponding to the independent network address that is the same as the actual network address shall be controlled first.
[0028] When the actual network address is different from the independent network address, the address switching instruction is obtained based on a preset control priority.
[0029] Based on the address switching instruction, the actual network address is switched to the independent network address so that the corresponding controlled device can be controlled through the network Bluetooth device.
[0030] By adopting the above technical solution, it is possible to determine whether there is an independent network address that is the same as the current network address, thereby determining whether the actual network address and the independent network address are the same. This improves the accuracy of the judgment. When the actual network address and the independent network address are the same, the controlled device corresponding to the independent network address that is the same as the current network address is prioritized for control, without the need for network switching, making the operation more convenient. When the actual network address and the independent network address are different, an address switching instruction is obtained according to the preset control priority, and the actual network address is switched to the independent network address, which facilitates the control of the controlled device and allows for better control of the controlled device.
[0031] Preferably, after switching the actual network address to the current network address based on the address switching instruction to facilitate control of the corresponding controlled device via the network Bluetooth device, the method further includes:
[0032] Obtain the control feedback information of the controlled device;
[0033] Based on the control feedback information, obtain the result information of the network Bluetooth device controlling the controlled device;
[0034] When the result information indicates a control failure, the location of the controlled device that failed in control is obtained as the failure location.
[0035] Obtain the location and layout information of all the controlled devices;
[0036] Based on the location layout information, determine whether the failed locations are located in the same space;
[0037] If so, then obtain the space where the failure location is located as the isolation space;
[0038] Signal interference warning information is obtained based on the isolation space;
[0039] If not, the position of the preset network routing device in the position layout information is obtained as a routing device position;
[0040] It is judged whether there is an obstacle between the routing device position and the failure position;
[0041] If so, signal weak prompt information is obtained;
[0042] If not, controlled device restart prompt information is obtained;
[0043] When the result information is all control failure, network exception prompt information is obtained.
[0044] By adopting the above technical solution, it is judged whether the failure position is located in the same space, and whether there is an obstacle between the Bluetooth position and the failure position, so that the possible cause of the generated control failure can be determined, and inspection is facilitated.
[0045] As a preferred, before the step of obtaining signal interference prompt information based on the isolated space, the method further comprises:
[0046] It is judged whether the network addresses of the controlled devices corresponding to the failure position in the isolated space are the same;
[0047] If so, the network address of the controlled device corresponding to the failure position is obtained as an abnormal address;
[0048] Network exception prompt information is obtained based on the abnormal address;
[0049] If not, the step of obtaining signal interference prompt information based on the isolated space is executed.
[0050] By adopting the above technical solution, it is judged whether the network addresses of the controlled devices corresponding to the failure position in the isolated space are the same, so that it can be further determined whether the control failure is caused by network exception or interference, and the accuracy of the judgment can be improved.
[0051] As a preferred, before the step of executing the step of obtaining signal interference prompt information based on the isolated space, the method further comprises:
[0052] It is judged whether there is a controlled device successfully controlled in the isolated space;
[0053] If so, signal interference-network exception prompt information is obtained;
[0054] If not, the next step is executed.
[0055] By adopting the above technical solution, it is judged whether there is a controlled device successfully controlled in the isolated space, so that the accuracy of obtaining signal interference prompt information can be further improved.
[0056] As preferred, after the actual network address is switched to the current network address based on the address switching instruction so as to control the corresponding controlled device through the network Bluetooth device, the method further comprises:
[0057] Obtaining a connection state between the network Bluetooth device and a preset display terminal;
[0058] When the connection state is connected, obtaining state information of the controlled device;
[0059] Sending the state information to the display terminal and displaying.
[0060] By using the above technical solution, the display terminal displays the state information of the controlled device, which facilitates the staff to monitor the controlled device.
[0061] In the second aspect, the application provides a network-based Bluetooth control system, which adopts the following technical solution:
[0062] A network-based Bluetooth control system comprises:
[0063] A control information acquisition module is configured to acquire Bluetooth control information, wherein the Bluetooth control information comprises a controlled device name;
[0064] A first address acquisition module is configured to acquire a network address corresponding to the controlled device name based on a preset device network table, as a current network address, wherein the device network table comprises the network address and the controlled device name corresponding to the network address;
[0065] A second address acquisition module is configured to acquire the network address currently connected by a network Bluetooth device, as an actual network address;
[0066] A network address judgment module is configured to judge whether the actual network address is the same as the current network address;
[0067] A switching instruction acquisition module is configured to acquire an address switching instruction when the actual network address is not the same as the current network address;
[0068] A control module is configured to switch the actual network address to the current network address based on the address switching instruction so as to control the corresponding controlled device through the network Bluetooth device.
[0069] According to the data transmission among the modules, the device name of the controlled device is acquired according to the Bluetooth control information, then the current network address is acquired according to the device name of the controlled device, and then it is judged whether the current network address is same as the actual network address, so that it is judged whether the network Bluetooth device and the controlled device are in the same local area network, if not, the address switching instruction is acquired to switch the actual network address to the current network address, so that the corresponding controlled device is conveniently controlled through the network Bluetooth device. The intelligent devices of different local area networks are conveniently controlled, and the network Bluetooth devices do not need to be controlled through multiple network Bluetooth devices, the timeliness of the device control is improved as much as possible, and the network Bluetooth device does not need to be manually selected, so that the error rate of the selection is reduced.
[0070] In a third aspect, the present application provides an intelligent terminal, which adopts the technical scheme as follows:
[0071] An intelligent terminal comprises:
[0072] A memory is configured to store a computer program capable of running on a processor.
[0073] The processor is capable of executing the steps of the method according to any one of the preceding aspects when running the computer program.
[0074] According to the above technical scheme, the memory can store information, the processor can retrieve information and issue control instructions, ensure the orderly execution of the program and achieve the effects of the above scheme.
[0075] In a fourth aspect, the present application provides a computer readable storage medium, which adopts the technical scheme as follows:
[0076] A computer readable storage medium stores a computer program capable of being loaded and executed by a processor to execute the method according to any one of the preceding aspects.
[0077] According to the above technical scheme, when the computer readable storage medium is loaded into any computer, the computer can execute the network-based Bluetooth control method provided by the present application.
[0078] In summary, the present application has at least one of the following beneficial technical effects:
[0079] 1. Determine whether the current network address is the same as the actual network address, which can determine whether the network Bluetooth device and the controlled device are in the same local area network, if not, get the address switching instruction to switch the actual network address to the current network address, so as to facilitate the control of the corresponding controlled device through the network Bluetooth device. It is convenient to control the intelligent devices of different local area networks, and it is not necessary to control through multiple network Bluetooth devices, which can improve the timeliness of device control as much as possible, and does not need manual selection of network Bluetooth device, which can reduce the error rate of selection error;
[0080] 2. Determine whether the failure position is located in the same space, determine whether there is an obstacle between the Bluetooth position and the failure position, which can determine the possible cause of the control failure, and facilitate the inspection;
[0081] 3. Determine whether the network addresses of the controlled devices corresponding to the failure position in the isolation space are the same, which can further determine whether the control failure is caused by network anomaly or interference, thereby improving the accuracy of the determination. BRIEF DESCRIPTION OF DRAWINGS
[0082] Figure 1 is a flowchart of a network-based Bluetooth control method provided by an embodiment of the present application;
[0083] Figure 2 is a flowchart of steps S11 to S1X in an embodiment of the present application;
[0084] Figure 3 is a flowchart of steps S21 to S2X in an embodiment of the present application;
[0085] Figure 4 is a flowchart of steps S31 to S3X in an embodiment of the present application;
[0086] Figure 5 is a flowchart of steps S41 to S4X in an embodiment of the present application;
[0087] Figure 6 is a flowchart of steps S51 to S5X in an embodiment of the present application;
[0088] Figure 7 is a flowchart of steps S61 to S6X in an embodiment of the present application;
[0089] Figure 8 is a structural block diagram of a network-based Bluetooth control system provided by an embodiment of the present application.
[0090] BRIEF DESCRIPTION OF DRAWINGS
[0091] 1, control information acquisition module; 2, first address acquisition module; 3, second address acquisition module; 4, network address judgment module; 5, switching instruction acquisition module; 6, control module. DETAILED DESCRIPTION
[0092] The following will be described in detail in combination with the accompanying Figures 1 to 8 Further detailed description will be made to the present application.
[0093] The embodiment of the present application discloses a network-based Bluetooth control method.
[0094] Reference Figure 1 The network-based Bluetooth control includes:
[0095] S1. Acquire Bluetooth control information;
[0096] When the network Bluetooth device is used to control the smart device to work, the terminal device connected with the preset network routing device sends Bluetooth control information, wherein the Bluetooth control information includes the controlled device name and the action to be performed by the controlled device, for example, for the smart lamp, the action to be performed is to turn on or turn off the lamp. The controlled device is the smart device to be controlled to work, and each controlled device has an independent and unique name. The network Bluetooth device refers to a device capable of connecting network and Bluetooth, such as Tmall Genie and Xiao Ai speaker.
[0097] S2. Acquire the network address corresponding to the controlled device name based on the preset device network table as the current network address;
[0098] Each controlled device is connected to the local area network, so each controlled device corresponds to a network address. The device network table includes the network address and the controlled device name corresponding to the network address, and one controlled device name corresponds to a unique network address. The current network address is acquired, that is, the controlled device name in the Bluetooth control information is matched with the controlled device name in the device network table. When the two names are the same, it proves that the matching is successful, and the network address corresponding to the controlled device name in the device network table matched successfully is acquired as the current network address.
[0099] S3. Acquire the network address currently connected by the network Bluetooth device as the actual network address;
[0100] The network Bluetooth device is connected to the local area network through wireless network, and the connection address of the local area network currently connected by the network Bluetooth device can be directly read as the actual network address.
[0101] S4. Judge whether the actual network address is the same as the current network address;
[0102] Then, it is judged whether the actual network address is same as the current network address, that is, whether the controlled device to be controlled and the network Bluetooth device are located in the same local area network, if yes, they are located in the same local area network, at this time, the controlled device can be directly controlled, otherwise, they are different local area networks.
[0103] S5. If not, an address switching instruction is acquired;
[0104] When the actual network address is not same as the current network address, at this time, the address switching instruction is acquired, wherein the address switching instruction includes the target network address, that is, the current network address, and the address switching instruction includes the preset automatic operation step and the network name corresponding to the automatic operation step.
[0105] S6. The actual network address is switched to the current network address based on the address switching instruction so as to control the corresponding controlled device through the network Bluetooth device;
[0106] Finally, the actual network address is switched to the current network address according to the address switching instruction, and the specific mode can be that the network name in the address switching instruction is used to identify the same network name pre-stored in the network Bluetooth device, when the same network name is identified, the corresponding network name in the network Bluetooth device is selected according to the preset automatic operation step in the address switching instruction, and the connection operation is performed, thereby realizing the switching of the network address. Of course, the switching mode can also be any other known switching mode that can be realized.
[0107] When the network Bluetooth device is switched to the current network address, the action required by the controlled device in the Bluetooth control information can be sent to the controlled device under the current network address, so that the controlled device performs the corresponding action, such as turning on or off the light.
[0108] Therefore, through the above mode, the intelligent devices in different local area networks can be conveniently controlled, and the devices do not need to be controlled through multiple network Bluetooth devices, the timeliness of device control can be improved as much as possible, and the selection error rate can be reduced without manual selection of the network Bluetooth device.
[0109] Reference Figure 2 When the controlled device is controlled, multiple devices may need to be controlled, so there can be multiple current network addresses, therefore, in another embodiment, the step S4 of judging whether the actual network address is same as the current network address includes:
[0110] S11. The actual number of current network addresses is acquired;
[0111] That is, by acquiring the number of controlled device names in the Bluetooth control information, that is, the actual number of current network addresses, in simple terms, there are several controlled device names, and there are several actual numbers.
[0112] S12. When the actual number is one, it is determined whether the actual network address is the same as the current network address;
[0113] If the actual number is one, it proves that there is no other selection method and no other operation method, and at this time, it can be directly determined whether the actual network address is the same as the current network address.
[0114] S13. When the actual number is at least two, it is determined whether the current network addresses are the same;
[0115] When the actual number is at least two, the current network addresses of each controlled device are acquired, and it is determined whether all the current network addresses are the same, so as to determine whether the controlled devices are located in the same local area network.
[0116] S14. If the current network addresses are the same, it is determined whether the actual network address is the same as the current network address;
[0117] If the current network addresses are the same, it proves that the controlled devices are located in the same local area network, and at this time, even if the actual number is more than one, it can be directly determined whether the actual network address is the same as the current network address.
[0118] S15. If the current network addresses are different, the different current network addresses are acquired as independent network addresses;
[0119] If the current network addresses are different, it proves that there are network addresses in the current network addresses that are located in different local area networks, and at this time, these different current network addresses are acquired as independent network addresses.
[0120] S16. It is determined whether the actual network address is the same as the independent network address;
[0121] At this time, it is determined whether the actual network address is the same as the current network address, that is, it is determined whether the actual network address is the same as the independent network address, so as to compare and determine the actual network address with each different independent network address, so as to realize the determination of whether the actual network address is the same as the current network address, and to ensure the accuracy of the determination as much as possible.
[0122] Referring to Figure 3 In another embodiment, step S16, that is, determining whether the actual network address is the same as the independent network address, comprises:
[0123] S21. It is determined whether there is an independent network address that is the same as the actual network address;
[0124] S22. If exists, the actual network address is the same as the independent network address;
[0125] S23. If not exists, the actual network address is different from the independent network address;
[0126] Specifically, it is judged whether the actual network address is the same as the independent network address, that is, whether there is a network address in the independent network address which is the same as the actual network address. If there is, it proves that the actual network address is the same as the independent network address, and at this time, the step S24 is jumped to. If not, it proves that the actual network address is different from the independent network address, and at this time, the step S25 is jumped to.
[0127] S24. When the actual network address is the same as the independent network address, the controlled device corresponding to the independent network address which is the same as the actual network address is preferentially controlled;
[0128] That is, if the actual network address is the same as the independent network address, that is, there is a network address in the independent network device which is the same as the actual network address. At this time, whether there is other priority or not, the controlled device corresponding to the independent network address which is the same as the actual network address is preferentially controlled. Therefore, it is not necessary to switch the actual network address back and forth, and the operation convenience can be improved.
[0129] S25. When the actual network address is different from the independent network address, an address switching instruction is acquired based on a preset control priority;
[0130] When the actual network address is different from the independent network address, at this time, the network address of the network Bluetooth device must be switched, so as to switch different local area networks, so as to be able to control different controlled devices. Therefore, at this time, the address switching instruction is acquired based on the preset control priority, that is, the address switching instruction includes the priority of switching the network address corresponding to the controlled device.
[0131] S26. The actual network address is switched to the independent network address based on the address switching instruction, so as to control the corresponding controlled device through the network Bluetooth device.
[0132] Finally, the actual network address is switched to the independent network address according to the address switching instruction, that is, the independent network address is switched to the network Bluetooth device in turn according to the order of the preset control priority, and then the network Bluetooth device can send the control instruction to the controlled device located in the same local area network through the corresponding local area network, so as to realize that the controlled device executes the corresponding action.
[0133] Reference Figure 4In order to determine whether the controlled device is successfully operated and obtain the cause of the exception, in another embodiment, after the actual network address is switched to the current network address based on the address switching instruction in step S6, so as to control the corresponding controlled device through the network Bluetooth device, the method further comprises the following steps:
[0134] S31. Obtain the control feedback information of the controlled device;
[0135] After the Bluetooth control information is sent to the controlled device through the preset network routing device, the controlled device collects the action state of itself in real time and uploads the action state to the system server, and the uploaded action state is the control feedback information.
[0136] S32. Obtain the result information of the network Bluetooth device controlling the controlled device based on the control feedback information;
[0137] The result information includes three states of existing control failure, all control failure and all control success. The specific obtaining method is to obtain the action currently performed by the controlled device according to the control feedback information of the controlled device, then compare the action with the action in the Bluetooth control information, and determine whether they are the same. For example, the action in the Bluetooth control information is to control the light to be off, and the current action of the smart lamp fed back in the control feedback information is also to control the light to be off, which proves that the control is successful.
[0138] Then, all control results are obtained, and it is determined whether all control results are control success. If there is control success and there is no control success, the result information is that there is control failure. If all control successes, the result information is all control success. If all control failures, the result information is all control failure.
[0139] S33. When the result information is existing control failure, obtain the position of the controlled device with control failure as the failure position;
[0140] When the result information is existing control failure, in order to determine the cause of the failure, the position of the controlled device with control failure is obtained as the failure position. The obtaining method can be that a position name table is preset, the position name table includes the controlled device name and the position corresponding to each controlled device name. The controlled device name of the controlled device with control failure is obtained, and it is matched with the controlled device name in the position name table, and the position corresponding to the same controlled device name in the position name table is obtained as the failure position.
[0141] S34. Obtain the position layout information of all controlled devices;
[0142] Then, position layout information of all controlled devices is acquired, wherein the position layout information is preset information, including different spaces, positions of each controlled device in the spaces, and whether there is an obstacle between each controlled device.
[0143] S35. It is judged whether the failure positions are located in the same space based on the position layout information.
[0144] That is, the spaces where the controlled devices corresponding to each failure position are located are acquired based on the position layout information, and then it is judged whether the spaces are the same. If yes, it is proved that the failure positions are located in the same space, otherwise, it is proved that the failure positions are not located in the same space.
[0145] S36. If yes, the space where the failure positions are located is acquired as an isolation space.
[0146] S37. Signal interference prompt information is acquired based on the isolation space.
[0147] If the failure positions are located in the same space, and the control of the controlled devices is still failed at this time, it is proved that the signals of the controlled devices in the space are interfered with high probability. Therefore, the space where the failure positions are located is acquired as an isolation space, and then the signal interference prompt information is acquired based on the isolation space, that is, the signal interference prompt information includes the isolation space.
[0148] After the signal interference prompt information is acquired, the signal interference prompt information is sent to a control terminal of a manager to prompt, so that the manager can check the isolation space conveniently, and interference can be eliminated in time, and normal connection work of the controlled devices can be ensured as much as possible.
[0149] S38. If no, a position of a preset network routing device in the position layout information is acquired as a routing device position.
[0150] If the failure positions are not located in the same space, a position of a preset network routing device (for example, a router) in the position layout information is acquired as a routing device position, that is, the position layout information also includes a position of the network routing device and whether there is an obstacle between the network routing device and the controlled device.
[0151] S39. It is judged whether there is an obstacle between the routing device position and the failure position.
[0152] Then, it is judged whether there is an obstacle between the routing device position and the failure position based on the position layout information, so as to determine whether the abnormal control of the controlled device is caused by the obstacle shielding.
[0153] S40. If yes, signal weak prompt information is acquired.
[0154] S41. If no, controlled device restart prompt information is acquired.
[0155] If there is an obstacle between the location of the routing device and the failed location, it proves that the signal of the network routing device is weak, so at this time, the weak signal prompt information is obtained, so as to remind the administrator to replace the network routing device with better wall-penetrating effect in time.
[0156] If there is no obstacle between the location of the routing device and the failed location, it proves that the signal is not weakened due to the shielding of the obstacle, but may be caused by the controlled device itself, so at this time, the controlled device restart prompt information is obtained, so as to remind the administrator to restart the controlled device in time, and then to exclude the fault of the controlled device.
[0157] S42. When the result information is all control failure, obtaining network exception prompt information;
[0158] When the result information is all control failure, it proves that all the controlled devices fail to control, and at this time, it is highly probable that the network itself has a problem, so the network exception prompt information is obtained, so as to prompt the staff to repair the network in time.
[0159] All the prompt information in the present application can be a text prompt sent to the administrator control terminal, for example, the text of the weak signal prompt information is weak signal, the text of the controlled device restart prompt information is restart the controlled device, and the text of the network exception prompt information is network exception, of course, it can also be reminded by different lights. Thus, the administrator can conveniently investigate the cause of the Bluetooth control in time, and improve the convenience of inspection.
[0160] Referring to Figure 5 , in order to further improve the accuracy of fault judgment, in another embodiment, before obtaining the signal interference prompt information based on the isolation space, it further comprises:
[0161] S51. Judging whether the network addresses of the controlled devices corresponding to the failed locations in the isolation space are same;
[0162] Obtaining the network addresses of the controlled devices corresponding to all the failed locations in the isolation space, and then judging whether these network addresses are same, so as to judge whether the controlled devices corresponding to the failed locations in the isolation space are in the same local area network.
[0163] S52. If same, obtaining the network address of the controlled device corresponding to the failed location as an abnormal address;
[0164] S53. Obtaining network exception prompt information based on the abnormal address;
[0165] If the same, it proves that the network addresses of all the failed positions corresponding to the controlled devices are the same local area network, so at this time the network address is taken as the abnormal address, and the network abnormal prompt information is obtained according to the abnormal address, that is, the abnormal address is included in the network abnormal prompt information, so as to facilitate the staff to repair and investigate the local area network that may exist abnormally.
[0166] S54. If different, the step of obtaining signal interference prompt information based on the isolation space is performed.
[0167] If the network addresses of the controlled devices corresponding to the failed positions in the isolation space are different, it means that the controlled devices corresponding to multiple local area networks all exist control abnormality, at this time it is highly probable to prove that the signal interference indeed exists in the isolation space, so at this time the step of obtaining signal interference prompt information based on the isolation space is continued to be performed. Through the above-mentioned manner, the accuracy of the judgment can be improved as much as possible.
[0168] Reference Figure 6 In order to further improve the accuracy of the judgment of whether it is signal interference, in another embodiment, before the step of obtaining signal interference prompt information based on the isolation space is performed, it further includes:
[0169] S61. judging whether there is a controlled device controlled successfully in the isolation space;
[0170] S62. If there is, obtaining signal interference-network abnormal prompt information;
[0171] S63. If there is not, performing the step of obtaining signal interference prompt information based on the isolation space.
[0172] Specifically, before the step of obtaining signal interference prompt information based on the isolation space is performed, it is judged whether there is a controlled device controlled successfully in the isolation space, that is, the positions of the controlled devices controlled successfully are obtained, and it is judged whether these positions exist in the isolation space. If yes, it proves that there is a controlled device controlled successfully in the isolation space, otherwise, it proves that there is not a controlled device controlled successfully in the isolation space.
[0173] If there is a controlled device controlled successfully in the isolation space, it means that there is a controlled device controlled successfully and a controlled device not controlled successfully in the isolation space, so at this time the reason may be signal interference or network abnormality, so at this time the signal interference-network abnormal prompt information is obtained, so as to remind the management personnel to check the signal interference and the network abnormality.
[0174] If the controlled device controlled successfully does not exist in the isolation space, it means that all the controlled devices in the isolation space are controlled unsuccessfully, so it can be determined with high probability that the cause is signal interference, so the step of obtaining signal interference prompt information based on the isolation space is continued to execute. Further, the accuracy of the signal interference judgment can be further improved.
[0175] With reference to Figure 7 In order to facilitate the management of the working state of the controlled device, in another embodiment, after the step S6, i.e., switching the actual network address to the current network address based on the address switching instruction so as to control the corresponding controlled device through the network Bluetooth device, further comprising:
[0176] S71. Obtain the connection state between the network Bluetooth device and the preset display terminal;
[0177] S72. When the connection state is connected, obtain the state information of the controlled device;
[0178] S73. Send the state information to the display terminal and display.
[0179] Specifically, after the actual network address is switched to the current network address based on the address switching instruction so as to control the corresponding controlled device through the network Bluetooth device, the connection state between the network Bluetooth device and the preset display terminal is obtained, i.e., whether the network Bluetooth device is connected with the preset display terminal is judged. If there is transmission of data signal between the network Bluetooth device and the display terminal, it proves to be in the connected state, otherwise it is in the unconnected state. The connection mode between the network Bluetooth device and the display terminal can be connected through Bluetooth or WIFI.
[0180] If the connection state is connected, the state information of the controlled device is obtained at this time. The state information is obtained by the controlled device collecting its own state information and transmitting it to the display terminal, such as the display or the display screen of the terminal setting, through the network Bluetooth device. The state information includes the running parameters and the action being executed of the controlled device. When it is not connected, no other operation is needed. Thus, through the above-mentioned manner, the working state of the controlled device can be viewed by the management personnel through the display terminal.
[0181] The implementation principle of an embodiment of the application is as follows: first, the Bluetooth control information is acquired, and the controlled device name is acquired according to the Bluetooth control information; then, the network address corresponding to the controlled device name is acquired according to the device network table, as the current network address. Next, the network address currently connected by the network Bluetooth device is acquired, as the actual network address. Then, it is judged whether the current network address is the same as the actual network address, so as to judge whether the network Bluetooth device and the controlled device are in the same local area network. If not, the address switching instruction is acquired to switch the actual network address to the current network address, so as to facilitate the control of the corresponding controlled device through the network Bluetooth device. The smart devices of different local area networks can be conveniently controlled, and the control does not need to be performed through multiple network Bluetooth devices, the timeliness of the device control can be improved as much as possible, and the selection of the network Bluetooth device does not need to be performed manually, so the error rate of the selection can be reduced.
[0182] The application further discloses a Bluetooth control system based on a network, which can achieve the same technical effects as the Bluetooth control method based on a network.
[0183] Reference Figure 8 The Bluetooth control based on a network comprises:
[0184] A control information acquisition module 1 is configured to acquire Bluetooth control information, and the Bluetooth control information comprises a controlled device name.
[0185] A first address acquisition module 2 is configured to acquire the network address corresponding to the controlled device name as the current network address based on a preset device network table, and the device network table comprises the network address and the controlled device name corresponding to the network address.
[0186] A second address acquisition module 3 is configured to acquire the network address currently connected by the network Bluetooth device as the actual network address.
[0187] A network address judgment module 4 is configured to judge whether the actual network address is the same as the current network address.
[0188] A switching instruction acquisition module 5 is configured to acquire the address switching instruction when the actual network address is not the same as the current network address.
[0189] A control module 6 is configured to switch the actual network address to the current network address based on the address switching instruction, so as to facilitate the control of the corresponding controlled device through the network Bluetooth device.
[0190] Specifically, first, the control information acquisition module 1 acquires Bluetooth control information, and sends the Bluetooth control information to the first address acquisition module 2 connected thereto, wherein the Bluetooth control information comprises a controlled device name. Then, the first address acquisition module 2 acquires a network address corresponding to the controlled device name based on a preset device network table, as a current network address, and sends the current network address to the network address judgment module 4 connected thereto, wherein the device network table comprises a network address and a controlled device name corresponding to the network address.
[0191] Then, the second address acquisition module 3 acquires a network address currently connected by the network Bluetooth device, as an actual network address, and sends the actual network address to the network address judgment module 4 connected thereto. Then, the network address judgment module 4 judges whether the actual network address is the same as the current network address, and sends the judgment result to the switching instruction acquisition module 5 connected thereto.
[0192] When the actual network address is different from the current network address, the switching instruction acquisition module 5 acquires an address switching instruction, and sends the address switching instruction to the control module 6 connected thereto. Finally, the control module 6 switches the actual network address to the current network address based on the address switching instruction, so as to control the corresponding controlled device through the network Bluetooth device.
[0193] Further, in the above manner, the intelligent devices of different local area networks can be conveniently controlled, and the network Bluetooth devices do not need to be controlled through multiple network Bluetooth devices, the timeliness of device control can be improved as much as possible, and the selection error rate can be reduced without manual selection of the network Bluetooth device.
[0194] The embodiment of the application further discloses a smart terminal comprising a memory and a processor. The memory stores a smart computer program. The processor can execute the steps of the network-based Bluetooth control method when the smart computer program is running. The smart computer program can use a known processing program to judge, acquire, match and the like of data, so as to realize control of the intelligent device.
[0195] The embodiment of the application further discloses a computer readable storage medium storing a computer program capable of being loaded and executed by a processor to execute the network-based Bluetooth control method. The computer readable storage medium comprises, for example, a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk and the like various storage program codes.
[0196] The above are preferred embodiments of the application, and do not limit the protection scope of the application, so that: equivalent changes made according to the structure, shape, principle of the application should be covered within the protection scope of the application.
Claims
1. A network-based Bluetooth control method, characterized by, The method comprises the following steps: obtaining Bluetooth control information, wherein the Bluetooth control information comprises a controlled device name; obtaining a network address corresponding to the controlled device name based on a preset device network table, as a current network address, wherein the device network table comprises the network address and the controlled device name corresponding to the network address; obtaining a network address currently connected by a network Bluetooth device, as an actual network address; determining whether the actual network address is the same as the current network address; if not, obtaining an address switching instruction; switching the actual network address to the current network address based on the address switching instruction, so as to control the corresponding controlled device through the network Bluetooth device; wherein, after the step of switching the actual network address to the current network address based on the address switching instruction, so as to control the corresponding controlled device through the network Bluetooth device, the method further comprises the following steps: obtaining control feedback information of the controlled device; obtaining result information of the network Bluetooth device controlling the controlled device based on the control feedback information; when the result information is that there is a control failure, obtaining a position of the controlled device with the control failure, as a failure position; obtaining position layout information of all the controlled devices; determining whether the failure position is located in the same space based on the position layout information; if yes, obtaining a space where the failure position is located, as an isolation space; obtaining signal interference prompt information based on the isolation space; if no, obtaining a position of a preset network routing device in the position layout information, as a routing device position; determining whether there is an obstacle between the routing device position and the failure position; if yes, obtaining signal weak prompt information; if no, obtaining controlled device restart prompt information; when the result information is that all the control fails, obtaining network exception prompt information; wherein, before the step of obtaining signal interference prompt information based on the isolation space, the method further comprises the following steps: determining whether network addresses of the controlled devices corresponding to the failure position in the isolation space are the same; if the same, obtaining the network addresses of the controlled devices corresponding to the failure position, as an abnormal address; obtaining network exception prompt information based on the abnormal address; if not the same, executing the step of obtaining signal interference prompt information based on the isolation space.
2. The Bluetooth control method according to claim 1, wherein, The step of determining whether the actual network address is the same as the current network address comprises the following steps: obtaining an actual number of the current network addresses; when the actual number is one, determining whether the actual network address is the same as the current network address; when the actual number is at least two, determining whether the current network addresses are the same; if the current network addresses are the same, determining whether the actual network address is the same as the current network address; if the current network addresses are not the same, obtaining different current network addresses, as independent network addresses; determining whether the actual network address is the same as the independent network address.
3. The Bluetooth control method according to claim 2, wherein, The step of determining whether the actual network address is the same as the independent network address comprises the following steps: determining whether the independent network address is the same as the actual network address; if yes, the independent network address is the same as the actual network address; if no, the independent network address is different from the actual network address; and, when the independent network address is the same as the actual network address, preferentially controlling the controlled device corresponding to the independent network address which is the same as the actual network address; when the independent network address is different from the actual network address, obtaining the address switching instruction based on a preset control priority; switching the actual network address to the independent network address based on the address switching instruction so as to control the corresponding controlled device through the network Bluetooth device.
4. The Bluetooth control method according to claim 1, wherein, Before the step of obtaining signal interference prompt information based on the isolated space, further comprising: determining whether there is a controlled device with successful control in the isolated space; if yes, obtaining signal interference-network abnormal prompt information; if no, executing the next step.
5. The Bluetooth control method according to claim 1, wherein, After the step of switching the actual network address to the current network address based on the address switching instruction so as to control the corresponding controlled device through the network Bluetooth device, further comprising: obtaining the connection state between the network Bluetooth device and a preset display terminal; when the connection state is connected, obtaining the state information of the controlled device; sending the state information to the display terminal and displaying.
6. A network-based Bluetooth control system, characterized by Comprising: a control information obtaining module (1) for obtaining Bluetooth control information, the Bluetooth control information including a controlled device name; a first address obtaining module (2) for obtaining the network address corresponding to the controlled device name based on a preset device network table, as a current network address, the device network table including the network address and the controlled device name corresponding to the network address; a second address obtaining module (3) for obtaining the network address currently connected by the network Bluetooth device, as an actual network address; a network address determining module (4) for determining whether the actual network address is the same as the current network address; a switching instruction obtaining module (5) for obtaining an address switching instruction when the actual network address is different from the current network address; a control module (6) for switching the actual network address to the current network address based on the address switching instruction so as to control the corresponding controlled device through the network Bluetooth device; wherein, after the step of switching the actual network address to the current network address based on the address switching instruction so as to control the corresponding controlled device through the network Bluetooth device, further comprising: obtaining control feedback information of the controlled device; obtaining result information of the network Bluetooth device controlling the controlled device based on the control feedback information; when the result information is control failure, obtaining the position of the controlled device with control failure as a failure position; obtaining position layout information of all the controlled devices; determining whether the failure position is located in the same space based on the position layout information; If yes, a space where the failure position is located is obtained as an isolation space; Signal interference prompt information is obtained based on the isolation space; If no, a position of a preset network routing device in the position layout information is obtained as a routing device position; It is judged whether there is an obstacle between the routing device position and the failure position; If yes, signal weak prompt information is obtained; If no, controlled device restart prompt information is obtained; When the result information is all control failure, network exception prompt information is obtained; Before the signal interference prompt information is obtained based on the isolation space, the following steps are further included: It is judged whether network addresses of the controlled devices corresponding to the failure position in the isolation space are same; If yes, the network address of the controlled device corresponding to the failure position is obtained as an exception address; Network exception prompt information is obtained based on the exception address; If no, the step of obtaining the signal interference prompt information based on the isolation space is executed.
7. A smart terminal, characterized in that It includes: A memory for storing a computer program capable of running on a processor; The processor, when running the computer program, can execute the steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer program capable of being loaded and executed by the processor to execute the method according to any one of claims 1 to 5 is stored.
Citation Information
Patent Citations
Intelligent device control method, control device and control system
CN108064442A
Wireless terminal equipment, screen projection method and device thereof and storage medium
CN115379514A