Communication quality detection method, device, equipment, medium and product
Through the low-power Bluetooth gateway, the detection data is sent to the sub-device and the confirmation receipt is received, and the detection results of communication delay time and packet error rate are generated, which solves the problem of poor communication quality detection efficiency and effect in the prior art, and realizes the detection of communication delay time in the BLE network.
Patent Information
- Application Number
- CN202411761937.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-04
AI Technical Summary
In the prior art, the efficiency and effect of detecting the communication quality of smart devices in the BLE network are poor, and the communication delay time cannot be detected.
Through the Bluetooth Low Energy gateway responds to the detection command, it sends detection data to the Bluetooth Low Energy sub-device, receives confirmation receipts, and generates detection results based on these data, including communication delay time and packet error rate.
The communication quality detection efficiency and effect can be improved without professional testing equipment, and can detect the communication delay time of low-power Bluetooth sub-equipment, thereby improving network optimization and problem discovery.
Smart Images

Figure CN119562298A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet of Things (IoT) technology, and in particular to a communication quality testing method, apparatus, equipment, medium, and product. Background Technology
[0002] In the field of smart home IoT, a large number of smart devices use the BLE (Bluetooth Low Energy) protocol. BLE is a short-range wireless communication technology based on the 2.4GHz ISM band. At the same time, other protocols such as Wi-Fi and ZigBee may also communicate on the 2.4GHz band, which may interfere with BLE communication. Physical objects, such as walls and metal objects, can also affect BLE communication. Detecting the communication quality of smart devices in the BLE network helps to discover problems and optimize local network topology.
[0003] Existing technologies for testing the communication quality of smart devices in BLE networks typically require specialized testing equipment and cannot detect communication latency, resulting in poor testing efficiency and effectiveness.
[0004] Therefore, it is necessary to propose a solution to improve the efficiency and effectiveness of communication quality detection. Summary of the Invention
[0005] The main purpose of this application is to provide a communication quality testing method, apparatus, equipment, medium and product, which aims to improve the efficiency and effectiveness of communication quality testing.
[0006] To achieve the above objectives, this application provides a communication quality detection method, which is applied to a low-power Bluetooth gateway and includes:
[0007] In response to receiving a detection command, detection data is sent to at least one Bluetooth Low Energy sub-device according to the detection command;
[0008] Receive an acknowledgment from at least one Bluetooth Low Energy sub-device;
[0009] Based on the confirmation receipt and the detection data, a detection result corresponding to the at least one low-power Bluetooth sub-device is generated or determined, wherein the detection result includes communication latency and packet error rate.
[0010] In one embodiment, the step of sending detection data to at least one Bluetooth Low Energy sub-device according to the detection command includes:
[0011] The number of tests and the size of the test package are determined according to the test instructions;
[0012] According to the number of detections and the size of the detection packet, the corresponding detection packet is sent to the at least one low-power Bluetooth sub-device at the attribute layer;
[0013] If the detection packet times out, the detection packet is retransmitted to at least one corresponding Bluetooth Low Energy sub-device.
[0014] In one embodiment, the detection command is issued by a cloud platform, and the step of generating or determining the detection result corresponding to the at least one Bluetooth Low Energy sub-device based on the confirmation receipt and the detection data includes:
[0015] The first statistical result is obtained by statistically analyzing the sending time of the detection packets and the receiving time of the acknowledgment receipts for each number of detections; and the second statistical result is obtained by statistically analyzing the number of detection packets sent, the number of retransmissions, and the number of acknowledgment receipts received.
[0016] The communication delay time is calculated based on the first statistical result, and the packet error rate is calculated based on the second statistical result; and / or, the first statistical result and the second statistical result are reported to the cloud platform so that the cloud platform can calculate the communication delay time based on the first statistical result and the packet error rate based on the second statistical result.
[0017] In one embodiment, the step of calculating the communication delay time based on the first statistical result includes:
[0018] Calculate the difference between the sending time of the detection packet and the receiving time of the acknowledgment receipt corresponding to each detection count to obtain each delay time;
[0019] The communication delay time is obtained by summing and averaging the delay times based on the number of detections.
[0020] In one embodiment, the step of calculating the packet error rate based on the second statistical result includes:
[0021] Add the number of times the detection packets were sent to the number of retransmissions to obtain the total number of packets sent;
[0022] Subtract the total number of packets sent from the number of times acknowledgment receipts were received to obtain the number of erroneous packets;
[0023] The packet error rate is obtained by dividing the number of erroneous packets by the total number of packets sent.
[0024] Furthermore, to achieve the above objectives, this application also proposes a communication quality detection method, which is applied to at least one low-power Bluetooth sub-device, and the method includes:
[0025] Receive detection data sent by a Bluetooth Low Energy gateway, wherein the detection data is sent by the Bluetooth Low Energy gateway in response to receiving a detection command, according to the detection command;
[0026] A confirmation receipt corresponding to the detection data is generated and sent to the Bluetooth Low Energy gateway, so that the Bluetooth Low Energy gateway receives the confirmation receipt and generates or determines the detection result corresponding to the at least one Bluetooth Low Energy sub-device based on the confirmation receipt and the detection data, wherein the detection result includes communication latency and packet error rate.
[0027] Furthermore, to achieve the above objectives, this application also proposes a communication quality detection device, which is applied to a low-power Bluetooth gateway, and the communication quality detection device includes:
[0028] A response module is configured to, in response to receiving a detection command, send detection data to at least one Bluetooth Low Energy sub-device according to the detection command.
[0029] A receiving module is configured to receive an acknowledgment sent by at least one Bluetooth Low Energy sub-device;
[0030] The determination module is used to generate or determine the detection result corresponding to the at least one low-power Bluetooth sub-device based on the confirmation receipt and the detection data, wherein the detection result includes communication latency and packet error rate.
[0031] In addition, to achieve the above objectives, this application also proposes a communication quality testing device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the communication quality testing method described above.
[0032] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the communication quality detection method described above.
[0033] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the communication quality detection method described above.
[0034] One or more technical solutions proposed in this application have at least the following technical effects:
[0035] The Bluetooth Low Energy (BLE) gateway, upon receiving a detection command, sends detection data to at least one BLE sub-device according to the command; receives an acknowledgment from at least one BLE sub-device; and generates or determines a detection result corresponding to at least one BLE sub-device based on the acknowledgment and detection data. The detection result includes communication latency and packet error rate. This solution does not require specialized detection equipment and can detect the communication latency of at least one BLE sub-device, thereby improving communication quality detection efficiency and detection effectiveness. Attached Figure Description
[0036] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0037] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is a schematic diagram of the detection principle in existing technology;
[0039] Figure 2 This is a schematic diagram of the transmission test process in the existing technology;
[0040] Figure 3 This is a schematic diagram of the reception test process in the prior art;
[0041] Figure 4 This is a flowchart illustrating an embodiment of the communication quality testing method of this application.
[0042] Figure 5 This is a flowchart illustrating Embodiment 2 of the communication quality testing method of this application;
[0043] Figure 6 This is a schematic diagram of the interaction timing according to the second embodiment of this application;
[0044] Figure 7 This is a flowchart illustrating Embodiment 3 of the communication quality testing method of this application;
[0045] Figure 8 This is a flowchart illustrating Embodiment 4 of the communication quality testing method of this application;
[0046] Figure 9 This is a schematic diagram of the module structure of the communication quality detection device according to an embodiment of this application;
[0047] Figure 10This is a schematic diagram of the device structure of the hardware operating environment involved in the communication quality detection method in this application embodiment.
[0048] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0049] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0050] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0051] The main solution of this application embodiment is as follows: Upon receiving a detection command, the Bluetooth Low Energy (BLE) gateway sends detection data to at least one BLE sub-device according to the detection command; receives an acknowledgment from at least one BLE sub-device; and generates or determines a detection result corresponding to at least one BLE sub-device based on the acknowledgment and detection data. The detection result includes communication latency and packet error rate. This solution does not require specialized detection equipment and can detect the communication latency of at least one BLE sub-device, thereby improving communication quality detection efficiency and detection effectiveness.
[0052] Technical terms used in the embodiments of this application:
[0053] BLE: Bluetooth Low Energy;
[0054] DTM: Direct Test Mode, defined in the Bluetooth core specification.
[0055] In this embodiment, for ease of description, the following description uses a communication quality detection device as the execution subject.
[0056] In the field of smart home IoT, a large number of smart devices use the BLE protocol. BLE is a short-range wireless communication technology based on the 2.4GHz ISM band. At the same time, other protocols such as Wi-Fi and ZigBee may also communicate on the 2.4GHz band, which may interfere with BLE communication. Physical objects, such as walls and metal objects, can also affect BLE communication. Detecting the communication quality of smart devices in the BLE network helps to discover problems and optimize local network topology.
[0057] The Bluetooth core specification defines a mode called DTM for Bluetooth radio frequency performance testing. All standard Bluetooth devices implement this mode, which is mainly used in the research and development and production stages.
[0058] Reference Figure 1 , Figure 1 This is a schematic diagram of the detection principle in existing technology, such as... Figure 1 As shown, the existing testing process includes three devices:
[0059] DUT (Device Under Test) refers to the device under test;
[0060] Upper Tester refers to the host computer testing equipment, which is usually a PC;
[0061] Lower Tester refers to the lower-level testing equipment, which is generally a professional Bluetooth RF testing device.
[0062] The Upper Tester connects to the DUT via a serial port. The Upper Tester sends test commands, the DUT executes the specified operations, and returns the specified results.
[0063] The Lower Tester receives signals from the DUT or sends signals to the DUT and generates a report.
[0064] Reference Figure 2 and Figure 3 , Figure 2 This is a schematic diagram of the sending test process in the existing technology. Figure 3 This is a schematic diagram of the receiving test process in the prior art, such as... Figure 2 and Figure 3 As shown, the sending and receiving test processes are generally the same, mainly including:
[0065] 1. The Upper Tester sends commands to the DUT to perform transmit or receive tests;
[0066] 2. Upon receiving the instruction, the DUT sends a receipt to the Upper Tester;
[0067] 3. The DUT begins sending or receiving data packets;
[0068] 4. The Upper Tester sends a command to the DUT to end the test;
[0069] 5. The DUT sends a test receipt to the Upper Tester.
[0070] Therefore, it can be seen that the existing detection methods have the following drawbacks:
[0071] 1. The BLE device needs to be running in DTM mode, and it cannot respond to other normal operations during detection;
[0072] 2. Dedicated Bluetooth RF testing equipment is required for testing;
[0073] 3. Unable to detect communication delay time.
[0074] This application provides a solution that can measure the latency of BLE sub-devices in the current BLE networking environment without modifying the BLE sub-devices or using additional testing equipment, and can send testing commands from the cloud.
[0075] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or communication quality detection device capable of performing the above functions. The following description uses a communication quality detection device as an example to illustrate this embodiment and the subsequent embodiments.
[0076] Based on this, embodiments of this application provide a communication quality detection method, referring to... Figure 4 , Figure 4 This is a flowchart illustrating the first embodiment of the communication quality detection method of this application.
[0077] In this embodiment, the communication quality detection method includes steps S10 to S30:
[0078] Step S10: In response to receiving a detection command, send detection data to at least one Bluetooth Low Energy sub-device according to the detection command;
[0079] Specifically, compared to existing technologies that can only issue detection commands through a host computer (such as a computer), this embodiment of the application sends detection commands to the BLE gateway through a cloud platform, making the detection method more flexible.
[0080] Optionally, after receiving the detection command sent by the cloud platform, the BLE gateway can send detection data to at least one Bluetooth Low Energy (BLE) sub-device according to the detection command. In this embodiment, detection data can be sent to multiple BLE sub-devices simultaneously, thereby realizing the detection of the communication quality of multiple BLE sub-devices and improving the efficiency of communication quality detection.
[0081] Step S20: Receive an acknowledgment from the at least one Bluetooth Low Energy sub-device;
[0082] Furthermore, after the BLE gateway sends detection data to at least one Bluetooth Low Energy (BLE) sub-device according to the detection command, under normal circumstances, at least one BLE sub-device will generate and return a corresponding acknowledgment receipt, i.e., an ACK receipt, and the BLE gateway can then receive the acknowledgment receipt sent by at least one BLE sub-device.
[0083] Optionally, in the BLE protocol stack, the link layer has a mechanism for timeout retransmission, verification, and judgment of data packets. The core process here is that the sending device performs CRC verification on the data when sending it, and the receiving device also performs CRC verification on the data when receiving it. If the CRC verification matches, the receiving device will send an ACK receipt for the data packet. The key detection indicators in this embodiment rely on monitoring the data packets of the BLE link layer. In order to prevent processing too many irrelevant data packets, only the detection-related packets are selected for processing.
[0084] Step S30: Based on the confirmation receipt and the detection data, generate or determine the detection result corresponding to the at least one low-power Bluetooth sub-device, wherein the detection result includes communication latency and packet error rate.
[0085] Furthermore, after receiving an acknowledgment from at least one Bluetooth Low Energy (BLE) sub-device, the BLE gateway can generate or determine the detection result corresponding to the at least one BLE sub-device based on the acknowledgment and the detection data. The detection result includes communication latency and packet error rate.
[0086] Optionally, in this embodiment of the application, the BLE gateway can perform statistics based on the sent detection data and the received confirmation receipts to obtain relevant statistical results.
[0087] As one implementation method, the BLE gateway can directly calculate the corresponding communication latency and packet error rate based on the statistical results, and then report the communication latency and packet error rate as detection results to the cloud platform.
[0088] As another implementation method, the BLE gateway can report the statistical results to the cloud platform, thereby using the computing power of the cloud platform to calculate the communication latency and packet error rate as the final detection result.
[0089] In this embodiment, the Bluetooth Low Energy (BLE) gateway, upon receiving a detection command, sends detection data to at least one BLE sub-device; receives an acknowledgment from at least one BLE sub-device; and generates or determines a detection result corresponding to at least one BLE sub-device based on the acknowledgment and detection data. The detection result includes communication latency and packet error rate. This solution eliminates the need for specialized detection equipment and can detect the communication latency of at least one BLE sub-device, thereby improving communication quality detection efficiency and effectiveness.
[0090] Based on the first embodiment of this application, a second embodiment of this application is proposed. In this second embodiment, content that is the same as or similar to that in the first embodiment described above can be referred to the above description and will not be repeated hereafter. Based on this, please refer to... Figure 5 Step S10 also includes steps S101 to S103:
[0091] S101: Determine the number of tests and the size of the test package according to the test instruction;
[0092] S102: According to the number of detections and the size of the detection packet, send the corresponding detection packet to the at least one low-power Bluetooth sub-device at the attribute layer;
[0093] S103: If the detection packet transmission times out, the detection packet is retransmitted to at least one corresponding Bluetooth Low Energy sub-device.
[0094] Reference Figure 6 , Figure 6 This is a schematic diagram of the interaction timing according to the second embodiment of this application, as shown below. Figure 6 As shown, the cloud platform sends a start detection command to the BLE gateway. The command includes the number of detections and the size of the detection packet. To avoid the detection packet being too large and causing the detection packet to be split during subsequent transmission, which would affect the accuracy of the final statistical results, the maximum size of the detection packet is set to 20 bytes in this embodiment. In other embodiments, the threshold for the size of the detection packet can be set according to the actual situation. This embodiment does not constitute a specific limitation on this.
[0095] Optionally, the BLE gateway can enter detection mode after receiving the detection command sent by the cloud platform. Only after entering detection mode will it begin to process the detection packets and ACK receipts of the BLE link layer.
[0096] Optionally, the BLE gateway sends detection data to the BLE sub-device at the BLE protocol ATT (Attribute) layer according to the number of detections and the size of the detection packets issued by the cloud platform.
[0097] For example, the ATT layer uses a Handle value of 65535. The first byte of the detection data is 'a', and each subsequent byte value is incremented by 1 based on the ASCII code of the previous byte. For instance, a 10-byte detection packet might contain the string "abcdefghij". The ATT layer's Handle is 2 bytes long, and 65535 is the maximum value that 2 bytes can represent. Devices start using Handles from 1, so using the maximum value will not result in any unused Handles. Devices will receive unused Handles normally, but will receive an ATT layer error message indicating an incorrect Handle, similar to "Invalid Handle". However, this does not affect packet transmission and ACK sending at the link layer.
[0098] Optionally, the BLE sub-device sends an acknowledgment receipt for the detection data packet at the link layer.
[0099] Optionally, the BLE gateway generates a corresponding timestamp when sending the detection packet, which can also be understood as starting a corresponding timer. If a confirmation acknowledgment is not received after a preset time (e.g., 2 seconds), it can be considered a timeout. The BLE link layer will automatically trigger a retransmission mechanism to resend the corresponding detection packet. It should be noted that the retransmitted detection packet should also be included in the statistics of the total number of packets sent.
[0100] This embodiment, through the above-described scheme, specifically determines the number of detections and the size of the detection packet according to the detection instruction; according to the number of detections and the size of the detection packet, the corresponding detection packet is sent to the at least one Bluetooth Low Energy (BLE) sub-device at the attribute layer; if the detection packet transmission times out, the detection packet is retransmitted to the corresponding at least one BLE sub-device. This enables the cloud platform to instruct the BLE gateway to send detection data to at least one BLE sub-device, facilitating subsequent result statistics and obtaining the detection results of at least one BLE sub-device. It eliminates the need for specialized detection equipment and can detect the communication latency of at least one BLE sub-device, thereby improving the efficiency and effectiveness of communication quality detection.
[0101] Based on any of the foregoing embodiments of this application, a third embodiment of this application is proposed. In this third embodiment, any content that is the same as or similar to any of the foregoing embodiments can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 7 Step S30 also includes steps S301 to S302:
[0102] S301: Calculate the sending time of the detection packet and the receiving time of the acknowledgment receipt for each detection count to obtain the first statistical result; and calculate the number of detection packets sent, the number of retransmissions, and the number of acknowledgment receipts received to obtain the second statistical result.
[0103] S302: Calculate the communication delay time based on the first statistical result, and calculate the packet error rate based on the second statistical result; and / or, report the first statistical result and the second statistical result to the cloud platform, so that the cloud platform can calculate the communication delay time based on the first statistical result and calculate the packet error rate based on the second statistical result.
[0104] Optionally, the step of calculating the communication delay time based on the first statistical result includes:
[0105] Calculate the difference between the sending time of the detection packet and the receiving time of the acknowledgment receipt corresponding to each detection count to obtain each delay time;
[0106] The communication delay time is obtained by summing and averaging the delay times based on the number of detections.
[0107] Optionally, the step of calculating the packet error rate based on the second statistical result includes:
[0108] Add the number of times the detection packets were sent to the number of retransmissions to obtain the total number of packets sent;
[0109] Subtract the total number of packets sent from the number of times acknowledgment receipts were received to obtain the number of erroneous packets;
[0110] The packet error rate is obtained by dividing the number of erroneous packets by the total number of packets sent.
[0111] Specifically, in this embodiment of the application, the BLE gateway can perform statistics based on the sent detection data and the received confirmation receipts to obtain relevant statistical results.
[0112] As one implementation method, the BLE gateway can directly calculate the corresponding communication latency and packet error rate based on the statistical results, and then report the communication latency and packet error rate as detection results to the cloud platform.
[0113] As another implementation method, the BLE gateway can report the statistical results to the cloud platform, thereby using the computing power of the cloud platform to calculate the communication latency and packet error rate as the final detection result.
[0114] Optionally, the BLE gateway reports the latency and timeout status of the current detection to the cloud platform. When all detection attempts are completed, the BLE gateway exits the detection mode.
[0115] Optionally, the BLE gateway reports the final detection results to the cloud platform, such as the number of packets sent, communication latency, and packet error rate.
[0116] Optionally, the communication delay time can be measured as: the time it takes for the BLE gateway to receive the ACK receipt – the time it takes for the BLE gateway to send the data packet.
[0117] Optionally, the packet error rate can be measured as: (total number of packets sent - number of times ACK receipts were received) ÷ total number of packets sent.
[0118] This embodiment, through the above-described scheme, specifically obtains a first statistical result by statistically analyzing the sending time of the detection packets and the receiving time of the acknowledgment receipts corresponding to each detection count; and obtains a second statistical result by statistically analyzing the number of detection packets sent, the number of retransmissions, and the number of acknowledgment receipts received; calculates the communication delay time based on the first statistical result, and calculates the packet error rate based on the second statistical result; and / or, reports the first and second statistical results to the cloud platform, so that the cloud platform can calculate the communication delay time based on the first statistical result and the packet error rate based on the second statistical result. This method requires no modification to the BLE sub-device, no additional detection equipment, and can measure the communication delay time of the BLE sub-device in the current BLE network environment by issuing detection commands or calculating results through the cloud, thereby improving the efficiency and effectiveness of communication quality detection.
[0119] This application also provides a communication quality detection method, applied to at least one low-power Bluetooth sub-device, as described above. Figure 8 , Figure 8 This is a flowchart illustrating the fourth embodiment of the communication quality detection method of this application.
[0120] In this embodiment, the communication quality detection method includes steps A10 to A20:
[0121] Step A10: Receive detection data sent by the Bluetooth Low Energy gateway, wherein the detection data is sent by the Bluetooth Low Energy gateway in response to receiving a detection command, according to the detection command;
[0122] Step A20: Generate an acknowledgment receipt corresponding to the detection data and send the acknowledgment receipt to the Bluetooth Low Energy gateway, so that the Bluetooth Low Energy gateway receives the acknowledgment receipt and, based on the acknowledgment receipt and the detection data, generates or determines the detection result corresponding to the at least one Bluetooth Low Energy sub-device, wherein the detection result includes communication latency and packet error rate.
[0123] Specifically, compared to existing technologies that can only issue detection commands through a host computer (such as a computer), this embodiment of the application sends detection commands to the BLE gateway through a cloud platform, making the detection method more flexible.
[0124] Optionally, after receiving the detection command sent by the cloud platform, the BLE gateway can send detection data to at least one Bluetooth Low Energy (BLE) sub-device according to the detection command. In this embodiment, detection data can be sent to multiple BLE sub-devices simultaneously, thereby realizing the detection of the communication quality of multiple BLE sub-devices and improving the efficiency of communication quality detection.
[0125] Furthermore, after the BLE gateway sends detection data to at least one Bluetooth Low Energy (BLE) sub-device according to the detection command, under normal circumstances, at least one BLE sub-device will generate and return a corresponding acknowledgment receipt, i.e., an ACK receipt, and the BLE gateway can then receive the acknowledgment receipt sent by at least one BLE sub-device.
[0126] Optionally, in the BLE protocol stack, the link layer has a mechanism for timeout retransmission, verification, and judgment of data packets. The core process here is that the sending device performs CRC verification on the data when sending it, and the receiving device also performs CRC verification on the data when receiving it. If the CRC verification matches, the receiving device will send an ACK receipt for the data packet. The key detection indicators in this embodiment rely on monitoring the data packets of the BLE link layer. In order to prevent processing too many irrelevant data packets, only the detection-related packets are selected for processing.
[0127] Furthermore, after receiving an acknowledgment from at least one Bluetooth Low Energy (BLE) sub-device, the BLE gateway can generate or determine the detection result corresponding to the at least one BLE sub-device based on the acknowledgment and the detection data. The detection result includes communication latency and packet error rate.
[0128] Optionally, in this embodiment of the application, the BLE gateway can perform statistics based on the sent detection data and the received confirmation receipts to obtain relevant statistical results.
[0129] As one implementation method, the BLE gateway can directly calculate the corresponding communication latency and packet error rate based on the statistical results, and then report the communication latency and packet error rate as detection results to the cloud platform.
[0130] As another implementation method, the BLE gateway can report the statistical results to the cloud platform, thereby using the computing power of the cloud platform to calculate the communication latency and packet error rate as the final detection result.
[0131] In this embodiment, through the above-described scheme, at least one Bluetooth Low Energy (BLE) sub-device receives detection data sent by a BLE gateway. The BLE gateway, in response to a received detection command, sends the detection data according to the command. It then generates a confirmation receipt corresponding to the detection data and sends the confirmation receipt to the BLE gateway. The BLE gateway receives the confirmation receipt and, based on the confirmation receipt and the detection data, generates or determines a detection result for the at least one BLE sub-device. The detection result includes communication latency and packet error rate. This method eliminates the need for specialized detection equipment and can detect the communication latency of at least one BLE sub-device, thereby improving the efficiency and effectiveness of communication quality detection.
[0132] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the communication quality detection method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0133] This application also provides a communication quality detection device, please refer to... Figure 9 The communication quality detection device includes:
[0134] A response module is configured to, in response to receiving a detection command, send detection data to at least one Bluetooth Low Energy sub-device according to the detection command.
[0135] A receiving module is configured to receive an acknowledgment sent by at least one Bluetooth Low Energy sub-device;
[0136] The determination module is used to generate or determine the detection result corresponding to the at least one low-power Bluetooth sub-device based on the confirmation receipt and the detection data, wherein the detection result includes communication latency and packet error rate.
[0137] The communication quality testing device provided in this application, employing the communication quality testing method in the above embodiments, can solve the technical problem of communication quality testing. Compared with the prior art, the beneficial effects of the communication quality testing device provided in this application are the same as those of the communication quality testing method provided in the above embodiments, and other technical features in the communication quality testing device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0138] This application provides a communication quality testing device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the communication quality testing method in Embodiment 1 above.
[0139] The following is for reference. Figure 10 The diagram illustrates a structural schematic of a communication quality testing device suitable for implementing embodiments of this application. The communication quality testing device in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 10The communication quality testing device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0140] like Figure 10 As shown, the communication quality detection device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the communication quality detection device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the communication quality testing equipment to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows communication quality testing equipment with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0141] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0142] The communication quality testing device provided in this application, employing the communication quality testing method described in the above embodiments, can solve the technical problem of communication quality testing. Compared with the prior art, the beneficial effects of the communication quality testing device provided in this application are the same as those of the communication quality testing method provided in the above embodiments, and other technical features of this communication quality testing device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.
[0143] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0144] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0145] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the communication quality detection method in the above embodiments.
[0146] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0147] The aforementioned computer-readable storage medium may be included in the communication quality testing equipment; or it may exist independently and not be assembled into the communication quality testing equipment.
[0148] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by the communication quality detection device, the following occurs within the communication quality detection device: a Bluetooth Low Energy gateway, in response to receiving a detection command, sends detection data to at least one Bluetooth Low Energy sub-device according to the detection command; receives an acknowledgment from at least one Bluetooth Low Energy sub-device; and, based on the acknowledgment and detection data, generates or determines a detection result corresponding to at least one Bluetooth Low Energy sub-device. The detection result includes communication latency and packet error rate. This solution eliminates the need for specialized detection equipment and can detect the communication latency of at least one Bluetooth Low Energy sub-device, thereby improving communication quality detection efficiency and effectiveness.
[0149] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0150] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0151] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0152] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described communication quality detection method, thereby solving the technical problem of communication quality detection. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the communication quality detection method provided in the above embodiments, and will not be repeated here.
[0153] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the communication quality detection method described above.
[0154] The computer program product provided in this application can solve the technical problem of communication quality detection. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the communication quality detection method provided in the above embodiments, and will not be repeated here.
[0155] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A communication quality detection method, characterized in that: The method is applied to a low-power Bluetooth gateway, comprising: In response to receiving the detection instruction, sending detection data to at least one low-power Bluetooth sub-device according to the detection instruction; Receiving a confirmation receipt sent by the at least one low-power Bluetooth sub-device; Based on the confirmation receipt and the detection data, a detection result corresponding to the at least one low-power Bluetooth sub-device is generated or determined, wherein the detection result includes a communication delay time and a packet error rate.
2. The method according to claim 1, characterized in that The step of sending detection data to at least one low-power Bluetooth sub-device according to the detection instruction comprises: Determine the number of detections and the size of the detection package according to the detection instruction; According to the number of detections and the size of the detection packet, sending a corresponding detection packet to the at least one low-power Bluetooth sub-device at the attribute layer; If the detection packet is timed out, the detection packet is resent to the corresponding at least one low-power Bluetooth sub-device.
3. The method according to claim 2, characterized in that The detection instruction is issued by the cloud platform, and the step of generating or determining the detection result corresponding to the at least one low-power Bluetooth sub-device based on the confirmation receipt and the detection data includes: Counting the sending time of the detection packet corresponding to each detection number and the receiving time of the confirmation receipt to obtain a first statistical result; and counting the number of times the detection packet is sent, the number of times it is resent, and the number of times the confirmation receipt is received to obtain a second statistical result; The communication delay time is calculated according to the first statistical result, and the packet error rate is calculated according to the second statistical result; and / or, the first statistical result and the second statistical result are reported to the cloud platform, so that the cloud platform calculates the communication delay time according to the first statistical result, and calculates the packet error rate according to the second statistical result.
4. The method according to claim 3, characterized in that The step of calculating the communication delay time according to the first statistical result comprises: Calculate the difference between the sending time of the detection packet corresponding to each detection number and the receiving time of the confirmation receipt to obtain each delay time; The delay times are summed and averaged according to the number of detections to obtain the communication delay time.
5. The method according to claim 3, characterized in that The step of calculating the packet error rate according to the second statistical result comprises: Add the number of times the detection packet is sent and the number of retransmissions to obtain the total number of packet transmissions; Subtract the total number of packet sending times from the number of confirmation receipts received to obtain the number of packet errors; The packet error rate is obtained by dividing the number of packet errors by the total number of packet transmissions.
6. A communication quality detection method, characterized in that: The method is applied to at least one low-power Bluetooth sub-device, comprising: Receiving detection data sent by a low-power Bluetooth gateway, wherein the detection data is sent by the low-power Bluetooth gateway in response to receiving a detection instruction and according to the detection instruction; Generate a confirmation receipt corresponding to the detection data, and send the confirmation receipt to the low-power Bluetooth gateway, so that the low-power Bluetooth gateway receives the confirmation receipt, and based on the confirmation receipt and the detection data, generates or determines the detection result corresponding to the at least one low-power Bluetooth sub-device, wherein the detection result includes the communication delay time and the packet error rate.
7. A communication quality detection device, characterized in that: The device is applied to a low-power Bluetooth gateway, comprising: A response module, configured to respond to receiving a detection instruction and send detection data to at least one low-power Bluetooth sub-device according to the detection instruction; A receiving module, configured to receive a confirmation receipt sent by the at least one low-power Bluetooth sub-device; A determination module is used to generate or determine a detection result corresponding to the at least one low-power Bluetooth sub-device based on the confirmation receipt and the detection data, wherein the detection result includes a communication delay time and a packet error rate.
8. A communication quality detection device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the communication quality detection method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the communication quality detection method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the communication quality detection method according to any one of claims 1 to 6 are implemented.