Bluetooth function detection method and system, and intelligent terminal
By obtaining Bluetooth signals and establishing a connection, reading characteristic values to detect Bluetooth functions, and using anti-interference methods to reduce interference from multiple Bluetooth signals, the problem of low Bluetooth connection speed and stability in the existing technology is solved, and efficient Bluetooth function testing and stable connection are achieved.
Patent Information
- Application Number
- CN202510428274.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-05-06
AI Technical Summary
When testing multiple Bluetooth devices, the prior art is prone to low connection speed and stability due to interference from multiple Bluetooth signals, making it difficult to efficiently detect Bluetooth functions.
By obtaining the Bluetooth signal, determining the information of the device to be tested, establishing a connection with it, and reading the characteristic value to detect the Bluetooth function. At the same time, an anti-interference method is used to identify multiple Bluetooth signals, select the device with the strongest signal to connect, and reduce interference through a timed shutdown command.
It improves the convenience and efficiency of Bluetooth function testing, reduces the situation of unstable connection, and enhances the stability of Bluetooth connection.
Smart Images

Figure CN119946679A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Bluetooth communication technology, and in particular to a Bluetooth function detection method, system and intelligent terminal. Background Art
[0002] Bluetooth is a short-range wireless communication technology that is mainly used for wireless data transmission between devices and is widely used in headphones, speakers, keyboards, cars and other scenarios.
[0003] In the prior art, the power level and other information of the device are generally read through Bluetooth technology. When the device leaves the factory, it is generally necessary to test the Bluetooth reading function of the device, and the status of the Bluetooth function is determined by comparing the data obtained by Bluetooth reading with the actual data of the device.
[0004] When there are many Bluetooth devices that need to be tested, multiple Bluetooth signals may exist simultaneously in the same workshop, resulting in lower speed and stability of the Bluetooth connection. Summary of the invention
[0005] In order to improve the convenience of Bluetooth function testing and reduce the situation of unstable Bluetooth connection, the present invention provides a Bluetooth function detection method, system and intelligent terminal.
[0006] In a first aspect, the present invention provides a Bluetooth function detection method, which adopts the following technical solution: A method for detecting a Bluetooth function, comprising: Get Bluetooth signal; Determine device information of the device under test according to the Bluetooth signal; Control the preset detection device to establish a Bluetooth connection with the device to be tested according to the device information, and monitor the Bluetooth connection status; Based on the establishment of Bluetooth connection, retrieve the service list; Determine target characteristics based on service list; Based on the target characteristics, the preset detection device is controlled to read the characteristic value.
[0007] By adopting the above technical solution, when there are multiple Bluetooth signals, the information of the corresponding Bluetooth device is read from the Bluetooth signal, and the signal of the Bluetooth device to be tested is selected, and then the Bluetooth device to be tested is connected and its characteristic value is read, so as to detect the working condition of its Bluetooth function and improve the convenience of Bluetooth function testing.
[0008] Optionally, a Bluetooth anti-interference method is also included, and the Bluetooth anti-interference method includes: Determine the transmission error based on the connection situation; When the transmission error is higher than a preset connection threshold, the number of devices is determined based on the Bluetooth signal; When the number of devices is higher than the preset interference threshold, the strength peak is determined based on the Bluetooth signal; Determine the interference signal based on the intensity peak; Determine interference information of the interference device based on the interference signal and the device information; According to the interference information, the preset detection device is controlled to establish a Bluetooth connection with the interference device, and a preset timed shutdown instruction is sent to shut down Bluetooth.
[0009] By adopting the above technical solution, when Bluetooth transmission is unstable, the number of Bluetooth signals emitted can be identified from the Bluetooth signals, so that when the number of Bluetooth signals is too many, the device with the strongest Bluetooth signal can be selected for connection, and the device with the strongest Bluetooth signal can be controlled to turn off the Bluetooth function at a scheduled time, thereby reducing the number of Bluetooth signals and improving the stability of Bluetooth connection.
[0010] Optionally, the Bluetooth anti-interference method further includes: When the number of devices is higher than the preset interference threshold, the strength valley is determined based on the Bluetooth signal; Determine the unit duration based on the intensity valley value; Determine the duration of interference based on the number of devices and unit duration; Determine connection strength based on device information and Bluetooth signal; Determine the connection duration based on the connection strength; Determine the shutdown duration based on the interference duration and the connection duration; Generate a timed closing instruction based on the closing duration.
[0011] By adopting the above technical solution, when the number of Bluetooth signals is too large, it takes a long time to establish Bluetooth connections with Bluetooth devices one by one and control the shutdown of their Bluetooth functions. At this time, the Bluetooth function shutdown time of the device is set according to the remaining number of Bluetooth devices that need to be shut down, so that the Bluetooth functions of other devices can be restarted in time after the Bluetooth function test of the device to be tested, thereby improving the convenience of Bluetooth function testing.
[0012] Optionally, a signal transfer method is also included, and the signal transfer method includes: When the connection strength is lower than a preset transmission threshold, the device distance is determined based on the connection strength; Determine the transfer interval based on the distance between devices; Determine the intensity interval based on the transit interval; Determine a relay signal of the relay device according to the strength interval and the Bluetooth signal; Determine transfer information according to the transfer signal; Control the preset transfer device to establish a Bluetooth connection with the device under test according to the transfer information and device information, and control the preset transfer device to read the characteristic value based on the target characteristic; Generate a feature data packet according to the feature value; According to the transfer information, the preset transfer device is controlled to establish a Bluetooth connection with the detection device, and based on the target characteristics, the preset detection device is controlled to read the characteristic data packet.
[0013] By adopting the above technical solution, when the Bluetooth signal strength of the device under test is low, it is easy to cause the Bluetooth connection with the device under test to fluctuate, thereby causing errors in the data read from the Bluetooth function. By selecting a Bluetooth device that can stably connect to the device under test as a transfer device, the data of the device under test is read through the transfer device, and then the transfer device is read by the detection device, thereby improving the stability of the Bluetooth connection.
[0014] Optionally, the signal relay method further includes: Determine data difference according to characteristic data packets; Determine the update cycle based on the data difference; Determine the relay strength based on the relay signal; Determine the transfer time based on the transfer strength and connection strength; Determine the interval duration based on the update cycle and transfer time; Control the preset device under test to establish a Bluetooth connection with the transfer device according to the transfer information and device information, and control the preset transfer device to read the characteristic value based on the target characteristic; Based on the reading of the characteristic value, the Bluetooth connection is disconnected, and after an interval, the preset device under test is controlled to establish a Bluetooth connection with the transfer device according to the transfer information and device information.
[0015] By adopting the above technical solution, when there is too much information transmitted by Bluetooth, it is easy to cause data congestion, which may lead to errors in the data transmitted by Bluetooth. By checking the data changes of the device under test and selecting a suitable data reading cycle, the reading data can be stabilized and data congestion can be reduced, thereby improving the stability of the Bluetooth connection.
[0016] Optionally, the signal relay method further includes: Determine the reading time according to the transfer intensity; When the reading duration is longer than the intermittent duration, determining a reselection signal of the reselection device according to the intensity interval and the Bluetooth signal; determining the check information according to the check signal; Determine the reselection duration based on the reselection signal and the connection strength; Determine the interval duration based on the update cycle and the reselection duration; Based on the reading of the characteristic value, the Bluetooth connection is disconnected, and after an interval, the preset device to be tested is controlled to establish a Bluetooth connection with the reselected device according to the reselected information and device information.
[0017] By adopting the above technical solution, when the detection device takes too long to read the transfer device, it is easy to cause the detection device to still read the data of the previous cycle of the transfer device when the transfer device reads the data of the next cycle of the device under test, resulting in difficulty in connecting the device under test and the transfer device. At this time, another Bluetooth device that can stably read the device under test is selected as the reselection device, so that when the detection device reads the data of the transfer device, the data of the device under test is read through the reselection device, thereby improving the efficiency of Bluetooth transmission.
[0018] Optionally, the signal relay method further includes: When the reading duration is lower than the update cycle, the difference between the update cycle and the reading duration is calculated and defined as the standby duration; Control the preset device under test to establish a Bluetooth connection with the transfer device according to the transfer information and device information, and control the preset transfer device to read the characteristic value based on the target characteristic; Generate a feature data packet according to the feature value; Based on the reading of the characteristic value, the Bluetooth connection is disconnected, and after the interval, the preset device to be tested is controlled to establish a Bluetooth connection with the reselected device according to the reselected information and device information; Control the preset transfer device to establish a Bluetooth connection with the detection device according to the transfer information, and control the preset detection device to read the characteristic data packet based on the target characteristics; Based on the situation of reading the characteristic data packet, the Bluetooth connection is disconnected, and after the standby time, the preset selection device is controlled to establish a Bluetooth connection with the detection device according to the selection information.
[0019] By adopting the above technical solution, when the time for the check-selection device to read the device to be tested is long, it is easy to cause the check-selection device to continue reading the device to be tested after the detection device has completed reading the data of the transfer device. At this time, the detection device is controlled to wait until the check-selection device completes reading, thereby reducing the situation where the check-selection device is connected to the device to be tested and the detection device at the same time.
[0020] Optionally, an abnormality alarm method is also included, and the abnormality alarm method includes: Determine the device location based on the device distance; Obtaining a device image based on the device location; Determine device features based on the device image, and determine feature sets based on the update cycle and feature data packets; Determining feature deviations based on feature sets and device features; When the characteristic deviation exceeds a preset deviation threshold, the preset detection device is controlled to issue an abnormal alarm.
[0021] By adopting the above technical solution, after the data of the device under test is obtained through Bluetooth reading, the actual data of the device under test is compared with the image to judge the working condition of the Bluetooth function of the device under test, and an alarm is issued in time when a problem occurs in the Bluetooth function.
[0022] In a second aspect, the present application provides a Bluetooth function detection system, which adopts the following technical solution: A bluetooth function detection system, comprising: Acquisition module, used to acquire Bluetooth signals and device images; A memory, used to store any one of the above-mentioned Bluetooth function detection methods; The program in the memory can be loaded and executed by the processor.
[0023] In a third aspect, the present application provides a smart terminal, which adopts the following technical solution: An intelligent terminal comprises a memory and a processor, wherein the memory stores any one of the above-mentioned Bluetooth function detection methods which can be loaded and executed by the processor.
[0024] By adopting the above technical solution, when there are multiple Bluetooth signals, the information of the corresponding Bluetooth device is read from the Bluetooth signal, and the signal of the Bluetooth device to be tested is selected, and then the Bluetooth device to be tested is connected and its characteristic value is read, so as to detect the working condition of its Bluetooth function and improve the convenience of Bluetooth function testing.
[0025] In summary, the present application includes at least one of the following beneficial technical effects: When there are multiple Bluetooth signals, the information of the corresponding Bluetooth device is read from the Bluetooth signal, and the signal of the Bluetooth device to be tested is selected, and then the Bluetooth device to be tested is connected and its characteristic value is read, so as to detect the working condition of its Bluetooth function, thereby improving the convenience of Bluetooth function testing; When Bluetooth transmission is unstable, the number of Bluetooth signals sent out is identified from the Bluetooth signals, so that when the number of Bluetooth signals is too large, the device with the strongest Bluetooth signal is selected for connection, and the device with the strongest Bluetooth signal is controlled to turn off the Bluetooth function at a scheduled time, thereby reducing the number of Bluetooth signals and improving the stability of Bluetooth connection; When the number of Bluetooth signals is too large, it takes a long time to establish Bluetooth connections with Bluetooth devices one by one and control the shutdown of their Bluetooth functions. At this time, the Bluetooth function shutdown time of the device is set according to the remaining number of Bluetooth devices that need to be shut down, so that the Bluetooth functions of other devices can be restarted in time after the Bluetooth function test of the device under test, thereby improving the convenience of Bluetooth function testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 is a flow chart of a method for detecting Bluetooth functionality; Figure 2 This is the process of Bluetooth anti-interference method Figure 1 ; Figure 3 This is the process of Bluetooth anti-interference method Figure 2 ; Figure 4 This is the process of signal relay method Figure 1 ; Figure 5 This is the process of signal relay method Figure 2 ; Figure 6 This is the process of signal relay method Figure 3 ; Figure 7 This is the process of signal relay method Figure 4 ; Figure 8 It is a flow chart of the abnormality alarm method. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0028] Reference Figure 1 , a Bluetooth function detection method, comprising: Step 100: Acquire Bluetooth signal.
[0029] The device under test refers to the product that needs to be tested for Bluetooth function, and the detection device refers to the equipment used to detect the device under test and display the test results. The device under test and the detection device are selected by the staff according to the actual situation, and will not be described in detail here. The Bluetooth signal refers to the signal to be connected sent by the Bluetooth device, and the Bluetooth signal can be obtained through the Bluetooth module on the detection device, where the detection device can only identify the Bluetooth signal located in the same direction of the device under test, and the other directions of the detection device are shielded from external signal interference by a metal shielding plate. The method of obtaining the Bluetooth signal is selected by the staff according to the actual situation, and will not be described in detail here.
[0030] Step 101: Determine device information of the device under test according to the Bluetooth signal.
[0031] Device information refers to information such as the ID and UUID of the device under test. The device information can be read from the Bluetooth signal. When there are multiple Bluetooth signals, the device information corresponding to the Bluetooth signal that is consistent with the preset ID or UUID of the device under test is selected. The method for reading the device information is selected by the staff according to the actual situation and will not be elaborated here.
[0032] Step 102: Control a preset detection device to establish a Bluetooth connection with the device to be tested according to the device information, and monitor the Bluetooth connection status.
[0033] After the detection device establishes a Bluetooth connection with the device to be tested, it stops acquiring Bluetooth signals. Monitoring the Bluetooth connection status refers to real-time monitoring of the connection status, data interaction or abnormal events between Bluetooth devices. The connection status is the recorded data packet consisting of the connection status, data interaction or abnormal events. The monitoring method of the Bluetooth device and the method for determining the connection status are common knowledge among people in this field and will not be elaborated here.
[0034] Step 103: Based on the establishment of the Bluetooth connection, retrieve the service list.
[0035] The service list refers to a list of services supported by the device under test. The method for determining the service list is common knowledge among those skilled in the art and will not be elaborated herein.
[0036] Step 104: Determine target features according to the service list.
[0037] The target feature refers to the feature value address that supports notification in the service list. The method for determining the target feature is common knowledge among those skilled in the art and will not be elaborated here.
[0038] Step 105: Based on the target feature, a preset detection device is controlled to read the feature value.
[0039] The characteristic value is the data read from the device under test according to the target characteristics. The characteristic value generally includes data such as the power of the device under test. The method of reading the characteristic value is common knowledge to those skilled in the art and will not be elaborated here.
[0040] When there are multiple Bluetooth signals, the information of the corresponding Bluetooth devices is read from the Bluetooth signals, and the signal of the Bluetooth device to be tested is selected, and then the Bluetooth device to be tested is connected and its characteristic value is read, so as to detect the working condition of its Bluetooth function and improve the convenience of Bluetooth function testing.
[0041] Reference Figure 2 , Bluetooth anti-interference methods include: Step 200: Determine the transmission error according to the connection status.
[0042] The transmission error refers to a value used to show the Bluetooth connection status between the device under test and the detection device. Generally, the delay time during data transmission is used as the transmission error. The method for determining the transmission error is common knowledge among people in this field and will not be elaborated here.
[0043] Step 201: When the transmission error is higher than a preset connection threshold, the number of devices is determined according to the Bluetooth signal.
[0044] The connection threshold refers to the maximum value of the transmission error when the device under test and the detection device are stably connected. The connection threshold is selected by the staff according to the actual situation and will not be described in detail here. The transmission error higher than the connection threshold indicates that the Bluetooth connection between the device under test and the detection device is unstable. The number of devices refers to the number of devices that send Bluetooth signals. The number of devices can be determined by identifying Bluetooth signals. The method for determining the number of devices is common knowledge among people in this field and will not be described in detail here.
[0045] Step 202: When the number of devices is higher than a preset interference threshold, determine a strength peak value based on the Bluetooth signal.
[0046] The interference threshold refers to the maximum number of devices that will not affect the Bluetooth connection between the device under test and the detection device. When there are too many Bluetooth signals, it is easy for multiple Bluetooth signals to occupy the Bluetooth frequency band, resulting in an unstable connection between the device under test and the detection device. The interference threshold is selected by the staff based on actual conditions and will not be elaborated here.
[0047] The number of devices exceeding the interference threshold indicates that there are too many Bluetooth signals. The peak intensity refers to the maximum value of the signal strength in the Bluetooth signal. The peak intensity can be read from the Bluetooth signal. The method for reading the peak intensity is common knowledge among those skilled in the art and will not be elaborated here.
[0048] Step 203: Determine the interference signal according to the intensity peak.
[0049] The interference signal refers to the signal that has the greatest interference on the Bluetooth connection between the device to be tested and the detection device, that is, the Bluetooth signal corresponding to the peak intensity. The method for determining the interference signal is common knowledge among those skilled in the art and will not be elaborated here.
[0050] Step 204: Determine interference information of the interference device according to the interference signal and the device information.
[0051] The interference device refers to the Bluetooth device that has the greatest interference on the Bluetooth connection between the device to be tested and the detection device. The interference information refers to information such as the ID and UUID of the interference device. The interference information can be read from the interference signal. The method of reading the interference information is common knowledge among people in this field and will not be elaborated here.
[0052] Step 205: Control a preset detection device to establish a Bluetooth connection with the interference device according to the interference information, and send a preset timed shutdown instruction to shut down Bluetooth.
[0053] The timed shutdown command is a command used to control the interfering device to temporarily shut down the Bluetooth device. The timed shutdown command is selected by the staff based on the actual situation and will not be elaborated here.
[0054] When Bluetooth transmission is unstable, the number of Bluetooth signals sent is identified from the Bluetooth signals, so that when the number of Bluetooth signals is too large, an interference device is selected for connection, and the interference device is controlled to turn off the Bluetooth function at a fixed time, thereby reducing the number of Bluetooth signals and improving the stability of Bluetooth connection.
[0055] Reference Figure 3 , Bluetooth anti-interference methods also include: Step 206: When the number of devices is higher than a preset interference threshold, a strength valley is determined according to the Bluetooth signal.
[0056] The strength valley value refers to the minimum value of the signal strength in the Bluetooth signal. The strength valley value can be read from the Bluetooth signal. The method for reading the strength valley value is common knowledge to those skilled in the art and will not be elaborated here.
[0057] Step 207: Determine the unit duration according to the intensity valley value.
[0058] The unit duration refers to the minimum duration required for the detection device to establish a connection with a Bluetooth device that emits a Bluetooth signal with a valley strength. The unit duration can be obtained by querying the connection data table. The connection data table refers to a data table that records different signal strengths and their corresponding connection durations.
[0059] Step 208: Determine the interference duration according to the number of devices and the unit duration.
[0060] Interference duration refers to the time required to connect to the interference device in sequence and turn off the Bluetooth function. The number of interference devices exceeding the interference threshold can be calculated by the number of devices and the interference threshold, and then the product of the number and the unit time is calculated as the interference duration.
[0061] Step 209: Determine the connection strength according to the device information and the Bluetooth signal.
[0062] The connection strength refers to the signal strength value of the Bluetooth signal corresponding to the device information. The method for determining the connection strength is common knowledge to those skilled in the art and will not be elaborated here.
[0063] Step 210: Determine the connection duration according to the connection strength.
[0064] The connection duration refers to the minimum duration required for the detection device to establish a connection with the device of the Bluetooth signal corresponding to the device information. The connection duration can be obtained by querying from the connection data table.
[0065] Step 211: Determine the shutdown duration according to the interference duration and the connection duration.
[0066] The shutdown time refers to the time required for the interference device to turn off the Bluetooth function, that is, the sum of the interference time and the connection time.
[0067] Step 212: Generate a timed closing instruction according to the closing duration.
[0068] When the number of Bluetooth signals is too large, it takes a long time to establish Bluetooth connections with Bluetooth devices one by one and control the shutdown of their Bluetooth functions. At this time, the Bluetooth function shutdown duration of the interfering device is set according to the remaining number of Bluetooth devices that need to be shut down, so that the Bluetooth functions of other devices can be restarted in time after the Bluetooth function test of the device under test, thereby improving the convenience of Bluetooth function testing.
[0069] Reference Figure 4 , signal relay methods include: Step 300: When the connection strength is lower than a preset transmission threshold, the device distance is determined according to the connection strength.
[0070] The device distance refers to the distance between the device to be tested and the detection device. The device distance can be obtained from the distance data table. The distance data table refers to a data table that records different signal strengths and their distances.
[0071] Step 301: Determine the transfer interval according to the device distance.
[0072] The transfer interval refers to the range that can stably receive the Bluetooth signal of the device under test and stably send the Bluetooth signal to the detection device. Generally, the threshold distance corresponding to the transmission threshold is obtained from the distance data table according to the transmission threshold, and then the overlapping part of the two circles with the positions of the device under test and the detection device as the center and the threshold distance as the radius is taken as the transfer interval.
[0073] Step 302: Determine the intensity interval according to the transfer interval.
[0074] The strength range refers to the signal strength range emitted by the Bluetooth device within the transfer range. The corresponding strength range can be obtained by querying the distance data table according to the transfer area.
[0075] Step 303: Determine the transfer signal of the transfer device according to the strength interval and the Bluetooth signal.
[0076] A transfer signal refers to a Bluetooth signal whose signal strength is within the intensity range. Generally, the signal with the highest intensity within the intensity range is selected as the transfer signal. A transfer device refers to a device used to read the characteristic value of the device to be tested and forward it to the detection device. The transfer device is the device corresponding to the transfer signal. The method for determining the transfer signal is common knowledge among people in this field and will not be elaborated here.
[0077] Step 304: Determine the transfer information according to the transfer signal.
[0078] The transfer information refers to information such as the ID and UUID of the transfer device. The method for determining the transfer information is common knowledge to those skilled in the art and will not be elaborated here.
[0079] Step 305: Control the preset transfer device to establish a Bluetooth connection with the device to be tested according to the transfer information and the device information, and control the preset transfer device to read the characteristic value based on the target characteristic.
[0080] The Bluetooth signal sent by the device under test is received through the transfer device and a connection is established, so that the characteristic value data in the device under test is read through the transfer device.
[0081] Step 306: Generate a feature data packet according to the feature value.
[0082] A characteristic data packet refers to a data packet obtained by aggregating characteristic data in a transfer device. After the transfer device reads the characteristic value from the device under test, it compresses the read data and performs other operations to reduce data corruption. The method for producing characteristic data packets is common knowledge among personnel in this field and will not be elaborated here.
[0083] Step 307: Control the preset transfer device to establish a Bluetooth connection with the detection device according to the transfer information, and control the preset detection device to read the feature data packet based on the target feature.
[0084] When the Bluetooth signal strength of the device under test is low, the Bluetooth connection with the device under test is likely to fluctuate, resulting in errors in the data read from the Bluetooth function. By selecting a Bluetooth device that can stably connect to the device under test as a transfer device, the data of the device under test is read through the transfer device, and then the detection device reads the transfer device, the stability of the Bluetooth connection is improved.
[0085] Reference Figure 5 , the signal relay method further includes: Step 308: Determine the data difference according to the characteristic data packet.
[0086] The data difference refers to the difference between the data in the latest feature data packet and the data in the previous feature data packet. The method for determining the data difference is common knowledge among those skilled in the art and will not be elaborated here.
[0087] Step 309: Determine the update period according to the data difference.
[0088] The update cycle refers to the interval length of reading characteristic values. When the interval length of reading characteristic values is too low, it is easy to cause too much data to be read per unit time, resulting in data congestion. When the interval length of reading characteristic values is too high, it is easy to cause too little data to be read per unit time, resulting in difficulty in accurately displaying the characteristic values. Generally, the minimum time interval that can accurately display the changes in the characteristic values is selected as the update cycle. The update cycle can be obtained by querying the periodic data table. The periodic data table refers to a data table that records different data differences and their corresponding update cycles.
[0089] Step 310: Determine the relay strength according to the relay signal.
[0090] The relay strength refers to the strength of the relay signal. The method for determining the relay strength is common knowledge to those skilled in the art and will not be elaborated here.
[0091] Step 311: Determine the transfer duration according to the transfer strength and the connection strength.
[0092] The transfer time refers to the time required for the transfer device to establish a Bluetooth connection with the device under test. The difference between the transfer strength and the connection strength can be calculated first, and then the corresponding transfer time can be queried from the connection data table according to the difference.
[0093] Step 312: Determine the interval duration according to the update cycle and the transfer duration.
[0094] The intermittent time refers to the time required for the transfer device to read the characteristic value again after reading it, that is, the difference between the update cycle and the transfer time.
[0095] Step 313: Control the preset device to be tested to establish a Bluetooth connection with the transfer device according to the transfer information and the device information, and control the preset transfer device to read the characteristic value based on the target characteristic.
[0096] The Bluetooth signal sent by the device under test is received through the transfer device and a connection is established, so that the characteristic value data in the device under test is read through the transfer device.
[0097] Step 314: based on the reading of the characteristic value, disconnect the Bluetooth connection, and after an interval, control the preset device under test to establish a Bluetooth connection with the transfer device according to the transfer information and device information.
[0098] When there is too much information transmitted by Bluetooth, it is easy to cause data congestion, which may lead to errors in the data transmitted by Bluetooth. By checking the data changes of the device under test and selecting the appropriate data reading cycle, data can be read stably and data congestion can be reduced, thereby improving the stability of the Bluetooth connection.
[0099] Reference Figure 6 , the signal relay method further includes: Step 315: Determine the reading duration according to the transfer intensity.
[0100] The reading time refers to the time required for the detection device to establish a Bluetooth connection with the transfer device. The corresponding reading time can be obtained by querying the connection data table according to the transfer strength.
[0101] Step 316: When the reading duration is greater than the intermittent duration, a reselection signal of the reselection device is determined according to the intensity interval and the Bluetooth signal.
[0102] The reading duration being higher than the intermittent duration means that when the transfer device needs to re-establish a Bluetooth connection with the device under test to read the characteristic value, the detection device is still establishing a Bluetooth connection with the transfer device. At this time, it is difficult for the transfer device to establish a connection with the device under test, which causes the reading process of the device under test to be delayed. The check-in signal refers to a Bluetooth signal whose signal strength is within the intensity range except for the transfer signal. Generally, the signal with the highest intensity within the intensity range is selected as the check-in signal. The check-in device refers to a device used to read the characteristic value of the device under test and forward it to the detection device instead of the transfer device. The check-in device is the device corresponding to the check-in signal. The method for determining the check-in signal is common knowledge among personnel in this field and will not be elaborated here.
[0103] Step 317: Determine the check-in information according to the check-in signal.
[0104] The reselection information refers to information such as the ID and UUID of the reselection device. The method for determining the reselection information is common knowledge to those skilled in the art and will not be elaborated herein.
[0105] Step 318: Determine the reselection duration according to the reselection signal and the connection strength.
[0106] The reselection duration refers to the time required for the reselection device to establish a Bluetooth connection with the device under test. The signal strength of the reselection signal can be first identified, and then the difference between the signal strength and the connection strength can be calculated. Then, the corresponding reselection duration can be queried from the connection data table according to the difference.
[0107] Step 319: Determine the interval duration according to the update cycle and the check duration.
[0108] The intermittent time is the time between the transfer device reading the characteristic value and the time for the reselection device to read the characteristic value. The intermittent time can be determined by calculating the difference between the update cycle and the reselection time.
[0109] Step 320: based on the reading of the characteristic value, disconnect the Bluetooth connection, and after an interval, control the preset device to be tested to establish a Bluetooth connection with the selected device according to the selected information and device information.
[0110] When the detection device takes too long to read the transfer device, it is easy to cause the detection device to still be reading the data of the previous cycle of the transfer device when the transfer device reads the data of the next cycle of the device under test, resulting in difficulty in connecting the device under test and the transfer device. At this time, another Bluetooth device that can stably read the device under test is selected as the reselection device, so that when the detection device reads the data of the transfer device, the data of the device under test can be read through the reselection device, thereby improving the efficiency of Bluetooth transmission.
[0111] Reference Figure 7 , the signal relay method further includes: Step 321: When the reading duration is less than the update period, the difference between the update period and the reading duration is calculated and defined as the standby duration.
[0112] The reading time length is lower than the update period, which means that the checking device is still reading the characteristic value data of the device under test after the device under test reads the transfer device. The standby time length is the time length required for the checking device to read the device under test after the test device reads the data packet in the transfer device.
[0113] Step 322: Control the preset device to be tested to establish a Bluetooth connection with the transfer device according to the transfer information and the device information, and control the preset transfer device to read the characteristic value based on the target characteristic.
[0114] The Bluetooth signal sent by the device under test is received through the transfer device and a connection is established, so that the characteristic value data in the device under test is read through the transfer device.
[0115] Step 323: Generate a feature data packet according to the feature value.
[0116] The characteristic value data read by the transfer device is packaged to be read by the detection device.
[0117] Step 324: based on the reading of the characteristic value, disconnect the Bluetooth connection, and after an interval, control the preset device to be tested to establish a Bluetooth connection with the selected device according to the selected information and device information.
[0118] After the transfer device reads the characteristic value, the characteristic value data is packaged and stored to be read by the detection device, and the characteristic value is read again by the checking device after an interval and packaged and stored.
[0119] Step 325: Control the preset transfer device to establish a Bluetooth connection with the detection device according to the transfer information, and control the preset detection device to read the feature data packet based on the target feature.
[0120] The characteristic data packet in the transfer device is read by the detection device to analyze the characteristic value.
[0121] Step 326: based on the reading of the characteristic data packet, disconnect the Bluetooth connection, and after the standby time, control the preset selection device to establish a Bluetooth connection with the detection device according to the selection information.
[0122] When the time taken for the checking device to read the device to be tested is long, it is easy for the checking device to continue reading the device to be tested after the detection device has finished reading the data of the transfer device. At this time, the detection device is controlled to wait until the checking device finishes reading, thereby reducing the situation where the checking device is connected to the device to be tested and the detection device at the same time.
[0123] Reference Figure 8 , the abnormal alarm methods include: Step 400: Determine the device location based on the device distance.
[0124] The device position refers to the location information of the device to be tested. The device position can be obtained by reading the position of the detection device and combining the detection direction of the detection device and the device distance. The position of the detection device and the method for determining the device position are common knowledge among people in this field and will not be elaborated here.
[0125] Step 401: Acquire a device image based on the device location.
[0126] The device image refers to a picture of the device under test. The device image can be obtained by a fixed camera. The camera closest to the device position is selected, and then the camera is controlled to turn to the device under test to obtain the device image. The method for obtaining the device image is selected by the staff according to the actual situation and will not be elaborated here.
[0127] Step 402: Determine device features according to the device image, and determine a feature set according to the update cycle and the feature data packet.
[0128] The device feature refers to the feature value displayed on the device under test. The device feature can be determined by image recognition technology. The method of identifying the device feature is common knowledge in the field and will not be described in detail here. The feature set refers to all feature data packets read by the detection device within the update cycle after the device feature is identified. The method of determining the feature set is common knowledge in the field and will not be described in detail here.
[0129] Step 403: Determine feature deviation according to the feature set and device features.
[0130] Feature deviation refers to the minimum deviation between the feature value in the feature set and the device feature, that is, the difference between the feature value in the feature set and the device feature is calculated respectively, and then the smaller one is selected as the feature deviation. The calculation method of feature deviation is common knowledge among people in this field and will not be elaborated here.
[0131] Step 404: When the characteristic deviation exceeds a preset deviation threshold, the preset detection device is controlled to issue an abnormal alarm.
[0132] The deviation threshold refers to the maximum characteristic deviation that can exist when the Bluetooth function works normally. The deviation threshold is selected by the staff according to the actual situation and will not be elaborated here. The characteristic deviation exceeding the deviation threshold means that the difference between the device characteristics and the characteristic values read by the Bluetooth module is too large, that is, the Bluetooth function of the device under test fails to work properly. The abnormal alarm is an alarm issued by the detection device to remind the staff that the Bluetooth function of the device under test fails to work properly. The abnormal alarm is selected by the staff according to the actual situation and will not be elaborated here.
[0133] After the data of the device under test is obtained through Bluetooth reading, the image is compared with the actual data of the device under test to determine the working condition of the Bluetooth function of the device under test, and an alarm is issued in time when a problem occurs in the Bluetooth function.
[0134] Based on the same inventive concept, an embodiment of the present invention provides a Bluetooth function detection system, including: Acquisition module, used to acquire Bluetooth signals and device images; A memory, used to store any one of the above-mentioned Bluetooth function detection methods; The program in the memory can be loaded and executed by the processor.
[0135] Based on the same inventive concept, an embodiment of the present invention provides a smart terminal, including a memory and a processor, wherein the memory stores any of the above-mentioned Bluetooth function detection methods that can be loaded and executed by the processor.
[0136] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0137] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A method for detecting a Bluetooth function, characterized in that: include: Get Bluetooth signal; Determine device information of the device under test according to the Bluetooth signal; Control the preset detection device to establish a Bluetooth connection with the device to be tested according to the device information, and monitor the Bluetooth connection status; Based on the establishment of Bluetooth connection, retrieve the service list; Determine target characteristics based on service list; Based on the target characteristics, a preset detection device is controlled to read the characteristic value.
2. A method for detecting a Bluetooth function according to claim 1, characterized in that: It also includes a Bluetooth anti-interference method, which includes: Determine the transmission error based on the connection situation; When the transmission error is higher than a preset connection threshold, the number of devices is determined based on the Bluetooth signal; When the number of devices is higher than the preset interference threshold, the strength peak is determined based on the Bluetooth signal; Determine the interference signal based on the intensity peak; Determine interference information of the interference device based on the interference signal and the device information; According to the interference information, the preset detection device is controlled to establish a Bluetooth connection with the interference device, and a preset timed shutdown instruction is sent to shut down Bluetooth.
3. A Bluetooth function detection method according to claim 2, characterized in that: The Bluetooth anti-interference method also includes: When the number of devices is higher than the preset interference threshold, the strength valley is determined based on the Bluetooth signal; Determine the unit duration based on the intensity valley value; Determine the duration of interference based on the number of devices and unit duration; Determine connection strength based on device information and Bluetooth signal; Determine the connection duration based on the connection strength; Determine the shutdown duration based on the interference duration and the connection duration; Generate a timed closing instruction based on the closing duration.
4. A Bluetooth function detection method according to claim 3, characterized in that: Also included is a signal transfer method, the signal transfer method comprising: When the connection strength is lower than a preset transmission threshold, the device distance is determined based on the connection strength; Determine the transfer interval based on the distance between devices; Determine the intensity interval based on the transit interval; Determine a relay signal of the relay device according to the strength interval and the Bluetooth signal; Determine transfer information according to the transfer signal; Control the preset transfer device to establish a Bluetooth connection with the device under test according to the transfer information and device information, and control the preset transfer device to read the characteristic value based on the target characteristic; Generate a feature data packet according to the feature value; According to the transfer information, the preset transfer device is controlled to establish a Bluetooth connection with the detection device, and based on the target characteristics, the preset detection device is controlled to read the characteristic data packet.
5. A Bluetooth function detection method according to claim 4, characterized in that: The signal relay method further includes: Determine data difference according to characteristic data packets; Determine the update cycle based on the data difference; Determine the relay strength based on the relay signal; Determine the transfer time based on the transfer strength and connection strength; Determine the interval duration based on the update cycle and transfer time; Control the preset device under test to establish a Bluetooth connection with the transfer device according to the transfer information and device information, and control the preset transfer device to read the characteristic value based on the target characteristic; Based on the reading of the characteristic value, the Bluetooth connection is disconnected, and after an interval, the preset device under test is controlled to establish a Bluetooth connection with the transfer device according to the transfer information and device information.
6. A method for detecting Bluetooth function according to claim 5, characterized in that: The signal relay method further includes: Determine the reading time according to the transfer intensity; When the reading duration is longer than the intermittent duration, determining a reselection signal of the reselection device according to the intensity interval and the Bluetooth signal; determining the check information according to the check signal; Determine the reselection duration based on the reselection signal and the connection strength; Determine the interval duration based on the update cycle and the reselection duration; Based on the reading of the characteristic value, the Bluetooth connection is disconnected, and after an interval, the preset device to be tested is controlled to establish a Bluetooth connection with the reselected device according to the reselected information and device information.
7. A method for detecting Bluetooth function according to claim 6, characterized in that: The signal relay method further includes: When the reading duration is lower than the update cycle, the difference between the update cycle and the reading duration is calculated and defined as the standby duration; Control the preset device under test to establish a Bluetooth connection with the transfer device according to the transfer information and device information, and control the preset transfer device to read the characteristic value based on the target characteristic; Generate a feature data packet according to the feature value; Based on the reading of the characteristic value, the Bluetooth connection is disconnected, and after the interval, the preset device to be tested is controlled to establish a Bluetooth connection with the reselected device according to the reselected information and device information; Control the preset transfer device to establish a Bluetooth connection with the detection device according to the transfer information, and control the preset detection device to read the characteristic data packet based on the target characteristics; Based on the situation of reading the characteristic data packet, the Bluetooth connection is disconnected, and after the standby time, the preset selection device is controlled to establish a Bluetooth connection with the detection device according to the selection information.
8. A method for detecting Bluetooth function according to claim 7, characterized in that: Also included is an abnormality alarm method, the abnormality alarm method comprising: Determine the device location based on the device distance; Obtaining a device image based on the device location; Determine device features based on the device image, and determine feature sets based on the update cycle and feature data packets; Determining feature deviations based on feature sets and device features; When the characteristic deviation exceeds a preset deviation threshold, the preset detection device is controlled to issue an abnormal alarm.
9. A Bluetooth function detection system, characterized in that: include: Acquisition module, used to acquire Bluetooth signals and device images; A memory, used to store a Bluetooth function detection method according to any one of claims 1 to 8; The program in the memory can be loaded and executed by the processor.
10. An intelligent terminal, characterized in that: The method comprises a memory and a processor, wherein the memory stores a Bluetooth function detection method as claimed in any one of claims 1 to 8 which can be loaded and executed by the processor.
Citation Information
Patent Citations
Function self-checking method and device and computer readable storage medium
CN110647433A
Communication module function detection systems and methods
CN112615683A
Power plant inspection method and system considering wireless signal interference among multiple devices
CN113298971A
Electric quantity display method of Bluetooth device, terminal and storage medium
CN114268689A
Method and device for controlling intelligent device, computer device, and storage medium
US20240049314A1